peddler 3.0.0 → 4.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -6
  3. data/lib/peddler/api.rb +28 -13
  4. data/lib/peddler/{api → apis}/amazon_warehousing_and_distribution_2024_05_09.rb +5 -5
  5. data/lib/peddler/{api → apis}/aplus_content_2020_11_01.rb +12 -12
  6. data/lib/peddler/{api → apis}/application_integrations_2024_04_01.rb +5 -5
  7. data/lib/peddler/{api → apis}/application_management_2023_11_30.rb +3 -3
  8. data/lib/peddler/{api → apis}/catalog_items_2020_12_01.rb +4 -4
  9. data/lib/peddler/{api → apis}/catalog_items_2022_04_01.rb +5 -5
  10. data/lib/peddler/{api → apis}/catalog_items_v0.rb +5 -5
  11. data/lib/peddler/{api → apis}/data_kiosk_2023_11_15.rb +7 -7
  12. data/lib/peddler/{api → apis}/easy_ship_2022_03_23.rb +20 -21
  13. data/lib/peddler/{api → apis}/fba_inbound_eligibility_v1.rb +3 -3
  14. data/lib/peddler/{api → apis}/fba_inventory_v1.rb +6 -6
  15. data/lib/peddler/{api → apis}/feeds_2021_06_30.rb +12 -9
  16. data/lib/peddler/{api → apis}/finances_2024_06_19.rb +3 -3
  17. data/lib/peddler/apis/finances_v0.rb +135 -0
  18. data/lib/peddler/{api → apis}/fulfillment_inbound_2024_03_20.rb +84 -54
  19. data/lib/peddler/{api → apis}/fulfillment_inbound_v0.rb +27 -20
  20. data/lib/peddler/{api → apis}/fulfillment_outbound_2020_07_01.rb +16 -16
  21. data/lib/peddler/{api → apis}/invoices_2024_06_19.rb +9 -9
  22. data/lib/peddler/{api → apis}/listings_items_2020_09_01.rb +5 -5
  23. data/lib/peddler/{api → apis}/listings_items_2021_08_01.rb +7 -41
  24. data/lib/peddler/{api → apis}/listings_restrictions_2021_08_01.rb +3 -3
  25. data/lib/peddler/{api → apis}/merchant_fulfillment_v0.rb +14 -14
  26. data/lib/peddler/{api → apis}/messaging_v1.rb +15 -15
  27. data/lib/peddler/{api → apis}/notifications_v1.rb +10 -10
  28. data/lib/peddler/{api → apis}/orders_v0.rb +13 -13
  29. data/lib/peddler/{api → apis}/product_fees_v0.rb +5 -5
  30. data/lib/peddler/{api → apis}/product_pricing_2022_05_01.rb +8 -8
  31. data/lib/peddler/{api → apis}/product_pricing_v0.rb +8 -8
  32. data/lib/peddler/{api → apis}/product_type_definitions_2020_09_01.rb +4 -4
  33. data/lib/peddler/{api → apis}/replenishment_2022_11_07.rb +5 -5
  34. data/lib/peddler/{api → apis}/reports_2021_06_30.rb +12 -12
  35. data/lib/peddler/{api → apis}/sales_v1.rb +3 -3
  36. data/lib/peddler/{api → apis}/sellers_v1.rb +4 -4
  37. data/lib/peddler/{api → apis}/services_v1.rb +19 -19
  38. data/lib/peddler/{api → apis}/shipment_invoicing_v0.rb +5 -5
  39. data/lib/peddler/{api → apis}/shipping_v1.rb +11 -11
  40. data/lib/peddler/{api → apis}/shipping_v2.rb +19 -19
  41. data/lib/peddler/{api → apis}/solicitations_v1.rb +4 -4
  42. data/lib/peddler/{api → apis}/supply_sources_2020_07_01.rb +8 -8
  43. data/lib/peddler/{api → apis}/tokens_2021_03_01.rb +3 -3
  44. data/lib/peddler/{api → apis}/uploads_2020_11_01.rb +3 -3
  45. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_inventory_v1.rb +4 -4
  46. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_2021_12_28.rb +5 -5
  47. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_v1.rb +6 -6
  48. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_payments_v1.rb +4 -4
  49. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +9 -9
  50. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_shipping_2021_12_28.rb +17 -17
  51. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_shipping_v1.rb +30 -30
  52. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_2021_12_28.rb +4 -4
  53. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_v1.rb +4 -4
  54. data/lib/peddler/{api → apis}/vendor_invoices_v1.rb +4 -4
  55. data/lib/peddler/{api → apis}/vendor_orders_v1.rb +7 -7
  56. data/lib/peddler/{api → apis}/vendor_shipments_v1.rb +6 -6
  57. data/lib/peddler/{api → apis}/vendor_transaction_status_v1.rb +3 -3
  58. data/lib/peddler/endpoint.rb +2 -2
  59. data/lib/peddler/error.rb +21 -12
  60. data/lib/peddler/helpers/feeds_2021_06_30.rb +26 -0
  61. data/lib/peddler/json_feed_document.rb +31 -0
  62. data/lib/peddler/marketplace.rb +46 -2
  63. data/lib/peddler/response.rb +46 -0
  64. data/lib/peddler/version.rb +1 -1
  65. data/lib/peddler.rb +54 -55
  66. metadata +59 -56
  67. data/lib/peddler/api/finances_v0.rb +0 -148
