peddler 4.3.1 → 4.5.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +459 -109
  3. data/lib/peddler/api.rb +13 -11
  4. data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +7 -7
  5. data/lib/peddler/apis/aplus_content_2020_11_01.rb +10 -10
  6. data/lib/peddler/apis/application_integrations_2024_04_01.rb +1 -1
  7. data/lib/peddler/apis/catalog_items_2020_12_01.rb +8 -8
  8. data/lib/peddler/apis/catalog_items_2022_04_01.rb +9 -9
  9. data/lib/peddler/apis/customer_feedback_2024_06_01.rb +143 -0
  10. data/lib/peddler/apis/data_kiosk_2023_11_15.rb +4 -4
  11. data/lib/peddler/apis/fba_inbound_eligibility_v1.rb +1 -1
  12. data/lib/peddler/apis/fba_inventory_v1.rb +3 -3
  13. data/lib/peddler/apis/feeds_2021_06_30.rb +6 -6
  14. data/lib/peddler/apis/finances_2024_06_01.rb +1 -1
  15. data/lib/peddler/apis/finances_2024_06_19.rb +14 -6
  16. data/lib/peddler/apis/finances_v0.rb +2 -2
  17. data/lib/peddler/apis/fulfillment_inbound_2024_03_20.rb +40 -40
  18. data/lib/peddler/apis/fulfillment_inbound_v0.rb +8 -8
  19. data/lib/peddler/apis/fulfillment_outbound_2020_07_01.rb +7 -7
  20. data/lib/peddler/apis/invoices_2024_06_19.rb +4 -4
  21. data/lib/peddler/apis/listings_items_2020_09_01.rb +6 -6
  22. data/lib/peddler/apis/listings_items_2021_08_01.rb +20 -26
  23. data/lib/peddler/apis/listings_restrictions_2021_08_01.rb +1 -1
  24. data/lib/peddler/apis/merchant_fulfillment_v0.rb +2 -2
  25. data/lib/peddler/apis/messaging_v1.rb +26 -26
  26. data/lib/peddler/apis/notifications_v1.rb +6 -6
  27. data/lib/peddler/apis/orders_v0.rb +20 -20
  28. data/lib/peddler/apis/product_fees_v0.rb +2 -2
  29. data/lib/peddler/apis/product_pricing_v0.rb +6 -6
  30. data/lib/peddler/apis/product_type_definitions_2020_09_01.rb +4 -4
  31. data/lib/peddler/apis/reports_2021_06_30.rb +12 -9
  32. data/lib/peddler/apis/sales_v1.rb +7 -2
  33. data/lib/peddler/apis/seller_wallet_2024_03_01.rb +5 -5
  34. data/lib/peddler/apis/services_v1.rb +27 -27
  35. data/lib/peddler/apis/shipment_invoicing_v0.rb +3 -3
  36. data/lib/peddler/apis/shipping_v1.rb +5 -5
  37. data/lib/peddler/apis/shipping_v2.rb +6 -6
  38. data/lib/peddler/apis/solicitations_v1.rb +4 -4
  39. data/lib/peddler/apis/supply_sources_2020_07_01.rb +4 -4
  40. data/lib/peddler/apis/uploads_2020_11_01.rb +2 -2
  41. data/lib/peddler/apis/vendor_direct_fulfillment_inventory_v1.rb +1 -1
  42. data/lib/peddler/apis/vendor_direct_fulfillment_orders_2021_12_28.rb +1 -1
  43. data/lib/peddler/apis/vendor_direct_fulfillment_orders_v1.rb +1 -1
  44. data/lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +1 -1
  45. data/lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb +4 -4
  46. data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +3 -3
  47. data/lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb +1 -1
  48. data/lib/peddler/apis/vendor_direct_fulfillment_transactions_v1.rb +1 -1
  49. data/lib/peddler/apis/vendor_orders_v1.rb +1 -1
  50. data/lib/peddler/apis/vendor_shipments_v1.rb +1 -1
  51. data/lib/peddler/apis/vendor_transaction_status_v1.rb +1 -1
  52. data/lib/peddler/config.rb +17 -0
  53. data/lib/peddler/error.rb +35 -8
  54. data/lib/peddler/helpers/feeds_2021_06_30.rb +22 -8
  55. data/lib/peddler/helpers/reports_2021_06_30.rb +38 -0
  56. data/lib/peddler/marketplace.rb +14 -0
  57. data/lib/peddler/response.rb +52 -5
  58. data/lib/peddler/token.rb +4 -15
  59. data/lib/peddler/version.rb +1 -1
  60. data/lib/peddler.rb +54 -0
  61. metadata +8 -13
  62. data/lib/peddler/parsers/openapi_parser_generator.rb +0 -550
  63. data/lib/peddler/parsers/smart_parser.rb +0 -199
