peddler 3.0.0.beta1 → 3.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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +96 -106
  3. data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +34 -22
  4. data/lib/peddler/api/aplus_content_2020_11_01.rb +86 -48
  5. data/lib/peddler/api/application_integrations_2024_04_01.rb +56 -0
  6. data/lib/peddler/api/application_management_2023_11_30.rb +12 -2
  7. data/lib/peddler/api/catalog_items_2020_12_01.rb +31 -20
  8. data/lib/peddler/api/catalog_items_2022_04_01.rb +35 -25
  9. data/lib/peddler/api/catalog_items_v0.rb +39 -26
  10. data/lib/peddler/api/data_kiosk_2023_11_15.rb +41 -25
  11. data/lib/peddler/api/easy_ship_2022_03_23.rb +62 -43
  12. data/lib/peddler/api/fba_inbound_eligibility_v1.rb +13 -5
  13. data/lib/peddler/api/fba_inventory_v1.rb +40 -24
  14. data/lib/peddler/api/feeds_2021_06_30.rb +43 -25
  15. data/lib/peddler/api/finances_2024_06_19.rb +50 -0
  16. data/lib/peddler/api/finances_v0.rb +86 -59
  17. data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +304 -205
  18. data/lib/peddler/api/fulfillment_inbound_v0.rb +112 -74
  19. data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +90 -53
  20. data/lib/peddler/api/invoices_2024_06_19.rb +180 -0
  21. data/lib/peddler/api/listings_items_2020_09_01.rb +44 -33
  22. data/lib/peddler/api/listings_items_2021_08_01.rb +76 -60
  23. data/lib/peddler/api/listings_restrictions_2021_08_01.rb +19 -9
  24. data/lib/peddler/api/merchant_fulfillment_v0.rb +31 -15
  25. data/lib/peddler/api/messaging_v1.rb +93 -61
  26. data/lib/peddler/api/notifications_v1.rb +54 -23
  27. data/lib/peddler/api/orders_v0.rb +87 -72
  28. data/lib/peddler/api/product_fees_v0.rb +39 -31
  29. data/lib/peddler/api/product_pricing_2022_05_01.rb +17 -6
  30. data/lib/peddler/api/product_pricing_v0.rb +63 -45
  31. data/lib/peddler/api/product_type_definitions_2020_09_01.rb +29 -18
  32. data/lib/peddler/api/replenishment_2022_11_07.rb +21 -9
  33. data/lib/peddler/api/reports_2021_06_30.rb +60 -36
  34. data/lib/peddler/api/sales_v1.rb +20 -12
  35. data/lib/peddler/api/sellers_v1.rb +16 -4
  36. data/lib/peddler/api/services_v1.rb +138 -98
  37. data/lib/peddler/api/shipment_invoicing_v0.rb +25 -12
  38. data/lib/peddler/api/shipping_v1.rb +54 -29
  39. data/lib/peddler/api/shipping_v2.rb +132 -80
  40. data/lib/peddler/api/solicitations_v1.rb +18 -8
  41. data/lib/peddler/api/supply_sources_2020_07_01.rb +33 -15
  42. data/lib/peddler/api/tokens_2021_03_01.rb +13 -5
  43. data/lib/peddler/api/uploads_2020_11_01.rb +16 -6
  44. data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +12 -4
  45. data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +29 -17
  46. data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +29 -17
  47. data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +11 -3
  48. data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +14 -4
  49. data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +74 -48
  50. data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +74 -50
  51. data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +11 -3
  52. data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +11 -3
  53. data/lib/peddler/api/vendor_invoices_v1.rb +11 -3
  54. data/lib/peddler/api/vendor_orders_v1.rb +54 -43
  55. data/lib/peddler/api/vendor_shipments_v1.rb +63 -51
  56. data/lib/peddler/api/vendor_transaction_status_v1.rb +12 -3
  57. data/lib/peddler/api.rb +41 -18
  58. data/lib/peddler/endpoint.rb +51 -0
  59. data/lib/peddler/error.rb +1 -0
  60. data/lib/peddler/marketplace.rb +49 -0
  61. data/lib/peddler/token.rb +70 -0
  62. data/lib/peddler/version.rb +1 -1
  63. data/lib/peddler.rb +56 -52
  64. metadata +10 -6
  65. data/lib/peddler/access_token.rb +0 -76
  66. data/lib/peddler/region.rb +0 -30