@@ -5,12 +5,12 @@ require "peddler/api"
5
5
  module Peddler
6
6
  class << self
7
7
  def fulfillment_inbound_2024_03_20(...)
8
- API::FulfillmentInbound20240320.new(...)
8
+ APIs::FulfillmentInbound20240320.new(...)
9
9
  end
10
10
  end
11
11
 
12
- class API
13
- # The Selling Partner API for FBA inbound operations.
12
+ module APIs
13
+ # Fulfillment Inbound v2024-03-20
14
14
  #
15
15
  # The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound
16
16
  # workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability
@@ -27,7 +27,7 @@ module Peddler
27
27
  # @param sort_by [String] Sort by field.
28
28
  # @param sort_order [String] The sort order.
29
29
  # @param rate_limit [Float] Requests per second
30
- # @return [Hash] The API response
30
+ # @return [Peddler::Response] The API response
31
31
  def list_inbound_plans(page_size: 10, pagination_token: nil, status: nil, sort_by: nil, sort_order: nil,
32
32
  rate_limit: 2.0)
33
33
  path = "/inbound/fba/2024-03-20/inboundPlans"
@@ -48,7 +48,7 @@ module Peddler
48
48
  # @note This operation can make a static sandbox call.
49
49
  # @param body [Hash] The body of the request to `createInboundPlan`.
50
50
  # @param rate_limit [Float] Requests per second
51
- # @return [Hash] The API response
51
+ # @return [Peddler::Response] The API response
52
52
  def create_inbound_plan(body, rate_limit: 2.0)
53
53
  path = "/inbound/fba/2024-03-20/inboundPlans"
54
54
 
@@ -60,7 +60,7 @@ module Peddler
60
60
  # @note This operation can make a static sandbox call.
61
61
  # @param inbound_plan_id [String] Identifier of an inbound plan.
62
62
  # @param rate_limit [Float] Requests per second
63
- # @return [Hash] The API response
63
+ # @return [Peddler::Response] The API response
64
64
  def get_inbound_plan(inbound_plan_id, rate_limit: 2.0)
65
65
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}"
66
66
 
@@ -76,7 +76,7 @@ module Peddler
76
76
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
77
77
  # token value from the query parameter the API returns the first page of the result.
78
78
  # @param rate_limit [Float] Requests per second
79
- # @return [Hash] The API response
79
+ # @return [Peddler::Response] The API response
80
80
  def list_inbound_plan_boxes(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
81
81
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/boxes"
82
82
  params = {
@@ -94,7 +94,7 @@ module Peddler
94
94
  # @note This operation can make a static sandbox call.
95
95
  # @param inbound_plan_id [String] Identifier of an inbound plan.
96
96
  # @param rate_limit [Float] Requests per second
97
- # @return [Hash] The API response
97
+ # @return [Peddler::Response] The API response
98
98
  def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0)
99
99
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/cancellation"
100
100
 
@@ -110,7 +110,7 @@ module Peddler
110
110
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
111
111
  # token value from the query parameter the API returns the first page of the result.
112
112
  # @param rate_limit [Float] Requests per second
113
- # @return [Hash] The API response
113
+ # @return [Peddler::Response] The API response
114
114
  def list_inbound_plan_items(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
115
115
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/items"
116
116
  params = {
@@ -127,7 +127,7 @@ module Peddler
127
127
  # @param inbound_plan_id [String] Identifier of an inbound plan.
128
128
  # @param body [Hash] The body of the request to `updateInboundPlanName`.
129
129
  # @param rate_limit [Float] Requests per second
130
- # @return [Hash] The API response
130
+ # @return [Peddler::Response] The API response
131
131
  def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0)
132
132
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/name"
133
133
 
@@ -146,7 +146,7 @@ module Peddler
146
146
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
147
147
  # token value from the query parameter the API returns the first page of the result.
148
148
  # @param rate_limit [Float] Requests per second
149
- # @return [Hash] The API response
149
+ # @return [Peddler::Response] The API response
150
150
  def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil,
151
151
  rate_limit: 2.0)
152
152
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/boxes"
@@ -169,7 +169,7 @@ module Peddler
169
169
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
170
170
  # token value from the query parameter the API returns the first page of the result.
171
171
  # @param rate_limit [Float] Requests per second
172
- # @return [Hash] The API response
172
+ # @return [Peddler::Response] The API response
173
173
  def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil,
174
174
  rate_limit: 2.0)