@@ -62,7 +62,7 @@ module Peddler
62
62
  # @param rate_limit [Float] Requests per second
63
63
  # @return [Peddler::Response] The API response
64
64
  def get_inbound_plan(inbound_plan_id, rate_limit: 2.0)
65
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}"
65
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}"
66
66
 
67
67
  meter(rate_limit).get(path)
68
68
  end
@@ -78,7 +78,7 @@ module Peddler
78
78
  # @param rate_limit [Float] Requests per second
79
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/boxes"
81
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/boxes"
82
82
  params = {
83
83
  "pageSize" => page_size,
84
84
  "paginationToken" => pagination_token,
@@ -96,7 +96,7 @@ module Peddler
96
96
  # @param rate_limit [Float] Requests per second
97
97
  # @return [Peddler::Response] The API response
98
98
  def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0)
99
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/cancellation"
99
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/cancellation"
100
100
 
101
101
  meter(rate_limit).put(path)
102
102
  end
@@ -112,7 +112,7 @@ module Peddler
112
112
  # @param rate_limit [Float] Requests per second
113
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/items"
115
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/items"
116
116
  params = {
117
117
  "pageSize" => page_size,
118
118
  "paginationToken" => pagination_token,
@@ -129,7 +129,7 @@ module Peddler
129
129
  # @param rate_limit [Float] Requests per second
130
130
  # @return [Peddler::Response] The API response
131
131
  def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0)
132
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/name"
132
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/name"
133
133
 
134
134
  meter(rate_limit).put(path, body:)
135
135
  end