@@ -3,6 +3,12 @@
3
3
  require "peddler/api"
4
4
 
5
5
  module Peddler
6
+ class << self
7
+ def fulfillment_inbound_v0(...)
8
+ API::FulfillmentInboundV0.new(...)
9
+ end
10
+ end
11
+
6
12
  class API
7
13
  # Selling Partner API for Fulfillment Inbound
8
14
  #
@@ -16,94 +22,106 @@ module Peddler
16
22
  # destination if the two shipment plans require different processing—for example, items that require labels must
17
23
  # be shipped separately from stickerless, commingled inventory.
18
24
  #
19
- # @param [Hash] body The request schema for the CreateInboundShipmentPlanRequest operation.
25
+ # @note This operation can make a static sandbox call.
26
+ # @param body [Hash] The request schema for the CreateInboundShipmentPlanRequest operation.
27
+ # @param rate_limit [Float] Requests per second
20
28
  # @return [Hash] The API response
21
- def create_inbound_shipment_plan(body)
29
+ def create_inbound_shipment_plan(body, rate_limit: 2.0)
22
30
  path = "/fba/inbound/v0/plans"
23
31
 
24
- rate_limit(2.0).post(path, body:)
32
+ meter(rate_limit).post(path, body:)
25
33
  end
26
34
 
27
35
  # Returns a new inbound shipment based on the specified shipmentId that was returned by the
28
36
  # createInboundShipmentPlan operation.
29
37
  #
30
- # @param [Hash] body The request schema for the InboundShipmentRequest operation.
31
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
38
+ # @note This operation can make a static sandbox call.
39
+ # @param body [Hash] The request schema for the InboundShipmentRequest operation.
40
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
32
41
  # operation.
42
+ # @param rate_limit [Float] Requests per second
33
43
  # @return [Hash] The API response
34
- def create_inbound_shipment(body, shipment_id)
44
+ def create_inbound_shipment(body, shipment_id, rate_limit: 2.0)
35
45
  path = "/fba/inbound/v0/shipments/#{shipment_id}"
36
46
 
37
- rate_limit(2.0).post(path, body:)
47
+ meter(rate_limit).post(path, body:)
38
48
  end
39
49
 
40
50
  # Updates or removes items from the inbound shipment identified by the specified shipment identifier. Adding new
41
51
  # items is not supported.
42
52
  #
43
- # @param [Hash] body The request schema for the InboundShipmentRequest operation.
44
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
53
+ # @note This operation can make a static sandbox call.
54
+ # @param body [Hash] The request schema for the InboundShipmentRequest operation.
55
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
45
56
  # operation.
57
+ # @param rate_limit [Float] Requests per second
46
58
  # @return [Hash] The API response
47
- def update_inbound_shipment(body, shipment_id)
59
+ def update_inbound_shipment(body, shipment_id, rate_limit: 2.0)
48
60
  path = "/fba/inbound/v0/shipments/#{shipment_id}"
49
61
 
50
- rate_limit(2.0).put(path, body:)
62
+ meter(rate_limit).put(path, body:)
51
63
  end
52
64
 
53
65
  # Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order.
54
66
  #
55
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
67
+ # @note This operation can make a static sandbox call.
68
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
56
69
  # operation.
57
- # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace the shipment is tied to.
70
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
71
+ # @param rate_limit [Float] Requests per second
58
72
  # @return [Hash] The API response
59
- def get_preorder_info(shipment_id, marketplace_id)
73
+ def get_preorder_info(shipment_id, marketplace_id, rate_limit: 2.0)
60
74
  path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder"
