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