@@ -149,7 +149,7 @@ module Peddler
149
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/boxes"
152
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingGroups/#{percent_encode(packing_group_id)}/boxes"
153
153
  params = {
154
154
  "pageSize" => page_size,
155
155
  "paginationToken" => pagination_token,
@@ -172,7 +172,7 @@ module Peddler
172
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items"
175
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingGroups/#{percent_encode(packing_group_id)}/items"
176
176
  params = {
177
177
  "pageSize" => page_size,
178
178
  "paginationToken" => pagination_token,
@@ -190,7 +190,7 @@ module Peddler
190
190
  # @param rate_limit [Float] Requests per second
191
191
  # @return [Peddler::Response] The API response
192
192
  def set_packing_information(inbound_plan_id, body, rate_limit: 2.0)
193
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingInformation"
193
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingInformation"
194
194
 
195
195
  meter(rate_limit).post(path, body:)
196
196
  end
@@ -207,7 +207,7 @@ module Peddler
207
207
  # @param rate_limit [Float] Requests per second
208
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
210
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingOptions"
211
211
  params = {
212
212
  "pageSize" => page_size,
213
213
  "paginationToken" => pagination_token,
@@ -223,7 +223,7 @@ module Peddler
223
223
  # @param rate_limit [Float] Requests per second
224
224
  # @return [Peddler::Response] The API response
225
225
  def generate_packing_options(inbound_plan_id, rate_limit: 2.0)
226
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
226
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingOptions"
227
227
 
228
228
  meter(rate_limit).post(path)
229
229
  end
@@ -236,7 +236,7 @@ module Peddler
236
236
  # @param rate_limit [Float] Requests per second
237
237
  # @return [Peddler::Response] The API response
238
238
  def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0)
239
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation"
239
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/packingOptions/#{percent_encode(packing_option_id)}/confirmation"
240
240
 
241
241
  meter(rate_limit).post(path)
242
242
  end
@@ -253,7 +253,7 @@ module Peddler
253
253
  # @param rate_limit [Float] Requests per second
254
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/pallets"
256
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/pallets"
257
257
  params = {
258
258
  "pageSize" => page_size,
259
259
  "paginationToken" => pagination_token,
@@ -274,7 +274,7 @@ module Peddler
274
274
  # @param rate_limit [Float] Requests per second
275
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
277
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/placementOptions"
278
278
  params = {
279
279
  "pageSize" => page_size,
280
280
  "paginationToken" => pagination_token,
@@ -291,7 +291,7 @@ module Peddler
291
291
  # @param rate_limit [Float] Requests per second
292
292
  # @return [Peddler::Response] The API response
293
293
  def generate_placement_options(inbound_plan_id, body, rate_limit: 2.0)
294
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
294
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/placementOptions"
295
295
 
296
296
  meter(rate_limit).post(path, body:)
297
297
  end
@@ -305,7 +305,7 @@ module Peddler
305
305
  # @param rate_limit [Float] Requests per second
306
306
  # @return [Peddler::Response] The API response
307
307
  def confirm_placement_option(inbound_plan_id, placement_option_id, rate_limit: 2.0)
308
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions/#{placement_option_id}/confirmation"
308
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/placementOptions/#{percent_encode(placement_option_id)}/confirmation"
309
309
 
310
310
  meter(rate_limit).post(path)
311
311
  end
@@ -319,7 +319,7 @@ module Peddler
319
319
  # @param rate_limit [Float] Requests per second
320
320
  # @return [Peddler::Response] The API response
321
321
  def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0)
322
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}"
322
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}"
323
323
 
324
324
  meter(rate_limit).get(path)
325
325
  end
@@ -336,7 +336,7 @@ module Peddler
336
336
  # @param rate_limit [Float] Requests per second
337
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/boxes"
339
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/boxes"
340
340
  params = {
341
341
  "pageSize" => page_size,
342
342
  "paginationToken" => pagination_token,
@@ -360,7 +360,7 @@ module Peddler
360
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
363
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/contentUpdatePreviews"
364
364
  params = {
365
365
  "pageSize" => page_size,
366
366
  "paginationToken" => pagination_token,
@@ -380,7 +380,7 @@ module Peddler
380
380
  # @param rate_limit [Float] Requests per second
381
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
383
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/contentUpdatePreviews"
384
384
 
385
385
  meter(rate_limit).post(path, body:)
386
386
  end
@@ -396,7 +396,7 @@ module Peddler
396
396
  # @param rate_limit [Float] Requests per second
397
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}"
399
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/contentUpdatePreviews/#{percent_encode(content_update_preview_id)}"
400
400
 
401
401
  meter(rate_limit).get(path)
402
402
  end
@@ -411,7 +411,7 @@ module Peddler
411
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}/confirmation"
414
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/contentUpdatePreviews/#{percent_encode(content_update_preview_id)}/confirmation"
415
415
 
416
416
  meter(rate_limit).post(path)
417
417
  end
@@ -424,7 +424,7 @@ module Peddler
424
424
  # @param rate_limit [Float] Requests per second
425
425
  # @return [Peddler::Response] The API response
426
426
  def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0)
427
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryChallanDocument"
427
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/deliveryChallanDocument"
428
428
 
429
429
  meter(rate_limit).get(path)
430
430
  end