61
75
  params = {
62
76
  "MarketplaceId" => marketplace_id,
63
77
  }.compact
64
78
 
65
- rate_limit(2.0).get(path, params:)
79
+ meter(rate_limit).get(path, params:)
66
80
  end
67
81
 
68
82
  # Returns information needed to confirm a shipment for pre-order. Call this operation after calling the
69
83
  # getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment.
70
84
  #
71
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
85
+ # @note This operation can make a static sandbox call.
86
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
72
87
  # operation.
73
- # @param [String] need_by_date Date that the shipment must arrive at the Amazon fulfillment center to avoid
88
+ # @param need_by_date [String] Date that the shipment must arrive at the Amazon fulfillment center to avoid
74
89
  # delivery promise breaks for pre-ordered items. Must be in YYYY-MM-DD format. The response to the
75
90
  # getPreorderInfo operation returns this value.
76
- # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace the shipment is tied to.
91
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
92
+ # @param rate_limit [Float] Requests per second
77
93
  # @return [Hash] The API response
78
- def confirm_preorder(shipment_id, need_by_date, marketplace_id)
94
+ def confirm_preorder(shipment_id, need_by_date, marketplace_id, rate_limit: 2.0)
79
95
  path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder/confirm"
80
96
  params = {
81
97
  "NeedByDate" => need_by_date,
82
98
  "MarketplaceId" => marketplace_id,
83
99
  }.compact
84
100
 
85
- rate_limit(2.0).put(path, params:)
101
+ meter(rate_limit).put(path, params:)
86
102
  end
87
103
 
88
104
  # Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon's
89
105
  # fulfillment network.
90
106
  #
91
- # @param [String] ship_to_country_code The country code of the country to which the items will be shipped. Note
107
+ # @note This operation can make a static sandbox call.
108
+ # @param ship_to_country_code [String] The country code of the country to which the items will be shipped. Note
92
109
  # that labeling requirements and item preparation instructions can vary by country.
93
- # @param [Array<String>] seller_sku_list A list of SellerSKU values. Used to identify items for which you want
110
+ # @param seller_sku_list [Array<String>] A list of SellerSKU values. Used to identify items for which you want
94
111
  # labeling requirements and item preparation instructions for shipment to Amazon's fulfillment network. The
95
112
  # SellerSKU is qualified by the Seller ID, which is included with every call to the Seller Partner API. Note:
96
113
  # Include seller SKUs that you have used to list items on Amazon's retail website. If you include a seller SKU
97
114
  # that you have never used to list an item on Amazon's retail website, the seller SKU is returned in the
98
115
  # InvalidSKUList property in the response.
99
- # @param [Array<String>] asin_list A list of ASIN values. Used to identify items for which you want item
116
+ # @param asin_list [Array<String>] A list of ASIN values. Used to identify items for which you want item
100
117
  # preparation instructions to help with item sourcing decisions. Note: ASINs must be included in the product
101
118
  # catalog for at least one of the marketplaces that the seller participates in. Any ASIN that is not included in
102
119
  # the product catalog for at least one of the marketplaces that the seller participates in is returned in the
103
120
  # InvalidASINList property in the response. You can find out which marketplaces a seller participates in by
104
121
  # calling the getMarketplaceParticipations operation in the Selling Partner API for Sellers.
122
+ # @param rate_limit [Float] Requests per second
105
123
  # @return [Hash] The API response
106
- def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: nil)
124
+ def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: nil, rate_limit: 2.0)
107
125
  path = "/fba/inbound/v0/prepInstructions"
108
126
  params = {
109
127
  "ShipToCountryCode" => ship_to_country_code,
@@ -111,30 +129,34 @@ module Peddler
111
129
  "ASINList" => asin_list,
112
130
  }.compact
113
131
 
114
- rate_limit(2.0).get(path, params:)
132
+ meter(rate_limit).get(path, params:)
115
133
  end
116
134
 
