peddler 3.0.0.beta1 → 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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +108 -110
  3. data/lib/peddler/api.rb +56 -18
  4. data/lib/peddler/{api → apis}/amazon_warehousing_and_distribution_2024_05_09.rb +38 -26
  5. data/lib/peddler/{api → apis}/aplus_content_2020_11_01.rb +97 -59
  6. data/lib/peddler/apis/application_integrations_2024_04_01.rb +56 -0
  7. data/lib/peddler/{api → apis}/application_management_2023_11_30.rb +14 -4
  8. data/lib/peddler/{api → apis}/catalog_items_2020_12_01.rb +34 -23
  9. data/lib/peddler/{api → apis}/catalog_items_2022_04_01.rb +39 -29
  10. data/lib/peddler/{api → apis}/catalog_items_v0.rb +43 -30
  11. data/lib/peddler/{api → apis}/data_kiosk_2023_11_15.rb +47 -31
  12. data/lib/peddler/apis/easy_ship_2022_03_23.rb +126 -0
  13. data/lib/peddler/{api → apis}/fba_inbound_eligibility_v1.rb +15 -7
  14. data/lib/peddler/{api → apis}/fba_inventory_v1.rb +45 -29
  15. data/lib/peddler/{api → apis}/feeds_2021_06_30.rb +54 -33
  16. data/lib/peddler/apis/finances_2024_06_19.rb +50 -0
  17. data/lib/peddler/{api → apis}/finances_v0.rb +50 -36
  18. data/lib/peddler/{api → apis}/fulfillment_inbound_2024_03_20.rb +384 -255
  19. data/lib/peddler/{api → apis}/fulfillment_inbound_v0.rb +138 -93
  20. data/lib/peddler/{api → apis}/fulfillment_outbound_2020_07_01.rb +105 -68
  21. data/lib/peddler/apis/invoices_2024_06_19.rb +180 -0
  22. data/lib/peddler/apis/listings_items_2020_09_01.rb +95 -0
  23. data/lib/peddler/apis/listings_items_2021_08_01.rb +136 -0
  24. data/lib/peddler/{api → apis}/listings_restrictions_2021_08_01.rb +21 -11
  25. data/lib/peddler/apis/merchant_fulfillment_v0.rb +80 -0
  26. data/lib/peddler/{api → apis}/messaging_v1.rb +107 -75
  27. data/lib/peddler/{api → apis}/notifications_v1.rb +63 -32
  28. data/lib/peddler/{api → apis}/orders_v0.rb +99 -84
  29. data/lib/peddler/apis/product_fees_v0.rb +77 -0
  30. data/lib/peddler/{api → apis}/product_pricing_2022_05_01.rb +24 -13
  31. data/lib/peddler/{api → apis}/product_pricing_v0.rb +70 -52
  32. data/lib/peddler/{api → apis}/product_type_definitions_2020_09_01.rb +32 -21
  33. data/lib/peddler/{api → apis}/replenishment_2022_11_07.rb +25 -13
  34. data/lib/peddler/{api → apis}/reports_2021_06_30.rb +71 -47
  35. data/lib/peddler/{api → apis}/sales_v1.rb +22 -14
  36. data/lib/peddler/{api → apis}/sellers_v1.rb +19 -7
  37. data/lib/peddler/{api → apis}/services_v1.rb +156 -116
  38. data/lib/peddler/apis/shipment_invoicing_v0.rb +59 -0
  39. data/lib/peddler/apis/shipping_v1.rb +132 -0
  40. data/lib/peddler/{api → apis}/shipping_v2.rb +150 -98
  41. data/lib/peddler/{api → apis}/solicitations_v1.rb +21 -11
  42. data/lib/peddler/apis/supply_sources_2020_07_01.rb +100 -0
  43. data/lib/peddler/{api → apis}/tokens_2021_03_01.rb +15 -7
  44. data/lib/peddler/{api → apis}/uploads_2020_11_01.rb +18 -8
  45. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_inventory_v1.rb +14 -6
  46. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_2021_12_28.rb +33 -21
  47. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_v1.rb +33 -21
  48. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_payments_v1.rb +13 -5
  49. data/lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +45 -0
  50. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_shipping_2021_12_28.rb +86 -60
  51. data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +189 -0
  52. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_2021_12_28.rb +14 -6
  53. data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_v1.rb +14 -6
  54. data/lib/peddler/apis/vendor_invoices_v1.rb +30 -0
  55. data/lib/peddler/{api → apis}/vendor_orders_v1.rb +59 -48
  56. data/lib/peddler/apis/vendor_shipments_v1.rb +132 -0
  57. data/lib/peddler/{api → apis}/vendor_transaction_status_v1.rb +14 -5
  58. data/lib/peddler/endpoint.rb +51 -0
  59. data/lib/peddler/error.rb +21 -11
  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 +93 -0
  63. data/lib/peddler/response.rb +46 -0
  64. data/lib/peddler/token.rb +70 -0
  65. data/lib/peddler/version.rb +1 -1
  66. data/lib/peddler.rb +55 -52
  67. metadata +64 -57
  68. data/lib/peddler/access_token.rb +0 -76
  69. data/lib/peddler/api/easy_ship_2022_03_23.rb +0 -108
  70. data/lib/peddler/api/listings_items_2020_09_01.rb +0 -84
  71. data/lib/peddler/api/listings_items_2021_08_01.rb +0 -154
  72. data/lib/peddler/api/merchant_fulfillment_v0.rb +0 -64
  73. data/lib/peddler/api/product_fees_v0.rb +0 -69
  74. data/lib/peddler/api/shipment_invoicing_v0.rb +0 -46
  75. data/lib/peddler/api/shipping_v1.rb +0 -107
  76. data/lib/peddler/api/supply_sources_2020_07_01.rb +0 -82
  77. data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +0 -35
  78. data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +0 -165
  79. data/lib/peddler/api/vendor_invoices_v1.rb +0 -22
  80. data/lib/peddler/api/vendor_shipments_v1.rb +0 -120
  81. data/lib/peddler/region.rb +0 -30