175
175
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items"
@@ -188,7 +188,7 @@ module Peddler
188
188
  # @param inbound_plan_id [String] Identifier of an inbound plan.
189
189
  # @param body [Hash] The body of the request to `setPackingInformation`.
190
190
  # @param rate_limit [Float] Requests per second
191
- # @return [Hash] The API response
191
+ # @return [Peddler::Response] The API response
192
192
  def set_packing_information(inbound_plan_id, body, rate_limit: 2.0)
193
193
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingInformation"
194
194
 
@@ -205,7 +205,7 @@ module Peddler
205
205
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
206
206
  # token value from the query parameter the API returns the first page of the result.
207
207
  # @param rate_limit [Float] Requests per second
208
- # @return [Hash] The API response
208
+ # @return [Peddler::Response] The API response
209
209
  def list_packing_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
210
210
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
211
211
  params = {
@@ -221,7 +221,7 @@ module Peddler
221
221
  # @note This operation can make a static sandbox call.
222
222
  # @param inbound_plan_id [String] Identifier of an inbound plan.
223
223
  # @param rate_limit [Float] Requests per second
224
- # @return [Hash] The API response
224
+ # @return [Peddler::Response] The API response
225
225
  def generate_packing_options(inbound_plan_id, rate_limit: 2.0)
226
226
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
227
227
 
@@ -234,7 +234,7 @@ module Peddler
234
234
  # @param inbound_plan_id [String] Identifier of an inbound plan.
235
235
  # @param packing_option_id [String] Identifier of a packing option.
236
236
  # @param rate_limit [Float] Requests per second
237
- # @return [Hash] The API response
237
+ # @return [Peddler::Response] The API response
238
238
  def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0)
239
239
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation"
240
240
 
@@ -251,7 +251,7 @@ module Peddler
251
251
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
252
252
  # token value from the query parameter the API returns the first page of the result.
253
253
  # @param rate_limit [Float] Requests per second