117
135
  # Returns current transportation information about an inbound shipment.
118
136
  #
119
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
137
+ # @note This operation can make a static sandbox call.
138
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
120
139
  # operation.
140
+ # @param rate_limit [Float] Requests per second
121
141
  # @return [Hash] The API response
122
- def get_transport_details(shipment_id)
142
+ def get_transport_details(shipment_id, rate_limit: 2.0)
123
143
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
124
144
 
125
- rate_limit(2.0).get(path)
145
+ meter(rate_limit).get(path)
126
146
  end
127
147
 
128
148
  # Sends transportation information to Amazon about an inbound shipment.
129
149
  #
130
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
150
+ # @note This operation can make a static sandbox call.
151
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
131
152
  # operation.
132
- # @param [Hash] body The request schema for the PutTransportDetailsRequest operation.
153
+ # @param body [Hash] The request schema for the PutTransportDetailsRequest operation.
154
+ # @param rate_limit [Float] Requests per second
133
155
  # @return [Hash] The API response
134
- def put_transport_details(shipment_id, body)
156
+ def put_transport_details(shipment_id, body, rate_limit: 2.0)
135
157
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport"
136
158
 
137
- rate_limit(2.0).put(path, body:)
159
+ meter(rate_limit).put(path, body:)
138
160
  end
139
161
 
140
162
  # Cancels a previously-confirmed request to ship an inbound shipment using an Amazon-partnered carrier. To be
@@ -144,26 +166,30 @@ module Peddler
144
166
  # shipment transportation request. After the void deadline passes, your account will be charged for the shipping
145
167
  # cost.
146
168
  #
147
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
169
+ # @note This operation can make a static sandbox call.
170
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
148
171
  # operation.
172
+ # @param rate_limit [Float] Requests per second
149
173
  # @return [Hash] The API response
150
- def void_transport(shipment_id)
174
+ def void_transport(shipment_id, rate_limit: 2.0)
151
175
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/void"
152
176
 
153
- rate_limit(2.0).post(path)
177
+ meter(rate_limit).post(path)
154
178
  end
155
179
 
156
180
  # Initiates the process of estimating the shipping cost for an inbound shipment by an Amazon-partnered carrier.
157
181
  # Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide
158
182
  # Amazon with the transportation information for the inbound shipment.
159
183
  #
160
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
184
+ # @note This operation can make a static sandbox call.
185
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
161
186
  # operation.
187
+ # @param rate_limit [Float] Requests per second
162
188
  # @return [Hash] The API response
163
- def estimate_transport(shipment_id)
189
+ def estimate_transport(shipment_id, rate_limit: 2.0)
164
190
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate"
165
191
 
166
- rate_limit(2.0).post(path)
192
+ meter(rate_limit).post(path)
167
193
  end
168
194
 
169
195
  # Confirms that the seller accepts the Amazon-partnered shipping estimate, agrees to allow Amazon to charge their
@@ -176,35 +202,39 @@ module Peddler
176
202
  # Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request
177
203
  # to void it. After the grace period has expired the seller's account will be charged for the shipping cost.
178
204
  #
179
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
205
+ # @note This operation can make a static sandbox call.
206
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
180
207
  # operation.
208
+ # @param rate_limit [Float] Requests per second
181
209
  # @return [Hash] The API response
182
- def confirm_transport(shipment_id)
210
+ def confirm_transport(shipment_id, rate_limit: 2.0)
183
211
  path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/confirm"
184
212
 
185
- rate_limit(2.0).post(path)
213
+ meter(rate_limit).post(path)
186
214
  end
187
215
 
188
216
  # Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center.
189
217
  #
190
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
218
+ # @note This operation can make a static sandbox call.
219
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
191
220
  # operation.
192
- # @param [String] page_type The page type to use to print the labels. Submitting a PageType value that is not
221
+ # @param page_type [String] The page type to use to print the labels. Submitting a PageType value that is not
193
222
  # supported in your marketplace returns an error.