@@ -3,7 +3,13 @@
3
3
  require "peddler/api"
4
4
 
5
5
  module Peddler
6
- class API
6
+ class << self
7
+ def fulfillment_inbound_v0(...)
8
+ APIs::FulfillmentInboundV0.new(...)
9
+ end
10
+ end
11
+
12
+ module APIs
7
13
  # Selling Partner API for Fulfillment Inbound
8
14
  #
9
15
  # The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound
@@ -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.
20
- # @return [Hash] The API response
21
- def create_inbound_shipment_plan(body)
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
28
+ # @return [Peddler::Response] The API response
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.
33
- # @return [Hash] The API response
34
- def create_inbound_shipment(body, shipment_id)
42
+ # @param rate_limit [Float] Requests per second
43
+ # @return [Peddler::Response] The API response
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.
46
- # @return [Hash] The API response
47
- def update_inbound_shipment(body, shipment_id)
57
+ # @param rate_limit [Float] Requests per second
58
+ # @return [Peddler::Response] The API response
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.
58
- # @return [Hash] The API response
59
- def get_preorder_info(shipment_id, marketplace_id)
70
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
71
+ # @param rate_limit [Float] Requests per second
72
+ # @return [Peddler::Response] The API response
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.
77
- # @return [Hash] The API response
78
- def confirm_preorder(shipment_id, need_by_date, marketplace_id)
91
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace the shipment is tied to.
92
+ # @param rate_limit [Float] Requests per second
93
+ # @return [Peddler::Response] The API response
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.
105
- # @return [Hash] The API response
106
- def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: nil)
122
+ # @param rate_limit [Float] Requests per second
123
+ # @return [Peddler::Response] The API response
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.
121
- # @return [Hash] The API response
122
- def get_transport_details(shipment_id)
140
+ # @param rate_limit [Float] Requests per second
141
+ # @return [Peddler::Response] The API response
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.
133
- # @return [Hash] The API response
134
- def put_transport_details(shipment_id, body)
153
+ # @param body [Hash] The request schema for the PutTransportDetailsRequest operation.
154
+ # @param rate_limit [Float] Requests per second
155
+ # @return [Peddler::Response] The API response
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.
149
- # @return [Hash] The API response
150
- def void_transport(shipment_id)
172
+ # @param rate_limit [Float] Requests per second
173
+ # @return [Peddler::Response] The API response
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.
162
- # @return [Hash] The API response
163
- def estimate_transport(shipment_id)
187
+ # @param rate_limit [Float] Requests per second
188
+ # @return [Peddler::Response] The API response
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,46 @@ 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.
181
- # @return [Hash] The API response
182
- def confirm_transport(shipment_id)
208
+ # @param rate_limit [Float] Requests per second
209
+ # @return [Peddler::Response] The API response
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
197
- # package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton
198
- # 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
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
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.
235
+ # @param number_of_pallets [Integer] The number of pallets in the shipment. This returns four identical labels for
200
236
  # each pallet.
