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,264 @@
1
+ =begin
2
+ #Selling Partner API for Direct Fulfillment Shipping
3
+
4
+ #The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpVdfShippingV1
13
+ class VendorShippingApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param purchase_order_number The purchaseOrderNumber for the packing slip you want.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [GetPackingSlipResponse]
23
+ def get_packing_slip(purchase_order_number, opts = {})
24
+ data = get_packing_slip_with_http_info(purchase_order_number, opts)
25
+ return data
26
+ end
27
+
28
+ # Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
29
+ # @param purchase_order_number The purchaseOrderNumber for the packing slip you want.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(GetPackingSlipResponse)>] GetPackingSlipResponse data, response status code and response headers
32
+ def get_packing_slip_with_http_info(purchase_order_number, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: VendorShippingApi.get_packing_slip ...'
35
+ end
36
+ # verify the required parameter 'purchase_order_number' is set
37
+ if @api_client.config.client_side_validation && purchase_order_number.nil?
38
+ fail ArgumentError, "Missing the required parameter 'purchase_order_number' when calling VendorShippingApi.get_packing_slip"
39
+ end
40
+ # resource path
41
+ local_var_path = '/vendor/directFulfillment/shipping/v1/packingSlips/{purchaseOrderNumber}'.sub('{' + 'purchaseOrderNumber' + '}', purchase_order_number.to_s)
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
58
+
59
+ auth_names = opts[:auth_names] || []
60
+ data = @api_client.call_api(:GET, local_var_path,
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type)
67
+
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: VendorShippingApi#get_packing_slip\nData: #{data.inspect}"
70
+ end
71
+ return data
72
+ end
73
+ # Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
74
+ # @param created_after Packing slips that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
75
+ # @param created_before Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
76
+ # @param [Hash] opts the optional parameters
77
+ # @option opts [String] :ship_from_party_id The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
78
+ # @option opts [Integer] :limit The limit to the number of records returned
79
+ # @option opts [String] :sort_order Sort ASC or DESC by packing slip creation date. (default to ASC)
80
+ # @option opts [String] :next_token Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
81
+ # @return [GetPackingSlipListResponse]
82
+ def get_packing_slips(created_after, created_before, opts = {})
83
+ data = get_packing_slips_with_http_info(created_after, created_before, opts)
84
+ return data
85
+ end
86
+
87
+ # Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
88
+ # @param created_after Packing slips that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
89
+ # @param created_before Packing slips that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :ship_from_party_id The vendor warehouseId for order fulfillment. If not specified the result will contain orders for all warehouses.
92
+ # @option opts [Integer] :limit The limit to the number of records returned
93
+ # @option opts [String] :sort_order Sort ASC or DESC by packing slip creation date.
94
+ # @option opts [String] :next_token Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call.
95
+ # @return [Array<(GetPackingSlipListResponse)>] GetPackingSlipListResponse data, response status code and response headers
96
+ def get_packing_slips_with_http_info(created_after, created_before, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: VendorShippingApi.get_packing_slips ...'
99
+ end
100
+ # verify the required parameter 'created_after' is set
101
+ if @api_client.config.client_side_validation && created_after.nil?
102
+ fail ArgumentError, "Missing the required parameter 'created_after' when calling VendorShippingApi.get_packing_slips"
103
+ end
104
+ # verify the required parameter 'created_before' is set
105
+ if @api_client.config.client_side_validation && created_before.nil?
106
+ fail ArgumentError, "Missing the required parameter 'created_before' when calling VendorShippingApi.get_packing_slips"
107
+ end
108
+ if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
109
+ fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
110
+ end
111
+ # resource path
112
+ local_var_path = '/vendor/directFulfillment/shipping/v1/packingSlips'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+ query_params[:'createdAfter'] = created_after
117
+ query_params[:'createdBefore'] = created_before
118
+ query_params[:'shipFromPartyId'] = opts[:'ship_from_party_id'] if !opts[:'ship_from_party_id'].nil?
119
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
120
+ query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
121
+ query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body]
133
+
134
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
135
+
136
+ auth_names = opts[:auth_names] || []
137
+ data = @api_client.call_api(:GET, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type)
144
+
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: VendorShippingApi#get_packing_slips\nData: #{data.inspect}"
147
+ end
148
+ return data
149
+ end
150
+ # Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
151
+ # @param body Request body containing the shipment confirmations data.
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [SubmitShipmentConfirmationsResponse]
154
+ def submit_shipment_confirmations(body, opts = {})
155
+ data = submit_shipment_confirmations_with_http_info(body, opts)
156
+ return data
157
+ end
158
+
159
+ # Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
160
+ # @param body Request body containing the shipment confirmations data.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(SubmitShipmentConfirmationsResponse)>] SubmitShipmentConfirmationsResponse data, response status code and response headers
163
+ def submit_shipment_confirmations_with_http_info(body, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: VendorShippingApi.submit_shipment_confirmations ...'
166
+ end
167
+ # verify the required parameter 'body' is set
168
+ if @api_client.config.client_side_validation && body.nil?
169
+ fail ArgumentError, "Missing the required parameter 'body' when calling VendorShippingApi.submit_shipment_confirmations"
170
+ end
171
+ # resource path
172
+ local_var_path = '/vendor/directFulfillment/shipping/v1/shipmentConfirmations'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+ # HTTP header 'Content-Type'
182
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
189
+
190
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
191
+
192
+ auth_names = opts[:auth_names] || []
193
+ data = @api_client.call_api(:POST, local_var_path,
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => return_type)
200
+
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: VendorShippingApi#submit_shipment_confirmations\nData: #{data.inspect}"
203
+ end
204
+ return data
205
+ end
206
+ # This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
207
+ # @param body Request body containing the shipment status update data.
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [SubmitShipmentStatusUpdatesResponse]
210
+ def submit_shipment_status_updates(body, opts = {})
211
+ data = submit_shipment_status_updates_with_http_info(body, opts)
212
+ return data
213
+ end
214
+
215
+ # This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
216
+ # @param body Request body containing the shipment status update data.
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [Array<(SubmitShipmentStatusUpdatesResponse)>] SubmitShipmentStatusUpdatesResponse data, response status code and response headers
219
+ def submit_shipment_status_updates_with_http_info(body, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: VendorShippingApi.submit_shipment_status_updates ...'
222
+ end
223
+ # verify the required parameter 'body' is set
224
+ if @api_client.config.client_side_validation && body.nil?
225
+ fail ArgumentError, "Missing the required parameter 'body' when calling VendorShippingApi.submit_shipment_status_updates"
226
+ end
227
+ # resource path
228
+ local_var_path = '/vendor/directFulfillment/shipping/v1/shipmentStatusUpdates'
229
+
230
+ # query parameters
231
+ query_params = opts[:query_params] || {}
232
+
233
+ # header parameters
234
+ header_params = opts[:header_params] || {}
235
+ # HTTP header 'Accept' (if needed)
236
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
237
+ # HTTP header 'Content-Type'
238
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
245
+
246
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
247
+
248
+ auth_names = opts[:auth_names] || []
249
+ data = @api_client.call_api(:POST, local_var_path,
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => return_type)
256
+
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug "API called: VendorShippingApi#submit_shipment_status_updates\nData: #{data.inspect}"
259
+ end
260
+ return data
261
+ end
262
+ end
263
+ end
264
+ end
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #Selling Partner API for Direct Fulfillment Shipping
3
+
4
+ #The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpVdfShippingV1
13
+ class VendorShippingLabelsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param purchase_order_number The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [GetShippingLabelResponse]
23
+ def get_shipping_label(purchase_order_number, opts = {})
24
+ data = get_shipping_label_with_http_info(purchase_order_number, opts)
25
+ return data
26
+ end
27
+
28
+ # Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
29
+ # @param purchase_order_number The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(GetShippingLabelResponse)>] GetShippingLabelResponse data, response status code and response headers
32
+ def get_shipping_label_with_http_info(purchase_order_number, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: VendorShippingLabelsApi.get_shipping_label ...'
35
+ end
36
+ # verify the required parameter 'purchase_order_number' is set
37
+ if @api_client.config.client_side_validation && purchase_order_number.nil?
38
+ fail ArgumentError, "Missing the required parameter 'purchase_order_number' when calling VendorShippingLabelsApi.get_shipping_label"
39
+ end
40
+ # resource path
41
+ local_var_path = '/vendor/directFulfillment/shipping/v1/shippingLabels/{purchaseOrderNumber}'.sub('{' + 'purchaseOrderNumber' + '}', purchase_order_number.to_s)
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
58
+
59
+ auth_names = opts[:auth_names] || []
60
+ data = @api_client.call_api(:GET, local_var_path,
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type)
67
+
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: VendorShippingLabelsApi#get_shipping_label\nData: #{data.inspect}"
70
+ end
71
+ return data
72
+ end
73
+ # Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
74
+ # @param created_after Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
75
+ # @param created_before Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
76
+ # @param [Hash] opts the optional parameters
77
+ # @option opts [String] :ship_from_party_id The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
78
+ # @option opts [Integer] :limit The limit to the number of records returned.
79
+ # @option opts [String] :sort_order Sort ASC or DESC by order creation date. (default to ASC)
80
+ # @option opts [String] :next_token Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
81
+ # @return [GetShippingLabelListResponse]
82
+ def get_shipping_labels(created_after, created_before, opts = {})
83
+ data = get_shipping_labels_with_http_info(created_after, created_before, opts)
84
+ return data
85
+ end
86
+
87
+ # Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
88
+ # @param created_after Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
89
+ # @param created_before Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :ship_from_party_id The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
92
+ # @option opts [Integer] :limit The limit to the number of records returned.
93
+ # @option opts [String] :sort_order Sort ASC or DESC by order creation date.
94
+ # @option opts [String] :next_token Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
95
+ # @return [Array<(GetShippingLabelListResponse)>] GetShippingLabelListResponse data, response status code and response headers
96
+ def get_shipping_labels_with_http_info(created_after, created_before, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: VendorShippingLabelsApi.get_shipping_labels ...'
99
+ end
100
+ # verify the required parameter 'created_after' is set
101
+ if @api_client.config.client_side_validation && created_after.nil?
102
+ fail ArgumentError, "Missing the required parameter 'created_after' when calling VendorShippingLabelsApi.get_shipping_labels"
103
+ end
104
+ # verify the required parameter 'created_before' is set
105
+ if @api_client.config.client_side_validation && created_before.nil?
106
+ fail ArgumentError, "Missing the required parameter 'created_before' when calling VendorShippingLabelsApi.get_shipping_labels"
107
+ end
108
+ if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
109
+ fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
110
+ end
111
+ # resource path
112
+ local_var_path = '/vendor/directFulfillment/shipping/v1/shippingLabels'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+ query_params[:'createdAfter'] = created_after
117
+ query_params[:'createdBefore'] = created_before
118
+ query_params[:'shipFromPartyId'] = opts[:'ship_from_party_id'] if !opts[:'ship_from_party_id'].nil?
119
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
120
+ query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
121
+ query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'payload'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body]
133
+
134
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
135
+
136
+ auth_names = opts[:auth_names] || []
137
+ data = @api_client.call_api(:GET, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type)
144
+
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: VendorShippingLabelsApi#get_shipping_labels\nData: #{data.inspect}"
147
+ end
148
+ return data
149
+ end
150
+ # Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
151
+ # @param body Request body containing one or more shipping labels data.
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [SubmitShippingLabelsResponse]
154
+ def submit_shipping_label_request(body, opts = {})
155
+ data = submit_shipping_label_request_with_http_info(body, opts)
156
+ return data
157
+ end
158
+
159
+ # Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
160
+ # @param body Request body containing one or more shipping labels data.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(SubmitShippingLabelsResponse)>] SubmitShippingLabelsResponse data, response status code and response headers
163
+ def submit_shipping_label_request_with_http_info(body, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: VendorShippingLabelsApi.submit_shipping_label_request ...'
166
+ end
167
+ # verify the required parameter 'body' is set
168
+ if @api_client.config.client_side_validation && body.nil?
169
+ fail ArgumentError, "Missing the required parameter 'body' when calling VendorShippingLabelsApi.submit_shipping_label_request"
170
+ end
171
+ # resource path
172
+ local_var_path = '/vendor/directFulfillment/shipping/v1/shippingLabels'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+ # HTTP header 'Content-Type'
182
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
183
+
184
+ # form parameters
185
+ form_params = opts[:form_params] || {}
186
+
187
+ # http body (model)
188
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
189
+
190
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
191
+
192
+ auth_names = opts[:auth_names] || []
193
+ data = @api_client.call_api(:POST, local_var_path,
194
+ :header_params => header_params,
195
+ :query_params => query_params,
196
+ :form_params => form_params,
197
+ :body => post_body,
198
+ :auth_names => auth_names,
199
+ :return_type => return_type)
200
+
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: VendorShippingLabelsApi#submit_shipping_label_request\nData: #{data.inspect}"
203
+ end
204
+ return data
205
+ end
206
+ end
207
+ end
208
+ end
@@ -0,0 +1,14 @@
1
+ =begin
2
+ #Selling Partner API for Direct Fulfillment Shipping
3
+
4
+ #The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor's shipping data.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ # APIs
12
+ require_relative './sp_vdf_shipping_v1/api/customer_invoices_api'
13
+ require_relative './sp_vdf_shipping_v1/api/vendor_shipping_api'
14
+ require_relative './sp_vdf_shipping_v1/api/vendor_shipping_labels_api'
@@ -0,0 +1,77 @@
1
+ =begin
2
+ #Selling Partner API for Retail Procurement Payments
3
+
4
+ #The Selling Partner API for Retail Procurement Payments provides programmatic access to vendors payments data.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpVendorInvoices
13
+ class VendorPaymentsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Submit new invoices to Amazon. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param body The request body containing the invoice data to submit.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [SubmitInvoicesResponse]
23
+ def submit_invoices(body, opts = {})
24
+ data = submit_invoices_with_http_info(body, opts)
25
+ return data
26
+ end
27
+
28
+ # Submit new invoices to Amazon. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
29
+ # @param body The request body containing the invoice data to submit.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(SubmitInvoicesResponse)>] SubmitInvoicesResponse data, response status code and response headers
32
+ def submit_invoices_with_http_info(body, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: VendorPaymentsApi.submit_invoices ...'
35
+ end
36
+ # verify the required parameter 'body' is set
37
+ if @api_client.config.client_side_validation && body.nil?
38
+ fail ArgumentError, "Missing the required parameter 'body' when calling VendorPaymentsApi.submit_invoices"
39
+ end
40
+ # resource path
41
+ local_var_path = '/vendor/payments/v1/invoices'
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ # HTTP header 'Content-Type'
51
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
58
+
59
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
60
+
61
+ auth_names = opts[:auth_names] || []
62
+ data = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => return_type)
69
+
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: VendorPaymentsApi#submit_invoices\nData: #{data.inspect}"
72
+ end
73
+ return data
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,12 @@
1
+ =begin
2
+ #Selling Partner API for Retail Procurement Payments
3
+
4
+ #The Selling Partner API for Retail Procurement Payments provides programmatic access to vendors payments data.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ # APIs
12
+ require_relative './sp_vendor_invoices/api/vendor_payments_api'