content: /*
   * Selling Partner API for Pricing
   * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
   *
   * OpenAPI spec version: v0
   * 
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   * Do not edit the class manually.
   */
  
  
  package io.swagger.client.api;
  
  import io.swagger.client.ApiCallback;
  import io.swagger.client.ApiClient;
  import io.swagger.client.ApiException;
  import io.swagger.client.ApiResponse;
  import io.swagger.client.Configuration;
  import io.swagger.client.Pair;
  import io.swagger.client.ProgressRequestBody;
  import io.swagger.client.ProgressResponseBody;
  import io.swagger.client.StringUtil;
  
  import com.google.gson.reflect.TypeToken;
  
  import java.io.IOException;
  
  
  import io.swagger.client.model.pricing.GetItemOffersBatchRequest;
  import io.swagger.client.model.pricing.GetItemOffersBatchResponse;
  import io.swagger.client.model.pricing.GetListingOffersBatchRequest;
  import io.swagger.client.model.pricing.GetListingOffersBatchResponse;
  import io.swagger.client.model.pricing.GetOffersResponse;
  import io.swagger.client.model.pricing.GetPricingResponse;
  
  import java.lang.reflect.Type;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  
  import com.amazon.SellingPartnerAPIAA.LWAAccessTokenCache;
  import com.amazon.SellingPartnerAPIAA.LWAAccessTokenCacheImpl;
  import com.amazon.SellingPartnerAPIAA.LWAAuthorizationCredentials;
  import com.amazon.SellingPartnerAPIAA.LWAAuthorizationSigner;
  import com.amazon.SellingPartnerAPIAA.RateLimitConfiguration;
  import com.amazon.SellingPartnerAPIAA.LWAException;
  
  public class ProductPricingApi {
      private ApiClient apiClient;
  
      ProductPricingApi() {
          this(Configuration.getDefaultApiClient());
      }
  
      public ProductPricingApi(ApiClient apiClient) {
          this.apiClient = apiClient;
      }
  
      public ApiClient getApiClient() {
          return apiClient;
      }
  
      public void setApiClient(ApiClient apiClient) {
          this.apiClient = apiClient;
      }
  
      /**
       * Build call for getCompetitivePricing
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param customerType Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. (optional)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getCompetitivePricingCall(String marketplaceId, String itemType, List<String> asins, List<String> skus, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = null;
  
          // create path and map variables
          String localVarPath = "/products/pricing/v0/competitivePrice";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          if (marketplaceId != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("MarketplaceId", marketplaceId));
          if (asins != null)
          localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "Asins", asins));
          if (skus != null)
          localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "Skus", skus));
          if (itemType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("ItemType", itemType));
          if (customerType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("CustomerType", customerType));
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getCompetitivePricingValidateBeforeCall(String marketplaceId, String itemType, List<String> asins, List<String> skus, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'marketplaceId' is set
          if (marketplaceId == null) {
              throw new ApiException("Missing the required parameter 'marketplaceId' when calling getCompetitivePricing(Async)");
          }
          
          // verify the required parameter 'itemType' is set
          if (itemType == null) {
              throw new ApiException("Missing the required parameter 'itemType' when calling getCompetitivePricing(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getCompetitivePricingCall(marketplaceId, itemType, asins, skus, customerType, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns competitive pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param customerType Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. (optional)
       * @return GetPricingResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetPricingResponse getCompetitivePricing(String marketplaceId, String itemType, List<String> asins, List<String> skus, String customerType) throws ApiException,LWAException {
          ApiResponse<GetPricingResponse> resp = getCompetitivePricingWithHttpInfo(marketplaceId, itemType, asins, skus, customerType);
          return resp.getData();
      }
  
      /**
       * 
       * Returns competitive pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param customerType Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. (optional)
       * @return ApiResponse&lt;GetPricingResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetPricingResponse> getCompetitivePricingWithHttpInfo(String marketplaceId, String itemType, List<String> asins, List<String> skus, String customerType) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getCompetitivePricingValidateBeforeCall(marketplaceId, itemType, asins, skus, customerType, null, null);
          Type localVarReturnType = new TypeToken<GetPricingResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns competitive pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param customerType Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer. (optional)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getCompetitivePricingAsync(String marketplaceId, String itemType, List<String> asins, List<String> skus, String customerType, final ApiCallback<GetPricingResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getCompetitivePricingValidateBeforeCall(marketplaceId, itemType, asins, skus, customerType, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetPricingResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
      /**
       * Build call for getItemOffers
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param asin The Amazon Standard Identification Number (ASIN) of the item. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getItemOffersCall(String marketplaceId, String itemCondition, String asin, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = null;
  
          // create path and map variables
          String localVarPath = "/products/pricing/v0/items/{Asin}/offers"
              .replaceAll("\\{" + "Asin" + "\\}", apiClient.escapeString(asin.toString()));
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          if (marketplaceId != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("MarketplaceId", marketplaceId));
          if (itemCondition != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("ItemCondition", itemCondition));
          if (customerType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("CustomerType", customerType));
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getItemOffersValidateBeforeCall(String marketplaceId, String itemCondition, String asin, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'marketplaceId' is set
          if (marketplaceId == null) {
              throw new ApiException("Missing the required parameter 'marketplaceId' when calling getItemOffers(Async)");
          }
          
          // verify the required parameter 'itemCondition' is set
          if (itemCondition == null) {
              throw new ApiException("Missing the required parameter 'itemCondition' when calling getItemOffers(Async)");
          }
          
          // verify the required parameter 'asin' is set
          if (asin == null) {
              throw new ApiException("Missing the required parameter 'asin' when calling getItemOffers(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getItemOffersCall(marketplaceId, itemCondition, asin, customerType, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns the lowest priced offers for a single item based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param asin The Amazon Standard Identification Number (ASIN) of the item. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @return GetOffersResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetOffersResponse getItemOffers(String marketplaceId, String itemCondition, String asin, String customerType) throws ApiException,LWAException {
          ApiResponse<GetOffersResponse> resp = getItemOffersWithHttpInfo(marketplaceId, itemCondition, asin, customerType);
          return resp.getData();
      }
  
      /**
       * 
       * Returns the lowest priced offers for a single item based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param asin The Amazon Standard Identification Number (ASIN) of the item. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @return ApiResponse&lt;GetOffersResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetOffersResponse> getItemOffersWithHttpInfo(String marketplaceId, String itemCondition, String asin, String customerType) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getItemOffersValidateBeforeCall(marketplaceId, itemCondition, asin, customerType, null, null);
          Type localVarReturnType = new TypeToken<GetOffersResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns the lowest priced offers for a single item based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param asin The Amazon Standard Identification Number (ASIN) of the item. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getItemOffersAsync(String marketplaceId, String itemCondition, String asin, String customerType, final ApiCallback<GetOffersResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getItemOffersValidateBeforeCall(marketplaceId, itemCondition, asin, customerType, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetOffersResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
      /**
       * Build call for getItemOffersBatch
       * @param getItemOffersBatchRequestBody  (required)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getItemOffersBatchCall(GetItemOffersBatchRequest getItemOffersBatchRequestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = getItemOffersBatchRequestBody;
  
          // create path and map variables
          String localVarPath = "/batches/products/pricing/v0/itemOffers";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getItemOffersBatchValidateBeforeCall(GetItemOffersBatchRequest getItemOffersBatchRequestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'getItemOffersBatchRequestBody' is set
          if (getItemOffersBatchRequestBody == null) {
              throw new ApiException("Missing the required parameter 'getItemOffersBatchRequestBody' when calling getItemOffersBatch(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getItemOffersBatchCall(getItemOffersBatchRequestBody, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns the lowest priced offers for a batch of items based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
       * @param getItemOffersBatchRequestBody  (required)
       * @return GetItemOffersBatchResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetItemOffersBatchResponse getItemOffersBatch(GetItemOffersBatchRequest getItemOffersBatchRequestBody) throws ApiException,LWAException {
          ApiResponse<GetItemOffersBatchResponse> resp = getItemOffersBatchWithHttpInfo(getItemOffersBatchRequestBody);
          return resp.getData();
      }
  
      /**
       * 
       * Returns the lowest priced offers for a batch of items based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
       * @param getItemOffersBatchRequestBody  (required)
       * @return ApiResponse&lt;GetItemOffersBatchResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetItemOffersBatchResponse> getItemOffersBatchWithHttpInfo(GetItemOffersBatchRequest getItemOffersBatchRequestBody) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getItemOffersBatchValidateBeforeCall(getItemOffersBatchRequestBody, null, null);
          Type localVarReturnType = new TypeToken<GetItemOffersBatchResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns the lowest priced offers for a batch of items based on ASIN.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
       * @param getItemOffersBatchRequestBody  (required)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getItemOffersBatchAsync(GetItemOffersBatchRequest getItemOffersBatchRequestBody, final ApiCallback<GetItemOffersBatchResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getItemOffersBatchValidateBeforeCall(getItemOffersBatchRequestBody, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetItemOffersBatchResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
      /**
       * Build call for getListingOffers
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#39;s SellerId, which is included with every operation that you submit. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getListingOffersCall(String marketplaceId, String itemCondition, String sellerSKU, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = null;
  
          // create path and map variables
          String localVarPath = "/products/pricing/v0/listings/{SellerSKU}/offers"
              .replaceAll("\\{" + "SellerSKU" + "\\}", apiClient.escapeString(sellerSKU.toString()));
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          if (marketplaceId != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("MarketplaceId", marketplaceId));
          if (itemCondition != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("ItemCondition", itemCondition));
          if (customerType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("CustomerType", customerType));
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getListingOffersValidateBeforeCall(String marketplaceId, String itemCondition, String sellerSKU, String customerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'marketplaceId' is set
          if (marketplaceId == null) {
              throw new ApiException("Missing the required parameter 'marketplaceId' when calling getListingOffers(Async)");
          }
          
          // verify the required parameter 'itemCondition' is set
          if (itemCondition == null) {
              throw new ApiException("Missing the required parameter 'itemCondition' when calling getListingOffers(Async)");
          }
          
          // verify the required parameter 'sellerSKU' is set
          if (sellerSKU == null) {
              throw new ApiException("Missing the required parameter 'sellerSKU' when calling getListingOffers(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getListingOffersCall(marketplaceId, itemCondition, sellerSKU, customerType, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns the lowest priced offers for a single SKU listing.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#39;s SellerId, which is included with every operation that you submit. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @return GetOffersResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetOffersResponse getListingOffers(String marketplaceId, String itemCondition, String sellerSKU, String customerType) throws ApiException,LWAException {
          ApiResponse<GetOffersResponse> resp = getListingOffersWithHttpInfo(marketplaceId, itemCondition, sellerSKU, customerType);
          return resp.getData();
      }
  
      /**
       * 
       * Returns the lowest priced offers for a single SKU listing.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#39;s SellerId, which is included with every operation that you submit. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @return ApiResponse&lt;GetOffersResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetOffersResponse> getListingOffersWithHttpInfo(String marketplaceId, String itemCondition, String sellerSKU, String customerType) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getListingOffersValidateBeforeCall(marketplaceId, itemCondition, sellerSKU, customerType, null, null);
          Type localVarReturnType = new TypeToken<GetOffersResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns the lowest priced offers for a single SKU listing.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (required)
       * @param sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#39;s SellerId, which is included with every operation that you submit. (required)
       * @param customerType Indicates whether to request Consumer or Business offers. Default is Consumer. (optional)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getListingOffersAsync(String marketplaceId, String itemCondition, String sellerSKU, String customerType, final ApiCallback<GetOffersResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getListingOffersValidateBeforeCall(marketplaceId, itemCondition, sellerSKU, customerType, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetOffersResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
      /**
       * Build call for getListingOffersBatch
       * @param getListingOffersBatchRequestBody  (required)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getListingOffersBatchCall(GetListingOffersBatchRequest getListingOffersBatchRequestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = getListingOffersBatchRequestBody;
  
          // create path and map variables
          String localVarPath = "/batches/products/pricing/v0/listingOffers";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getListingOffersBatchValidateBeforeCall(GetListingOffersBatchRequest getListingOffersBatchRequestBody, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'getListingOffersBatchRequestBody' is set
          if (getListingOffersBatchRequestBody == null) {
              throw new ApiException("Missing the required parameter 'getListingOffersBatchRequestBody' when calling getListingOffersBatch(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getListingOffersBatchCall(getListingOffersBatchRequestBody, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns the lowest priced offers for a batch of listings by SKU.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param getListingOffersBatchRequestBody  (required)
       * @return GetListingOffersBatchResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetListingOffersBatchResponse getListingOffersBatch(GetListingOffersBatchRequest getListingOffersBatchRequestBody) throws ApiException,LWAException {
          ApiResponse<GetListingOffersBatchResponse> resp = getListingOffersBatchWithHttpInfo(getListingOffersBatchRequestBody);
          return resp.getData();
      }
  
      /**
       * 
       * Returns the lowest priced offers for a batch of listings by SKU.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param getListingOffersBatchRequestBody  (required)
       * @return ApiResponse&lt;GetListingOffersBatchResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetListingOffersBatchResponse> getListingOffersBatchWithHttpInfo(GetListingOffersBatchRequest getListingOffersBatchRequestBody) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getListingOffersBatchValidateBeforeCall(getListingOffersBatchRequestBody, null, null);
          Type localVarReturnType = new TypeToken<GetListingOffersBatchResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns the lowest priced offers for a batch of listings by SKU.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param getListingOffersBatchRequestBody  (required)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getListingOffersBatchAsync(GetListingOffersBatchRequest getListingOffersBatchRequestBody, final ApiCallback<GetListingOffersBatchResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getListingOffersBatchValidateBeforeCall(getListingOffersBatchRequestBody, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetListingOffersBatchResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
      /**
       * Build call for getPricing
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)
       * @param offerType Indicates whether to request pricing information for the seller&#39;s B2C or B2B offers. Default is B2C. (optional)
       * @param progressListener Progress listener
       * @param progressRequestListener Progress request listener
       * @return Call to execute
       * @throws ApiException If fail to serialize the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getPricingCall(String marketplaceId, String itemType, List<String> asins, List<String> skus, String itemCondition, String offerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          Object localVarPostBody = null;
  
          // create path and map variables
          String localVarPath = "/products/pricing/v0/price";
  
          List<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          if (marketplaceId != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("MarketplaceId", marketplaceId));
          if (asins != null)
          localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "Asins", asins));
          if (skus != null)
          localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "Skus", skus));
          if (itemType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("ItemType", itemType));
          if (itemCondition != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("ItemCondition", itemCondition));
          if (offerType != null)
          localVarQueryParams.addAll(apiClient.parameterToPair("OfferType", offerType));
  
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
  
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          final String[] localVarAccepts = {
              "application/json"
          };
          final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
          if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
  
          final String[] localVarContentTypes = {
              "application/json"
          };
          final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
          localVarHeaderParams.put("Content-Type", localVarContentType);
  
          if(progressListener != null) {
              apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                  @Override
                  public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
                      com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                      return originalResponse.newBuilder()
                      .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                      .build();
                  }
              });
          }
  
          String[] localVarAuthNames = new String[] {  };
          return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
      }
  
      @SuppressWarnings("rawtypes")
      private com.squareup.okhttp.Call getPricingValidateBeforeCall(String marketplaceId, String itemType, List<String> asins, List<String> skus, String itemCondition, String offerType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException {
          
          // verify the required parameter 'marketplaceId' is set
          if (marketplaceId == null) {
              throw new ApiException("Missing the required parameter 'marketplaceId' when calling getPricing(Async)");
          }
          
          // verify the required parameter 'itemType' is set
          if (itemType == null) {
              throw new ApiException("Missing the required parameter 'itemType' when calling getPricing(Async)");
          }
          
  
          com.squareup.okhttp.Call call = getPricingCall(marketplaceId, itemType, asins, skus, itemCondition, offerType, progressListener, progressRequestListener);
          return call;
  
      }
  
      /**
       * 
       * Returns pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)
       * @param offerType Indicates whether to request pricing information for the seller&#39;s B2C or B2B offers. Default is B2C. (optional)
       * @return GetPricingResponse
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public GetPricingResponse getPricing(String marketplaceId, String itemType, List<String> asins, List<String> skus, String itemCondition, String offerType) throws ApiException,LWAException {
          ApiResponse<GetPricingResponse> resp = getPricingWithHttpInfo(marketplaceId, itemType, asins, skus, itemCondition, offerType);
          return resp.getData();
      }
  
      /**
       * 
       * Returns pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)
       * @param offerType Indicates whether to request pricing information for the seller&#39;s B2C or B2B offers. Default is B2C. (optional)
       * @return ApiResponse&lt;GetPricingResponse&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public ApiResponse<GetPricingResponse> getPricingWithHttpInfo(String marketplaceId, String itemType, List<String> asins, List<String> skus, String itemCondition, String offerType) throws ApiException,LWAException {
          com.squareup.okhttp.Call call = getPricingValidateBeforeCall(marketplaceId, itemType, asins, skus, itemCondition, offerType, null, null);
          Type localVarReturnType = new TypeToken<GetPricingResponse>(){}.getType();
          return apiClient.execute(call, localVarReturnType);
      }
  
      /**
       *  (asynchronously)
       * Returns pricing information for a seller&#39;s offer listings based on seller SKU or ASIN.  **Note:** The parameters associated with this operation may contain special characters that require URL encoding to call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding).  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
       * @param marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned. (required)
       * @param itemType Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. (required)
       * @param asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)
       * @param skus A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)
       * @param itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)
       * @param offerType Indicates whether to request pricing information for the seller&#39;s B2C or B2B offers. Default is B2C. (optional)
       * @param callback The callback to be executed when the API call finishes
       * @return The request call
       * @throws ApiException If fail to process the API call, e.g. serializing the request body object
       * @throws LWAException If calls to fetch LWA access token fails
       */
      public com.squareup.okhttp.Call getPricingAsync(String marketplaceId, String itemType, List<String> asins, List<String> skus, String itemCondition, String offerType, final ApiCallback<GetPricingResponse> callback) throws ApiException, LWAException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getPricingValidateBeforeCall(marketplaceId, itemType, asins, skus, itemCondition, offerType, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<GetPricingResponse>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
  
      public static class Builder {
          private LWAAuthorizationCredentials lwaAuthorizationCredentials;
          private String endpoint;
          private LWAAccessTokenCache lwaAccessTokenCache;
          private Boolean disableAccessTokenCache = false;
          private RateLimitConfiguration rateLimitConfiguration;
  
  
          public Builder lwaAuthorizationCredentials(LWAAuthorizationCredentials lwaAuthorizationCredentials) {
              this.lwaAuthorizationCredentials = lwaAuthorizationCredentials;
              return this;
          }
  
          public Builder endpoint(String endpoint) {
              this.endpoint = endpoint;
              return this;
          }
          
          public Builder lwaAccessTokenCache(LWAAccessTokenCache lwaAccessTokenCache) {
              this.lwaAccessTokenCache = lwaAccessTokenCache;
              return this;
          }
  		
  	   public Builder disableAccessTokenCache() {
              this.disableAccessTokenCache = true;
              return this;
          }
  
          public Builder rateLimitConfigurationOnRequests(RateLimitConfiguration rateLimitConfiguration){
              this.rateLimitConfiguration = rateLimitConfiguration;
              return this;
          }
          
          public Builder disableRateLimitOnRequests() {
              this.rateLimitConfiguration = null;
              return this;
          }
  
          public ProductPricingApi build() {
              if (lwaAuthorizationCredentials == null) {
                  throw new RuntimeException("LWAAuthorizationCredentials not set");
              }
  
              if (StringUtil.isEmpty(endpoint)) {
                  throw new RuntimeException("Endpoint not set");
              }
              
              LWAAuthorizationSigner lwaAuthorizationSigner = null;            
              if (disableAccessTokenCache) {
                  lwaAuthorizationSigner = new LWAAuthorizationSigner(lwaAuthorizationCredentials);
              }
              else {
                  if (lwaAccessTokenCache == null) {
                      lwaAccessTokenCache = new LWAAccessTokenCacheImpl();                  
                   }
                   lwaAuthorizationSigner = new LWAAuthorizationSigner(lwaAuthorizationCredentials,lwaAccessTokenCache);
              }
  
              return new ProductPricingApi(new ApiClient()
                  .setLWAAuthorizationSigner(lwaAuthorizationSigner)
                  .setBasePath(endpoint)
                  .setRateLimiter(rateLimitConfiguration));
          }
      }
  }
  