Class: AmzSpApi::OrdersApiModel::OrdersV0Api

Inherits:
Object
  • Object
show all
Defined in:
lib/orders-api-model/api/orders_v0_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OrdersV0Api

Returns a new instance of OrdersV0Api.



16
17
18
# File 'lib/orders-api-model/api/orders_v0_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/orders-api-model/api/orders_v0_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_order(order_id, opts = {}) ⇒ GetOrderResponse

Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:



23
24
25
26
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 23

def get_order(order_id, opts = {})
  data, _status_code, _headers = get_order_with_http_info(order_id, opts)
  data
end

#get_order_address(order_id, opts = {}) ⇒ GetOrderAddressResponse

Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:



77
78
79
80
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 77

def get_order_address(order_id, opts = {})
  data, _status_code, _headers = get_order_address_with_http_info(order_id, opts)
  data
end

#get_order_address_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderAddressResponse, Integer, Hash)>

Returns the shipping address for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:

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

    GetOrderAddressResponse data, response status code and response headers



86
87
88
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
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 86

def get_order_address_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_address ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_address"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/address'.sub('{' + 'orderId' + '}', order_id.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'])

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

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

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

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

#get_order_buyer_info(order_id, opts = {}) ⇒ GetOrderBuyerInfoResponse

Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:



131
132
133
134
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 131

def get_order_buyer_info(order_id, opts = {})
  data, _status_code, _headers = get_order_buyer_info_with_http_info(order_id, opts)
  data
end

#get_order_buyer_info_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderBuyerInfoResponse, Integer, Hash)>

Returns buyer information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:

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

    GetOrderBuyerInfoResponse data, response status code and response headers



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
175
176
177
178
179
180
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 140

def get_order_buyer_info_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_buyer_info ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_buyer_info"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/buyerInfo'.sub('{' + 'orderId' + '}', order_id.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'])

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

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

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

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

#get_order_items(order_id, opts = {}) ⇒ GetOrderItemsResponse

Returns detailed order item information for the order that you specify. If NextToken is provided, it’s used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Options Hash (opts):

  • :next_token (String)

    A string token returned in the response of your previous request.

Returns:



186
187
188
189
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 186

def get_order_items(order_id, opts = {})
  data, _status_code, _headers = get_order_items_with_http_info(order_id, opts)
  data
end

#get_order_items_buyer_info(order_id, opts = {}) ⇒ GetOrderItemsBuyerInfoResponse

Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Options Hash (opts):

  • :next_token (String)

    A string token returned in the response of your previous request.

Returns:



243
244
245
246
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 243

def get_order_items_buyer_info(order_id, opts = {})
  data, _status_code, _headers = get_order_items_buyer_info_with_http_info(order_id, opts)
  data
end

#get_order_items_buyer_info_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderItemsBuyerInfoResponse, Integer, Hash)>

Returns buyer information for the order items in the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Options Hash (opts):

  • :next_token (String)

    A string token returned in the response of your previous request.

Returns:



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
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 253

def get_order_items_buyer_info_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_items_buyer_info ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_items_buyer_info"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/orderItems/buyerInfo'.sub('{' + 'orderId' + '}', order_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].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] || 'GetOrderItemsBuyerInfoResponse' 

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

#get_order_items_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderItemsResponse, Integer, Hash)>

Returns detailed order item information for the order that you specify. If NextToken is provided, it&#x27;s used to retrieve the next page of order items. __Note__: When an order is in the Pending state (the order has been placed but payment has not been authorized), the getOrderItems operation does not return information about pricing, taxes, shipping charges, gift status or promotions for the order items in the order. After an order leaves the Pending state (this occurs when payment has been authorized) and enters the Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping charges, gift status and promotions for the order items in the order. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Options Hash (opts):

  • :next_token (String)

    A string token returned in the response of your previous request.

Returns:

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

    GetOrderItemsResponse data, response status code and response headers



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
231
232
233
234
235
236
237
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 196

def get_order_items_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_items ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_items"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/orderItems'.sub('{' + 'orderId' + '}', order_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].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] || 'GetOrderItemsResponse' 

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

#get_order_regulated_info(order_id, opts = {}) ⇒ GetOrderRegulatedInfoResponse

Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:



299
300
301
302
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 299

def get_order_regulated_info(order_id, opts = {})
  data, _status_code, _headers = get_order_regulated_info_with_http_info(order_id, opts)
  data
end

#get_order_regulated_info_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderRegulatedInfoResponse, Integer, Hash)>

Returns regulated information for the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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:

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:



308
309
310
311
312
313
314
315
316
317
318
319
320
321
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
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 308

def get_order_regulated_info_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_regulated_info ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_regulated_info"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/regulatedInfo'.sub('{' + 'orderId' + '}', order_id.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', 'PendingOrder', 'ApprovedOrder', 'RejectedOrder'])

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

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

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

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