@@ -444,7 +444,7 @@ module Peddler
444
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
447
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/deliveryWindowOptions"
448
448
  params = {
449
449
  "pageSize" => page_size,
450
450
  "paginationToken" => pagination_token,
@@ -461,7 +461,7 @@ module Peddler
461
461
  # @param rate_limit [Float] Requests per second
462
462
  # @return [Peddler::Response] The API response
463
463
  def generate_delivery_window_options(inbound_plan_id, shipment_id, rate_limit: 2.0)
464
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
464
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/deliveryWindowOptions"
465
465
 
466
466
  meter(rate_limit).post(path)
467
467
  end
@@ -480,7 +480,7 @@ module Peddler
480
480
  # @param rate_limit [Float] Requests per second
481
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions/#{delivery_window_option_id}/confirmation"
483
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/deliveryWindowOptions/#{percent_encode(delivery_window_option_id)}/confirmation"
484
484
 
485
485
  meter(rate_limit).post(path)
486
486
  end
@@ -497,7 +497,7 @@ module Peddler
497
497
  # @param rate_limit [Float] Requests per second
498
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/items"
500
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/items"
501
501
  params = {
502
502
  "pageSize" => page_size,
503
503
  "paginationToken" => pagination_token,
@@ -515,7 +515,7 @@ module Peddler
515
515
  # @param rate_limit [Float] Requests per second
516
516
  # @return [Peddler::Response] The API response
517
517
  def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
518
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/name"
518
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/name"
519
519
 
520
520
  meter(rate_limit).put(path, body:)
521
521
  end
@@ -533,7 +533,7 @@ module Peddler
533
533
  # @param rate_limit [Float] Requests per second
534
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
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets"
536
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/pallets"
537
537
  params = {
538
538
  "pageSize" => page_size,
539
539
  "paginationToken" => pagination_token,
@@ -552,7 +552,7 @@ module Peddler
552
552
  # @param rate_limit [Float] Requests per second
553
553
  # @return [Peddler::Response] The API response
554
554
  def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
555
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentCancellation"
555
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/selfShipAppointmentCancellation"
556
556
 
557
557
  meter(rate_limit).put(path, body:)
558
558
  end
@@ -573,7 +573,7 @@ module Peddler
573
573
  # @return [Peddler::Response] The API response
574
574
  def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
575
575
  rate_limit: 2.0)
576
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
576
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/selfShipAppointmentSlots"
577
577
  params = {
578
578
  "pageSize" => page_size,
579
579
  "paginationToken" => pagination_token,
@@ -592,7 +592,7 @@ module Peddler
592
592
  # @param rate_limit [Float] Requests per second
593
593
  # @return [Peddler::Response] The API response
594
594
  def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
595
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
595
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/selfShipAppointmentSlots"
596
596
 
597
597
  meter(rate_limit).post(path, body:)
598
598
  end
@@ -608,7 +608,7 @@ module Peddler
608
608
  # @param rate_limit [Float] Requests per second
609
609
  # @return [Peddler::Response] The API response
610
610
  def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body, rate_limit: 2.0)
611
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule"
611
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/selfShipAppointmentSlots/#{percent_encode(slot_id)}/schedule"
612
612
 
613
613
  meter(rate_limit).post(path, body:)
614
614
  end
@@ -625,7 +625,7 @@ module Peddler
625
625
  # @param rate_limit [Float] Requests per second
626
626
  # @return [Peddler::Response] The API response
627
627
  def update_shipment_source_address(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
628
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/sourceAddress"
628
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/sourceAddress"
629
629
 
630
630
  meter(rate_limit).put(path, body:)
631
631
  end
@@ -639,7 +639,7 @@ module Peddler
639
639
  # @param rate_limit [Float] Requests per second
640
640
  # @return [Peddler::Response] The API response
641
641
  def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
642
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/trackingDetails"
642
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/shipments/#{percent_encode(shipment_id)}/trackingDetails"
643
643
 
644
644
  meter(rate_limit).put(path, body:)
645
645
  end
@@ -662,7 +662,7 @@ module Peddler
662
662
  # @return [Peddler::Response] The API response
663
663
  def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, placement_option_id: nil,
664
664
  shipment_id: nil, rate_limit: 2.0)
665
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
665
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/transportationOptions"
666
666
  params = {
667
667
  "pageSize" => page_size,
668
668
  "paginationToken" => pagination_token,
@@ -681,7 +681,7 @@ module Peddler
681
681
  # @param rate_limit [Float] Requests per second
682
682
  # @return [Peddler::Response] The API response
683
683
  def generate_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
684
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
684
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/transportationOptions"
685
685
 
686
686
  meter(rate_limit).post(path, body:)
687
687
  end
@@ -695,7 +695,7 @@ module Peddler
695
695
  # @param rate_limit [Float] Requests per second
696
696
  # @return [Peddler::Response] The API response
697
697
  def confirm_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
698
- path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation"
698
+ path = "/inbound/fba/2024-03-20/inboundPlans/#{percent_encode(inbound_plan_id)}/transportationOptions/confirmation"
699
699
 
700
700
  meter(rate_limit).post(path, body:)
701
701
  end
@@ -711,7 +711,7 @@ module Peddler
711
711
  def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0)
712
712
  path = "/inbound/fba/2024-03-20/items/compliance"
713
713
  params = {
714
- "mskus" => mskus,
714
+ "mskus" => stringify_array(mskus),
715
715
  "marketplaceId" => marketplace_id,
716
716
  }.compact
717
717
 
@@ -760,7 +760,7 @@ module Peddler
760
760
  path = "/inbound/fba/2024-03-20/items/prepDetails"
761
761
  params = {
762
762
  "marketplaceId" => marketplace_id,
763
- "mskus" => mskus,
763
+ "mskus" => stringify_array(mskus),
764
764
  }.compact
765
765
 
766
766
  meter(rate_limit).get(path, params:)
@@ -785,7 +785,7 @@ module Peddler
785
785
  # @param rate_limit [Float] Requests per second
786
786
  # @return [Peddler::Response] The API response
787
787
  def get_inbound_operation_status(operation_id, rate_limit: 2.0)
788
- path = "/inbound/fba/2024-03-20/operations/#{operation_id}"
788
+ path = "/inbound/fba/2024-03-20/operations/#{percent_encode(operation_id)}"
789
789
 
790
790
  meter(rate_limit).get(path)
791
791
  end
@@ -39,8 +39,8 @@ module Peddler
39
39
  path = "/fba/inbound/v0/prepInstructions"
40
40
  params = {
41
41
  "ShipToCountryCode" => ship_to_country_code,
42
- "SellerSKUList" => seller_sku_list,
43
- "ASINList" => asin_list,
42
+ "SellerSKUList" => stringify_array(seller_sku_list),
43
+ "ASINList" => stringify_array(asin_list),
44
44
  }.compact
45
45
 
46
46
  meter(rate_limit).get(path, params:)
@@ -75,12 +75,12 @@ module Peddler
75
75
  # @return [Peddler::Response] The API response
76
76
  def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: nil,
77
77
  number_of_pallets: nil, page_size: nil, page_start_index: nil, rate_limit: 2.0)
78
- path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
78
+ path = "/fba/inbound/v0/shipments/#{percent_encode(shipment_id)}/labels"
79
79
  params = {
80
80
  "PageType" => page_type,
81
81
  "LabelType" => label_type,
82
82
  "NumberOfPackages" => number_of_packages,
83
- "PackageLabelsToPrint" => package_labels_to_print,
83
+ "PackageLabelsToPrint" => stringify_array(package_labels_to_print),
84
84
  "NumberOfPallets" => number_of_pallets,
85
85
  "PageSize" => page_size,
86
86
  "PageStartIndex" => page_start_index,
@@ -99,7 +99,7 @@ module Peddler
99
99
  # @param rate_limit [Float] Requests per second
100
100
  # @return [Peddler::Response] The API response
101
101
  def get_bill_of_lading(shipment_id, rate_limit: 2.0)
102
- path = "/fba/inbound/v0/shipments/#{shipment_id}/billOfLading"
102
+ path = "/fba/inbound/v0/shipments/#{percent_encode(shipment_id)}/billOfLading"
103
103
 
104
104
  meter(rate_limit).get(path)
105
105
  end
@@ -129,8 +129,8 @@ module Peddler
129
129
  last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0)
130
130
  path = "/fba/inbound/v0/shipments"
131
131
  params = {
132
- "ShipmentStatusList" => shipment_status_list,
133
- "ShipmentIdList" => shipment_id_list,
132
+ "ShipmentStatusList" => stringify_array(shipment_status_list),
133
+ "ShipmentIdList" => stringify_array(shipment_id_list),
134
134
  "LastUpdatedAfter" => last_updated_after,
135
135
  "LastUpdatedBefore" => last_updated_before,
136
136
  "QueryType" => query_type,
@@ -149,7 +149,7 @@ module Peddler
149
149
  # @param rate_limit [Float] Requests per second
150
150
  # @return [Peddler::Response] The API response
151
151
  def get_shipment_items_by_shipment_id(shipment_id, marketplace_id: nil, rate_limit: 2.0)
152
- path = "/fba/inbound/v0/shipments/#{shipment_id}/items"
152
+ path = "/fba/inbound/v0/shipments/#{percent_encode(shipment_id)}/items"
153
153
  params = {
154
154
  "MarketplaceId" => marketplace_id,
155
155
  }.compact
@@ -128,7 +128,7 @@ module Peddler
128
128
  # @param rate_limit [Float] Requests per second
129
129
  # @return [Peddler::Response] The API response
130
130
  def create_fulfillment_return(body, seller_fulfillment_order_id, rate_limit: 2.0)
131
- path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{seller_fulfillment_order_id}/return"
131
+ path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/return"
132
132
 
133
133
  meter(rate_limit).put(path, body:)
134
134
  end
@@ -141,7 +141,7 @@ module Peddler
141
141
  # @param rate_limit [Float] Requests per second
142
142
  # @return [Peddler::Response] The API response
143
143
  def get_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0)
144
- path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{seller_fulfillment_order_id}"
144
+ path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}"
145
145
 
