Class: AmzSpApi::ProductPricingApiModel::ProductPricingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/product-pricing-api-model/api/product_pricing_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProductPricingApi

Returns a new instance of ProductPricingApi.



16
17
18
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_competitive_pricing(marketplace_id, item_type, opts = {}) ⇒ GetPricingResponse

Returns competitive pricing information for a seller’s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 1 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_type

    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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asins (Array<String>)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.

  • :skus (Array<String>)

    A list of up to twenty seller SKU values used to identify items in the given marketplace.

  • :customer_type (String)

    Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.

Returns:



27
28
29
30
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 27

def get_competitive_pricing(marketplace_id, item_type, opts = {})
  data, _status_code, _headers = get_competitive_pricing_with_http_info(marketplace_id, item_type, opts)
  data
end

#get_competitive_pricing_with_http_info(marketplace_id, item_type, opts = {}) ⇒ Array<(GetPricingResponse, Integer, Hash)>

Returns competitive pricing information for a seller&#x27;s offer listings based on seller SKU or 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_type

    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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asins (Array<String>)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.

  • :skus (Array<String>)

    A list of up to twenty seller SKU values used to identify items in the given marketplace.

  • :customer_type (String)

    Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.

Returns:

  • (Array<(GetPricingResponse, Integer, Hash)>)

    GetPricingResponse data, response status code and response headers



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 40

def get_competitive_pricing_with_http_info(marketplace_id, item_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_competitive_pricing ...'
  end
  # verify the required parameter 'marketplace_id' is set
  if @api_client.config.client_side_validation && marketplace_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_id' when calling ProductPricingApi.get_competitive_pricing"
  end
  # verify the required parameter 'item_type' is set
  if @api_client.config.client_side_validation && item_type.nil?
    fail ArgumentError, "Missing the required parameter 'item_type' when calling ProductPricingApi.get_competitive_pricing"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['Asin', 'Sku'].include?(item_type)
    fail ArgumentError, "invalid value for 'item_type', must be one of Asin, Sku"
  end
  if @api_client.config.client_side_validation && opts[:'customer_type'] && !['Consumer', 'Business'].include?(opts[:'customer_type'])
    fail ArgumentError, 'invalid value for "customer_type", must be one of Consumer, Business'
  end
  # resource path
  local_var_path = '/products/pricing/v0/competitivePrice'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MarketplaceId'] = marketplace_id
  query_params[:'ItemType'] = item_type
  query_params[:'Asins'] = @api_client.build_collection_param(opts[:'asins'], :csv) if !opts[:'asins'].nil?
  query_params[:'Skus'] = @api_client.build_collection_param(opts[:'skus'], :csv) if !opts[:'skus'].nil?
  query_params[:'CustomerType'] = opts[:'customer_type'] if !opts[:'customer_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetPricingResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_competitive_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_item_offers(marketplace_id, item_condition, asin, opts = {}) ⇒ GetOffersResponse

Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 1 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_condition

    Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • asin

    The Amazon Standard Identification Number (ASIN) of the item.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :customer_type (String)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

Returns:



104
105
106
107
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 104

def get_item_offers(marketplace_id, item_condition, asin, opts = {})
  data, _status_code, _headers = get_item_offers_with_http_info(marketplace_id, item_condition, asin, opts)
  data
end

#get_item_offers_batch(body, opts = {}) ⇒ GetItemOffersBatchResponse

Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 1 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



179
180
181
182
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 179

def get_item_offers_batch(body, opts = {})
  data, _status_code, _headers = get_item_offers_batch_with_http_info(body, opts)
  data
end

#get_item_offers_batch_with_http_info(body, opts = {}) ⇒ Array<(GetItemOffersBatchResponse, Integer, Hash)>

Returns the lowest priced offers for a batch of items 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).

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetItemOffersBatchResponse, Integer, Hash)>)

    GetItemOffersBatchResponse data, response status code and response headers



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 188

def get_item_offers_batch_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_item_offers_batch ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ProductPricingApi.get_item_offers_batch"
  end
  # resource path
  local_var_path = '/batches/products/pricing/v0/itemOffers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'GetItemOffersBatchResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_item_offers_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_item_offers_with_http_info(marketplace_id, item_condition, asin, opts = {}) ⇒ Array<(GetOffersResponse, Integer, Hash)>

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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_condition

    Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • asin

    The Amazon Standard Identification Number (ASIN) of the item.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :customer_type (String)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