194
- # @param [String] label_type The type of labels requested.
195
- # @param [Integer] number_of_packages The number of packages in the shipment.
196
- # @param [Array<String>] package_labels_to_print A list of identifiers that specify packages for which you want
223
+ # @param label_type [String] The type of labels requested.
224
+ # @param number_of_packages [Integer] The number of packages in the shipment.
225
+ # @param package_labels_to_print [Array<String>] A list of identifiers that specify packages for which you want
197
226
  # package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton
198
227
  # Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code.
199
- # @param [Integer] number_of_pallets The number of pallets in the shipment. This returns four identical labels for
228
+ # @param number_of_pallets [Integer] The number of pallets in the shipment. This returns four identical labels for
200
229
  # each pallet.
201
- # @param [Integer] page_size The page size for paginating through the total packages' labels. This is a required
230
+ # @param page_size [Integer] The page size for paginating through the total packages' labels. This is a required
202
231
  # parameter for Non-Partnered LTL Shipments. Max value:1000.
203
- # @param [Integer] page_start_index The page start index for paginating through the total packages' labels. This
232
+ # @param page_start_index [Integer] The page start index for paginating through the total packages' labels. This
204
233
  # is a required parameter for Non-Partnered LTL Shipments.
234
+ # @param rate_limit [Float] Requests per second
205
235
  # @return [Hash] The API response
206
236
  def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: nil,
207
- number_of_pallets: nil, page_size: nil, page_start_index: nil)
237
+ number_of_pallets: nil, page_size: nil, page_start_index: nil, rate_limit: 2.0)
208
238
  path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
209
239
  params = {
210
240
  "PageType" => page_type,
@@ -216,43 +246,47 @@ module Peddler
216
246
  "PageStartIndex" => page_start_index,
217
247
  }.compact
218
248
 
219
- rate_limit(2.0).get(path, params:)
249
+ meter(rate_limit).get(path, params:)
220
250
  end
221
251
 
222
252
  # Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading
223
253
  # operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than
224
254
  # Truckload/Full Truckload (LTL/FTL) inbound shipment.
225
255
  #
226
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
256
+ # @note This operation can make a static sandbox call.
257
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
227
258
  # operation.
259
+ # @param rate_limit [Float] Requests per second
228
260
  # @return [Hash] The API response
229
- def get_bill_of_lading(shipment_id)
261
+ def get_bill_of_lading(shipment_id, rate_limit: 2.0)
230
262
  path = "/fba/inbound/v0/shipments/#{shipment_id}/billOfLading"
231
263
 
232
- rate_limit(2.0).get(path)
264
+ meter(rate_limit).get(path)
233
265
  end
234
266
 
235
267
  # Returns a list of inbound shipments based on criteria that you specify.
236
268
  #
237
- # @param [Array<String>] shipment_status_list A list of ShipmentStatus values. Used to select shipments with a
269
+ # @note This operation can make a static sandbox call.
270
+ # @param shipment_status_list [Array<String>] A list of ShipmentStatus values. Used to select shipments with a
238
271
  # current status that matches the status values that you specify.
239
- # @param [Array<String>] shipment_id_list A list of shipment IDs used to select the shipments that you want. If
272
+ # @param shipment_id_list [Array<String>] A list of shipment IDs used to select the shipments that you want. If
240
273
  # both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are
241
274
  # returned.
242
- # @param [String] last_updated_after A date used for selecting inbound shipments that were last updated after (or
275
+ # @param last_updated_after [String] A date used for selecting inbound shipments that were last updated after (or
243
276
  # at) a specified time. The selection includes updates made by Amazon and by the seller.
244
- # @param [String] last_updated_before A date used for selecting inbound shipments that were last updated before
277
+ # @param last_updated_before [String] A date used for selecting inbound shipments that were last updated before
245
278
  # (or at) a specified time. The selection includes updates made by Amazon and by the seller.
