sp_api_clients 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +161 -0
  3. data/LICENSE +21 -0
  4. data/README.md +284 -0
  5. data/lib/amazon_sp_clients/adapter_loader.rb +28 -0
  6. data/lib/amazon_sp_clients/api_client.rb +309 -0
  7. data/lib/amazon_sp_clients/api_error.rb +37 -0
  8. data/lib/amazon_sp_clients/api_response.rb +54 -0
  9. data/lib/amazon_sp_clients/configuration.rb +144 -0
  10. data/lib/amazon_sp_clients/marketplaces.rb +63 -0
  11. data/lib/amazon_sp_clients/middlewares/raise_error.rb +166 -0
  12. data/lib/amazon_sp_clients/session.rb +124 -0
  13. data/lib/amazon_sp_clients/sp_fba_inventory.rb +8 -0
  14. data/lib/amazon_sp_clients/sp_feeds_2021.rb +8 -0
  15. data/lib/amazon_sp_clients/sp_fulfillment_outbound_2020.rb +8 -0
  16. data/lib/amazon_sp_clients/sp_listings_items_2021.rb +8 -0
  17. data/lib/amazon_sp_clients/sp_orders_v0.rb +8 -0
  18. data/lib/amazon_sp_clients/sp_reports_2021.rb +8 -0
  19. data/lib/amazon_sp_clients/sp_tokens_2021.rb +8 -0
  20. data/lib/amazon_sp_clients/sp_vdf_inventory_v1.rb +8 -0
  21. data/lib/amazon_sp_clients/sp_vdf_orders_v1.rb +8 -0
  22. data/lib/amazon_sp_clients/sp_vdf_shipping_v1.rb +8 -0
  23. data/lib/amazon_sp_clients/sp_vendor_invoices.rb +8 -0
  24. data/lib/amazon_sp_clients/sp_vendor_orders.rb +8 -0
  25. data/lib/amazon_sp_clients/sp_vendor_transaction_status.rb +8 -0
  26. data/lib/amazon_sp_clients/sp_vendors_shipments.rb +8 -0
  27. data/lib/amazon_sp_clients/token_exchange_auth.rb +82 -0
  28. data/lib/amazon_sp_clients/uploader.rb +77 -0
  29. data/lib/amazon_sp_clients/v2/api.rb +43 -0
  30. data/lib/amazon_sp_clients/v2/apis/fba_inventory.rb +80 -0
  31. data/lib/amazon_sp_clients/v2/apis/feeds_2021.rb +86 -0
  32. data/lib/amazon_sp_clients/v2/apis/fulfillment_outbound_2020.rb +184 -0
  33. data/lib/amazon_sp_clients/v2/apis/listings_items_2021.rb +144 -0
  34. data/lib/amazon_sp_clients/v2/apis/orders_v0.rb +165 -0
  35. data/lib/amazon_sp_clients/v2/apis/reports_2021.rb +117 -0
  36. data/lib/amazon_sp_clients/v2/apis/tokens_2021.rb +25 -0
  37. data/lib/amazon_sp_clients/v2/apis/vdf_inventory_v1.rb +26 -0
  38. data/lib/amazon_sp_clients/v2/apis/vdf_orders_v1.rb +61 -0
  39. data/lib/amazon_sp_clients/v2/apis/vdf_shipping_v1.rb +139 -0
  40. data/lib/amazon_sp_clients/v2/apis/vendor_invoices.rb +25 -0
  41. data/lib/amazon_sp_clients/v2/apis/vendor_orders.rb +106 -0
  42. data/lib/amazon_sp_clients/v2/apis/vendor_transaction_status.rb +25 -0
  43. data/lib/amazon_sp_clients/v2/apis/vendors_shipments.rb +120 -0
  44. data/lib/amazon_sp_clients/v2/apis.rb +82 -0
  45. data/lib/amazon_sp_clients/v2/client.rb +198 -0
  46. data/lib/amazon_sp_clients/v2/config.rb +85 -0
  47. data/lib/amazon_sp_clients/v2/credentials.rb +91 -0
  48. data/lib/amazon_sp_clients/v2/documents.rb +115 -0
  49. data/lib/amazon_sp_clients/v2/error_mapper.rb +235 -0
  50. data/lib/amazon_sp_clients/v2/errors.rb +117 -0
  51. data/lib/amazon_sp_clients/v2/lwa.rb +100 -0
  52. data/lib/amazon_sp_clients/v2/rdt.rb +104 -0
  53. data/lib/amazon_sp_clients/v2/token.rb +39 -0
  54. data/lib/amazon_sp_clients/v2.rb +33 -0
  55. data/lib/amazon_sp_clients/version.rb +3 -0
  56. data/lib/amazon_sp_clients.rb +69 -0
  57. data/lib/sp_api_clients.rb +6 -0
  58. data/sp_api_clients.gemspec +53 -0
  59. data/vendor/fba_inventory/lib/sp_fba_inventory/api/fba_inventory_api.rb +289 -0
  60. data/vendor/fba_inventory/lib/sp_fba_inventory.rb +12 -0
  61. data/vendor/feeds_2021/lib/sp_feeds_2021/api/feeds_api.rb +367 -0
  62. data/vendor/feeds_2021/lib/sp_feeds_2021.rb +12 -0
  63. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020/api/fba_outbound_api.rb +845 -0
  64. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020.rb +12 -0
  65. data/vendor/listings_items_2021/lib/sp_listings_items_2021/api/listings_api.rb +480 -0
  66. data/vendor/listings_items_2021/lib/sp_listings_items_2021.rb +12 -0
  67. data/vendor/orders_v0/lib/sp_orders_v0/api/orders_v0_api.rb +593 -0
  68. data/vendor/orders_v0/lib/sp_orders_v0/api/shipment_api.rb +83 -0
  69. data/vendor/orders_v0/lib/sp_orders_v0.rb +13 -0
  70. data/vendor/reports_2021/lib/sp_reports_2021/api/reports_api.rb +530 -0
  71. data/vendor/reports_2021/lib/sp_reports_2021.rb +12 -0
  72. data/vendor/tokens_2021/lib/sp_tokens_2021/api/tokens_api.rb +77 -0
  73. data/vendor/tokens_2021/lib/sp_tokens_2021.rb +12 -0
  74. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1/api/update_inventory_api.rb +83 -0
  75. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1.rb +12 -0
  76. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1/api/vendor_orders_api.rb +217 -0
  77. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1.rb +12 -0
  78. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/customer_invoices_api.rb +152 -0
  79. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_api.rb +264 -0
  80. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_labels_api.rb +208 -0
  81. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1.rb +14 -0
  82. data/vendor/vendor_invoices/lib/sp_vendor_invoices/api/vendor_payments_api.rb +77 -0
  83. data/vendor/vendor_invoices/lib/sp_vendor_invoices.rb +12 -0
  84. data/vendor/vendor_orders/lib/sp_vendor_orders/api/vendor_orders_api.rb +323 -0
  85. data/vendor/vendor_orders/lib/sp_vendor_orders.rb +12 -0
  86. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status/api/vendor_transaction_api.rb +75 -0
  87. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status.rb +12 -0
  88. data/vendor/vendors_shipments/lib/sp_vendors_shipments/api/vendor_shipping_api.rb +337 -0
  89. data/vendor/vendors_shipments/lib/sp_vendors_shipments.rb +12 -0
  90. metadata +321 -0