#get_order_with_http_info(order_id, opts = {}) ⇒ Array<(GetOrderResponse, Integer, Hash)>

Returns the order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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:

  • order_id

    An Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:

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

    GetOrderResponse data, response status code and response headers



32
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/orders-api-model/api/orders_v0_api.rb', line 32

def get_order_with_http_info(order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order ...'
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}'.sub('{' + 'orderId' + '}', order_id.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'])

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

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

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

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

#get_orders(marketplace_ids, opts = {}) ⇒ GetOrdersResponse

Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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_ids

    A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. See the [Selling Partner API Developer Guide](doc:marketplace-ids) for a complete list of marketplaceId values.

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

    the optional parameters

Options Hash (opts):

  • :created_after (String)

    A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format.

  • :created_before (String)

    A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format.

  • :last_updated_after (String)

    A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.

  • :last_updated_before (String)

    A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.

  • :order_statuses (Array<String>)

    A list of &#x60;OrderStatus&#x60; values used to filter the results. **Possible values:** - &#x60;PendingAvailability&#x60; (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.) - &#x60;Pending&#x60; (The order has been placed but payment has not been authorized.) - &#x60;Unshipped&#x60; (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped.) - &#x60;PartiallyShipped&#x60; (One or more, but not all, items in the order have been shipped.) - &#x60;Shipped&#x60; (All items in the order have been shipped.) - &#x60;InvoiceUnconfirmed&#x60; (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.) - &#x60;Canceled&#x60; (The order has been canceled.) - &#x60;Unfulfillable&#x60; (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.)

  • :fulfillment_channels (Array<String>)

    A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: AFN (Fulfillment by Amazon); MFN (Fulfilled by the seller).

  • :payment_methods (Array<String>)

    A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS).

  • :buyer_email (String)

    The email address of a buyer. Used to select orders that contain the specified email address.

  • :seller_order_id (String)

    An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified.

  • :max_results_per_page (Integer)

    A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.

  • :easy_ship_shipment_statuses (Array<String>)

    A list of &#x60;EasyShipShipmentStatus&#x60; values. Used to select Easy Ship orders with statuses that match the specified values. If &#x60;EasyShipShipmentStatus&#x60; is specified, only Amazon Easy Ship orders are returned. **Possible values:** - &#x60;PendingSchedule&#x60; (The package is awaiting the schedule for pick-up.) - &#x60;PendingPickUp&#x60; (Amazon has not yet picked up the package from the seller.) - &#x60;PendingDropOff&#x60; (The seller will deliver the package to the carrier.) - &#x60;LabelCanceled&#x60; (The seller canceled the pickup.) - &#x60;PickedUp&#x60; (Amazon has picked up the package from the seller.) - &#x60;DroppedOff&#x60; (The package is delivered to the carrier by the seller.) - &#x60;AtOriginFC&#x60; (The packaged is at the origin fulfillment center.) - &#x60;AtDestinationFC&#x60; (The package is at the destination fulfillment center.) - &#x60;Delivered&#x60; (The package has been delivered.) - &#x60;RejectedByBuyer&#x60; (The package has been rejected by the buyer.) - &#x60;Undeliverable&#x60; (The package cannot be delivered.) - &#x60;ReturningToSeller&#x60; (The package was not delivered and is being returned to the seller.) - &#x60;ReturnedToSeller&#x60; (The package was not delivered and was returned to the seller.) - &#x60;Lost&#x60; (The package is lost.) - &#x60;OutForDelivery&#x60; (The package is out for delivery.) - &#x60;Damaged&#x60; (The package was damaged by the carrier.)

  • :electronic_invoice_statuses (Array<String>)

    A list of &#x60;ElectronicInvoiceStatus&#x60; values. Used to select orders with electronic invoice statuses that match the specified values. **Possible values:** - &#x60;NotRequired&#x60; (Electronic invoice submission is not required for this order.) - &#x60;NotFound&#x60; (The electronic invoice was not submitted for this order.) - &#x60;Processing&#x60; (The electronic invoice is being processed for this order.) - &#x60;Errored&#x60; (The last submitted electronic invoice was rejected for this order.) - &#x60;Accepted&#x60; (The last submitted electronic invoice was submitted and accepted.)

  • :next_token (String)

    A string token returned in the response of your previous request.

  • :amazon_order_ids (Array<String>)

    A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format.

  • :actual_fulfillment_supply_source_id (String)

    Denotes the recommended sourceId where the order should be fulfilled from.

  • :is_ispu (BOOLEAN)

    When true, this order is marked to be picked up from a store rather than delivered.

  • :store_chain_store_id (String)

    The store chain store identifier. Linked to a specific store in a store chain.

Returns:



370
371
372
373
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 370

