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.
- checksums.yaml +4 -4
- data/README.md +96 -106
- data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +34 -22
- data/lib/peddler/api/aplus_content_2020_11_01.rb +86 -48
- data/lib/peddler/api/application_integrations_2024_04_01.rb +56 -0
- data/lib/peddler/api/application_management_2023_11_30.rb +12 -2
- data/lib/peddler/api/catalog_items_2020_12_01.rb +31 -20
- data/lib/peddler/api/catalog_items_2022_04_01.rb +35 -25
- data/lib/peddler/api/catalog_items_v0.rb +39 -26
- data/lib/peddler/api/data_kiosk_2023_11_15.rb +41 -25
- data/lib/peddler/api/easy_ship_2022_03_23.rb +62 -43
- data/lib/peddler/api/fba_inbound_eligibility_v1.rb +13 -5
- data/lib/peddler/api/fba_inventory_v1.rb +40 -24
- data/lib/peddler/api/feeds_2021_06_30.rb +43 -25
- data/lib/peddler/api/finances_2024_06_19.rb +50 -0
- data/lib/peddler/api/finances_v0.rb +86 -59
- data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +304 -205
- data/lib/peddler/api/fulfillment_inbound_v0.rb +112 -74
- data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +90 -53
- data/lib/peddler/api/invoices_2024_06_19.rb +180 -0
- data/lib/peddler/api/listings_items_2020_09_01.rb +44 -33
- data/lib/peddler/api/listings_items_2021_08_01.rb +76 -60
- data/lib/peddler/api/listings_restrictions_2021_08_01.rb +19 -9
- data/lib/peddler/api/merchant_fulfillment_v0.rb +31 -15
- data/lib/peddler/api/messaging_v1.rb +93 -61
- data/lib/peddler/api/notifications_v1.rb +54 -23
- data/lib/peddler/api/orders_v0.rb +87 -72
- data/lib/peddler/api/product_fees_v0.rb +39 -31
- data/lib/peddler/api/product_pricing_2022_05_01.rb +17 -6
- data/lib/peddler/api/product_pricing_v0.rb +63 -45
- data/lib/peddler/api/product_type_definitions_2020_09_01.rb +29 -18
- data/lib/peddler/api/replenishment_2022_11_07.rb +21 -9
- data/lib/peddler/api/reports_2021_06_30.rb +60 -36
- data/lib/peddler/api/sales_v1.rb +20 -12
- data/lib/peddler/api/sellers_v1.rb +16 -4
- data/lib/peddler/api/services_v1.rb +138 -98
- data/lib/peddler/api/shipment_invoicing_v0.rb +25 -12
- data/lib/peddler/api/shipping_v1.rb +54 -29
- data/lib/peddler/api/shipping_v2.rb +132 -80
- data/lib/peddler/api/solicitations_v1.rb +18 -8
- data/lib/peddler/api/supply_sources_2020_07_01.rb +33 -15
- data/lib/peddler/api/tokens_2021_03_01.rb +13 -5
- data/lib/peddler/api/uploads_2020_11_01.rb +16 -6
- data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +12 -4
- data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +29 -17
- data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +29 -17
- data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +11 -3
- data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +14 -4
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +74 -48
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +74 -50
- data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +11 -3
- data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +11 -3
- data/lib/peddler/api/vendor_invoices_v1.rb +11 -3
- data/lib/peddler/api/vendor_orders_v1.rb +54 -43
- data/lib/peddler/api/vendor_shipments_v1.rb +63 -51
- data/lib/peddler/api/vendor_transaction_status_v1.rb +12 -3
- data/lib/peddler/api.rb +41 -18
- data/lib/peddler/endpoint.rb +51 -0
- data/lib/peddler/error.rb +1 -0
- data/lib/peddler/marketplace.rb +49 -0
- data/lib/peddler/token.rb +70 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +56 -52
- metadata +10 -6
- data/lib/peddler/access_token.rb +0 -76
- 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_2024_03_20(...)
|
8
|
+
API::FulfillmentInbound20240320.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# The Selling Partner API for FBA inbound operations.
|
8
14
|
#
|
@@ -12,15 +18,18 @@ module Peddler
|
|
12
18
|
class FulfillmentInbound20240320 < API
|
13
19
|
# Provides a list of inbound plans with minimal information.
|
14
20
|
#
|
15
|
-
# @
|
16
|
-
# @param [
|
21
|
+
# @note This operation can make a static sandbox call.
|
22
|
+
# @param page_size [Integer] The number of inbound plans to return in the response matching the given query.
|
23
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
17
24
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
18
25
|
# token value from the query parameter the API returns the first page of the result.
|
19
|
-
# @param [String]
|
20
|
-
# @param [String]
|
21
|
-
# @param [String]
|
26
|
+
# @param status [String] The status of an inbound plan.
|
27
|
+
# @param sort_by [String] Sort by field.
|
28
|
+
# @param sort_order [String] The sort order.
|
29
|
+
# @param rate_limit [Float] Requests per second
|
22
30
|
# @return [Hash] The API response
|
23
|
-
def list_inbound_plans(page_size:
|
31
|
+
def list_inbound_plans(page_size: 10, pagination_token: nil, status: nil, sort_by: nil, sort_order: nil,
|
32
|
+
rate_limit: 2.0)
|
24
33
|
path = "/inbound/fba/2024-03-20/inboundPlans"
|
25
34
|
params = {
|
26
35
|
"pageSize" => page_size,
|
@@ -30,376 +39,431 @@ module Peddler
|
|
30
39
|
"sortOrder" => sort_order,
|
31
40
|
}.compact
|
32
41
|
|
33
|
-
rate_limit
|
42
|
+
meter(rate_limit).get(path, params:)
|
34
43
|
end
|
35
44
|
|
36
45
|
# Creates an inbound plan. An inbound plan contains all the necessary information to send shipments into Amazon's
|
37
46
|
# fufillment network.
|
38
47
|
#
|
39
|
-
# @
|
48
|
+
# @note This operation can make a static sandbox call.
|
49
|
+
# @param body [Hash] The body of the request to `createInboundPlan`.
|
50
|
+
# @param rate_limit [Float] Requests per second
|
40
51
|
# @return [Hash] The API response
|
41
|
-
def create_inbound_plan(body)
|
52
|
+
def create_inbound_plan(body, rate_limit: 2.0)
|
42
53
|
path = "/inbound/fba/2024-03-20/inboundPlans"
|
43
54
|
|
44
|
-
rate_limit
|
55
|
+
meter(rate_limit).post(path, body:)
|
45
56
|
end
|
46
57
|
|
47
58
|
# Fetches the top level information about an inbound plan.
|
48
59
|
#
|
49
|
-
# @
|
60
|
+
# @note This operation can make a static sandbox call.
|
61
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
62
|
+
# @param rate_limit [Float] Requests per second
|
50
63
|
# @return [Hash] The API response
|
51
|
-
def get_inbound_plan(inbound_plan_id)
|
64
|
+
def get_inbound_plan(inbound_plan_id, rate_limit: 2.0)
|
52
65
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}"
|
53
66
|
|
54
|
-
rate_limit
|
67
|
+
meter(rate_limit).get(path)
|
55
68
|
end
|
56
69
|
|
57
70
|
# Provides a paginated list of box packages in an inbound plan.
|
58
71
|
#
|
59
|
-
# @
|
60
|
-
# @param [
|
61
|
-
# @param [
|
72
|
+
# @note This operation can make a static sandbox call.
|
73
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
74
|
+
# @param page_size [Integer] The number of boxes to return in the response matching the given query.
|
75
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
62
76
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
63
77
|
# token value from the query parameter the API returns the first page of the result.
|
78
|
+
# @param rate_limit [Float] Requests per second
|
64
79
|
# @return [Hash] The API response
|
65
|
-
def list_inbound_plan_boxes(inbound_plan_id, page_size:
|
80
|
+
def list_inbound_plan_boxes(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
66
81
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/boxes"
|
67
82
|
params = {
|
68
83
|
"pageSize" => page_size,
|
69
84
|
"paginationToken" => pagination_token,
|
70
85
|
}.compact
|
71
86
|
|
72
|
-
rate_limit
|
87
|
+
meter(rate_limit).get(path, params:)
|
73
88
|
end
|
74
89
|
|
75
90
|
# Cancels an Inbound Plan. Charges may apply if the cancellation is performed outside of a void window. The window
|
76
91
|
# for Amazon Partnered Carriers is 24 hours for Small Parcel Delivery (SPD) and one hour for Less-Than-Truckload
|
77
92
|
# (LTL) carrier shipments.
|
78
93
|
#
|
79
|
-
# @
|
94
|
+
# @note This operation can make a static sandbox call.
|
95
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
96
|
+
# @param rate_limit [Float] Requests per second
|
80
97
|
# @return [Hash] The API response
|
81
|
-
def cancel_inbound_plan(inbound_plan_id)
|
98
|
+
def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0)
|
82
99
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/cancellation"
|
83
100
|
|
84
|
-
rate_limit
|
101
|
+
meter(rate_limit).put(path)
|
85
102
|
end
|
86
103
|
|
87
104
|
# Provides a paginated list of item packages in an inbound plan.
|
88
105
|
#
|
89
|
-
# @
|
90
|
-
# @param [
|
91
|
-
# @param [
|
106
|
+
# @note This operation can make a static sandbox call.
|
107
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
108
|
+
# @param page_size [Integer] The number of items to return in the response matching the given query.
|
109
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
92
110
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
93
111
|
# token value from the query parameter the API returns the first page of the result.
|
112
|
+
# @param rate_limit [Float] Requests per second
|
94
113
|
# @return [Hash] The API response
|
95
|
-
def list_inbound_plan_items(inbound_plan_id, page_size:
|
114
|
+
def list_inbound_plan_items(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
96
115
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/items"
|
97
116
|
params = {
|
98
117
|
"pageSize" => page_size,
|
99
118
|
"paginationToken" => pagination_token,
|
100
119
|
}.compact
|
101
120
|
|
102
|
-
rate_limit
|
121
|
+
meter(rate_limit).get(path, params:)
|
103
122
|
end
|
104
123
|
|
105
124
|
# Updates the name of an existing inbound plan.
|
106
125
|
#
|
107
|
-
# @
|
108
|
-
# @param [
|
126
|
+
# @note This operation can make a static sandbox call.
|
127
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
128
|
+
# @param body [Hash] The body of the request to `updateInboundPlanName`.
|
129
|
+
# @param rate_limit [Float] Requests per second
|
109
130
|
# @return [Hash] The API response
|
110
|
-
def update_inbound_plan_name(inbound_plan_id, body)
|
131
|
+
def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0)
|
111
132
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/name"
|
112
133
|
|
113
|
-
rate_limit
|
134
|
+
meter(rate_limit).put(path, body:)
|
114
135
|
end
|
115
136
|
|
116
137
|
# Retrieves a page of boxes from a given packing group. These boxes were previously provided through the
|
117
138
|
# `setPackingInformation` operation. This API is used for workflows where boxes are packed before Amazon
|
118
139
|
# determines shipment splits.
|
119
140
|
#
|
120
|
-
# @
|
121
|
-
# @param [String]
|
122
|
-
# @param [
|
123
|
-
# @param [
|
141
|
+
# @note This operation can make a static sandbox call.
|
142
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
143
|
+
# @param packing_group_id [String] Identifier of a packing group.
|
144
|
+
# @param page_size [Integer] The number of packing group boxes to return in the response matching the given query.
|
145
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
124
146
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
125
147
|
# token value from the query parameter the API returns the first page of the result.
|
148
|
+
# @param rate_limit [Float] Requests per second
|
126
149
|
# @return [Hash] The API response
|
127
|
-
def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size:
|
150
|
+
def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil,
|
151
|
+
rate_limit: 2.0)
|
128
152
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/boxes"
|
129
153
|
params = {
|
130
154
|
"pageSize" => page_size,
|
131
155
|
"paginationToken" => pagination_token,
|
132
156
|
}.compact
|
133
157
|
|
134
|
-
rate_limit
|
158
|
+
meter(rate_limit).get(path, params:)
|
135
159
|
end
|
136
160
|
|
137
161
|
# Retrieves a page of items in a given packing group. Packing options must first be generated by the corresponding
|
138
162
|
# operation before packing group items can be listed.
|
139
163
|
#
|
140
|
-
# @
|
141
|
-
# @param [String]
|
142
|
-
# @param [
|
143
|
-
# @param [
|
164
|
+
# @note This operation can make a static sandbox call.
|
165
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
166
|
+
# @param packing_group_id [String] Identifier of a packing group.
|
167
|
+
# @param page_size [Integer] The number of packing group items to return in the response matching the given query.
|
168
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
144
169
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
145
170
|
# token value from the query parameter the API returns the first page of the result.
|
171
|
+
# @param rate_limit [Float] Requests per second
|
146
172
|
# @return [Hash] The API response
|
147
|
-
def list_packing_group_items(inbound_plan_id, packing_group_id, page_size:
|
173
|
+
def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil,
|
174
|
+
rate_limit: 2.0)
|
148
175
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items"
|
149
176
|
params = {
|
150
177
|
"pageSize" => page_size,
|
151
178
|
"paginationToken" => pagination_token,
|
152
179
|
}.compact
|
153
180
|
|
154
|
-
rate_limit
|
181
|
+
meter(rate_limit).get(path, params:)
|
155
182
|
end
|
156
183
|
|
157
184
|
# Sets packing information for an inbound plan. This should be called after an inbound plan is created to populate
|
158
185
|
# the box level information required for planning and transportation estimates.
|
159
186
|
#
|
160
|
-
# @
|
161
|
-
# @param [
|
187
|
+
# @note This operation can make a static sandbox call.
|
188
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
189
|
+
# @param body [Hash] The body of the request to `setPackingInformation`.
|
190
|
+
# @param rate_limit [Float] Requests per second
|
162
191
|
# @return [Hash] The API response
|
163
|
-
def set_packing_information(inbound_plan_id, body)
|
192
|
+
def set_packing_information(inbound_plan_id, body, rate_limit: 2.0)
|
164
193
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingInformation"
|
165
194
|
|
166
|
-
rate_limit
|
195
|
+
meter(rate_limit).post(path, body:)
|
167
196
|
end
|
168
197
|
|
169
198
|
# Retrieves a list of all packing options for an inbound plan. Packing options must first be generated by the
|
170
199
|
# corresponding operation before becoming available.
|
171
200
|
#
|
172
|
-
# @
|
173
|
-
# @param [
|
174
|
-
# @param [
|
201
|
+
# @note This operation can make a static sandbox call.
|
202
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
203
|
+
# @param page_size [Integer] The number of packing options to return in the response matching the given query.
|
204
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
175
205
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
176
206
|
# token value from the query parameter the API returns the first page of the result.
|
207
|
+
# @param rate_limit [Float] Requests per second
|
177
208
|
# @return [Hash] The API response
|
178
|
-
def list_packing_options(inbound_plan_id, page_size:
|
209
|
+
def list_packing_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
179
210
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
|
180
211
|
params = {
|
181
212
|
"pageSize" => page_size,
|
182
213
|
"paginationToken" => pagination_token,
|
183
214
|
}.compact
|
184
215
|
|
185
|
-
rate_limit
|
216
|
+
meter(rate_limit).get(path, params:)
|
186
217
|
end
|
187
218
|
|
188
219
|
# Generates available packing options for the inbound plan.
|
189
220
|
#
|
190
|
-
# @
|
221
|
+
# @note This operation can make a static sandbox call.
|
222
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
223
|
+
# @param rate_limit [Float] Requests per second
|
191
224
|
# @return [Hash] The API response
|
192
|
-
def generate_packing_options(inbound_plan_id)
|
225
|
+
def generate_packing_options(inbound_plan_id, rate_limit: 2.0)
|
193
226
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions"
|
194
227
|
|
195
|
-
rate_limit
|
228
|
+
meter(rate_limit).post(path)
|
196
229
|
end
|
197
230
|
|
198
231
|
# Confirms the packing option for an inbound plan.
|
199
232
|
#
|
200
|
-
# @
|
201
|
-
# @param [String]
|
233
|
+
# @note This operation can make a static sandbox call.
|
234
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
235
|
+
# @param packing_option_id [String] Identifier of a packing option.
|
236
|
+
# @param rate_limit [Float] Requests per second
|
202
237
|
# @return [Hash] The API response
|
203
|
-
def confirm_packing_option(inbound_plan_id, packing_option_id)
|
238
|
+
def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0)
|
204
239
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation"
|
205
240
|
|
206
|
-
rate_limit
|
241
|
+
meter(rate_limit).post(path)
|
207
242
|
end
|
208
243
|
|
209
244
|
# Provides a paginated list of pallet packages in an inbound plan. An inbound plan will have pallets when the
|
210
245
|
# related details are provided after generating Less-Than-Truckload (LTL) carrier shipments.
|
211
246
|
#
|
212
|
-
# @
|
213
|
-
# @param [
|
214
|
-
# @param [
|
247
|
+
# @note This operation can make a static sandbox call.
|
248
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
249
|
+
# @param page_size [Integer] The number of pallets to return in the response matching the given query.
|
250
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
215
251
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
216
252
|
# token value from the query parameter the API returns the first page of the result.
|
253
|
+
# @param rate_limit [Float] Requests per second
|
217
254
|
# @return [Hash] The API response
|
218
|
-
def list_inbound_plan_pallets(inbound_plan_id, page_size:
|
255
|
+
def list_inbound_plan_pallets(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
219
256
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/pallets"
|
220
257
|
params = {
|
221
258
|
"pageSize" => page_size,
|
222
259
|
"paginationToken" => pagination_token,
|
223
260
|
}.compact
|
224
261
|
|
225
|
-
rate_limit
|
262
|
+
meter(rate_limit).get(path, params:)
|
226
263
|
end
|
227
264
|
|
228
265
|
# Provides a list of all placement options for an inbound plan. Placement options must first be generated by the
|
229
266
|
# corresponding operation before becoming available.
|
230
267
|
#
|
231
|
-
# @
|
232
|
-
# @param [
|
233
|
-
# @param [
|
268
|
+
# @note This operation can make a static sandbox call.
|
269
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
270
|
+
# @param page_size [Integer] The number of placement options to return in the response matching the given query.
|
271
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
234
272
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
235
273
|
# token value from the query parameter the API returns the first page of the result.
|
274
|
+
# @param rate_limit [Float] Requests per second
|
236
275
|
# @return [Hash] The API response
|
237
|
-
def list_placement_options(inbound_plan_id, page_size:
|
276
|
+
def list_placement_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
238
277
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
|
239
278
|
params = {
|
240
279
|
"pageSize" => page_size,
|
241
280
|
"paginationToken" => pagination_token,
|
242
281
|
}.compact
|
243
282
|
|
244
|
-
rate_limit
|
283
|
+
meter(rate_limit).get(path, params:)
|
245
284
|
end
|
246
285
|
|
247
286
|
# Generates placement options for the inbound plan.
|
248
287
|
#
|
249
|
-
# @
|
250
|
-
# @param [
|
288
|
+
# @note This operation can make a static sandbox call.
|
289
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
290
|
+
# @param body [Hash] The body of the request to `generatePlacementOptions`.
|
291
|
+
# @param rate_limit [Float] Requests per second
|
251
292
|
# @return [Hash] The API response
|
252
|
-
def generate_placement_options(inbound_plan_id, body)
|
293
|
+
def generate_placement_options(inbound_plan_id, body, rate_limit: 2.0)
|
253
294
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions"
|
254
295
|
|
255
|
-
rate_limit
|
296
|
+
meter(rate_limit).post(path, body:)
|
256
297
|
end
|
257
298
|
|
258
299
|
# Confirms the placement option for an inbound plan. Once confirmed, it cannot be changed for the Inbound Plan.
|
259
300
|
#
|
260
|
-
# @
|
261
|
-
# @param [String]
|
301
|
+
# @note This operation can make a static sandbox call.
|
302
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
303
|
+
# @param placement_option_id [String] The identifier of a placement option. A placement option represents the
|
262
304
|
# shipment splits and destinations of SKUs.
|
305
|
+
# @param rate_limit [Float] Requests per second
|
263
306
|
# @return [Hash] The API response
|
264
|
-
def confirm_placement_option(inbound_plan_id, placement_option_id)
|
307
|
+
def confirm_placement_option(inbound_plan_id, placement_option_id, rate_limit: 2.0)
|
265
308
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions/#{placement_option_id}/confirmation"
|
266
309
|
|
267
|
-
rate_limit
|
310
|
+
meter(rate_limit).post(path)
|
268
311
|
end
|
269
312
|
|
270
313
|
# Provides the full details for a specific shipment within an inbound plan. The `transportationOptionId` inside
|
271
314
|
# `acceptedTransportationSelection` can be used to retrieve the transportation details for the shipment.
|
272
315
|
#
|
273
|
-
# @
|
274
|
-
# @param [String]
|
316
|
+
# @note This operation can make a static sandbox call.
|
317
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
318
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
319
|
+
# @param rate_limit [Float] Requests per second
|
275
320
|
# @return [Hash] The API response
|
276
|
-
def get_shipment(inbound_plan_id, shipment_id)
|
321
|
+
def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0)
|
277
322
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}"
|
278
323
|
|
279
|
-
rate_limit
|
324
|
+
meter(rate_limit).get(path)
|
280
325
|
end
|
281
326
|
|
282
327
|
# Provides a paginated list of box packages in a shipment.
|
283
328
|
#
|
284
|
-
# @
|
285
|
-
# @param [String]
|
286
|
-
# @param [
|
287
|
-
# @param [
|
329
|
+
# @note This operation can make a static sandbox call.
|
330
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
331
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
332
|
+
# @param page_size [Integer] The number of boxes to return in the response matching the given query.
|
333
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
288
334
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
289
335
|
# token value from the query parameter the API returns the first page of the result.
|
336
|
+
# @param rate_limit [Float] Requests per second
|
290
337
|
# @return [Hash] The API response
|
291
|
-
def list_shipment_boxes(inbound_plan_id, shipment_id, page_size:
|
338
|
+
def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
292
339
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/boxes"
|
293
340
|
params = {
|
294
341
|
"pageSize" => page_size,
|
295
342
|
"paginationToken" => pagination_token,
|
296
343
|
}.compact
|
297
344
|
|
298
|
-
rate_limit
|
345
|
+
meter(rate_limit).get(path, params:)
|
299
346
|
end
|
300
347
|
|
301
348
|
# Retrieve a paginated list of shipment content update previews for a given shipment. The shipment content update
|
302
349
|
# preview is a summary of the requested shipment content changes along with the transportation cost implications
|
303
350
|
# of the change that can only be confirmed prior to the expiry date specified.
|
304
351
|
#
|
305
|
-
# @
|
306
|
-
# @param [String]
|
307
|
-
# @param [
|
308
|
-
# @param [
|
352
|
+
# @note This operation can make a static sandbox call.
|
353
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
354
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
355
|
+
# @param page_size [Integer] The number of content update previews to return.
|
356
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
309
357
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
310
358
|
# token value from the query parameter the API returns the first page of the result.
|
359
|
+
# @param rate_limit [Float] Requests per second
|
311
360
|
# @return [Hash] The API response
|
312
|
-
def list_shipment_content_update_previews(inbound_plan_id, shipment_id, page_size:
|
361
|
+
def list_shipment_content_update_previews(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
|
362
|
+
rate_limit: 2.0)
|
313
363
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
|
314
364
|
params = {
|
315
365
|
"pageSize" => page_size,
|
316
366
|
"paginationToken" => pagination_token,
|
317
367
|
}.compact
|
318
368
|
|
319
|
-
rate_limit
|
369
|
+
meter(rate_limit).get(path, params:)
|
320
370
|
end
|
321
371
|
|
322
372
|
# Generate a shipment content update preview given a set of intended boxes and/or items for a shipment with a
|
323
373
|
# confirmed carrier. The shipment content update preview will be viewable with the updated costs and contents
|
324
374
|
# prior to confirmation.
|
325
375
|
#
|
326
|
-
# @
|
327
|
-
# @param [String]
|
328
|
-
# @param [
|
376
|
+
# @note This operation can make a static sandbox call.
|
377
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
378
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
379
|
+
# @param body [Hash] The body of the request to `generateShipmentContentUpdatePreviews`.
|
380
|
+
# @param rate_limit [Float] Requests per second
|
329
381
|
# @return [Hash] The API response
|
330
|
-
def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body)
|
382
|
+
def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
331
383
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews"
|
332
384
|
|
333
|
-
rate_limit
|
385
|
+
meter(rate_limit).post(path, body:)
|
334
386
|
end
|
335
387
|
|
336
388
|
# Retrieve a shipment content update preview which provides a summary of the requested shipment content changes
|
337
389
|
# along with the transportation cost implications of the change that can only be confirmed prior to the expiry
|
338
390
|
# date specified.
|
339
391
|
#
|
340
|
-
# @
|
341
|
-
# @param [String]
|
342
|
-
# @param [String]
|
392
|
+
# @note This operation can make a static sandbox call.
|
393
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
394
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
395
|
+
# @param content_update_preview_id [String] Identifier of a content update preview.
|
396
|
+
# @param rate_limit [Float] Requests per second
|
343
397
|
# @return [Hash] The API response
|
344
|
-
def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id)
|
398
|
+
def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id, rate_limit: 2.0)
|
345
399
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}"
|
346
400
|
|
347
|
-
rate_limit
|
401
|
+
meter(rate_limit).get(path)
|
348
402
|
end
|
349
403
|
|
350
404
|
# Confirm a shipment content update preview and accept the changes in transportation cost.
|
351
405
|
#
|
352
|
-
# @
|
353
|
-
# @param [String]
|
354
|
-
# @param [String]
|
406
|
+
# @note This operation can make a static sandbox call.
|
407
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
408
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
409
|
+
# @param content_update_preview_id [String] Identifier of a content update preview.
|
410
|
+
# @param rate_limit [Float] Requests per second
|
355
411
|
# @return [Hash] The API response
|
356
|
-
def confirm_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id
|
412
|
+
def confirm_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id,
|
413
|
+
rate_limit: 2.0)
|
357
414
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}/confirmation"
|
358
415
|
|
359
|
-
rate_limit
|
416
|
+
meter(rate_limit).post(path)
|
360
417
|
end
|
361
418
|
|
362
419
|
# Provide delivery challan document for PCP transportation in IN marketplace.
|
363
420
|
#
|
364
|
-
# @
|
365
|
-
# @param [String]
|
421
|
+
# @note This operation can make a static sandbox call.
|
422
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
423
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
424
|
+
# @param rate_limit [Float] Requests per second
|
366
425
|
# @return [Hash] The API response
|
367
|
-
def get_delivery_challan_document(inbound_plan_id, shipment_id)
|
426
|
+
def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0)
|
368
427
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryChallanDocument"
|
369
428
|
|
370
|
-
rate_limit
|
429
|
+
meter(rate_limit).get(path)
|
371
430
|
end
|
372
431
|
|
373
432
|
# Retrieves all delivery window options for a shipment. Delivery window options must first be generated by the
|
374
433
|
# `generateDeliveryWindowOptions` operation before becoming available.
|
375
434
|
#
|
376
|
-
# @
|
377
|
-
# @param [String]
|
378
|
-
# @param [
|
435
|
+
# @note This operation can make a static sandbox call.
|
436
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
437
|
+
# @param shipment_id [String] The shipment to get delivery window options for.
|
438
|
+
# @param page_size [Integer] The number of delivery window options to return in the response matching the given
|
379
439
|
# query.
|
380
|
-
# @param [String]
|
440
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
381
441
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
382
442
|
# token value from the query parameter the API returns the first page of the result.
|
443
|
+
# @param rate_limit [Float] Requests per second
|
383
444
|
# @return [Hash] The API response
|
384
|
-
def list_delivery_window_options(inbound_plan_id, shipment_id, page_size:
|
445
|
+
def list_delivery_window_options(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
|
446
|
+
rate_limit: 2.0)
|
385
447
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
|
386
448
|
params = {
|
387
449
|
"pageSize" => page_size,
|
388
450
|
"paginationToken" => pagination_token,
|
389
451
|
}.compact
|
390
452
|
|
391
|
-
rate_limit
|
453
|
+
meter(rate_limit).get(path, params:)
|
392
454
|
end
|
393
455
|
|
394
456
|
# Generates available delivery window options for a given shipment.
|
395
457
|
#
|
396
|
-
# @
|
397
|
-
# @param [String]
|
458
|
+
# @note This operation can make a static sandbox call.
|
459
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
460
|
+
# @param shipment_id [String] The shipment to generate delivery window options for.
|
461
|
+
# @param rate_limit [Float] Requests per second
|
398
462
|
# @return [Hash] The API response
|
399
|
-
def generate_delivery_window_options(inbound_plan_id, shipment_id)
|
463
|
+
def generate_delivery_window_options(inbound_plan_id, shipment_id, rate_limit: 2.0)
|
400
464
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions"
|
401
465
|
|
402
|
-
rate_limit
|
466
|
+
meter(rate_limit).post(path)
|
403
467
|
end
|
404
468
|
|
405
469
|
# Confirms the delivery window option for chosen shipment within an inbound plan. A placement option must be
|
@@ -409,122 +473,139 @@ module Peddler
|
|
409
473
|
# `CONFIRMED_DELIVERY_WINDOW` require a delivery window to be confirmed prior to transportation option
|
410
474
|
# confirmation.
|
411
475
|
#
|
412
|
-
# @
|
413
|
-
# @param [String]
|
414
|
-
# @param [String]
|
476
|
+
# @note This operation can make a static sandbox call.
|
477
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
478
|
+
# @param shipment_id [String] The shipment to confirm the delivery window option for.
|
479
|
+
# @param delivery_window_option_id [String] The id of the delivery window option to be confirmed.
|
480
|
+
# @param rate_limit [Float] Requests per second
|
415
481
|
# @return [Hash] The API response
|
416
|
-
def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_window_option_id)
|
482
|
+
def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_window_option_id, rate_limit: 2.0)
|
417
483
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions/#{delivery_window_option_id}/confirmation"
|
418
484
|
|
419
|
-
rate_limit
|
485
|
+
meter(rate_limit).post(path)
|
420
486
|
end
|
421
487
|
|
422
488
|
# Provides a paginated list of item packages in a shipment.
|
423
489
|
#
|
424
|
-
# @
|
425
|
-
# @param [String]
|
426
|
-
# @param [
|
427
|
-
# @param [
|
490
|
+
# @note This operation can make a static sandbox call.
|
491
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
492
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
493
|
+
# @param page_size [Integer] The number of items to return in the response matching the given query.
|
494
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
428
495
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
429
496
|
# token value from the query parameter the API returns the first page of the result.
|
497
|
+
# @param rate_limit [Float] Requests per second
|
430
498
|
# @return [Hash] The API response
|
431
|
-
def list_shipment_items(inbound_plan_id, shipment_id, page_size:
|
499
|
+
def list_shipment_items(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
432
500
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/items"
|
433
501
|
params = {
|
434
502
|
"pageSize" => page_size,
|
435
503
|
"paginationToken" => pagination_token,
|
436
504
|
}.compact
|
437
505
|
|
438
|
-
rate_limit
|
506
|
+
meter(rate_limit).get(path, params:)
|
439
507
|
end
|
440
508
|
|
441
509
|
# Updates the name of an existing shipment.
|
442
510
|
#
|
443
|
-
# @
|
444
|
-
# @param [String]
|
445
|
-
# @param [
|
511
|
+
# @note This operation can make a static sandbox call.
|
512
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
513
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
514
|
+
# @param body [Hash] The body of the request to `updateShipmentName`.
|
515
|
+
# @param rate_limit [Float] Requests per second
|
446
516
|
# @return [Hash] The API response
|
447
|
-
def update_shipment_name(inbound_plan_id, shipment_id, body)
|
517
|
+
def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
448
518
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/name"
|
449
519
|
|
450
|
-
rate_limit
|
520
|
+
meter(rate_limit).put(path, body:)
|
451
521
|
end
|
452
522
|
|
453
523
|
# Provides a paginated list of pallet packages in a shipment. A palletized shipment will have pallets when the
|
454
524
|
# related details are provided after generating Less-Than-Truckload (LTL) carrier shipments.
|
455
525
|
#
|
456
|
-
# @
|
457
|
-
# @param [String]
|
458
|
-
# @param [
|
459
|
-
# @param [
|
526
|
+
# @note This operation can make a static sandbox call.
|
527
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
528
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
529
|
+
# @param page_size [Integer] The number of pallets to return in the response matching the given query.
|
530
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
460
531
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
461
532
|
# token value from the query parameter the API returns the first page of the result.
|
533
|
+
# @param rate_limit [Float] Requests per second
|
462
534
|
# @return [Hash] The API response
|
463
|
-
def list_shipment_pallets(inbound_plan_id, shipment_id, page_size:
|
535
|
+
def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0)
|
464
536
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets"
|
465
537
|
params = {
|
466
538
|
"pageSize" => page_size,
|
467
539
|
"paginationToken" => pagination_token,
|
468
540
|
}.compact
|
469
541
|
|
470
|
-
rate_limit
|
542
|
+
meter(rate_limit).get(path, params:)
|
471
543
|
end
|
472
544
|
|
473
545
|
# Cancels a self-ship appointment slot against a shipment.
|
474
546
|
#
|
475
|
-
# @
|
476
|
-
# @param [String]
|
477
|
-
# @param [
|
547
|
+
# @note This operation can make a static sandbox call.
|
548
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
549
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
550
|
+
# @param body [Hash] The body of the request to `cancelSelfShipAppointment`.
|
551
|
+
# @param rate_limit [Float] Requests per second
|
478
552
|
# @return [Hash] The API response
|
479
|
-
def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body)
|
553
|
+
def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
480
554
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentCancellation"
|
481
555
|
|
482
|
-
rate_limit
|
556
|
+
meter(rate_limit).put(path, body:)
|
483
557
|
end
|
484
558
|
|
485
559
|
# Retrieves a list of available self-ship appointment slots used to drop off a shipment at a warehouse.
|
486
560
|
#
|
487
|
-
# @
|
488
|
-
# @param [String]
|
489
|
-
# @param [
|
561
|
+
# @note This operation can make a static sandbox call.
|
562
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
563
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
564
|
+
# @param page_size [Integer] The number of self ship appointment slots to return in the response matching the
|
490
565
|
# given query.
|
491
|
-
# @param [String]
|
566
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
492
567
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
493
568
|
# token value from the query parameter the API returns the first page of the result.
|
569
|
+
# @param rate_limit [Float] Requests per second
|
494
570
|
# @return [Hash] The API response
|
495
|
-
def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size:
|
571
|
+
def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil,
|
572
|
+
rate_limit: 2.0)
|
496
573
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
|
497
574
|
params = {
|
498
575
|
"pageSize" => page_size,
|
499
576
|
"paginationToken" => pagination_token,
|
500
577
|
}.compact
|
501
578
|
|
502
|
-
rate_limit
|
579
|
+
meter(rate_limit).get(path, params:)
|
503
580
|
end
|
504
581
|
|
505
582
|
# Initiates the process of generating the appointment slots list.
|
506
583
|
#
|
507
|
-
# @
|
508
|
-
# @param [String]
|
509
|
-
# @param [
|
584
|
+
# @note This operation can make a static sandbox call.
|
585
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
586
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
587
|
+
# @param body [Hash] The body of the request to `generateSelfShipAppointmentSlots`.
|
588
|
+
# @param rate_limit [Float] Requests per second
|
510
589
|
# @return [Hash] The API response
|
511
|
-
def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body)
|
590
|
+
def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
512
591
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots"
|
513
592
|
|
514
|
-
rate_limit
|
593
|
+
meter(rate_limit).post(path, body:)
|
515
594
|
end
|
516
595
|
|
517
596
|
# Confirms or reschedules a self-ship appointment slot against a shipment.
|
518
597
|
#
|
519
|
-
# @
|
520
|
-
# @param [String]
|
521
|
-
# @param [String]
|
522
|
-
# @param [
|
598
|
+
# @note This operation can make a static sandbox call.
|
599
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
600
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
601
|
+
# @param slot_id [String] An identifier to a self-ship appointment slot.
|
602
|
+
# @param body [Hash] The body of the request to `scheduleSelfShipAppointment`.
|
603
|
+
# @param rate_limit [Float] Requests per second
|
523
604
|
# @return [Hash] The API response
|
524
|
-
def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body)
|
605
|
+
def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body, rate_limit: 2.0)
|
525
606
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule"
|
526
607
|
|
527
|
-
rate_limit
|
608
|
+
meter(rate_limit).post(path, body:)
|
528
609
|
end
|
529
610
|
|
530
611
|
# Updates the source address of an existing shipment. The shipment source address can only be updated prior to the
|
@@ -532,44 +613,50 @@ module Peddler
|
|
532
613
|
# options will be invalidated and will need to be regenerated to capture the potential difference in
|
533
614
|
# transportation options and quotes due to the new source address.
|
534
615
|
#
|
535
|
-
# @
|
536
|
-
# @param [String]
|
537
|
-
# @param [
|
616
|
+
# @note This operation can make a static sandbox call.
|
617
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
618
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
619
|
+
# @param body [Hash] The body of the request to `updateShipmentSourceAddress`.
|
620
|
+
# @param rate_limit [Float] Requests per second
|
538
621
|
# @return [Hash] The API response
|
539
|
-
def update_shipment_source_address(inbound_plan_id, shipment_id, body)
|
622
|
+
def update_shipment_source_address(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
540
623
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/sourceAddress"
|
541
624
|
|
542
|
-
rate_limit
|
625
|
+
meter(rate_limit).put(path, body:)
|
543
626
|
end
|
544
627
|
|
545
628
|
# Updates a shipment's tracking details.
|
546
629
|
#
|
547
|
-
# @
|
548
|
-
# @param [String]
|
549
|
-
# @param [
|
630
|
+
# @note This operation can make a static sandbox call.
|
631
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
632
|
+
# @param shipment_id [String] Identifier of a shipment. A shipment contains the boxes and units being inbounded.
|
633
|
+
# @param body [Hash] The body of the request to `updateShipmentTrackingDetails`.
|
634
|
+
# @param rate_limit [Float] Requests per second
|
550
635
|
# @return [Hash] The API response
|
551
|
-
def update_shipment_tracking_details(inbound_plan_id, shipment_id, body)
|
636
|
+
def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_limit: 2.0)
|
552
637
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/trackingDetails"
|
553
638
|
|
554
|
-
rate_limit
|
639
|
+
meter(rate_limit).put(path, body:)
|
555
640
|
end
|
556
641
|
|
557
642
|
# Retrieves all transportation options for a shipment. Transportation options must first be generated by the
|
558
643
|
# `generateTransportationOptions` operation before becoming available.
|
559
644
|
#
|
560
|
-
# @
|
561
|
-
# @param [
|
645
|
+
# @note This operation can make a static sandbox call.
|
646
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
647
|
+
# @param page_size [Integer] The number of transportation options to return in the response matching the given
|
562
648
|
# query.
|
563
|
-
# @param [String]
|
649
|
+
# @param pagination_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
564
650
|
# The value of this token is fetched from the `pagination` returned in the API response. In the absence of the
|
565
651
|
# token value from the query parameter the API returns the first page of the result.
|
566
|
-
# @param [String]
|
652
|
+
# @param placement_option_id [String] The placement option to get transportation options for. Either
|
567
653
|
# `placementOptionId` or `shipmentId` must be specified.
|
568
|
-
# @param [String]
|
654
|
+
# @param shipment_id [String] The shipment to get transportation options for. Either `placementOptionId` or
|
569
655
|
# `shipmentId` must be specified.
|
656
|
+
# @param rate_limit [Float] Requests per second
|
570
657
|
# @return [Hash] The API response
|
571
|
-
def list_transportation_options(inbound_plan_id, page_size:
|
572
|
-
|
658
|
+
def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, placement_option_id: nil,
|
659
|
+
shipment_id: nil, rate_limit: 2.0)
|
573
660
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
|
574
661
|
params = {
|
575
662
|
"pageSize" => page_size,
|
@@ -578,82 +665,94 @@ module Peddler
|
|
578
665
|
"shipmentId" => shipment_id,
|
579
666
|
}.compact
|
580
667
|
|
581
|
-
rate_limit
|
668
|
+
meter(rate_limit).get(path, params:)
|
582
669
|
end
|
583
670
|
|
584
671
|
# Generates available transportation options for a given placement option.
|
585
672
|
#
|
586
|
-
# @
|
587
|
-
# @param [
|
673
|
+
# @note This operation can make a static sandbox call.
|
674
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
675
|
+
# @param body [Hash] The body of the request to `generateTransportationOptions`.
|
676
|
+
# @param rate_limit [Float] Requests per second
|
588
677
|
# @return [Hash] The API response
|
589
|
-
def generate_transportation_options(inbound_plan_id, body)
|
678
|
+
def generate_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
|
590
679
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
|
591
680
|
|
592
|
-
rate_limit
|
681
|
+
meter(rate_limit).post(path, body:)
|
593
682
|
end
|
594
683
|
|
595
684
|
# Confirms all the transportation options for an inbound plan. A placement option must be confirmed prior to use
|
596
685
|
# of this API. Once confirmed, new transportation options can not be generated or confirmed for the Inbound Plan.
|
597
686
|
#
|
598
|
-
# @
|
599
|
-
# @param [
|
687
|
+
# @note This operation can make a static sandbox call.
|
688
|
+
# @param inbound_plan_id [String] Identifier of an inbound plan.
|
689
|
+
# @param body [Hash] The body of the request to `confirmTransportationOptions`.
|
690
|
+
# @param rate_limit [Float] Requests per second
|
600
691
|
# @return [Hash] The API response
|
601
|
-
def confirm_transportation_options(inbound_plan_id, body)
|
692
|
+
def confirm_transportation_options(inbound_plan_id, body, rate_limit: 2.0)
|
602
693
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation"
|
603
694
|
|
604
|
-
rate_limit
|
695
|
+
meter(rate_limit).post(path, body:)
|
605
696
|
end
|
606
697
|
|
607
698
|
# List the inbound compliance details for MSKUs in a given marketplace.
|
608
699
|
#
|
609
|
-
# @
|
610
|
-
# @param [String]
|
700
|
+
# @note This operation can make a static sandbox call.
|
701
|
+
# @param mskus [Array<String>] List of merchant SKUs - a merchant-supplied identifier for a specific SKU.
|
702
|
+
# @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace
|
611
703
|
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values.
|
704
|
+
# @param rate_limit [Float] Requests per second
|
612
705
|
# @return [Hash] The API response
|
613
|
-
def list_item_compliance_details(mskus, marketplace_id)
|
706
|
+
def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0)
|
614
707
|
path = "/inbound/fba/2024-03-20/items/compliance"
|
615
708
|
params = {
|
616
709
|
"mskus" => mskus,
|
617
710
|
"marketplaceId" => marketplace_id,
|
618
711
|
}.compact
|
619
712
|
|
620
|
-
rate_limit
|
713
|
+
meter(rate_limit).get(path, params:)
|
621
714
|
end
|
622
715
|
|
623
716
|
# Update compliance details for list of MSKUs. The details provided here are only used for the IN marketplace
|
624
717
|
# compliance validation.
|
625
718
|
#
|
626
|
-
# @
|
719
|
+
# @note This operation can make a static sandbox call.
|
720
|
+
# @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace
|
627
721
|
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values.
|
628
|
-
# @param [Hash]
|
722
|
+
# @param body [Hash] The body of the request to `updateItemComplianceDetails`.
|
723
|
+
# @param rate_limit [Float] Requests per second
|
629
724
|
# @return [Hash] The API response
|
630
|
-
def update_item_compliance_details(marketplace_id, body)
|
725
|
+
def update_item_compliance_details(marketplace_id, body, rate_limit: 2.0)
|
631
726
|
path = "/inbound/fba/2024-03-20/items/compliance"
|
632
727
|
params = {
|
633
728
|
"marketplaceId" => marketplace_id,
|
634
729
|
}.compact
|
635
730
|
|
636
|
-
rate_limit
|
731
|
+
meter(rate_limit).put(path, body:, params:)
|
637
732
|
end
|
638
733
|
|
639
734
|
# For a given marketplace - creates labels for a list of mskus.
|
640
735
|
#
|
641
|
-
# @
|
736
|
+
# @note This operation can make a static sandbox call.
|
737
|
+
# @param body [Hash] The body of the request to `createMarketplaceItemLabels`.
|
738
|
+
# @param rate_limit [Float] Requests per second
|
642
739
|
# @return [Hash] The API response
|
643
|
-
def create_marketplace_item_labels(body)
|
740
|
+
def create_marketplace_item_labels(body, rate_limit: 2.0)
|
644
741
|
path = "/inbound/fba/2024-03-20/items/labels"
|
645
742
|
|
646
|
-
rate_limit
|
743
|
+
meter(rate_limit).post(path, body:)
|
647
744
|
end
|
648
745
|
|
649
746
|
# Gets the status of the processing of an asynchronous API call.
|
650
747
|
#
|
651
|
-
# @
|
748
|
+
# @note This operation can make a static sandbox call.
|
749
|
+
# @param operation_id [String] Identifier of an asynchronous operation.
|
750
|
+
# @param rate_limit [Float] Requests per second
|
652
751
|
# @return [Hash] The API response
|
653
|
-
def get_inbound_operation_status(operation_id)
|
752
|
+
def get_inbound_operation_status(operation_id, rate_limit: 2.0)
|
654
753
|
path = "/inbound/fba/2024-03-20/operations/#{operation_id}"
|
655
754
|
|
656
|
-
rate_limit
|
755
|
+
meter(rate_limit).get(path)
|
657
756
|
end
|
658
757
|
end
|
659
758
|
end
|