Returns:

  • (Array<(GetOffersResponse, Integer, Hash)>)

    GetOffersResponse data, response status code and response headers



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 116

def get_item_offers_with_http_info(marketplace_id, item_condition, asin, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_item_offers ...'
  end
  # verify the required parameter 'marketplace_id' is set
  if @api_client.config.client_side_validation && marketplace_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_id' when calling ProductPricingApi.get_item_offers"
  end
  # verify the required parameter 'item_condition' is set
  if @api_client.config.client_side_validation && item_condition.nil?
    fail ArgumentError, "Missing the required parameter 'item_condition' when calling ProductPricingApi.get_item_offers"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['New', 'Used', 'Collectible', 'Refurbished', 'Club'].include?(item_condition)
    fail ArgumentError, "invalid value for 'item_condition', must be one of New, Used, Collectible, Refurbished, Club"
  end
  # verify the required parameter 'asin' is set
  if @api_client.config.client_side_validation && asin.nil?
    fail ArgumentError, "Missing the required parameter 'asin' when calling ProductPricingApi.get_item_offers"
  end
  if @api_client.config.client_side_validation && opts[:'customer_type'] && !['Consumer', 'Business'].include?(opts[:'customer_type'])
    fail ArgumentError, 'invalid value for "customer_type", must be one of Consumer, Business'
  end
  # resource path
  local_var_path = '/products/pricing/v0/items/{Asin}/offers'.sub('{' + 'Asin' + '}', asin.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MarketplaceId'] = marketplace_id
  query_params[:'ItemCondition'] = item_condition
  query_params[:'CustomerType'] = opts[:'customer_type'] if !opts[:'customer_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetOffersResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_item_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_listing_offers(marketplace_id, item_condition, seller_sku, opts = {}) ⇒ GetOffersResponse

Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 2 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_condition

    Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • seller_sku

    Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#x27;s SellerId, which is included with every operation that you submit.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :customer_type (String)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

Returns:



238
239
240
241
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 238

def get_listing_offers(marketplace_id, item_condition, seller_sku, opts = {})
  data, _status_code, _headers = get_listing_offers_with_http_info(marketplace_id, item_condition, seller_sku, opts)
  data
end

#get_listing_offers_batch(body, opts = {}) ⇒ GetListingOffersBatchResponse

Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 1 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



313
314
315
316
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 313

def get_listing_offers_batch(body, opts = {})
  data, _status_code, _headers = get_listing_offers_batch_with_http_info(body, opts)
  data
end

#get_listing_offers_batch_with_http_info(body, opts = {}) ⇒ Array<(GetListingOffersBatchResponse, Integer, Hash)>

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).

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 322

def get_listing_offers_batch_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_listing_offers_batch ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling ProductPricingApi.get_listing_offers_batch"
  end
  # resource path
  local_var_path = '/batches/products/pricing/v0/listingOffers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'GetListingOffersBatchResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_listing_offers_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_listing_offers_with_http_info(marketplace_id, item_condition, seller_sku, opts = {}) ⇒ Array<(GetOffersResponse, Integer, Hash)>

Returns the lowest priced offers for a single SKU listing. **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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_condition

    Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • seller_sku

    Identifies an item in the given marketplace. SellerSKU is qualified by the seller&#x27;s SellerId, which is included with every operation that you submit.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :customer_type (String)

    Indicates whether to request Consumer or Business offers. Default is Consumer.

Returns:

  • (Array<(GetOffersResponse, Integer, Hash)>)

    GetOffersResponse data, response status code and response headers



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 250

def get_listing_offers_with_http_info(marketplace_id, item_condition, seller_sku, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_listing_offers ...'
  end
  # verify the required parameter 'marketplace_id' is set
  if @api_client.config.client_side_validation && marketplace_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_id' when calling ProductPricingApi.get_listing_offers"
  end
  # verify the required parameter 'item_condition' is set
  if @api_client.config.client_side_validation && item_condition.nil?
    fail ArgumentError, "Missing the required parameter 'item_condition' when calling ProductPricingApi.get_listing_offers"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['New', 'Used', 'Collectible', 'Refurbished', 'Club'].include?(item_condition)
    fail ArgumentError, "invalid value for 'item_condition', must be one of New, Used, Collectible, Refurbished, Club"
  end
  # verify the required parameter 'seller_sku' is set
  if @api_client.config.client_side_validation && seller_sku.nil?
    fail ArgumentError, "Missing the required parameter 'seller_sku' when calling ProductPricingApi.get_listing_offers"
  end
  if @api_client.config.client_side_validation && opts[:'customer_type'] && !['Consumer', 'Business'].include?(opts[:'customer_type'])
    fail ArgumentError, 'invalid value for "customer_type", must be one of Consumer, Business'
  end
  # resource path
  local_var_path = '/products/pricing/v0/listings/{SellerSKU}/offers'.sub('{' + 'SellerSKU' + '}', seller_sku.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MarketplaceId'] = marketplace_id
  query_params[:'ItemCondition'] = item_condition
  query_params[:'CustomerType'] = opts[:'customer_type'] if !opts[:'customer_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetOffersResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_listing_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_pricing(marketplace_id, item_type, opts = {}) ⇒ GetPricingResponse

Returns pricing information for a seller’s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 1 | The ‘x-amzn-RateLimit-Limit` 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_type

    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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asins (Array<String>)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.

  • :skus (Array<String>)

    A list of up to twenty seller SKU values used to identify items in the given marketplace.

  • :item_condition (String)

    Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • :offer_type (String)

    Indicates whether to request pricing information for the seller&#x27;s B2C or B2B offers. Default is B2C.

Returns:



374
375
376
377
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 374

def get_pricing(marketplace_id, item_type, opts = {})
  data, _status_code, _headers = get_pricing_with_http_info(marketplace_id, item_type, opts)
  data
end

#get_pricing_with_http_info(marketplace_id, item_type, opts = {}) ⇒ Array<(GetPricingResponse, Integer, Hash)>

Returns pricing information for a seller&#x27;s offer listings based on seller SKU or 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).

Parameters:

  • marketplace_id

    A marketplace identifier. Specifies the marketplace for which prices are returned.

  • item_type

    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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asins (Array<String>)

    A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.

  • :skus (Array<String>)

    A list of up to twenty seller SKU values used to identify items in the given marketplace.

  • :item_condition (String)

    Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.

  • :offer_type (String)

    Indicates whether to request pricing information for the seller&#x27;s B2C or B2B offers. Default is B2C.

Returns:

  • (Array<(GetPricingResponse, Integer, Hash)>)

    GetPricingResponse data, response status code and response headers



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/product-pricing-api-model/api/product_pricing_api.rb', line 388

def get_pricing_with_http_info(marketplace_id, item_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProductPricingApi.get_pricing ...'
  end
  # verify the required parameter 'marketplace_id' is set
  if @api_client.config.client_side_validation && marketplace_id.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_id' when calling ProductPricingApi.get_pricing"
  end
  # verify the required parameter 'item_type' is set
  if @api_client.config.client_side_validation && item_type.nil?
    fail ArgumentError, "Missing the required parameter 'item_type' when calling ProductPricingApi.get_pricing"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['Asin', 'Sku'].include?(item_type)
    fail ArgumentError, "invalid value for 'item_type', must be one of Asin, Sku"
  end
  if @api_client.config.client_side_validation && opts[:'item_condition'] && !['New', 'Used', 'Collectible', 'Refurbished', 'Club'].include?(opts[:'item_condition'])
    fail ArgumentError, 'invalid value for "item_condition", must be one of New, Used, Collectible, Refurbished, Club'
  end
  if @api_client.config.client_side_validation && opts[:'offer_type'] && !['B2C', 'B2B'].include?(opts[:'offer_type'])
    fail ArgumentError, 'invalid value for "offer_type", must be one of B2C, B2B'
  end
  # resource path
  local_var_path = '/products/pricing/v0/price'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MarketplaceId'] = marketplace_id
  query_params[:'ItemType'] = item_type
  query_params[:'Asins'] = @api_client.build_collection_param(opts[:'asins'], :csv) if !opts[:'asins'].nil?
  query_params[:'Skus'] = @api_client.build_collection_param(opts[:'skus'], :csv) if !opts[:'skus'].nil?
  query_params[:'ItemCondition'] = opts[:'item_condition'] if !opts[:'item_condition'].nil?
  query_params[:'OfferType'] = opts[:'offer_type'] if !opts[:'offer_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetPricingResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProductPricingApi#get_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end