201
- # @param [Integer] page_size The page size for paginating through the total packages' labels. This is a required
237
+ # @param page_size [Integer] The page size for paginating through the total packages' labels. This is a required
202
238
  # 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
239
+ # @param page_start_index [Integer] The page start index for paginating through the total packages' labels. This
204
240
  # is a required parameter for Non-Partnered LTL Shipments.
205
- # @return [Hash] The API response
241
+ # @param rate_limit [Float] Requests per second
242
+ # @return [Peddler::Response] The API response
206
243
  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)
244
+ number_of_pallets: nil, page_size: nil, page_start_index: nil, rate_limit: 2.0)
208
245
  path = "/fba/inbound/v0/shipments/#{shipment_id}/labels"
209
246
  params = {
210
247
  "PageType" => page_type,
@@ -216,43 +253,47 @@ module Peddler
216
253
  "PageStartIndex" => page_start_index,
217
254
  }.compact
218
255
 
219
- rate_limit(2.0).get(path, params:)
256
+ meter(rate_limit).get(path, params:)
220
257
  end
221
258
 
222
259
  # Returns a bill of lading for a Less Than Truckload/Full Truckload (LTL/FTL) shipment. The getBillOfLading
223
260
  # operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than
224
261
  # Truckload/Full Truckload (LTL/FTL) inbound shipment.
225
262
  #
226
- # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan
263
+ # @note This operation can make a static sandbox call.
264
+ # @param shipment_id [String] A shipment identifier originally returned by the createInboundShipmentPlan
227
265
  # operation.
228
- # @return [Hash] The API response
229
- def get_bill_of_lading(shipment_id)
266
+ # @param rate_limit [Float] Requests per second
267
+ # @return [Peddler::Response] The API response
268
+ def get_bill_of_lading(shipment_id, rate_limit: 2.0)
230
269
  path = "/fba/inbound/v0/shipments/#{shipment_id}/billOfLading"
231
270
 
232
- rate_limit(2.0).get(path)
271
+ meter(rate_limit).get(path)
233
272
  end
234
273
 
235
274
  # Returns a list of inbound shipments based on criteria that you specify.
236
275
  #
237
- # @param [Array<String>] shipment_status_list A list of ShipmentStatus values. Used to select shipments with a
276
+ # @note This operation can make a static sandbox call.
277
+ # @param shipment_status_list [Array<String>] A list of ShipmentStatus values. Used to select shipments with a
238
278
  # 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
279
+ # @param shipment_id_list [Array<String>] A list of shipment IDs used to select the shipments that you want. If
240
280
  # both ShipmentStatusList and ShipmentIdList are specified, only shipments that match both parameters are
241
281
  # returned.