146
146
  meter(rate_limit).get(path)
147
147
  end
@@ -155,7 +155,7 @@ module Peddler
155
155
  # @param rate_limit [Float] Requests per second
156
156
  # @return [Peddler::Response] The API response
157
157
  def update_fulfillment_order(body, seller_fulfillment_order_id, rate_limit: 2.0)
158
- path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{seller_fulfillment_order_id}"
158
+ path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}"
159
159
 
160
160
  meter(rate_limit).put(path, body:)
161
161
  end
@@ -169,7 +169,7 @@ module Peddler
169
169
  # @param rate_limit [Float] Requests per second
170
170
  # @return [Peddler::Response] The API response
171
171
  def cancel_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0)
172
- path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{seller_fulfillment_order_id}/cancel"
172
+ path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/cancel"
173
173
 
174
174
  meter(rate_limit).put(path)
175
175
  end
@@ -188,7 +188,7 @@ module Peddler
188
188
  def submit_fulfillment_order_status_update(seller_fulfillment_order_id, body)
189
189
  must_sandbox!
190
190
 
191
- path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{seller_fulfillment_order_id}/status"
191
+ path = "/fba/outbound/2020-07-01/fulfillmentOrders/#{percent_encode(seller_fulfillment_order_id)}/status"
192
192
 
