peddler 2.4.5 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +406 -134
  3. data/lib/peddler/access_token.rb +76 -0
  4. data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +80 -0
  5. data/lib/peddler/api/aplus_content_2020_11_01.rb +208 -0
  6. data/lib/peddler/api/application_management_2023_11_30.rb +25 -0
  7. data/lib/peddler/api/catalog_items_2020_12_01.rb +70 -0
  8. data/lib/peddler/api/catalog_items_2022_04_01.rb +83 -0
  9. data/lib/peddler/api/catalog_items_v0.rb +90 -0
  10. data/lib/peddler/api/data_kiosk_2023_11_15.rb +92 -0
  11. data/lib/peddler/api/easy_ship_2022_03_23.rb +108 -0
  12. data/lib/peddler/api/fba_inbound_eligibility_v1.rb +36 -0
  13. data/lib/peddler/api/fba_inventory_v1.rb +106 -0
  14. data/lib/peddler/api/feeds_2021_06_30.rb +104 -0
  15. data/lib/peddler/api/finances_v0.rb +121 -0
  16. data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +660 -0
  17. data/lib/peddler/api/fulfillment_inbound_v0.rb +314 -0
  18. data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +222 -0
  19. data/lib/peddler/api/listings_items_2020_09_01.rb +84 -0
  20. data/lib/peddler/api/listings_items_2021_08_01.rb +154 -0
  21. data/lib/peddler/api/listings_restrictions_2021_08_01.rb +37 -0
  22. data/lib/peddler/api/merchant_fulfillment_v0.rb +64 -0
  23. data/lib/peddler/api/messaging_v1.rb +241 -0
  24. data/lib/peddler/api/notifications_v1.rb +114 -0
  25. data/lib/peddler/api/orders_v0.rb +264 -0
  26. data/lib/peddler/api/product_fees_v0.rb +69 -0
  27. data/lib/peddler/api/product_pricing_2022_05_01.rb +43 -0
  28. data/lib/peddler/api/product_pricing_v0.rb +144 -0
  29. data/lib/peddler/api/product_type_definitions_2020_09_01.rb +75 -0
  30. data/lib/peddler/api/replenishment_2022_11_07.rb +45 -0
  31. data/lib/peddler/api/reports_2021_06_30.rb +139 -0
  32. data/lib/peddler/api/sales_v1.rb +69 -0
  33. data/lib/peddler/api/sellers_v1.rb +33 -0
  34. data/lib/peddler/api/services_v1.rb +308 -0
  35. data/lib/peddler/api/shipment_invoicing_v0.rb +46 -0
  36. data/lib/peddler/api/shipping_v1.rb +107 -0
  37. data/lib/peddler/api/shipping_v2.rb +267 -0
  38. data/lib/peddler/api/solicitations_v1.rb +53 -0
  39. data/lib/peddler/api/supply_sources_2020_07_01.rb +82 -0
  40. data/lib/peddler/api/tokens_2021_03_01.rb +30 -0
  41. data/lib/peddler/api/uploads_2020_11_01.rb +40 -0
  42. data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +24 -0
  43. data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +72 -0
  44. data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +72 -0
  45. data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +23 -0
  46. data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +35 -0
  47. data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +177 -0
  48. data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +165 -0
  49. data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +24 -0
  50. data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +24 -0
  51. data/lib/peddler/api/vendor_invoices_v1.rb +22 -0
  52. data/lib/peddler/api/vendor_orders_v1.rb +148 -0
  53. data/lib/peddler/api/vendor_shipments_v1.rb +120 -0
  54. data/lib/peddler/api/vendor_transaction_status_v1.rb +24 -0
  55. data/lib/peddler/api.rb +115 -0
  56. data/lib/peddler/error.rb +30 -0
  57. data/lib/peddler/region.rb +30 -0
  58. data/lib/peddler/version.rb +1 -1
  59. data/lib/peddler.rb +52 -1
  60. metadata +70 -80
  61. data/lib/mws/easy_ship/client.rb +0 -93
  62. data/lib/mws/easy_ship.rb +0 -3
  63. data/lib/mws/feeds/client.rb +0 -122
  64. data/lib/mws/feeds.rb +0 -3
  65. data/lib/mws/finances/client.rb +0 -82
  66. data/lib/mws/finances.rb +0 -3
  67. data/lib/mws/fulfillment_inbound_shipment/client.rb +0 -388
  68. data/lib/mws/fulfillment_inbound_shipment.rb +0 -3
  69. data/lib/mws/fulfillment_inventory/client.rb +0 -57
  70. data/lib/mws/fulfillment_inventory.rb +0 -3
  71. data/lib/mws/fulfillment_outbound_shipment/client.rb +0 -211
  72. data/lib/mws/fulfillment_outbound_shipment.rb +0 -3
  73. data/lib/mws/merchant_fulfillment/client.rb +0 -87
  74. data/lib/mws/merchant_fulfillment.rb +0 -3
  75. data/lib/mws/off_amazon_payments.rb +0 -3
  76. data/lib/mws/orders/client.rb +0 -120
  77. data/lib/mws/orders.rb +0 -3
  78. data/lib/mws/products/client.rb +0 -268
  79. data/lib/mws/products.rb +0 -3
  80. data/lib/mws/recommendations/client.rb +0 -72
  81. data/lib/mws/recommendations.rb +0 -3
  82. data/lib/mws/reports/client.rb +0 -236
  83. data/lib/mws/reports.rb +0 -3
  84. data/lib/mws/sellers/client.rb +0 -44
  85. data/lib/mws/sellers.rb +0 -3
  86. data/lib/mws/shipment_invoicing/client.rb +0 -74
  87. data/lib/mws/shipment_invoicing.rb +0 -3
  88. data/lib/mws/subscriptions/client.rb +0 -179
  89. data/lib/mws/subscriptions.rb +0 -3
  90. data/lib/mws.rb +0 -29
  91. data/lib/peddler/client.rb +0 -159
  92. data/lib/peddler/errors/builder.rb +0 -64
  93. data/lib/peddler/errors/class_generator.rb +0 -40
  94. data/lib/peddler/errors/error.rb +0 -45
  95. data/lib/peddler/errors/parser.rb +0 -28
  96. data/lib/peddler/flat_file_parser.rb +0 -56
  97. data/lib/peddler/headers.rb +0 -102
  98. data/lib/peddler/marketplace.rb +0 -79
  99. data/lib/peddler/operation.rb +0 -78
  100. data/lib/peddler/parser.rb +0 -33
  101. data/lib/peddler/structured_list.rb +0 -23
  102. data/lib/peddler/vcr_matcher.rb +0 -97
  103. data/lib/peddler/xml_parser.rb +0 -38
  104. data/lib/peddler/xml_response_parser.rb +0 -25