254
- # @return [Hash] The API response
254
+ # @return [Peddler::Response] The API response
255
255
  def list_inbound_plan_pallets(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
256
256
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/pallets"
257
257
  params = {
@@ -272,7 +272,7 @@ module Peddler
272
272
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
273
273
  # token value from the query parameter the API returns the first page of the result.
274
274
  # @param rate_limit [Float] Requests per second
275
- # @return [Hash] The API response
275
+ # @return [Peddler::Response] The API response
276
276
  def list_placement_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
277
277
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
278
278
  params = {
@@ -289,7 +289,7 @@ module Peddler
289
289
  # @param inbound_plan_id [String] Identifier of an inbound plan.
290
290
  # @param body [Hash] The body of the request to `generatePlacementOptions`.
291
291
  # @param rate_limit [Float] Requests per second
292
- # @return [Hash] The API response
292
+ # @return [Peddler::Response] The API response
293
293
  def generate_placement_options(inbound_plan_id, body, rate_limit: 2.0)
294
294
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
295
295
 
@@ -303,7 +303,7 @@ module Peddler
303
303
  # @param placement_option_id [String] The identifier of a placement option. A placement option represents the
304
304
  # shipment splits and destinations of SKUs.
305
305
  # @param rate_limit [Float] Requests per second
306
- # @return [Hash] The API response
306
+ # @return [Peddler::Response] The API response
307
307
  def confirm_placement_option(inbound_plan_id, placement_option_id, rate_limit: 2.0)
308
308
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions/#{placement_option_id}/confirmation"
309
309
 
@@ -317,7 +317,7 @@ module Peddler
317
317
  # @param inbound_plan_id [String] Identifier of an inbound plan.
318
318
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
319
319
  # @param rate_limit [Float] Requests per second
320
- # @return [Hash] The API response
320
+ # @return [Peddler::Response] The API response
321
321
  def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0)
322
322
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}"
323
323
 
@@ -334,7 +334,7 @@ module Peddler
334
334
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
335
335
  # token value from the query parameter the API returns the first page of the result.
336
336
  # @param rate_limit [Float] Requests per second
337
- # @return [Hash] The API response
337
+ # @return [Peddler::Response] The API response
338
338
  def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
339
339
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/boxes"
340
340
  params = {
@@ -357,7 +357,7 @@ module Peddler
357
357
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
358
358
  # token value from the query parameter the API returns the first page of the result.
359
359
  # @param rate_limit [Float] Requests per second
360
- # @return [Hash] The API response
360
+ # @return [Peddler::Response] The API response
361
361
  def list_shipment_content_update_previews(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
362
362
  rate_limit: 2.0)
363
363
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
@@ -378,7 +378,7 @@ module Peddler
378
378
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
379
379
  # @param body [Hash] The body of the request to `generateShipmentContentUpdatePreviews`.
380
380
  # @param rate_limit [Float] Requests per second
381
- # @return [Hash] The API response
381
+ # @return [Peddler::Response] The API response
382
382
  def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
383
383
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
384
384
 
@@ -394,7 +394,7 @@ module Peddler
394
394
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
395
395
  # @param content_update_preview_id [String] Identifier of a content update preview.
396
396
  # @param rate_limit [Float] Requests per second
397
- # @return [Hash] The API response
397
+ # @return [Peddler::Response] The API response
398
398
  def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id, rate_limit: 2.0)
399
399
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}"
400
400
 
@@ -408,7 +408,7 @@ module Peddler
408
408
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
409
409
  # @param content_update_preview_id [String] Identifier of a content update preview.
410
410
  # @param rate_limit [Float] Requests per second
411
- # @return [Hash] The API response
411
+ # @return [Peddler::Response] The API response
412
412
  def confirm_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id,
413
413
  rate_limit: 2.0)
414
414
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}/confirmation"
@@ -422,7 +422,7 @@ module Peddler
422
422
  # @param inbound_plan_id [String] Identifier of an inbound plan.
423
423
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
424
424
  # @param rate_limit [Float] Requests per second
425
- # @return [Hash] The API response
425
+ # @return [Peddler::Response] The API response
426
426
  def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0)
427
427
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryChallanDocument"
428
428
 
@@ -441,7 +441,7 @@ module Peddler
441
441
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
442
442
  # token value from the query parameter the API returns the first page of the result.
443
443
  # @param rate_limit [Float] Requests per second
444
- # @return [Hash] The API response
444
+ # @return [Peddler::Response] The API response
445
445
  def list_delivery_window_options(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
446
446
  rate_limit: 2.0)
447
447
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
@@ -459,7 +459,7 @@ module Peddler
459
459
  # @param inbound_plan_id [String] Identifier of an inbound plan.
460
460
  # @param shipment_id [String] The shipment to generate delivery window options for.
461
461
  # @param rate_limit [Float] Requests per second
462
- # @return [Hash] The API response
462
+ # @return [Peddler::Response] The API response
463
463
  def generate_delivery_window_options(inbound_plan_id, shipment_id, rate_limit: 2.0)
464
464
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
465
465
 
@@ -478,7 +478,7 @@ module Peddler
478
478
  # @param shipment_id [String] The shipment to confirm the delivery window option for.
479
479
  # @param delivery_window_option_id [String] The id of the delivery window option to be confirmed.
480
480
  # @param rate_limit [Float] Requests per second
481
- # @return [Hash] The API response
481
+ # @return [Peddler::Response] The API response
482
482
  def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_window_option_id, rate_limit: 2.0)
483
483
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions/#{delivery_window_option_id}/confirmation"
484
484
 
@@ -495,7 +495,7 @@ module Peddler
495
495
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
496
496
  # token value from the query parameter the API returns the first page of the result.
497
497
  # @param rate_limit [Float] Requests per second