242
- # @param [String] last_updated_after A date used for selecting inbound shipments that were last updated after (or
282
+ # @param last_updated_after [String] A date used for selecting inbound shipments that were last updated after (or
243
283
  # 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
284
+ # @param last_updated_before [String] A date used for selecting inbound shipments that were last updated before
245
285
  # (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
286
+ # @param query_type [String] Indicates whether shipments are returned using shipment information (by providing the
247
287
  # ShipmentStatusList or ShipmentIdList parameters), using a date range (by providing the LastUpdatedAfter and
248
288
  # LastUpdatedBefore parameters), or by using NextToken to continue returning items specified in a previous
249
289
  # 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
290
+ # @param next_token [String] A string token returned in the response to your previous request.
291
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
252
292
  # stored.
253
- # @return [Hash] The API response
293
+ # @param rate_limit [Float] Requests per second
294
+ # @return [Peddler::Response] The API response
254
295
  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)
296
+ last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0)
256
297
  path = "/fba/inbound/v0/shipments"
257
298
  params = {
258
299
  "ShipmentStatusList" => shipment_status_list,
@@ -264,40 +305,44 @@ module Peddler
264
305
  "MarketplaceId" => marketplace_id,
265
306
  }.compact
266
307
 
267
- rate_limit(2.0).get(path, params:)
308
+ meter(rate_limit).get(path, params:)
268
309
  end
269
310
 
270
311
  # Returns a list of items in a specified inbound shipment.
271
312
  #
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
313
+ # @note This operation can make a static sandbox call.
314
+ # @param shipment_id [String] A shipment identifier used for selecting items in a specific inbound shipment.
315
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
274
316
  # stored.
275
- # @return [Hash] The API response
276
- def get_shipment_items_by_shipment_id(shipment_id, marketplace_id)
317
+ # @param rate_limit [Float] Requests per second
318
+ # @return [Peddler::Response] The API response
319
+ def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2.0)
277
320
  path = "/fba/inbound/v0/shipments/#{shipment_id}/items"
278
321
  params = {
279
322
  "MarketplaceId" => marketplace_id,
280
323
  }.compact
281
324
 
282
- rate_limit(2.0).get(path, params:)
325
+ meter(rate_limit).get(path, params:)
283
326
  end
284
327
 
285
328
  # Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified
286
329
  # time frame.
287
330
  #
288
- # @param [String] last_updated_after A date used for selecting inbound shipment items that were last updated after
331
+ # @note This operation can make a static sandbox call.
332
+ # @param last_updated_after [String] A date used for selecting inbound shipment items that were last updated after
289
333
  # (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
334
+ # @param last_updated_before [String] A date used for selecting inbound shipment items that were last updated
291
335
  # 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
336
+ # @param query_type [String] Indicates whether items are returned using a date range (by providing the
293
337
  # LastUpdatedAfter and LastUpdatedBefore parameters), or using NextToken, which continues returning items
294
338
  # 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
339
+ # @param next_token [String] A string token returned in the response to your previous request.
340
+ # @param marketplace_id [String] A marketplace identifier. Specifies the marketplace where the product would be
297
341
  # stored.
298
- # @return [Hash] The API response
342
+ # @param rate_limit [Float] Requests per second
343
+ # @return [Peddler::Response] The API response
299
344
  def get_shipment_items(query_type, marketplace_id, last_updated_after: nil, last_updated_before: nil,
300
- next_token: nil)
345
+ next_token: nil, rate_limit: 2.0)
301
346
  path = "/fba/inbound/v0/shipmentItems"
302
347
  params = {
303
348
  "LastUpdatedAfter" => last_updated_after,
@@ -307,7 +352,7 @@ module Peddler
307
352
  "MarketplaceId" => marketplace_id,
308
353
  }.compact
309
354
 
310
- rate_limit(2.0).get(path, params:)
355
+ meter(rate_limit).get(path, params:)
311
356
  end
312
357
  end
313
358
  end