/// <summary>
        /// Cross-Border Quotes This operation provides an estimate of the duties, taxes, and transportation costs for the items in a buyer&#39;s online shopping basket. The API calculates how many separate parcels are required to ship the items and estimates costs. The API checks each item&#39;s eligibility to clear customs and returns the quote for eligible items. To look for futher info please look into [Cross-Border Quotes](https://shipping.pitneybowes.com/api/post-quotes.html#)
        /// </summary>
        /// <exception cref="shippingapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="crossBorderQuotesRequest"></param>
        /// <param name="xPBUnifiedErrorStructure">Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs. (optional, default to true)</param>
        /// <returns>Task of CrossBorderQuotesResponse</returns>
        public async System.Threading.Tasks.Task <CrossBorderQuotesResponse> GetCrossBorderQuotesAsync(CrossBorderQuotesRequest crossBorderQuotesRequest, bool?xPBUnifiedErrorStructure = default(bool?))
        {
            ApiResponse <CrossBorderQuotesResponse> localVarResponse = await GetCrossBorderQuotesAsyncWithHttpInfo(crossBorderQuotesRequest, xPBUnifiedErrorStructure);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Cross-Border Quotes This operation provides an estimate of the duties, taxes, and transportation costs for the items in a buyer&#39;s online shopping basket. The API calculates how many separate parcels are required to ship the items and estimates costs. The API checks each item&#39;s eligibility to clear customs and returns the quote for eligible items. To look for futher info please look into [Cross-Border Quotes](https://shipping.pitneybowes.com/api/post-quotes.html#)
        /// </summary>
        /// <exception cref="shippingapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="crossBorderQuotesRequest"></param>
        /// <param name="xPBUnifiedErrorStructure">Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs. (optional, default to true)</param>
        /// <returns>Task of ApiResponse (CrossBorderQuotesResponse)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <CrossBorderQuotesResponse> > GetCrossBorderQuotesAsyncWithHttpInfo(CrossBorderQuotesRequest crossBorderQuotesRequest, bool?xPBUnifiedErrorStructure = default(bool?))
        {
            // verify the required parameter 'crossBorderQuotesRequest' is set
            if (crossBorderQuotesRequest == null)
            {
                throw new ApiException(400, "Missing required parameter 'crossBorderQuotesRequest' when calling CrossBorderQuotesApi->GetCrossBorderQuotes");
            }

            var    localVarPath         = "/v1/crossborder/checkout/quotes";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (xPBUnifiedErrorStructure != null)
            {
                localVarHeaderParams.Add("X-PB-UnifiedErrorStructure", this.Configuration.ApiClient.ParameterToString(xPBUnifiedErrorStructure));                                   // header parameter
            }
            if (crossBorderQuotesRequest != null && crossBorderQuotesRequest.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(crossBorderQuotesRequest); // http body (model) parameter
            }
            else
            {
                localVarPostBody = crossBorderQuotesRequest; // byte array
            }

            // authentication (oAuth2ClientCredentials) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetCrossBorderQuotes", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <CrossBorderQuotesResponse>(localVarStatusCode,
                                                               localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                                               (CrossBorderQuotesResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CrossBorderQuotesResponse))));
        }
        /// <summary>
        /// Cross-Border Quotes This operation provides an estimate of the duties, taxes, and transportation costs for the items in a buyer&#39;s online shopping basket. The API calculates how many separate parcels are required to ship the items and estimates costs. The API checks each item&#39;s eligibility to clear customs and returns the quote for eligible items. To look for futher info please look into [Cross-Border Quotes](https://shipping.pitneybowes.com/api/post-quotes.html#)
        /// </summary>
        /// <exception cref="shippingapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="crossBorderQuotesRequest"></param>
        /// <param name="xPBUnifiedErrorStructure">Set this to true to use the standard [error object](https://shipping.pitneybowes.com/reference/error-object.html#standard-error-object) if an error occurs. (optional, default to true)</param>
        /// <returns>CrossBorderQuotesResponse</returns>
        public CrossBorderQuotesResponse GetCrossBorderQuotes(CrossBorderQuotesRequest crossBorderQuotesRequest, bool?xPBUnifiedErrorStructure = default(bool?))
        {
            ApiResponse <CrossBorderQuotesResponse> localVarResponse = GetCrossBorderQuotesWithHttpInfo(crossBorderQuotesRequest, xPBUnifiedErrorStructure);

            return(localVarResponse.Data);
        }