498
- # @return [Hash] The API response
498
+ # @return [Peddler::Response] The API response
499
499
  def list_shipment_items(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
500
500
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/items"
501
501
  params = {
@@ -513,7 +513,7 @@ module Peddler
513
513
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
514
514
  # @param body [Hash] The body of the request to `updateShipmentName`.
515
515
  # @param rate_limit [Float] Requests per second
516
- # @return [Hash] The API response
516
+ # @return [Peddler::Response] The API response
517
517
  def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
518
518
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/name"
519
519
 
@@ -531,7 +531,7 @@ module Peddler
531
531
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
532
532
  # token value from the query parameter the API returns the first page of the result.
533
533
  # @param rate_limit [Float] Requests per second
534
- # @return [Hash] The API response
534
+ # @return [Peddler::Response] The API response
535
535
  def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
536
536
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets"
537
537
  params = {
@@ -549,7 +549,7 @@ module Peddler
549
549
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
550
550
  # @param body [Hash] The body of the request to `cancelSelfShipAppointment`.
551
551
  # @param rate_limit [Float] Requests per second
552
- # @return [Hash] The API response
552
+ # @return [Peddler::Response] The API response
553
553
  def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
554
554
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentCancellation"
555
555
 
@@ -567,7 +567,7 @@ module Peddler
567
567
  # The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
568
568
  # token value from the query parameter the API returns the first page of the result.
569
569
  # @param rate_limit [Float] Requests per second
570
- # @return [Hash] The API response
570
+ # @return [Peddler::Response] The API response
571
571
  def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
572
572
  rate_limit: 2.0)
573
573
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
@@ -586,7 +586,7 @@ module Peddler
586
586
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
587
587
  # @param body [Hash] The body of the request to `generateSelfShipAppointmentSlots`.
588
588
  # @param rate_limit [Float] Requests per second
589
- # @return [Hash] The API response
589
+ # @return [Peddler::Response] The API response
590
590
  def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
591
591
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
592
592
 
@@ -601,7 +601,7 @@ module Peddler
601
601
  # @param slot_id [String] An identifier to a self-ship appointment slot.
602
602
  # @param body [Hash] The body of the request to `scheduleSelfShipAppointment`.
603
603
  # @param rate_limit [Float] Requests per second
604
- # @return [Hash] The API response
604
+ # @return [Peddler::Response] The API response
605
605
  def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body, rate_limit: 2.0)
606
606
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule"
607
607
 
@@ -618,7 +618,7 @@ module Peddler
618
618
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
619
619
  # @param body [Hash] The body of the request to `updateShipmentSourceAddress`.
620
620
  # @param rate_limit [Float] Requests per second
621
- # @return [Hash] The API response
621
+ # @return [Peddler::Response] The API response
622
622
  def update_shipment_source_address(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
623
623
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/sourceAddress"
624
624
 
@@ -632,7 +632,7 @@ module Peddler
632
632
  # @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
633
633
  # @param body [Hash] The body of the request to `updateShipmentTrackingDetails`.
634
634
  # @param rate_limit [Float] Requests per second
635
- # @return [Hash] The API response
635
+ # @return [Peddler::Response] The API response
636
636
  def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
637
637
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/trackingDetails"
638
638
 
@@ -654,7 +654,7 @@ module Peddler
654
654
  # @param shipment_id [String] The shipment to get transportation options for. Either `placementOptionId` or
655
655
  # `shipmentId` must be specified.
656
656
  # @param rate_limit [Float] Requests per second
657
- # @return [Hash] The API response
657
+ # @return [Peddler::Response] The API response
658
658
  def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, placement_option_id: nil,
659
659
  shipment_id: nil, rate_limit: 2.0)
660
660
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
@@ -674,7 +674,7 @@ module Peddler
674
674
  # @param inbound_plan_id [String] Identifier of an inbound plan.
675
675
  # @param body [Hash] The body of the request to `generateTransportationOptions`.
676
676
  # @param rate_limit [Float] Requests per second
677
- # @return [Hash] The API response
677
+ # @return [Peddler::Response] The API response
678
678
  def generate_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
679
679
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
680
680
 
@@ -688,7 +688,7 @@ module Peddler
688
688
  # @param inbound_plan_id [String] Identifier of an inbound plan.
689
689
  # @param body [Hash] The body of the request to `confirmTransportationOptions`.
690
690
  # @param rate_limit [Float] Requests per second
691
- # @return [Hash] The API response
691
+ # @return [Peddler::Response] The API response
692
692
  def confirm_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
693
693
  path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation"
694
694
 
@@ -698,11 +698,11 @@ module Peddler
698
698
  # List the inbound compliance details for MSKUs in a given marketplace.
699
699
  #
700
700
  # @note This operation can make a static sandbox call.
701
- # @param mskus [Array<String>] List of merchant SKUs - a merchant-supplied identifier for a specific SKU.
702
- # @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace
703
- # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values.
701
+ # @param mskus [Array<String>] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU.
702
+ # @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace
703
+ # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
704
704
  # @param rate_limit [Float] Requests per second
705
- # @return [Hash] The API response
705
+ # @return [Peddler::Response] The API response
706
706
  def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0)