193
193
  put(path, body:)
194
194
  end
@@ -223,7 +223,7 @@ module Peddler
223
223
  # @param rate_limit [Float] Requests per second
224
224
  # @return [Peddler::Response] The API response
225
225
  def get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_start_date: nil, rate_limit: 2.0)
226
- path = "/fba/outbound/2020-07-01/features/inventory/#{feature_name}"
226
+ path = "/fba/outbound/2020-07-01/features/inventory/#{percent_encode(feature_name)}"
227
227
  params = {
228
228
  "marketplaceId" => marketplace_id,
229
229
  "nextToken" => next_token,
@@ -246,7 +246,7 @@ module Peddler
246
246
  # @param rate_limit [Float] Requests per second
247
247
  # @return [Peddler::Response] The API response
248
248
  def get_feature_sku(marketplace_id, feature_name, seller_sku, rate_limit: 2.0)
249
- path = "/fba/outbound/2020-07-01/features/inventory/#{feature_name}/#{seller_sku}"
249
+ path = "/fba/outbound/2020-07-01/features/inventory/#{percent_encode(feature_name)}/#{percent_encode(seller_sku)}"
250
250
  params = {
251
251
  "marketplaceId" => marketplace_id,
252
252
  }.compact
@@ -38,7 +38,7 @@ module Peddler
38
38
  # @param rate_limit [Float] Requests per second
39
39
  # @return [Peddler::Response] The API response
40
40
  def get_invoices_document(invoices_document_id, rate_limit: 0.0167)
41
- path = "/tax/invoices/2024-06-19/documents/#{invoices_document_id}"
41
+ path = "/tax/invoices/2024-06-19/documents/#{percent_encode(invoices_document_id)}"
42
42
 
43
43
  meter(rate_limit).get(path)
44
44
  end
@@ -95,7 +95,7 @@ module Peddler
95
95
  # @param rate_limit [Float] Requests per second
96
96
  # @return [Peddler::Response] The API response
97
97
  def get_invoices_export(export_id, rate_limit: 2.0)
98
- path = "/tax/invoices/2024-06-19/exports/#{export_id}"
98
+ path = "/tax/invoices/2024-06-19/exports/#{percent_encode(export_id)}"
99
99
 
100
100
  meter(rate_limit).get(path)
101
101
  end
@@ -150,7 +150,7 @@ module Peddler
150
150
  "nextToken" => next_token,
151
151
  "sortOrder" => sort_order,
152
152
  "invoiceType" => invoice_type,
153
- "statuses" => statuses,
153
+ "statuses" => stringify_array(statuses),
154
154
  "externalInvoiceId" => external_invoice_id,
155
155
  "sortBy" => sort_by,
156
156
  }.compact
