Class: AmzSpApi::ProductFeesApiModel::FeesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FeesApi

Returns a new instance of FeesApi.



16
17
18
# File 'lib/product-fees-api-model/api/fees_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-fees-api-model/api/fees_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_my_fees_estimate_for_asin(body, asin, opts = {}) ⇒ GetMyFeesEstimateResponse

Returns the estimated fees for the item indicated by the specified ASIN in the marketplace specified in the request body. You can call ‘getMyFeesEstimateForASIN` for an item on behalf of a selling partner before the selling partner sets the item’s price. The selling partner can then take estimated fees into account. Each fees request must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. Note: This identifier value is only an estimate, actual costs may vary. Search "fees" in [Seller Central](sellercentral.amazon.com/) and consult the store-specific fee schedule for the most up-to-date information. **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:

  • body
  • asin

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

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

    the optional parameters

Returns:



24
25
26
27
# File 'lib/product-fees-api-model/api/fees_api.rb', line 24

def get_my_fees_estimate_for_asin(body, asin, opts = {})
  data, _status_code, _headers = get_my_fees_estimate_for_asin_with_http_info(body, asin, opts)
  data
end

#get_my_fees_estimate_for_asin_with_http_info(body, asin, opts = {}) ⇒ Array<(GetMyFeesEstimateResponse, Integer, Hash)>

Returns the estimated fees for the item indicated by the specified ASIN in the marketplace specified in the request body. You can call &#x60;getMyFeesEstimateForASIN&#x60; for an item on behalf of a selling partner before the selling partner sets the item&#x27;s price. The selling partner can then take estimated fees into account. Each fees request must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. Note: This identifier value is only an estimate, actual costs may vary. Search &quot;fees&quot; in [Seller Central](sellercentral.amazon.com/) and consult the store-specific fee schedule for the most up-to-date information. **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:

  • body
  • asin

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

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

    the optional parameters

Returns:

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

    GetMyFeesEstimateResponse data, response status code and response headers



34
35
36
37
38
39
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
# File 'lib/product-fees-api-model/api/fees_api.rb', line 34

def get_my_fees_estimate_for_asin_with_http_info(body, asin, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimate_for_asin ...'
  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 FeesApi.get_my_fees_estimate_for_asin"
  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 FeesApi.get_my_fees_estimate_for_asin"
  end
  # resource path
  local_var_path = '/products/fees/v0/items/{Asin}/feesEstimate'.sub('{' + 'Asin' + '}', asin.to_s)

  # 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] || 'GetMyFeesEstimateResponse' 

  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: FeesApi#get_my_fees_estimate_for_asin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_my_fees_estimate_for_sku(body, seller_sku, opts = {}) ⇒ GetMyFeesEstimateResponse

Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call ‘getMyFeesEstimateForSKU` for an item on behalf of a selling partner before the selling partner sets the item’s price. The selling partner can then take any estimated fees into account. Each fees estimate request must include an original identifier. This identifier is included in the fees estimate so that you can correlate a fees estimate with the original request. Note: The identifier value is only an estimate, actual costs may vary. Search "fees" in [Seller Central](sellercentral.amazon.com/) and consult the store-specific fee schedule for the most up-to-date information. **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:

  • body
  • seller_sku

    Used to identify 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

Returns:



86
87
88
89
# File 'lib/product-fees-api-model/api/fees_api.rb', line 86

def get_my_fees_estimate_for_sku(body, seller_sku, opts = {})
  data, _status_code, _headers = get_my_fees_estimate_for_sku_with_http_info(body, seller_sku, opts)
  data
end

#get_my_fees_estimate_for_sku_with_http_info(body, seller_sku, opts = {}) ⇒ Array<(GetMyFeesEstimateResponse, Integer, Hash)>

Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call &#x60;getMyFeesEstimateForSKU&#x60; for an item on behalf of a selling partner before the selling partner sets the item&#x27;s price. The selling partner can then take any estimated fees into account. Each fees estimate request must include an original identifier. This identifier is included in the fees estimate so that you can correlate a fees estimate with the original request. Note: The identifier value is only an estimate, actual costs may vary. Search &quot;fees&quot; in [Seller Central](sellercentral.amazon.com/) and consult the store-specific fee schedule for the most up-to-date information. **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:

  • body
  • seller_sku

    Used to identify 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

Returns:

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

    GetMyFeesEstimateResponse data, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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
# File 'lib/product-fees-api-model/api/fees_api.rb', line 96

def get_my_fees_estimate_for_sku_with_http_info(body, seller_sku, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimate_for_sku ...'
  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 FeesApi.get_my_fees_estimate_for_sku"
  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 FeesApi.get_my_fees_estimate_for_sku"
  end
  # resource path
  local_var_path = '/products/fees/v0/listings/{SellerSKU}/feesEstimate'.sub('{' + 'SellerSKU' + '}', seller_sku.to_s)

  # 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] || 'GetMyFeesEstimateResponse' 

  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: FeesApi#get_my_fees_estimate_for_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_my_fees_estimates(body, opts = {}) ⇒ GetMyFeesEstimatesResponse

Returns the estimated fees for a list of products. **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:



147
148
149
150
# File 'lib/product-fees-api-model/api/fees_api.rb', line 147

def get_my_fees_estimates(body, opts = {})
  data, _status_code, _headers = get_my_fees_estimates_with_http_info(body, opts)
  data
end

#get_my_fees_estimates_with_http_info(body, opts = {}) ⇒ Array<(GetMyFeesEstimatesResponse, Integer, Hash)>

Returns the estimated fees for a list of products. **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<(GetMyFeesEstimatesResponse, Integer, Hash)>)

    GetMyFeesEstimatesResponse data, response status code and response headers



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/product-fees-api-model/api/fees_api.rb', line 156

def get_my_fees_estimates_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimates ...'
  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 FeesApi.get_my_fees_estimates"
  end
  # resource path
  local_var_path = '/products/fees/v0/feesEstimate'

  # 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] || 'GetMyFeesEstimatesResponse' 

  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: FeesApi#get_my_fees_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end