707
707
  path = "/inbound/fba/2024-03-20/items/compliance"
708
708
  params = {
@@ -713,15 +713,15 @@ module Peddler
713
713
  meter(rate_limit).get(path, params:)
714
714
  end
715
715
 
716
- # Update compliance details for list of MSKUs. The details provided here are only used for the IN marketplace
717
- # compliance validation.
716
+ # Update compliance details for a list of MSKUs. The details provided here are only used for the India (IN -
717
+ # A21TJRUUN4KGV) marketplace compliance validation.
718
718
  #
719
719
  # @note This operation can make a static sandbox call.
720
- # @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace
721
- # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values.
720
+ # @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace
721
+ # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
722
722
  # @param body [Hash] The body of the request to `updateItemComplianceDetails`.
723
723
  # @param rate_limit [Float] Requests per second
724
- # @return [Hash] The API response
724
+ # @return [Peddler::Response] The API response
725
725
  def update_item_compliance_details(marketplace_id, body, rate_limit: 2.0)
726
726
  path = "/inbound/fba/2024-03-20/items/compliance"
727
727
  params = {
@@ -731,24 +731,54 @@ module Peddler
731
731
  meter(rate_limit).put(path, body:, params:)
732
732
  end
733
733
 
734
- # For a given marketplace - creates labels for a list of mskus.
734
+ # For a given marketplace - creates labels for a list of MSKUs.
735
735
  #
736
736
  # @note This operation can make a static sandbox call.
737
737
  # @param body [Hash] The body of the request to `createMarketplaceItemLabels`.
738
738
  # @param rate_limit [Float] Requests per second
739
- # @return [Hash] The API response
739
+ # @return [Peddler::Response] The API response
740
740
  def create_marketplace_item_labels(body, rate_limit: 2.0)
741
741
  path = "/inbound/fba/2024-03-20/items/labels"
742
742
 
743
743
  meter(rate_limit).post(path, body:)
744
744
  end
745
745
 
746
+ # Get preparation details for a list of MSKUs in a specified marketplace.
747
+ #
748
+ # @note This operation can make a static sandbox call.
749
+ # @param marketplace_id [String] The marketplace ID. For a list of possible values, refer to [Marketplace
750
+ # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
751
+ # @param mskus [Array<String>] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU.
752
+ # @param rate_limit [Float] Requests per second
753
+ # @return [Peddler::Response] The API response
754
+ def list_prep_details(marketplace_id, mskus, rate_limit: 2.0)
755
+ path = "/inbound/fba/2024-03-20/items/prepDetails"
756
+ params = {
757
+ "marketplaceId" => marketplace_id,
758
+ "mskus" => mskus,
759
+ }.compact
760
+
761
+ meter(rate_limit).get(path, params:)
762
+ end
763
+
764
+ # Set the preparation details for a list of MSKUs in a specified marketplace.
765
+ #
766
+ # @note This operation can make a static sandbox call.
767
+ # @param body [Hash] The body of the request to `setPrepDetails`.
768
+ # @param rate_limit [Float] Requests per second
769
+ # @return [Peddler::Response] The API response
770
+ def set_prep_details(body, rate_limit: 2.0)
771
+ path = "/inbound/fba/2024-03-20/items/prepDetails"
772
+
773
+ meter(rate_limit).post(path, body:)
774
+ end
775
+
746
776
  # Gets the status of the processing of an asynchronous API call.
747
777
  #
748
778
  # @note This operation can make a static sandbox call.
749
779
  # @param operation_id [String] Identifier of an asynchronous operation.
750
780
  # @param rate_limit [Float] Requests per second
751
- # @return [Hash] The API response
781
+ # @return [Peddler::Response] The API response
752
782
  def get_inbound_operation_status(operation_id, rate_limit: 2.0)
753
783
  path = "/inbound/fba/2024-03-20/operations/#{operation_id}"
754
784
 
@@ -5,11 +5,11 @@ require "peddler/api"
5
5
  module Peddler
6
6
  class << self
7
7
  def fulfillment_inbound_v0(...)
8
- API::FulfillmentInboundV0.new(...)
8
+ APIs::FulfillmentInboundV0.new(...)
9
9
  end
10
10
  end
11
11
 
12
- class API
12
+ module APIs
13
13
  # Selling Partner API for Fulfillment Inbound
14
14
  #
15
15
  # The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound
@@ -25,7 +25,7 @@ module Peddler
25
25
  # @note This operation can make a static sandbox call.
26
26
  # @param body [Hash] The request schema for the CreateInboundShipmentPlanRequest operation.
27
27
  # @param rate_limit [Float] Requests per second
28
- # @return [Hash] The API response
28
+ # @return [Peddler::Response] The API response
29
29
  def create_inbound_shipment_plan(body, rate_limit: 2.0)
30
30
  path = "/fba/inbound/v0/plans"
31
31
 
@@ -40,7 +40,7 @@ module Peddler
40
40
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
41
41
  # operation.
42
42
  # @param rate_limit [Float] Requests per second
43
- # @return [Hash] The API response
43
+ # @return [Peddler::Response] The API response
44
44
  def create_inbound_shipment(body, shipment_id, rate_limit: 2.0)
45
45
  path = "/fba/inbound/v0/shipments/#{shipment_id}"
46
46
 
@@ -55,7 +55,7 @@ module Peddler
55
55
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
56
56
  # operation.
57
57
  # @param rate_limit [Float] Requests per second
58
- # @return [Hash] The API response
58
+ # @return [Peddler::Response] The API response
59
59
  def update_inbound_shipment(body, shipment_id, rate_limit: 2.0)
60
60
  path = "/fba/inbound/v0/shipments/#{shipment_id}"
61
61
 
@@ -69,7 +69,7 @@ module Peddler
69
69
  # operation.
70
70
  # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
71
71
  # @param rate_limit [Float] Requests per second
72
- # @return [Hash] The API response
72
+ # @return [Peddler::Response] The API response
73
73
  def get_preorder_info(shipment_id, marketplace_id, rate_limit: 2.0)
74
74
  path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder"
75
75
  params = {
@@ -90,7 +90,7 @@ module Peddler
90
90
  # getPreorderInfo operation returns this value.
91
91
  # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
92
92
  # @param rate_limit [Float] Requests per second
93
- # @return [Hash] The API response
93
+ # @return [Peddler::Response] The API response
94
94
  def confirm_preorder(shipment_id, need_by_date, marketplace_id, rate_limit: 2.0)
95
95
  path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder/confirm"
96
96
  params = {
@@ -120,7 +120,7 @@ module Peddler
120
120
  # InvalidASINList property in the response. You can find out which marketplaces a seller participates in by
121
121
  # calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers.
122
122
  # @param rate_limit [Float] Requests per second
123
- # @return [Hash] The API response
123
+ # @return [Peddler::Response] The API response
124
124
  def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: nil, rate_limit: 2.0)
125
125
  path = "/fba/inbound/v0/prepInstructions"
126
126
  params = {
@@ -138,7 +138,7 @@ module Peddler
138
138
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
139
139
  # operation.
140
140
  # @param rate_limit [Float] Requests per second
141
- # @return [Hash] The API response
141
+ # @return [Peddler::Response] The API response
142
142
  def get_transport_details(shipment_id, rate_limit: 2.0)
143
143
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
144
144
 
@@ -152,7 +152,7 @@ module Peddler
152
152
  # operation.
153
153
  # @param body [Hash] The request schema for the PutTransportDetailsRequest operation.
154
154
  # @param rate_limit [Float] Requests per second
155
- # @return [Hash] The API response
155
+ # @return [Peddler::Response] The API response
156
156
  def put_transport_details(shipment_id, body, rate_limit: 2.0)
157
157
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
158
158
 
@@ -170,7 +170,7 @@ module Peddler
170
170
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
171
171
  # operation.
172
172
  # @param rate_limit [Float] Requests per second
173
- # @return [Hash] The API response
173
+ # @return [Peddler::Response] The API response
174
174
  def void_transport(shipment_id, rate_limit: 2.0)
175
175
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/void"
176
176
 
@@ -185,7 +185,7 @@ module Peddler
185
185
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
186
186
  # operation.
187
187
  # @param rate_limit [Float] Requests per second
188
- # @return [Hash] The API response
188
+ # @return [Peddler::Response] The API response
189
189
  def estimate_transport(shipment_id, rate_limit: 2.0)
190
190
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate"
191
191
 
@@ -206,7 +206,7 @@ module Peddler
206
206
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
207
207
  # operation.
208
208
  # @param rate_limit [Float] Requests per second
209
- # @return [Hash] The API response
209
+ # @return [Peddler::Response] The API response
210
210
  def confirm_transport(shipment_id, rate_limit: 2.0)
211
211
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/confirm"
212
212
 
@@ -223,8 +223,15 @@ module Peddler
223
223
  # @param label_type [String] The type of labels requested.
224
224
  # @param number_of_packages [Integer] The number of packages in the shipment.
225
225
  # @param package_labels_to_print [Array<String>] A list of identifiers that specify packages for which you want
226
- # package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton
227
- # Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code.
226
+ # package labels printed. If you provide box content information with the [FBA Inbound Shipment Carton
227
+ # Information
228
+ # Feed](https://developer-docs.amazon.com/sp-api/docs/fulfillment-by-amazon-feed-type-values#fba-inbound-shipment-carton-information-feed),
229
+ # then `PackageLabelsToPrint` must match the `CartonId` values you provide through that feed. If you provide box
230
+ # content information with the Fulfillment Inbound API v2024-03-20, then `PackageLabelsToPrint` must match the
231
+ # `boxID` values from the
232
+ # [`listShipmentBoxes`](https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v2024-03-20-reference#listshipmentboxes)
233
+ # response. If these values do not match as required, the operation returns the `IncorrectPackageIdentifier`
234
+ # error code.
228
235
  # @param number_of_pallets [Integer] The number of pallets in the shipment. This returns four identical labels for
229
236
  # each pallet.
230
237
  # @param page_size [Integer] The page size for paginating through the total packages' labels. This is a required
@@ -232,7 +239,7 @@ module Peddler
232
239
  # @param page_start_index [Integer] The page start index for paginating through the total packages' labels. This
233
240
  # is a required parameter for Non-Partnered LTL Shipments.
234
241
  # @param rate_limit [Float] Requests per second
235
- # @return [Hash] The API response
242
+ # @return [Peddler::Response] The API response
236
243
  def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: nil,
237
244
  number_of_pallets: nil, page_size: nil, page_start_index: nil, rate_limit: 2.0)
238
245
  path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
@@ -257,7 +264,7 @@ module Peddler
257
264
  # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
258
265
  # operation.
259
266
  # @param rate_limit [Float] Requests per second
260
- # @return [Hash] The API response
267
+ # @return [Peddler::Response] The API response
261
268
  def get_bill_of_lading(shipment_id, rate_limit: 2.0)
262
269
  path = "/fba/inbound/v0/shipments/#{shipment_id}/billOfLading"
263
270
 
@@ -284,7 +291,7 @@ module Peddler
284
291
  # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
285
292
  # stored.
286
293
  # @param rate_limit [Float] Requests per second
287
- # @return [Hash] The API response
294
+ # @return [Peddler::Response] The API response
288
295
  def get_shipments(query_type, marketplace_id, shipment_status_list: nil, shipment_id_list: nil,
289
296
  last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0)
290
297
  path = "/fba/inbound/v0/shipments"
@@ -308,7 +315,7 @@ module Peddler
308
315
  # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
309
316
  # stored.
310
317
  # @param rate_limit [Float] Requests per second
311
- # @return [Hash] The API response
318
+ # @return [Peddler::Response] The API response
312
319
  def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2.0)
313
320
  path = "/fba/inbound/v0/shipments/#{shipment_id}/items"
314
321
  params = {
@@ -333,7 +340,7 @@ module Peddler
333
340
  # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
334
341
  # stored.
335
342
  # @param rate_limit [Float] Requests per second
336
- # @return [Hash] The API response
343
+ # @return [Peddler::Response] The API response
337
344
  def get_shipment_items(query_type, marketplace_id, last_updated_after: nil, last_updated_before: nil,
338
345
  next_token: nil, rate_limit: 2.0)
339
346
  path = "/fba/inbound/v0/shipmentItems"