@@ -168,7 +168,7 @@ module Peddler
168
168
  # @param rate_limit [Float] Requests per second
169
169
  # @return [Peddler::Response] The API response
170
170
  def get_invoice(marketplace_id, invoice_id, rate_limit: 2.0)
171
- path = "/tax/invoices/2024-06-19/invoices/#{invoice_id}"
171
+ path = "/tax/invoices/2024-06-19/invoices/#{percent_encode(invoice_id)}"
172
172
  params = {
173
173
  "marketplaceId" => marketplace_id,
174
174
  }.compact
@@ -32,9 +32,9 @@ module Peddler
32
32
  # @param rate_limit [Float] Requests per second
33
33
  # @return [Peddler::Response] The API response
34
34
  def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0)
35
- path = "/listings/2020-09-01/items/#{seller_id}/#{sku}"
35
+ path = "/listings/2020-09-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
36
36
  params = {
37
- "marketplaceIds" => marketplace_ids,
37
+ "marketplaceIds" => stringify_array(marketplace_ids),
38
38
  "issueLocale" => issue_locale,
39
39
  }.compact
40
40
 
@@ -57,9 +57,9 @@ module Peddler
57
57
  # @param rate_limit [Float] Requests per second
58
58
  # @return [Peddler::Response] The API response
59
59
  def patch_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil, rate_limit: 5.0)
60
- path = "/listings/2020-09-01/items/#{seller_id}/#{sku}"
60
+ path = "/listings/2020-09-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
61
61
  params = {
62
- "marketplaceIds" => marketplace_ids,
62
+ "marketplaceIds" => stringify_array(marketplace_ids),
63
63
  "issueLocale" => issue_locale,
64
64
  }.compact
65
65
 
@@ -82,9 +82,9 @@ module Peddler
82
82
  # @param rate_limit [Float] Requests per second
83
83
  # @return [Peddler::Response] The API response
84
84
  def put_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil, rate_limit: 5.0)
85
- path = "/listings/2020-09-01/items/#{seller_id}/#{sku}"
85
+ path = "/listings/2020-09-01/items/#{percent_encode(seller_id)}/#{percent_encode(sku)}"
86
86
  params = {
87
- "marketplaceIds" => marketplace_ids,
87
+ "marketplaceIds" => stringify_array(marketplace_ids),
88
88
  "issueLocale" => issue_locale,
89
89
  }.compact
90
90