@@ -1,388 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
-
5
- module MWS
6
- module FulfillmentInboundShipment
7
- # With the Fulfillment Inbound Shipment API, you can create and update
8
- # inbound shipments of inventory in the Amazon Fulfillment Network. You can
9
- # also request lists of inbound shipments or inbound shipment items based on
10
- # criteria that you specify.
11
- class Client < ::Peddler::Client
12
- self.version = '2010-10-01'
13
- self.path = "/FulfillmentInboundShipment/#{version}"
14
-
15
- # Returns inbound guidance for a list of items by Seller SKU
16
- #
17
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetInboundGuidanceForSKU.html
18
- # @param [String] marketplace_id
19
- # @param [Array<String>] seller_sku_list
20
- # @return [Peddler::XMLParser]
21
- def get_inbound_guidance_for_sku(marketplace_id, *seller_sku_list)
22
- operation('GetInboundGuidanceForSKU')
23
- .add('MarketplaceId' => marketplace_id,
24
- 'SellerSKUList' => seller_sku_list)
25
- .structure!('SellerSKUList', 'Id')
26
-
27
- run
28
- end
29
-
30
- # Returns inbound guidance for a list of items by ASIN
31
- #
32
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetInboundGuidanceForASIN.html
33
- # @param [String] marketplace_id
34
- # @param [Array<String>] asin_list
35
- # @return [Peddler::XMLParser]
36
- def get_inbound_guidance_for_asin(marketplace_id, *asin_list)
37
- operation('GetInboundGuidanceForASIN')
38
- .add('MarketplaceId' => marketplace_id, 'ASINList' => asin_list)
39
- .structure!('ASINList', 'Id')
40
-
41
- run
42
- end
43
-
44
- # Returns the information required to create an inbound shipment
45
- #
46
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipmentPlan.html
47
- # @param [Struct, Hash] ship_from_address
48
- # @param [Array<Struct, Hash>] inbound_shipment_plan_request_items
49
- # @param [Hash] opts
50
- # @option opts [String] :ship_to_country_code
51
- # @option opts [String] :ship_to_country_subdivision_code
52
- # @option opts [String] :label_prep_preference
53
- # @return [Peddler::XMLParser]
54
- def create_inbound_shipment_plan(ship_from_address,
55
- inbound_shipment_plan_request_items,
56
- opts = {})
57
- operation('CreateInboundShipmentPlan')
58
- .add(opts)
59
- .add('ShipFromAddress' => ship_from_address,
60
- 'InboundShipmentPlanRequestItems' =>
61
- inbound_shipment_plan_request_items)
62
- .structure!('InboundShipmentPlanRequestItems', 'member')
63
- .structure!('PrepDetailsList', 'member')
64
-
65
- run
66
- end
67
-
68
- # Creates an inbound shipment
69
- #
70
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipment.html
71
- # @param [String] shipment_id
72
- # @param [Struct, Hash] inbound_shipment_header
73
- # @param [Array<Struct, Hash>] :inbound_shipment_items
74
- # @return [Peddler::XMLParser]
75
- def create_inbound_shipment(shipment_id, inbound_shipment_header,
76
- inbound_shipment_items)
77
- build_inbound_shipment_operation('CreateInboundShipment', shipment_id,
78
- inbound_shipment_header,
79
- inbound_shipment_items)
80
-
81
- run
82
- end
83
-
84
- # Updates an existing inbound shipment
85
- #
86
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_UpdateInboundShipment.html
87
- # @param [String] shipment_id
88
- # @param [Struct, Hash] inbound_shipment_header
89
- # @param [Array<Struct, Hash>] :inbound_shipment_items
90
- # @return [Peddler::XMLParser]
91
- def update_inbound_shipment(shipment_id, inbound_shipment_header,
92
- inbound_shipment_items)
93
- build_inbound_shipment_operation('UpdateInboundShipment', shipment_id,
94
- inbound_shipment_header,
95
- inbound_shipment_items)
96
-
97
- run
98
- end
99
-
100
- # Returns pre-order information, including dates
101
- #
102
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPreorderInfo.html
103
- # @param [String] shipment_id
104
- # @return [Peddler::XMLParser]
105
- def get_preorder_info(shipment_id)
106
- operation('GetPreorderInfo')
107
- .add('ShipmentId' => shipment_id)
108
-
109
- run
110
- end
111
-
112
- # Confirms a shipment for pre-order
113
- #
114
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ConfirmPreorder.html
115
- # @param [String] shipment_id
116
- # @param [#iso8601] need_by_date
117
- # @return [Peddler::XMLParser]
118
- def confirm_preorder(shipment_id, need_by_date)
119
- operation('ConfirmPreorder')
120
- .add('ShipmentId' => shipment_id, 'NeedByDate' => need_by_date)
121
-
122
- run
123
- end
124
-
125
- # Returns labeling requirements and item preparation instructions to help
126
- # you prepare items for an inbound shipment
127
- #
128
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPrepInstructionsForSKU.html
129
- # @param [String] ship_to_country_code
130
- # @param [Array<String>] seller_sku_list
131
- # @return [Peddler::XMLParser]
132
- def get_prep_instructions_for_sku(ship_to_country_code, *seller_sku_list)
133
- operation('GetPrepInstructionsForSKU')
134
- .add('SellerSKUList' => seller_sku_list,
135
- 'ShipToCountryCode' => ship_to_country_code)
136
- .structure!('SellerSKUList', 'Id')
137
-
138
- run
139
- end
140
-
141
- # Returns item preparation instructions to help with item sourcing
142
- # decisions
143
- #
144
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPrepInstructionsForASIN.html
145
- # @param [String] ship_to_country_code
146
- # @param [Array<String>] asin_list
147
- # @return [Peddler::XMLParser]
148
- def get_prep_instructions_for_asin(ship_to_country_code, *asin_list)
149
- operation('GetPrepInstructionsForASIN')
150
- .add('ASINList' => asin_list,
151
- 'ShipToCountryCode' => ship_to_country_code)
152
- .structure!('ASINList', 'Id')
153
-
154
- run
155
- # Work around a bug upstream
156
- #
157
- # @see https://github.com/hakanensari/peddler/issues/122
158
- rescue Peddler::Errors::Error => e
159
- raise unless e.message.include?("Value null at 'asinList'")
160
-
161
- get_prep_instructions_for_asin_with_bad_params(ship_to_country_code,
162
- *asin_list)
163
- end
164
-
165
- # Sends transportation information to Amazon about an inbound shipment
166
- #
167
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_PutTransportContent.html
168
- # @param [String] shipment_id
169
- # @param [Boolean] is_partnered
170
- # @param [String] shipment_type
171
- # @param [Struct, Hash] transport_details
172
- # @return [Peddler::XMLParser]
173
- def put_transport_content(shipment_id, is_partnered, shipment_type,
174
- transport_details)
175
- operation('PutTransportContent')
176
- .add('ShipmentId' => shipment_id, 'IsPartnered' => is_partnered,
177
- 'ShipmentType' => shipment_type,
178
- 'TransportDetails' => transport_details)
179
- .structure!('PackageList', 'member')
180
- .structure!('PalletList', 'member')
181
-
182
- run
183
- end
184
-
185
- # Requests an estimate of the shipping cost for an inbound shipment
186
- #
187
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_EstimateTransportRequest.html
188
- # @param [String] shipment_id
189
- # @return [Peddler::XMLParser]
190
- def estimate_transport_request(shipment_id)
191
- operation('EstimateTransportRequest')
192
- .add('ShipmentId' => shipment_id)
193
-
194
- run
195
- end
196
-
197
- # Returns current transportation information about an inbound shipment
198
- #
199
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetTransportContent.html
200
- # @param [String] shipment_id
201
- # @return [Peddler::XMLParser]
202
- def get_transport_content(shipment_id)
203
- operation('GetTransportContent')
204
- .add('ShipmentId' => shipment_id)
205
-
206
- run
207
- end
208
-
209
- # Confirms that you accept the Amazon-partnered shipping estimate and you
210
- # request that the Amazon-partnered carrier ship your inbound shipment
211
- #
212
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ConfirmTransportRequest.html
213
- # @param [String] shipment_id
214
- # @return [Peddler::XMLParser]
215
- def confirm_transport_request(shipment_id)
216
- operation('ConfirmTransportRequest')
217
- .add('ShipmentId' => shipment_id)
218
-
219
- run
220
- end
221
-
222
- # Voids a previously-confirmed request to ship your inbound shipment using
223
- # an Amazon-partnered carrier
224
- #
225
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_VoidTransportRequest.html
226
- # @param [String] shipment_id
227
- # @return [Peddler::XMLParser]
228
- def void_transport_request(shipment_id)
229
- operation('VoidTransportRequest')
230
- .add('ShipmentId' => shipment_id)
231
-
232
- run
233
- end
234
-
235
- # Returns PDF document data for printing package labels for an inbound
236
- # shipment
237
- #
238
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPackageLabels.html
239
- # @param [String] shipment_id
240
- # @param [String] page_type
241
- # @param [Hash] opts
242
- # @option opts [Integer] :number_of_packages
243
- # @return [Peddler::XMLParser]
244
- def get_package_labels(shipment_id, page_type, opts = {})
245
- operation('GetPackageLabels')
246
- .add(opts)
247
- .add('ShipmentId' => shipment_id, 'PageType' => page_type)
248
-
249
- run
250
- end
251
-
252
- # Returns unique package labels for faster and more accurate shipment
253
- # processing at the Amazon fulfillment centre
254
- #
255
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetUniquePackageLabels.html
256
- # @param [String] shipment_id
257
- # @param [String] page_type
258
- # @param [Array<String>] package_labels_to_print
259
- # @return [Peddler::XMLParser]
260
- def get_unique_package_labels(shipment_id, page_type,
261
- package_labels_to_print)
262
- operation('GetUniquePackageLabels')
263
- .add('ShipmentId' => shipment_id, 'PageType' => page_type,
264
- 'PackageLabelsToPrint' => package_labels_to_print)
265
- .structure!('PackageLabelsToPrint', 'member')
266
-
267
- run
268
- end
269
-
270
- # Returns pallet labels
271
- #
272
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPalletLabels.html
273
- # @param [String] shipment_id
274
- # @param [String] page_type
275
- # @param [Integer] number_of_pallets
276
- # @return [Peddler::XMLParser]
277
- def get_pallet_labels(shipment_id, page_type, number_of_pallets)
278
- operation('GetPalletLabels')
279
- .add('ShipmentId' => shipment_id, 'PageType' => page_type,
280
- 'NumberOfPallets' => number_of_pallets)
281
-
282
- run
283
- end
284
-
285
- # Returns PDF document data for printing a bill of lading for an inbound
286
- # shipment
287
- #
288
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetBillOfLading.html
289
- # @param [String] shipment_id
290
- # @return [Peddler::XMLParser]
291
- def get_bill_of_lading(shipment_id)
292
- operation('GetBillOfLading')
293
- .add('ShipmentId' => shipment_id)
294
- run
295
- end
296
-
297
- # Returns a list of inbound shipments based on criteria that you specify
298
- #
299
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipments.html
300
- # @param [Hash] opts
301
- # @option opts [Array<String>] :shipment_status_list
302
- # @option opts [Array<String>] :shipment_id_list
303
- # @option opts [String, #iso8601] :last_updated_after
304
- # @option opts [String, #iso8601] :last_updated_before
305
- # @return [Peddler::XMLParser]
306
- def list_inbound_shipments(opts = {})
307
- operation('ListInboundShipments')
308
- .add(opts)
309
- .structure!('ShipmentStatusList', 'member')
310
- .structure!('ShipmentIdList', 'member')
311
-
312
- run
313
- end
314
-
315
- # Returns the next page of inbound shipments
316
- #
317
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentsByNextToken.html
318
- # @param [String] next_token
319
- # @return [Peddler::XMLParser]
320
- def list_inbound_shipments_by_next_token(next_token)
321
- operation('ListInboundShipmentsByNextToken')
322
- .add('NextToken' => next_token)
323
-
324
- run
325
- end
326
-
327
- # Returns a list of items in a specified inbound shipment, or a list of
328
- # items that were updated within a specified time frame
329
- #
330
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItems.html
331
- # @param [Hash] opts
332
- # @option opts [String] :shipment_id
333
- # @option opts [String, #iso8601] :last_updated_after
334
- # @option opts [String, #iso8601] :last_updated_before
335
- # @return [Peddler::XMLParser]
336
- def list_inbound_shipment_items(opts = {})
337
- operation('ListInboundShipmentItems')
338
- .add(opts)
339
-
340
- run
341
- end
342
-
343
- # Returns the next page of inbound shipment items
344
- #
345
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItemsByNextToken.html
346
- # @param [String] next_token
347
- # @return [Peddler::XMLParser]
348
- def list_inbound_shipment_items_by_next_token(next_token)
349
- operation('ListInboundShipmentItemsByNextToken')
350
- .add('NextToken' => next_token)
351
-
352
- run
353
- end
354
-
355
- # Gets the operational status of the API
356
- #
357
- # @see https://docs.developer.amazonservices.com/en_US/fba_inbound/MWS_GetServiceStatus.html
358
- # @return [Peddler::XMLParser]
359
- def get_service_status
360
- operation('GetServiceStatus')
361
- run
362
- end
363
-
364
- private
365
-
366
- def build_inbound_shipment_operation(operation_name, shipment_id,
367
- inbound_shipment_header,
368
- inbound_shipment_items)
369
- operation(operation_name)
370
- .add('ShipmentId' => shipment_id,
371
- 'InboundShipmentHeader' => inbound_shipment_header,
372
- 'InboundShipmentItems' => inbound_shipment_items)
373
- .structure!('InboundShipmentItems', 'member')
374
- .structure!('PrepDetailsList', 'member')
375
- end
376
-
377
- def get_prep_instructions_for_asin_with_bad_params(_ship_to_country_code,
378
- *asin_list)
379
- operation
380
- .add('AsinList' => asin_list)
381
- .structure!('AsinList', 'Id')
382
- .delete_if { |key, _val| key.include?('ASINList') }
383
-
384
- run
385
- end
386
- end
387
- end
388
- end
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/fulfillment_inbound_shipment/client'
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
-
5
- module MWS
6
- module FulfillmentInventory
7
- # The Fulfillment Inventory API can help you stay up-to-date on the
8
- # availability of your inventory in the Amazon Fulfillment Network. The
9
- # Fulfillment Inventory API reports real-time availability information for
10
- # your Amazon Fulfillment Network inventory regardless of whether you are
11
- # selling your inventory on Amazon's retail web site or through other retail
12
- # channels.
13
- class Client < ::Peddler::Client
14
- self.version = '2010-10-01'
15
- self.path = "/FulfillmentInventory/#{version}"
16
-
17
- # Returns information about the availability of a seller's inventory
18
- #
19
- # @see https://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
20
- # @param [Hash] opts
21
- # @option opts [Array<String>, String] :seller_skus
22
- # @option opts [String, #iso8601] :query_start_date_time
23
- # @option opts [String] :response_group
24
- # @option opts [String] :marketplace_id
25
- # @return [Peddler::XMLParser]
26
- def list_inventory_supply(opts = {})
27
- operation('ListInventorySupply')
28
- .add(opts)
29
- .structure!('SellerSkus', 'member')
30
-
31
- run
32
- end
33
-
34
- # Returns the next page of information about the availability of a
35
- # seller's inventory
36
- #
37
- # @see https://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupplyByNextToken.html
38
- # @param [String] next_token
39
- # @return [Peddler::XMLParser]
40
- def list_inventory_supply_by_next_token(next_token)
41
- operation('ListInventorySupplyByNextToken')
42
- .add('NextToken' => next_token)
43
-
44
- run
45
- end
46
-
47
- # Gets the operational status of the API
48
- #
49
- # @see https://docs.developer.amazonservices.com/en_US/fba_inventory/MWS_GetServiceStatus.html
50
- # @return [Peddler::XMLParser]
51
- def get_service_status
52
- operation('GetServiceStatus')
53
- run
54
- end
55
- end
56
- end
57
- end
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/fulfillment_inventory/client'
@@ -1,211 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
- require 'excon'
5
-
6
- module MWS
7
- module FulfillmentOutboundShipment
8
- # The Fulfillment Outbound Shipment API enables you to fulfill orders placed
9
- # through channels other than Amazon's retail web site, using your inventory
10
- # in the Amazon Fulfillment Network. You can request previews of potential
11
- # fulfillment orders that return estimated shipping fees and shipping dates
12
- # based on shipping speed. You can get detailed item-level, shipment-level,
13
- # and order-level information for any existing fulfillment order that you
14
- # specify. You can also request lists of existing fulfillment orders based
15
- # on when they were fulfilled and by the fulfillment method associated with
16
- # them.
17
- class Client < ::Peddler::Client
18
- self.version = '2010-10-01'
19
- self.path = "/FulfillmentOutboundShipment/#{version}"
20
-
21
- # Lists fulfillment order previews
22
- #
23
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_GetFulfillmentPreview.html
24
- # @param [Struct, Hash] address
25
- # @param [Array<Struct, Hash>] items
26
- # @param [Hash] opts
27
- # @option opts Array[String] :shipping_speed_categories
28
- # @option opts [Boolean] :include_cod_fulfillment_preview
29
- # @return [Peddler::XMLParser]
30
- def get_fulfillment_preview(address, items, opts = {})
31
- operation('GetFulfillmentPreview')
32
- .add(opts)
33
- .add('Address' => address, 'Items' => items)
34
- .structure!('Items', 'member')
35
- .structure!('ShippingSpeedCategories', 'member')
36
-
37
- run
38
- end
39
-
40
- # Requests that Amazon ship items from the seller's Amazon Fulfillment
41
- # Network inventory to a destination address
42
- #
43
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_CreateFulfillmentOrder.html
44
- # @param [String] seller_fulfillment_order_id
45
- # @param [String] displayable_order_id
46
- # @param [String, #iso8601] displayable_order_date_time
47
- # @param [String] displayable_order_comment
48
- # @param [String] shipping_speed_category
49
- # @param [Struct, Hash] destination_address
50
- # @param [Array<Struct, Hash>] items
51
- # @param [Hash] opts
52
- # @option opts [String] :fulfillment_action
53
- # @option opts [String] :fulfillment_policy
54
- # @option opts [Array<String>] :notification_email_list
55
- # @option opts [Struct, Hash] :cod_settings
56
- # @return [Peddler::XMLParser]
57
- def create_fulfillment_order(seller_fulfillment_order_id,
58
- displayable_order_id,
59
- displayable_order_date_time,
60
- displayable_order_comment,
61
- shipping_speed_category,
62
- destination_address, items, opts = {})
63
- operation('CreateFulfillmentOrder')
64
- .add(opts)
65
- .add('SellerFulfillmentOrderId' => seller_fulfillment_order_id,
66
- 'DisplayableOrderId' => displayable_order_id,
67
- 'DisplayableOrderDateTime' => displayable_order_date_time,
68
- 'DisplayableOrderComment' => displayable_order_comment,
69
- 'ShippingSpeedCategory' => shipping_speed_category,
70
- 'DestinationAddress' => destination_address,
71
- 'Items' => items)
72
- .structure!('Items', 'member')
73
- .structure!('NotificationEmailList', 'member')
74
-
75
- run
76
- end
77
-
78
- # Updates and/or requests shipment for a fulfillment order with an order
79
- # hold on it
80
- #
81
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_UpdateFulfillmentOrder.html
82
- # @param [String] seller_fulfillment_order_id
83
- # @param [Hash] opts
84
- # @option opts [String] :fulfillment_action
85
- # @option opts [String] :displayable_order_id
86
- # @option opts [String, #iso8601] :displayable_order_date_time
87
- # @option opts [String] :displayable_order_comment
88
- # @option opts [String] :shipping_speed_category
89
- # @option opts [Struct, Hash] :destination_address
90
- # @option opts [String] :fulfillment_policy
91
- # @option opts [Array<String>] :notification_email_list
92
- # @option opts [Array<Struct, Hash>] :items
93
- # @return [Peddler::XMLParser]
94
- def update_fulfillment_order(seller_fulfillment_order_id, opts = {})
95
- operation('UpdateFulfillmentOrder')
96
- .add(opts)
97
- .add('SellerFulfillmentOrderId' => seller_fulfillment_order_id)
98
- .structure!('NotificationEmailList', 'member')
99
- .structure!('Items', 'member')
100
-
101
- run
102
- end
103
-
104
- # Gets a fulfillment order
105
- #
106
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_GetFulfillmentOrder.html
107
- # @param [String] seller_fulfillment_order_id
108
- # @return [Peddler::XMLParser]
109
- def get_fulfillment_order(seller_fulfillment_order_id)
110
- operation('GetFulfillmentOrder')
111
- .add('SellerFulfillmentOrderId' => seller_fulfillment_order_id)
112
-
113
- run
114
- end
115
-
116
- # Returns a list of fulfillment orders fulfilled on or after a date
117
- #
118
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_ListAllFulfillmentOrders.html
119
- # @param [Hash] opts
120
- # @option opts [String, #iso8601] :query_start_date_time
121
- # @return [Peddler::XMLParser]
122
- def list_all_fulfillment_orders(opts = {})
123
- operation('ListAllFulfillmentOrders')
124
- .add(opts)
125
-
126
- run
127
- end
128
-
129
- # Returns the next page of fulfillment orders
130
- #
131
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_ListAllFulfillmentOrdersByNextToken.html
132
- # @param [String] next_token
133
- # @return [Peddler::XMLParser]
134
- def list_all_fulfillment_orders_by_next_token(next_token)
135
- operation('ListAllFulfillmentOrdersByNextToken')
136
- .add('NextToken' => next_token)
137
-
138
- run
139
- end
140
-
141
- # Returns delivery tracking information for a package in an outbound
142
- # shipment for a Multi-Channel Fulfillment order
143
- #
144
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_GetPackageTrackingDetails.html
145
- # @param [String] package_number
146
- # @return [Peddler::XMLParser]
147
- def get_package_tracking_details(package_number)
148
- operation('GetPackageTrackingDetails')
149
- .add('PackageNumber' => package_number)
150
-
151
- run
152
- end
153
-
154
- # Requests that Amazon stop attempting to fulfill an existing fulfillment
155
- # order
156
- #
157
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_CancelFulfillmentOrder.html
158
- # @param [String] seller_fulfillment_order_id
159
- # @return [Peddler::XMLParser]
160
- def cancel_fulfillment_order(seller_fulfillment_order_id)
161
- operation('CancelFulfillmentOrder')
162
- .add('SellerFulfillmentOrderId' => seller_fulfillment_order_id)
163
-
164
- run
165
- end
166
-
167
- # Returns a list of return reason codes for a seller SKU in a given
168
- # marketplace.
169
- #
170
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_ListReturnReasonCodes.html
171
- # @param [String] seller_sku
172
- # @param [Hash] opts
173
- # @option opts [String] :marketplace_id
174
- # @option opts [String] :seller_fulfillment_order_id
175
- # @option opts [String] :language
176
- # @return [Peddler::XMLParser]
177
- def list_return_reason_codes(seller_sku, opts = {})
178
- operation('ListReturnReasonCodes')
179
- .add(opts)
180
- .add('SellerSKU' => seller_sku)
181
- .structure!('List', 'member')
182
-
183
- run
184
- end
185
-
186
- # Creates a fulfillment return.
187
- #
188
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/FBAOutbound_CreateFulfillmentReturn.html
189
- # @param [String] seller_fulfillment_order_id
190
- # @param [Array] items
191
- # @return [Peddler::XMLParser]
192
- def create_fulfillment_return(seller_fulfillment_order_id, items)
193
- operation('CreateFulfillmentReturn')
194
- .add('SellerFulfillmentOrderId' => seller_fulfillment_order_id,
195
- 'Items' => items)
196
- .structure!('Items', 'member')
197
-
198
- run
199
- end
200
-
201
- # Gets the operational status of the API
202
- #
203
- # @see https://docs.developer.amazonservices.com/en_US/fba_outbound/MWS_GetServiceStatus.html
204
- # @return [Peddler::XMLParser]
205
- def get_service_status
206
- operation('GetServiceStatus')
207
- run
208
- end
209
- end
210
- end
211
- end
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/fulfillment_outbound_shipment/client'