def get_orders(marketplace_ids, opts = {})
  data, _status_code, _headers = get_orders_with_http_info(marketplace_ids, opts)
  data
end

#get_orders_with_http_info(marketplace_ids, opts = {}) ⇒ Array<(GetOrdersResponse, Integer, Hash)>

Returns orders created or updated during the time frame indicated by the specified parameters. You can also apply a range of filtering criteria to narrow the list of orders returned. If NextToken is present, that will be used to retrieve the orders instead of other criteria. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.0167 | 20 | 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 then 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_ids

    A list of MarketplaceId values. Used to select orders that were placed in the specified marketplaces. See the [Selling Partner API Developer Guide](doc:marketplace-ids) for a complete list of marketplaceId values.

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

    the optional parameters

Options Hash (opts):

  • :created_after (String)

    A date used for selecting orders created after (or at) a specified time. Only orders placed after the specified time are returned. Either the CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both cannot be empty. The date must be in ISO 8601 format.

  • :created_before (String)

    A date used for selecting orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in ISO 8601 format.

  • :last_updated_after (String)

    A date used for selecting orders that were last updated after (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.

  • :last_updated_before (String)

    A date used for selecting orders that were last updated before (or at) a specified time. An update is defined as any change in order status, including the creation of a new order. Includes updates made by Amazon and by the seller. The date must be in ISO 8601 format.

  • :order_statuses (Array<String>)

    A list of &#x60;OrderStatus&#x60; values used to filter the results. **Possible values:** - &#x60;PendingAvailability&#x60; (This status is available for pre-orders only. The order has been placed, payment has not been authorized, and the release date of the item is in the future.) - &#x60;Pending&#x60; (The order has been placed but payment has not been authorized.) - &#x60;Unshipped&#x60; (Payment has been authorized and the order is ready for shipment, but no items in the order have been shipped.) - &#x60;PartiallyShipped&#x60; (One or more, but not all, items in the order have been shipped.) - &#x60;Shipped&#x60; (All items in the order have been shipped.) - &#x60;InvoiceUnconfirmed&#x60; (All items in the order have been shipped. The seller has not yet given confirmation to Amazon that the invoice has been shipped to the buyer.) - &#x60;Canceled&#x60; (The order has been canceled.) - &#x60;Unfulfillable&#x60; (The order cannot be fulfilled. This state applies only to Multi-Channel Fulfillment orders.)

  • :fulfillment_channels (Array<String>)

    A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. Possible values: AFN (Fulfillment by Amazon); MFN (Fulfilled by the seller).

  • :payment_methods (Array<String>)

    A list of payment method values. Used to select orders paid using the specified payment methods. Possible values: COD (Cash on delivery); CVS (Convenience store payment); Other (Any payment method other than COD or CVS).

  • :buyer_email (String)

    The email address of a buyer. Used to select orders that contain the specified email address.

  • :seller_order_id (String)

    An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If SellerOrderId is specified, then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified.

  • :max_results_per_page (Integer)

    A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.

  • :easy_ship_shipment_statuses (Array<String>)

    A list of &#x60;EasyShipShipmentStatus&#x60; values. Used to select Easy Ship orders with statuses that match the specified values. If &#x60;EasyShipShipmentStatus&#x60; is specified, only Amazon Easy Ship orders are returned. **Possible values:** - &#x60;PendingSchedule&#x60; (The package is awaiting the schedule for pick-up.) - &#x60;PendingPickUp&#x60; (Amazon has not yet picked up the package from the seller.) - &#x60;PendingDropOff&#x60; (The seller will deliver the package to the carrier.) - &#x60;LabelCanceled&#x60; (The seller canceled the pickup.) - &#x60;PickedUp&#x60; (Amazon has picked up the package from the seller.) - &#x60;DroppedOff&#x60; (The package is delivered to the carrier by the seller.) - &#x60;AtOriginFC&#x60; (The packaged is at the origin fulfillment center.) - &#x60;AtDestinationFC&#x60; (The package is at the destination fulfillment center.) - &#x60;Delivered&#x60; (The package has been delivered.) - &#x60;RejectedByBuyer&#x60; (The package has been rejected by the buyer.) - &#x60;Undeliverable&#x60; (The package cannot be delivered.) - &#x60;ReturningToSeller&#x60; (The package was not delivered and is being returned to the seller.) - &#x60;ReturnedToSeller&#x60; (The package was not delivered and was returned to the seller.) - &#x60;Lost&#x60; (The package is lost.) - &#x60;OutForDelivery&#x60; (The package is out for delivery.) - &#x60;Damaged&#x60; (The package was damaged by the carrier.)

  • :electronic_invoice_statuses (Array<String>)

    A list of &#x60;ElectronicInvoiceStatus&#x60; values. Used to select orders with electronic invoice statuses that match the specified values. **Possible values:** - &#x60;NotRequired&#x60; (Electronic invoice submission is not required for this order.) - &#x60;NotFound&#x60; (The electronic invoice was not submitted for this order.) - &#x60;Processing&#x60; (The electronic invoice is being processed for this order.) - &#x60;Errored&#x60; (The last submitted electronic invoice was rejected for this order.) - &#x60;Accepted&#x60; (The last submitted electronic invoice was submitted and accepted.)

  • :next_token (String)

    A string token returned in the response of your previous request.

  • :amazon_order_ids (Array<String>)

    A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order identifier, in 3-7-7 format.

  • :actual_fulfillment_supply_source_id (String)

    Denotes the recommended sourceId where the order should be fulfilled from.

  • :is_ispu (BOOLEAN)

    When true, this order is marked to be picked up from a store rather than delivered.

  • :store_chain_store_id (String)

    The store chain store identifier. Linked to a specific store in a store chain.

Returns:

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

    GetOrdersResponse data, response status code and response headers



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
449
450
451
452
453
454
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 396

def get_orders_with_http_info(marketplace_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_orders ...'
  end
  # verify the required parameter 'marketplace_ids' is set
  if @api_client.config.client_side_validation && marketplace_ids.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling OrdersV0Api.get_orders"
  end
  # resource path
  local_var_path = '/orders/v0/orders'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MarketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
  query_params[:'CreatedAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'CreatedBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'LastUpdatedAfter'] = opts[:'last_updated_after'] if !opts[:'last_updated_after'].nil?
  query_params[:'LastUpdatedBefore'] = opts[:'last_updated_before'] if !opts[:'last_updated_before'].nil?
  query_params[:'OrderStatuses'] = @api_client.build_collection_param(opts[:'order_statuses'], :csv) if !opts[:'order_statuses'].nil?
  query_params[:'FulfillmentChannels'] = @api_client.build_collection_param(opts[:'fulfillment_channels'], :csv) if !opts[:'fulfillment_channels'].nil?
  query_params[:'PaymentMethods'] = @api_client.build_collection_param(opts[:'payment_methods'], :csv) if !opts[:'payment_methods'].nil?
  query_params[:'BuyerEmail'] = opts[:'buyer_email'] if !opts[:'buyer_email'].nil?
  query_params[:'SellerOrderId'] = opts[:'seller_order_id'] if !opts[:'seller_order_id'].nil?
  query_params[:'MaxResultsPerPage'] = opts[:'max_results_per_page'] if !opts[:'max_results_per_page'].nil?
  query_params[:'EasyShipShipmentStatuses'] = @api_client.build_collection_param(opts[:'easy_ship_shipment_statuses'], :csv) if !opts[:'easy_ship_shipment_statuses'].nil?
  query_params[:'ElectronicInvoiceStatuses'] = @api_client.build_collection_param(opts[:'electronic_invoice_statuses'], :csv) if !opts[:'electronic_invoice_statuses'].nil?
  query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'AmazonOrderIds'] = @api_client.build_collection_param(opts[:'amazon_order_ids'], :csv) if !opts[:'amazon_order_ids'].nil?
  query_params[:'ActualFulfillmentSupplySourceId'] = opts[:'actual_fulfillment_supply_source_id'] if !opts[:'actual_fulfillment_supply_source_id'].nil?
  query_params[:'IsISPU'] = opts[:'is_ispu'] if !opts[:'is_ispu'].nil?
  query_params[:'StoreChainStoreId'] = opts[:'store_chain_store_id'] if !opts[:'store_chain_store_id'].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] || 'GetOrdersResponse' 

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

#update_verification_status(body, order_id, opts = {}) ⇒ nil

Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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

    The request body for the updateVerificationStatus operation.

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:

  • (nil)


460
461
462
463
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 460

def update_verification_status(body, order_id, opts = {})
  update_verification_status_with_http_info(body, order_id, opts)
  nil
end

#update_verification_status_with_http_info(body, order_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Updates (approves or rejects) the verification status of an order containing regulated products. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 0.5 | 30 | 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 then 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

    The request body for the updateVerificationStatus operation.

  • order_id

    An orderId is an Amazon-defined order identifier, in 3-7-7 format.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# File 'lib/orders-api-model/api/orders_v0_api.rb', line 470

def update_verification_status_with_http_info(body, order_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OrdersV0Api.update_verification_status ...'
  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 OrdersV0Api.update_verification_status"
  end
  # verify the required parameter 'order_id' is set
  if @api_client.config.client_side_validation && order_id.nil?
    fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.update_verification_status"
  end
  # resource path
  local_var_path = '/orders/v0/orders/{orderId}/regulatedInfo'.sub('{' + 'orderId' + '}', order_id.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] 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:PATCH, 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: OrdersV0Api#update_verification_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end