Class: AmznSpApi::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.



14
15
16
# File 'lib/product_fees_api_model/api/fees_api.rb', line 14

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



12
13
14
# File 'lib/product_fees_api_model/api/fees_api.rb', line 12

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:



23
24
25
26
# File 'lib/product_fees_api_model/api/fees_api.rb', line 23

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

Raises:

  • (ArgumentError)


33
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
# File 'lib/product_fees_api_model/api/fees_api.rb', line 33

def get_my_fees_estimate_for_asin_with_http_info(body, asin, opts = {})
  @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimate_for_asin ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling FeesApi.get_my_fees_estimate_for_asin" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'asin' is set
  raise ArgumentError, "Missing the required parameter 'asin' when calling FeesApi.get_my_fees_estimate_for_asin" if @api_client.config.client_side_validation && asin.nil?

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

  @api_client.config.logger.debug "API called: FeesApi#get_my_fees_estimate_for_asin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [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:



79
80
81
82
# File 'lib/product_fees_api_model/api/fees_api.rb', line 79

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

Raises:

  • (ArgumentError)


89
90
91
92
93
94
95
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
# File 'lib/product_fees_api_model/api/fees_api.rb', line 89

def get_my_fees_estimate_for_sku_with_http_info(body, seller_sku, opts = {})
  @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimate_for_sku ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling FeesApi.get_my_fees_estimate_for_sku" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'seller_sku' is set
  raise ArgumentError, "Missing the required parameter 'seller_sku' when calling FeesApi.get_my_fees_estimate_for_sku" if @api_client.config.client_side_validation && seller_sku.nil?

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

  @api_client.config.logger.debug "API called: FeesApi#get_my_fees_estimate_for_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [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:



134
135
136
137
# File 'lib/product_fees_api_model/api/fees_api.rb', line 134

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

Raises:

  • (ArgumentError)


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
175
176
177
178
179
180
# File 'lib/product_fees_api_model/api/fees_api.rb', line 143

def get_my_fees_estimates_with_http_info(body, opts = {})
  @api_client.config.logger.debug 'Calling API: FeesApi.get_my_fees_estimates ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling FeesApi.get_my_fees_estimates" if @api_client.config.client_side_validation && body.nil?

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

  @api_client.config.logger.debug "API called: FeesApi#get_my_fees_estimates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end