@@ -0,0 +1,593 @@
1
+ =begin
2
+ #Selling Partner API for Orders
3
+
4
+ #Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools. _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
5
+
6
+ OpenAPI spec version: v0
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpOrdersV0
13
+ class OrdersV0Api
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param body Request body of `confirmShipment`.
21
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [nil]
24
+ def confirm_shipment(body, order_id, opts = {})
25
+ confirm_shipment_with_http_info(body, order_id, opts)
26
+ return nil
27
+ end
28
+
29
+ # Updates the shipment confirmation status for a specified order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
30
+ # @param body Request body of `confirmShipment`.
31
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(nil)>] nil, response status code and response headers
34
+ def confirm_shipment_with_http_info(body, order_id, opts = {})
35
+ if @api_client.config.debugging
36
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.confirm_shipment ...'
37
+ end
38
+ # verify the required parameter 'body' is set
39
+ if @api_client.config.client_side_validation && body.nil?
40
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrdersV0Api.confirm_shipment"
41
+ end
42
+ # verify the required parameter 'order_id' is set
43
+ if @api_client.config.client_side_validation && order_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.confirm_shipment"
45
+ end
46
+ # resource path
47
+ local_var_path = '/orders/v0/orders/{orderId}/shipmentConfirmation'.sub('{' + 'orderId' + '}', order_id.to_s)
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
64
+
65
+ return_type = opts[:return_type]
66
+
67
+ auth_names = opts[:auth_names] || []
68
+ data = @api_client.call_api(:POST, local_var_path,
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type)
75
+
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: OrdersV0Api#confirm_shipment\nData: #{data.inspect}"
78
+ end
79
+ return data
80
+ end
81
+ # Returns 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
82
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [GetOrderResponse]
85
+ def get_order(order_id, opts = {})
86
+ data = get_order_with_http_info(order_id, opts)
87
+ return data
88
+ end
89
+
90
+ # Returns 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
91
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(GetOrderResponse)>] GetOrderResponse data, response status code and response headers
94
+ def get_order_with_http_info(order_id, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order ...'
97
+ end
98
+ # verify the required parameter 'order_id' is set
99
+ if @api_client.config.client_side_validation && order_id.nil?
100
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order"
101
+ end
102
+ # resource path
103
+ local_var_path = '/orders/v0/orders/{orderId}'.sub('{' + 'orderId' + '}', order_id.to_s)
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
112
+
113
+ # form parameters
114
+ form_params = opts[:form_params] || {}
115
+
116
+ # http body (model)
117
+ post_body = opts[:body]
118
+
119
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
120
+
121
+ auth_names = opts[:auth_names] || []
122
+ data = @api_client.call_api(:GET, local_var_path,
123
+ :header_params => header_params,
124
+ :query_params => query_params,
125
+ :form_params => form_params,
126
+ :body => post_body,
127
+ :auth_names => auth_names,
128
+ :return_type => return_type)
129
+
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order\nData: #{data.inspect}"
132
+ end
133
+ return data
134
+ end
135
+ # Returns the shipping address 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
136
+ # @param order_id An &#x60;orderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
137
+ # @param [Hash] opts the optional parameters
138
+ # @return [GetOrderAddressResponse]
139
+ def get_order_address(order_id, opts = {})
140
+ data = get_order_address_with_http_info(order_id, opts)
141
+ return data
142
+ end
143
+
144
+ # Returns the shipping address 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
145
+ # @param order_id An &#x60;orderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<(GetOrderAddressResponse)>] GetOrderAddressResponse data, response status code and response headers
148
+ def get_order_address_with_http_info(order_id, opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_address ...'
151
+ end
152
+ # verify the required parameter 'order_id' is set
153
+ if @api_client.config.client_side_validation && order_id.nil?
154
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_address"
155
+ end
156
+ # resource path
157
+ local_var_path = '/orders/v0/orders/{orderId}/address'.sub('{' + 'orderId' + '}', order_id.to_s)
158
+
159
+ # query parameters
160
+ query_params = opts[:query_params] || {}
161
+
162
+ # header parameters
163
+ header_params = opts[:header_params] || {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
166
+
167
+ # form parameters
168
+ form_params = opts[:form_params] || {}
169
+
170
+ # http body (model)
171
+ post_body = opts[:body]
172
+
173
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
174
+
175
+ auth_names = opts[:auth_names] || []
176
+ data = @api_client.call_api(:GET, local_var_path,
177
+ :header_params => header_params,
178
+ :query_params => query_params,
179
+ :form_params => form_params,
180
+ :body => post_body,
181
+ :auth_names => auth_names,
182
+ :return_type => return_type)
183
+
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order_address\nData: #{data.inspect}"
186
+ end
187
+ return data
188
+ end
189
+ # Returns buyer 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
190
+ # @param order_id An &#x60;orderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [GetOrderBuyerInfoResponse]
193
+ def get_order_buyer_info(order_id, opts = {})
194
+ data = get_order_buyer_info_with_http_info(order_id, opts)
195
+ return data
196
+ end
197
+
198
+ # Returns buyer 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
199
+ # @param order_id An &#x60;orderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(GetOrderBuyerInfoResponse)>] GetOrderBuyerInfoResponse data, response status code and response headers
202
+ def get_order_buyer_info_with_http_info(order_id, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_buyer_info ...'
205
+ end
206
+ # verify the required parameter 'order_id' is set
207
+ if @api_client.config.client_side_validation && order_id.nil?
208
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_buyer_info"
209
+ end
210
+ # resource path
211
+ local_var_path = '/orders/v0/orders/{orderId}/buyerInfo'.sub('{' + 'orderId' + '}', order_id.to_s)
212
+
213
+ # query parameters
214
+ query_params = opts[:query_params] || {}
215
+
216
+ # header parameters
217
+ header_params = opts[:header_params] || {}
218
+ # HTTP header 'Accept' (if needed)
219
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
220
+
221
+ # form parameters
222
+ form_params = opts[:form_params] || {}
223
+
224
+ # http body (model)
225
+ post_body = opts[:body]
226
+
227
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
228
+
229
+ auth_names = opts[:auth_names] || []
230
+ data = @api_client.call_api(:GET, local_var_path,
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => return_type)
237
+
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order_buyer_info\nData: #{data.inspect}"
240
+ end
241
+ return data
242
+ end
243
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
244
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
245
+ # @param [Hash] opts the optional parameters
246
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
247
+ # @return [GetOrderItemsResponse]
248
+ def get_order_items(order_id, opts = {})
249
+ data = get_order_items_with_http_info(order_id, opts)
250
+ return data
251
+ end
252
+
253
+ # Returns detailed order item information for the order that you specify. If &#x60;NextToken&#x60; 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
254
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
257
+ # @return [Array<(GetOrderItemsResponse)>] GetOrderItemsResponse data, response status code and response headers
258
+ def get_order_items_with_http_info(order_id, opts = {})
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_items ...'
261
+ end
262
+ # verify the required parameter 'order_id' is set
263
+ if @api_client.config.client_side_validation && order_id.nil?
264
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_items"
265
+ end
266
+ # resource path
267
+ local_var_path = '/orders/v0/orders/{orderId}/orderItems'.sub('{' + 'orderId' + '}', order_id.to_s)
268
+
269
+ # query parameters
270
+ query_params = opts[:query_params] || {}
271
+ query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
272
+
273
+ # header parameters
274
+ header_params = opts[:header_params] || {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:body]
283
+
284
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
285
+
286
+ auth_names = opts[:auth_names] || []
287
+ data = @api_client.call_api(:GET, local_var_path,
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => return_type)
294
+
295
+ if @api_client.config.debugging
296
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order_items\nData: #{data.inspect}"
297
+ end
298
+ return data
299
+ end
300
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
301
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
304
+ # @return [GetOrderItemsBuyerInfoResponse]
305
+ def get_order_items_buyer_info(order_id, opts = {})
306
+ data = get_order_items_buyer_info_with_http_info(order_id, opts)
307
+ return data
308
+ end
309
+
310
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
311
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
312
+ # @param [Hash] opts the optional parameters
313
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
314
+ # @return [Array<(GetOrderItemsBuyerInfoResponse)>] GetOrderItemsBuyerInfoResponse data, response status code and response headers
315
+ def get_order_items_buyer_info_with_http_info(order_id, opts = {})
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_items_buyer_info ...'
318
+ end
319
+ # verify the required parameter 'order_id' is set
320
+ if @api_client.config.client_side_validation && order_id.nil?
321
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_items_buyer_info"
322
+ end
323
+ # resource path
324
+ local_var_path = '/orders/v0/orders/{orderId}/orderItems/buyerInfo'.sub('{' + 'orderId' + '}', order_id.to_s)
325
+
326
+ # query parameters
327
+ query_params = opts[:query_params] || {}
328
+ query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
329
+
330
+ # header parameters
331
+ header_params = opts[:header_params] || {}
332
+ # HTTP header 'Accept' (if needed)
333
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
334
+
335
+ # form parameters
336
+ form_params = opts[:form_params] || {}
337
+
338
+ # http body (model)
339
+ post_body = opts[:body]
340
+
341
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
342
+
343
+ auth_names = opts[:auth_names] || []
344
+ data = @api_client.call_api(:GET, local_var_path,
345
+ :header_params => header_params,
346
+ :query_params => query_params,
347
+ :form_params => form_params,
348
+ :body => post_body,
349
+ :auth_names => auth_names,
350
+ :return_type => return_type)
351
+
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order_items_buyer_info\nData: #{data.inspect}"
354
+ end
355
+ return data
356
+ end
357
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
358
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
359
+ # @param [Hash] opts the optional parameters
360
+ # @return [GetOrderRegulatedInfoResponse]
361
+ def get_order_regulated_info(order_id, opts = {})
362
+ data = get_order_regulated_info_with_http_info(order_id, opts)
363
+ return data
364
+ end
365
+
366
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
367
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [Array<(GetOrderRegulatedInfoResponse)>] GetOrderRegulatedInfoResponse data, response status code and response headers
370
+ def get_order_regulated_info_with_http_info(order_id, opts = {})
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_order_regulated_info ...'
373
+ end
374
+ # verify the required parameter 'order_id' is set
375
+ if @api_client.config.client_side_validation && order_id.nil?
376
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.get_order_regulated_info"
377
+ end
378
+ # resource path
379
+ local_var_path = '/orders/v0/orders/{orderId}/regulatedInfo'.sub('{' + 'orderId' + '}', order_id.to_s)
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'PendingOrder', 'ApprovedOrder', 'RejectedOrder'])
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:body]
394
+
395
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
396
+
397
+ auth_names = opts[:auth_names] || []
398
+ data = @api_client.call_api(:GET, local_var_path,
399
+ :header_params => header_params,
400
+ :query_params => query_params,
401
+ :form_params => form_params,
402
+ :body => post_body,
403
+ :auth_names => auth_names,
404
+ :return_type => return_type)
405
+
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_order_regulated_info\nData: #{data.inspect}"
408
+ end
409
+ return data
410
+ end
411
+ # Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. `NextToken` doesn't affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
412
+ # @param marketplace_ids A list of &#x60;MarketplaceId&#x60; values. Used to select orders that were placed in the specified marketplaces. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of &#x60;marketplaceId&#x60; values.
413
+ # @param [Hash] opts the optional parameters
414
+ # @option opts [String] :created_after Use this date to select orders created after (or at) a specified time. Only orders placed after the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the &#x60;CreatedAfter&#x60; parameter or the &#x60;LastUpdatedAfter&#x60; parameter is required. Both cannot be empty. &#x60;LastUpdatedAfter&#x60; and &#x60;LastUpdatedBefore&#x60; cannot be set when &#x60;CreatedAfter&#x60; is set.
415
+ # @option opts [String] :created_before Use this date to select orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: &#x60;CreatedBefore&#x60; is optional when &#x60;CreatedAfter&#x60; is set. If specified, &#x60;CreatedBefore&#x60; must be equal to or after the &#x60;CreatedAfter&#x60; date and at least two minutes before current time.
416
+ # @option opts [String] :last_updated_after Use this date to select 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](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the &#x60;CreatedAfter&#x60; parameter or the &#x60;LastUpdatedAfter&#x60; parameter is required. Both cannot be empty. &#x60;CreatedAfter&#x60; or &#x60;CreatedBefore&#x60; cannot be set when &#x60;LastUpdatedAfter&#x60; is set.
417
+ # @option opts [String] :last_updated_before Use this date to select 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](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: &#x60;LastUpdatedBefore&#x60; is optional when &#x60;LastUpdatedAfter&#x60; is set. But if specified, &#x60;LastUpdatedBefore&#x60; must be equal to or after the &#x60;LastUpdatedAfter&#x60; date and at least two minutes before current time.
418
+ # @option opts [Array<String>] :order_statuses 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.)
419
+ # @option opts [Array<String>] :fulfillment_channels A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. **Possible values**: &#x60;AFN&#x60; (fulfilled by Amazon), &#x60;MFN&#x60; (fulfilled by seller).
420
+ # @option opts [Array<String>] :payment_methods A list of payment method values. Use this field to select orders that were paid with the specified payment methods. **Possible values**: &#x60;COD&#x60; (cash on delivery), &#x60;CVS&#x60; (convenience store), &#x60;Other&#x60; (Any payment method other than COD or CVS).
421
+ # @option opts [String] :buyer_email The email address of a buyer. Used to select orders that contain the specified email address.
422
+ # @option opts [String] :seller_order_id An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If &#x60;SellerOrderId&#x60; is specified, then &#x60;FulfillmentChannels&#x60;, &#x60;OrderStatuses&#x60;, &#x60;PaymentMethod&#x60;, &#x60;LastUpdatedAfter&#x60;, LastUpdatedBefore, and &#x60;BuyerEmail&#x60; cannot be specified.
423
+ # @option opts [Integer] :max_results_per_page A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
424
+ # @option opts [Array<String>] :easy_ship_shipment_statuses 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.)
425
+ # @option opts [Array<String>] :electronic_invoice_statuses 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.)
426
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
427
+ # @option opts [Array<String>] :amazon_order_ids A list of &#x60;AmazonOrderId&#x60; values. An &#x60;AmazonOrderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
428
+ # @option opts [String] :actual_fulfillment_supply_source_id The &#x60;sourceId&#x60; of the location from where you want the order fulfilled.
429
+ # @option opts [BOOLEAN] :is_ispu When true, this order is marked to be picked up from a store rather than delivered.
430
+ # @option opts [String] :store_chain_store_id The store chain store identifier. Linked to a specific store in a store chain.
431
+ # @option opts [String] :earliest_delivery_date_before Use this date to select orders with a earliest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
432
+ # @option opts [String] :earliest_delivery_date_after Use this date to select orders with a earliest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
433
+ # @option opts [String] :latest_delivery_date_before Use this date to select orders with a latest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
434
+ # @option opts [String] :latest_delivery_date_after Use this date to select orders with a latest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
435
+ # @return [GetOrdersResponse]
436
+ def get_orders(marketplace_ids, opts = {})
437
+ data = get_orders_with_http_info(marketplace_ids, opts)
438
+ return data
439
+ end
440
+
441
+ # Returns orders that are created or updated during the specified time period. If you want to return specific types of orders, you can apply filters to your request. &#x60;NextToken&#x60; doesn&#x27;t affect any filters that you include in your request; it only impacts the pagination for the filtered orders response. **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 are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
442
+ # @param marketplace_ids A list of &#x60;MarketplaceId&#x60; values. Used to select orders that were placed in the specified marketplaces. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a complete list of &#x60;marketplaceId&#x60; values.
443
+ # @param [Hash] opts the optional parameters
444
+ # @option opts [String] :created_after Use this date to select orders created after (or at) a specified time. Only orders placed after the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the &#x60;CreatedAfter&#x60; parameter or the &#x60;LastUpdatedAfter&#x60; parameter is required. Both cannot be empty. &#x60;LastUpdatedAfter&#x60; and &#x60;LastUpdatedBefore&#x60; cannot be set when &#x60;CreatedAfter&#x60; is set.
445
+ # @option opts [String] :created_before Use this date to select orders created before (or at) a specified time. Only orders placed before the specified time are returned. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: &#x60;CreatedBefore&#x60; is optional when &#x60;CreatedAfter&#x60; is set. If specified, &#x60;CreatedBefore&#x60; must be equal to or after the &#x60;CreatedAfter&#x60; date and at least two minutes before current time.
446
+ # @option opts [String] :last_updated_after Use this date to select 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](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the &#x60;CreatedAfter&#x60; parameter or the &#x60;LastUpdatedAfter&#x60; parameter is required. Both cannot be empty. &#x60;CreatedAfter&#x60; or &#x60;CreatedBefore&#x60; cannot be set when &#x60;LastUpdatedAfter&#x60; is set.
447
+ # @option opts [String] :last_updated_before Use this date to select 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](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: &#x60;LastUpdatedBefore&#x60; is optional when &#x60;LastUpdatedAfter&#x60; is set. But if specified, &#x60;LastUpdatedBefore&#x60; must be equal to or after the &#x60;LastUpdatedAfter&#x60; date and at least two minutes before current time.
448
+ # @option opts [Array<String>] :order_statuses 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.)
449
+ # @option opts [Array<String>] :fulfillment_channels A list that indicates how an order was fulfilled. Filters the results by fulfillment channel. **Possible values**: &#x60;AFN&#x60; (fulfilled by Amazon), &#x60;MFN&#x60; (fulfilled by seller).
450
+ # @option opts [Array<String>] :payment_methods A list of payment method values. Use this field to select orders that were paid with the specified payment methods. **Possible values**: &#x60;COD&#x60; (cash on delivery), &#x60;CVS&#x60; (convenience store), &#x60;Other&#x60; (Any payment method other than COD or CVS).
451
+ # @option opts [String] :buyer_email The email address of a buyer. Used to select orders that contain the specified email address.
452
+ # @option opts [String] :seller_order_id An order identifier that is specified by the seller. Used to select only the orders that match the order identifier. If &#x60;SellerOrderId&#x60; is specified, then &#x60;FulfillmentChannels&#x60;, &#x60;OrderStatuses&#x60;, &#x60;PaymentMethod&#x60;, &#x60;LastUpdatedAfter&#x60;, LastUpdatedBefore, and &#x60;BuyerEmail&#x60; cannot be specified.
453
+ # @option opts [Integer] :max_results_per_page A number that indicates the maximum number of orders that can be returned per page. Value must be 1 - 100. Default 100.
454
+ # @option opts [Array<String>] :easy_ship_shipment_statuses 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.)
455
+ # @option opts [Array<String>] :electronic_invoice_statuses 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.)
456
+ # @option opts [String] :next_token A string token returned in the response of your previous request.
457
+ # @option opts [Array<String>] :amazon_order_ids A list of &#x60;AmazonOrderId&#x60; values. An &#x60;AmazonOrderId&#x60; is an Amazon-defined order identifier, in 3-7-7 format.
458
+ # @option opts [String] :actual_fulfillment_supply_source_id The &#x60;sourceId&#x60; of the location from where you want the order fulfilled.
459
+ # @option opts [BOOLEAN] :is_ispu When true, this order is marked to be picked up from a store rather than delivered.
460
+ # @option opts [String] :store_chain_store_id The store chain store identifier. Linked to a specific store in a store chain.
461
+ # @option opts [String] :earliest_delivery_date_before Use this date to select orders with a earliest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
462
+ # @option opts [String] :earliest_delivery_date_after Use this date to select orders with a earliest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
463
+ # @option opts [String] :latest_delivery_date_before Use this date to select orders with a latest delivery date before (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
464
+ # @option opts [String] :latest_delivery_date_after Use this date to select orders with a latest delivery date after (or at) a specified time. The date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.
465
+ # @return [Array<(GetOrdersResponse)>] GetOrdersResponse data, response status code and response headers
466
+ def get_orders_with_http_info(marketplace_ids, opts = {})
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.get_orders ...'
469
+ end
470
+ # verify the required parameter 'marketplace_ids' is set
471
+ if @api_client.config.client_side_validation && marketplace_ids.nil?
472
+ fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling OrdersV0Api.get_orders"
473
+ end
474
+ # resource path
475
+ local_var_path = '/orders/v0/orders'
476
+
477
+ # query parameters
478
+ query_params = opts[:query_params] || {}
479
+ query_params[:'MarketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
480
+ query_params[:'CreatedAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
481
+ query_params[:'CreatedBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
482
+ query_params[:'LastUpdatedAfter'] = opts[:'last_updated_after'] if !opts[:'last_updated_after'].nil?
483
+ query_params[:'LastUpdatedBefore'] = opts[:'last_updated_before'] if !opts[:'last_updated_before'].nil?
484
+ query_params[:'OrderStatuses'] = @api_client.build_collection_param(opts[:'order_statuses'], :csv) if !opts[:'order_statuses'].nil?
485
+ query_params[:'FulfillmentChannels'] = @api_client.build_collection_param(opts[:'fulfillment_channels'], :csv) if !opts[:'fulfillment_channels'].nil?
486
+ query_params[:'PaymentMethods'] = @api_client.build_collection_param(opts[:'payment_methods'], :csv) if !opts[:'payment_methods'].nil?
487
+ query_params[:'BuyerEmail'] = opts[:'buyer_email'] if !opts[:'buyer_email'].nil?
488
+ query_params[:'SellerOrderId'] = opts[:'seller_order_id'] if !opts[:'seller_order_id'].nil?
489
+ query_params[:'MaxResultsPerPage'] = opts[:'max_results_per_page'] if !opts[:'max_results_per_page'].nil?
490
+ query_params[:'EasyShipShipmentStatuses'] = @api_client.build_collection_param(opts[:'easy_ship_shipment_statuses'], :csv) if !opts[:'easy_ship_shipment_statuses'].nil?
491
+ query_params[:'ElectronicInvoiceStatuses'] = @api_client.build_collection_param(opts[:'electronic_invoice_statuses'], :csv) if !opts[:'electronic_invoice_statuses'].nil?
492
+ query_params[:'NextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
493
+ query_params[:'AmazonOrderIds'] = @api_client.build_collection_param(opts[:'amazon_order_ids'], :csv) if !opts[:'amazon_order_ids'].nil?
494
+ query_params[:'ActualFulfillmentSupplySourceId'] = opts[:'actual_fulfillment_supply_source_id'] if !opts[:'actual_fulfillment_supply_source_id'].nil?
495
+ query_params[:'IsISPU'] = opts[:'is_ispu'] if !opts[:'is_ispu'].nil?
496
+ query_params[:'StoreChainStoreId'] = opts[:'store_chain_store_id'] if !opts[:'store_chain_store_id'].nil?
497
+ query_params[:'EarliestDeliveryDateBefore'] = opts[:'earliest_delivery_date_before'] if !opts[:'earliest_delivery_date_before'].nil?
498
+ query_params[:'EarliestDeliveryDateAfter'] = opts[:'earliest_delivery_date_after'] if !opts[:'earliest_delivery_date_after'].nil?
499
+ query_params[:'LatestDeliveryDateBefore'] = opts[:'latest_delivery_date_before'] if !opts[:'latest_delivery_date_before'].nil?
500
+ query_params[:'LatestDeliveryDateAfter'] = opts[:'latest_delivery_date_after'] if !opts[:'latest_delivery_date_after'].nil?
501
+
502
+ # header parameters
503
+ header_params = opts[:header_params] || {}
504
+ # HTTP header 'Accept' (if needed)
505
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
506
+
507
+ # form parameters
508
+ form_params = opts[:form_params] || {}
509
+
510
+ # http body (model)
511
+ post_body = opts[:body]
512
+
513
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
514
+
515
+ auth_names = opts[:auth_names] || []
516
+ data = @api_client.call_api(:GET, local_var_path,
517
+ :header_params => header_params,
518
+ :query_params => query_params,
519
+ :form_params => form_params,
520
+ :body => post_body,
521
+ :auth_names => auth_names,
522
+ :return_type => return_type)
523
+
524
+ if @api_client.config.debugging
525
+ @api_client.config.logger.debug "API called: OrdersV0Api#get_orders\nData: #{data.inspect}"
526
+ end
527
+ return data
528
+ end
529
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
530
+ # @param body The request body for the &#x60;updateVerificationStatus&#x60; operation.
531
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
532
+ # @param [Hash] opts the optional parameters
533
+ # @return [nil]
534
+ def update_verification_status(body, order_id, opts = {})
535
+ update_verification_status_with_http_info(body, order_id, opts)
536
+ return nil
537
+ end
538
+
539
+ # 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 preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
540
+ # @param body The request body for the &#x60;updateVerificationStatus&#x60; operation.
541
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [Array<(nil)>] nil, response status code and response headers
544
+ def update_verification_status_with_http_info(body, order_id, opts = {})
545
+ if @api_client.config.debugging
546
+ @api_client.config.logger.debug 'Calling API: OrdersV0Api.update_verification_status ...'
547
+ end
548
+ # verify the required parameter 'body' is set
549
+ if @api_client.config.client_side_validation && body.nil?
550
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrdersV0Api.update_verification_status"
551
+ end
552
+ # verify the required parameter 'order_id' is set
553
+ if @api_client.config.client_side_validation && order_id.nil?
554
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersV0Api.update_verification_status"
555
+ end
556
+ # resource path
557
+ local_var_path = '/orders/v0/orders/{orderId}/regulatedInfo'.sub('{' + 'orderId' + '}', order_id.to_s)
558
+
559
+ # query parameters
560
+ query_params = opts[:query_params] || {}
561
+
562
+ # header parameters
563
+ header_params = opts[:header_params] || {}
564
+ # HTTP header 'Accept' (if needed)
565
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
566
+ # HTTP header 'Content-Type'
567
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
568
+
569
+ # form parameters
570
+ form_params = opts[:form_params] || {}
571
+
572
+ # http body (model)
573
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
574
+
575
+ return_type = opts[:return_type]
576
+
577
+ auth_names = opts[:auth_names] || []
578
+ data = @api_client.call_api(:PATCH, local_var_path,
579
+ :header_params => header_params,
580
+ :query_params => query_params,
581
+ :form_params => form_params,
582
+ :body => post_body,
583
+ :auth_names => auth_names,
584
+ :return_type => return_type)
585
+
586
+ if @api_client.config.debugging
587
+ @api_client.config.logger.debug "API called: OrdersV0Api#update_verification_status\nData: #{data.inspect}"
588
+ end
589
+ return data
590
+ end
591
+ end
592
+ end
593
+ end