246
- # @param [String] query_type Indicates whether shipments are returned using shipment information (by providing the
279
+ # @param query_type [String] Indicates whether shipments are returned using shipment information (by providing the
247
280
  # ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and
248
281
  # LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous
249
282
  # request.
250
- # @param [String] next_token A string token returned in the response to your previous request.
251
- # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace where the product would be
283
+ # @param next_token [String] A string token returned in the response to your previous request.
284
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
252
285
  # stored.
286
+ # @param rate_limit [Float] Requests per second
253
287
  # @return [Hash] The API response
254
288
  def get_shipments(query_type, marketplace_id, shipment_status_list: nil, shipment_id_list: nil,
255
- last_updated_after: nil, last_updated_before: nil, next_token: nil)
289
+ last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0)
256
290
  path = "/fba/inbound/v0/shipments"
257
291
  params = {
258
292
  "ShipmentStatusList" => shipment_status_list,
@@ -264,40 +298,44 @@ module Peddler
264
298
  "MarketplaceId" => marketplace_id,
265
299
  }.compact
266
300
 
267
- rate_limit(2.0).get(path, params:)
301
+ meter(rate_limit).get(path, params:)
268
302
  end
269
303
 
270
304
  # Returns a list of items in a specified inbound shipment.
271
305
  #
272
- # @param [String] shipment_id A shipment identifier used for selecting items in a specific inbound shipment.
273
- # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace where the product would be
306
+ # @note This operation can make a static sandbox call.
307
+ # @param shipment_id [String] A shipment identifier used for selecting items in a specific inbound shipment.
308
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
274
309
  # stored.
310
+ # @param rate_limit [Float] Requests per second
275
311
  # @return [Hash] The API response
276
- def get_shipment_items_by_shipment_id(shipment_id, marketplace_id)
312
+ def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2.0)
277
313
  path = "/fba/inbound/v0/shipments/#{shipment_id}/items"
278
314
  params = {
279
315
  "MarketplaceId" => marketplace_id,
280
316
  }.compact
281
317
 
282
- rate_limit(2.0).get(path, params:)
318
+ meter(rate_limit).get(path, params:)
283
319
  end
284
320
 
285
321
  # Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified
286
322
  # time frame.
287
323
  #
288
- # @param [String] last_updated_after A date used for selecting inbound shipment items that were last updated after
324
+ # @note This operation can make a static sandbox call.
325
+ # @param last_updated_after [String] A date used for selecting inbound shipment items that were last updated after
289
326
  # (or at) a specified time. The selection includes updates made by Amazon and by the seller.
290
- # @param [String] last_updated_before A date used for selecting inbound shipment items that were last updated
327
+ # @param last_updated_before [String] A date used for selecting inbound shipment items that were last updated
291
328
  # before (or at) a specified time. The selection includes updates made by Amazon and by the seller.
292
- # @param [String] query_type Indicates whether items are returned using a date range (by providing the
329
+ # @param query_type [String] Indicates whether items are returned using a date range (by providing the
293
330
  # LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items
294
331
  # specified in a previous request.
295
- # @param [String] next_token A string token returned in the response to your previous request.
296
- # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace where the product would be
332
+ # @param next_token [String] A string token returned in the response to your previous request.
333
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
297
334
  # stored.
335
+ # @param rate_limit [Float] Requests per second
298
336
  # @return [Hash] The API response
299
337
  def get_shipment_items(query_type, marketplace_id, last_updated_after: nil, last_updated_before: nil,
300
- next_token: nil)
338
+ next_token: nil, rate_limit: 2.0)
301
339
  path = "/fba/inbound/v0/shipmentItems"
302
340
  params = {
303
341
  "LastUpdatedAfter" => last_updated_after,
@@ -307,7 +345,7 @@ module Peddler
307
345
  "MarketplaceId" => marketplace_id,
308
346
  }.compact
309
347
 
310
- rate_limit(2.0).get(path, params:)
348
+ meter(rate_limit).get(path, params:)
311
349
  end
312
350
  end
313
351
  end