peddler 3.0.0.beta1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +108 -110
- data/lib/peddler/api.rb +56 -18
- data/lib/peddler/{api → apis}/amazon_warehousing_and_distribution_2024_05_09.rb +38 -26
- data/lib/peddler/{api → apis}/aplus_content_2020_11_01.rb +97 -59
- data/lib/peddler/apis/application_integrations_2024_04_01.rb +56 -0
- data/lib/peddler/{api → apis}/application_management_2023_11_30.rb +14 -4
- data/lib/peddler/{api → apis}/catalog_items_2020_12_01.rb +34 -23
- data/lib/peddler/{api → apis}/catalog_items_2022_04_01.rb +39 -29
- data/lib/peddler/{api → apis}/catalog_items_v0.rb +43 -30
- data/lib/peddler/{api → apis}/data_kiosk_2023_11_15.rb +47 -31
- data/lib/peddler/apis/easy_ship_2022_03_23.rb +126 -0
- data/lib/peddler/{api → apis}/fba_inbound_eligibility_v1.rb +15 -7
- data/lib/peddler/{api → apis}/fba_inventory_v1.rb +45 -29
- data/lib/peddler/{api → apis}/feeds_2021_06_30.rb +54 -33
- data/lib/peddler/apis/finances_2024_06_19.rb +50 -0
- data/lib/peddler/{api → apis}/finances_v0.rb +50 -36
- data/lib/peddler/{api → apis}/fulfillment_inbound_2024_03_20.rb +384 -255
- data/lib/peddler/{api → apis}/fulfillment_inbound_v0.rb +138 -93
- data/lib/peddler/{api → apis}/fulfillment_outbound_2020_07_01.rb +105 -68
- data/lib/peddler/apis/invoices_2024_06_19.rb +180 -0
- data/lib/peddler/apis/listings_items_2020_09_01.rb +95 -0
- data/lib/peddler/apis/listings_items_2021_08_01.rb +136 -0
- data/lib/peddler/{api → apis}/listings_restrictions_2021_08_01.rb +21 -11
- data/lib/peddler/apis/merchant_fulfillment_v0.rb +80 -0
- data/lib/peddler/{api → apis}/messaging_v1.rb +107 -75
- data/lib/peddler/{api → apis}/notifications_v1.rb +63 -32
- data/lib/peddler/{api → apis}/orders_v0.rb +99 -84
- data/lib/peddler/apis/product_fees_v0.rb +77 -0
- data/lib/peddler/{api → apis}/product_pricing_2022_05_01.rb +24 -13
- data/lib/peddler/{api → apis}/product_pricing_v0.rb +70 -52
- data/lib/peddler/{api → apis}/product_type_definitions_2020_09_01.rb +32 -21
- data/lib/peddler/{api → apis}/replenishment_2022_11_07.rb +25 -13
- data/lib/peddler/{api → apis}/reports_2021_06_30.rb +71 -47
- data/lib/peddler/{api → apis}/sales_v1.rb +22 -14
- data/lib/peddler/{api → apis}/sellers_v1.rb +19 -7
- data/lib/peddler/{api → apis}/services_v1.rb +156 -116
- data/lib/peddler/apis/shipment_invoicing_v0.rb +59 -0
- data/lib/peddler/apis/shipping_v1.rb +132 -0
- data/lib/peddler/{api → apis}/shipping_v2.rb +150 -98
- data/lib/peddler/{api → apis}/solicitations_v1.rb +21 -11
- data/lib/peddler/apis/supply_sources_2020_07_01.rb +100 -0
- data/lib/peddler/{api → apis}/tokens_2021_03_01.rb +15 -7
- data/lib/peddler/{api → apis}/uploads_2020_11_01.rb +18 -8
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_inventory_v1.rb +14 -6
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_2021_12_28.rb +33 -21
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_orders_v1.rb +33 -21
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_payments_v1.rb +13 -5
- data/lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +45 -0
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_shipping_2021_12_28.rb +86 -60
- data/lib/peddler/apis/vendor_direct_fulfillment_shipping_v1.rb +189 -0
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_2021_12_28.rb +14 -6
- data/lib/peddler/{api → apis}/vendor_direct_fulfillment_transactions_v1.rb +14 -6
- data/lib/peddler/apis/vendor_invoices_v1.rb +30 -0
- data/lib/peddler/{api → apis}/vendor_orders_v1.rb +59 -48
- data/lib/peddler/apis/vendor_shipments_v1.rb +132 -0
- data/lib/peddler/{api → apis}/vendor_transaction_status_v1.rb +14 -5
- data/lib/peddler/endpoint.rb +51 -0
- data/lib/peddler/error.rb +21 -11
- data/lib/peddler/helpers/feeds_2021_06_30.rb +26 -0
- data/lib/peddler/json_feed_document.rb +31 -0
- data/lib/peddler/marketplace.rb +93 -0
- data/lib/peddler/response.rb +46 -0
- data/lib/peddler/token.rb +70 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +55 -52
- metadata +64 -57
- data/lib/peddler/access_token.rb +0 -76
- data/lib/peddler/api/easy_ship_2022_03_23.rb +0 -108
- data/lib/peddler/api/listings_items_2020_09_01.rb +0 -84
- data/lib/peddler/api/listings_items_2021_08_01.rb +0 -154
- data/lib/peddler/api/merchant_fulfillment_v0.rb +0 -64
- data/lib/peddler/api/product_fees_v0.rb +0 -69
- data/lib/peddler/api/shipment_invoicing_v0.rb +0 -46
- data/lib/peddler/api/shipping_v1.rb +0 -107
- data/lib/peddler/api/supply_sources_2020_07_01.rb +0 -82
- data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +0 -35
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +0 -165
- data/lib/peddler/api/vendor_invoices_v1.rb +0 -22
- data/lib/peddler/api/vendor_shipments_v1.rb +0 -120
- data/lib/peddler/region.rb +0 -30
@@ -3,8 +3,14 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
-
class
|
7
|
-
|
6
|
+
class << self
|
7
|
+
def fulfillment_inbound_2024_03_20(...)
|
8
|
+
APIs::FulfillmentInbound20240320.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# Fulfillment Inbound v2024-03-20
|
8
14
|
#
|
9
15
|
# The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound
|
10
16
|
# workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability
|
@@ -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]
|
22
|
-
# @
|
23
|
-
|
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 [Peddler::Response] 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)
|
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
|
-
# @
|
40
|
-
# @
|
41
|
-
|
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 [Peddler::Response] The API response
|
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
|
-
# @
|
50
|
-
# @
|
51
|
-
|
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 [Peddler::Response] The API response
|
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.
|
64
|
-
# @
|
65
|
-
|
78
|
+
# @param rate_limit [Float] Requests per second
|
79
|
+
# @return [Peddler::Response] The API response
|
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
|
-
# @
|
80
|
-
# @
|
81
|
-
|
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 [Peddler::Response] The API response
|
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.
|
94
|
-
# @
|
95
|
-
|
112
|
+
# @param rate_limit [Float] Requests per second
|
113
|
+
# @return [Peddler::Response] The API response
|
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 [
|
109
|
-
# @
|
110
|
-
|
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 [Peddler::Response] The API response
|
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.
|
126
|
-
# @
|
127
|
-
|
148
|
+
# @param rate_limit [Float] Requests per second
|
149
|
+
# @return [Peddler::Response] 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)
|
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.
|
146
|
-
# @
|
147
|
-
|
171
|
+
# @param rate_limit [Float] Requests per second
|
172
|
+
# @return [Peddler::Response] 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)
|
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 [
|
162
|
-
# @
|
163
|
-
|
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 [Peddler::Response] The API response
|
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.
|
177
|
-
# @
|
178
|
-
|
207
|
+
# @param rate_limit [Float] Requests per second
|
208
|
+
# @return [Peddler::Response] The API response
|
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
|
-
# @
|
191
|
-
# @
|
192
|
-
|
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 [Peddler::Response] The API response
|
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]
|
202
|
-
# @
|
203
|
-
|
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 [Peddler::Response] The API response
|
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.
|
217
|
-
# @
|
218
|
-
|
253
|
+
# @param rate_limit [Float] Requests per second
|
254
|
+
# @return [Peddler::Response] The API response
|
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.
|
236
|
-
# @
|
237
|
-
|
274
|
+
# @param rate_limit [Float] Requests per second
|
275
|
+
# @return [Peddler::Response] The API response
|
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 [
|
251
|
-
# @
|
252
|
-
|
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 [Peddler::Response] The API response
|
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.
|
263
|
-
# @
|
264
|
-
|
305
|
+
# @param rate_limit [Float] Requests per second
|
306
|
+
# @return [Peddler::Response] The API response
|
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]
|
275
|
-
# @
|
276
|
-
|
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 [Peddler::Response] The API response
|
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.
|
290
|
-
# @
|
291
|
-
|
336
|
+
# @param rate_limit [Float] Requests per second
|
337
|
+
# @return [Peddler::Response] The API response
|
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.
|
311
|
-
# @
|
312
|
-
|
359
|
+
# @param rate_limit [Float] Requests per second
|
360
|
+
# @return [Peddler::Response] 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)
|
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 [
|
329
|
-
# @
|
330
|
-
|
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 [Peddler::Response] The API response
|
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]
|
343
|
-
# @
|
344
|
-
|
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 [Peddler::Response] The API response
|
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]
|
355
|
-
# @
|
356
|
-
|
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 [Peddler::Response] The API response
|
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]
|
366
|
-
# @
|
367
|
-
|
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 [Peddler::Response] The API response
|
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.
|
383
|
-
# @
|
384
|
-
|
443
|
+
# @param rate_limit [Float] Requests per second
|
444
|
+
# @return [Peddler::Response] 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)
|
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]
|
398
|
-
# @
|
399
|
-
|
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 [Peddler::Response] The API response
|
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]
|
415
|
-
# @
|
416
|
-
|
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 [Peddler::Response] The API response
|
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.
|
430
|
-
# @
|
431
|
-
|
497
|
+
# @param rate_limit [Float] Requests per second
|
498
|
+
# @return [Peddler::Response] The API response
|
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 [
|
446
|
-
# @
|
447
|
-
|
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 [Peddler::Response] The API response
|
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.
|
462
|
-
# @
|
463
|
-
|
533
|
+
# @param rate_limit [Float] Requests per second
|
534
|
+
# @return [Peddler::Response] The API response
|
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 [
|
478
|
-
# @
|
479
|
-
|
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 [Peddler::Response] The API response
|
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.
|
494
|
-
# @
|
495
|
-
|
569
|
+
# @param rate_limit [Float] Requests per second
|
570
|
+
# @return [Peddler::Response] 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)
|
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 [
|
510
|
-
# @
|
511
|
-
|
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 [Peddler::Response] The API response
|
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 [
|
523
|
-
# @
|
524
|
-
|
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 [Peddler::Response] The API response
|
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 [
|
538
|
-
# @
|
539
|
-
|
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 [Peddler::Response] The API response
|
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 [
|
550
|
-
# @
|
551
|
-
|
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 [Peddler::Response] The API response
|
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.
|
570
|
-
# @
|
571
|
-
|
572
|
-
|
656
|
+
# @param rate_limit [Float] Requests per second
|
657
|
+
# @return [Peddler::Response] 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)
|
573
660
|
path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions"
|
574
661
|
params = {
|
575
662
|
"pageSize" => page_size,
|
@@ -578,82 +665,124 @@ 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 [
|
588
|
-
# @
|
589
|
-
|
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 [Peddler::Response] The API response
|
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 [
|
600
|
-
# @
|
601
|
-
|
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 [Peddler::Response] The API response
|
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]
|
611
|
-
#
|
612
|
-
#
|
613
|
-
|
700
|
+
# @note This operation can make a static sandbox call.
|
701
|
+
# @param mskus [Array<String>] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU.
|
702
|
+
# @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace
|
703
|
+
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
704
|
+
# @param rate_limit [Float] Requests per second
|
705
|
+
# @return [Peddler::Response] The API response
|
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
|
-
# Update compliance details for list of MSKUs. The details provided here are only used for the IN
|
624
|
-
# compliance validation.
|
716
|
+
# Update compliance details for a list of MSKUs. The details provided here are only used for the India (IN -
|
717
|
+
# A21TJRUUN4KGV) marketplace compliance validation.
|
625
718
|
#
|
626
|
-
# @
|
627
|
-
#
|
628
|
-
#
|
629
|
-
# @
|
630
|
-
|
719
|
+
# @note This operation can make a static sandbox call.
|
720
|
+
# @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace
|
721
|
+
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
722
|
+
# @param body [Hash] The body of the request to `updateItemComplianceDetails`.
|
723
|
+
# @param rate_limit [Float] Requests per second
|
724
|
+
# @return [Peddler::Response] The API response
|
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
|
-
# For a given marketplace - creates labels for a list of
|
734
|
+
# For a given marketplace - creates labels for a list of MSKUs.
|
640
735
|
#
|
641
|
-
# @
|
642
|
-
# @
|
643
|
-
|
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 [Peddler::Response] The API response
|
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:)
|
744
|
+
end
|
745
|
+
|
746
|
+
# Get preparation details for a list of MSKUs in a specified marketplace.
|
747
|
+
#
|
748
|
+
# @note This operation can make a static sandbox call.
|
749
|
+
# @param marketplace_id [String] The marketplace ID. For a list of possible values, refer to [Marketplace
|
750
|
+
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
751
|
+
# @param mskus [Array<String>] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU.
|
752
|
+
# @param rate_limit [Float] Requests per second
|
753
|
+
# @return [Peddler::Response] The API response
|
754
|
+
def list_prep_details(marketplace_id, mskus, rate_limit: 2.0)
|
755
|
+
path = "/inbound/fba/2024-03-20/items/prepDetails"
|
756
|
+
params = {
|
757
|
+
"marketplaceId" => marketplace_id,
|
758
|
+
"mskus" => mskus,
|
759
|
+
}.compact
|
760
|
+
|
761
|
+
meter(rate_limit).get(path, params:)
|
762
|
+
end
|
763
|
+
|
764
|
+
# Set the preparation details for a list of MSKUs in a specified marketplace.
|
765
|
+
#
|
766
|
+
# @note This operation can make a static sandbox call.
|
767
|
+
# @param body [Hash] The body of the request to `setPrepDetails`.
|
768
|
+
# @param rate_limit [Float] Requests per second
|
769
|
+
# @return [Peddler::Response] The API response
|
770
|
+
def set_prep_details(body, rate_limit: 2.0)
|
771
|
+
path = "/inbound/fba/2024-03-20/items/prepDetails"
|
772
|
+
|
773
|
+
meter(rate_limit).post(path, body:)
|
647
774
|
end
|
648
775
|
|
649
776
|
# Gets the status of the processing of an asynchronous API call.
|
650
777
|
#
|
651
|
-
# @
|
652
|
-
# @
|
653
|
-
|
778
|
+
# @note This operation can make a static sandbox call.
|
779
|
+
# @param operation_id [String] Identifier of an asynchronous operation.
|
780
|
+
# @param rate_limit [Float] Requests per second
|
781
|
+
# @return [Peddler::Response] The API response
|
782
|
+
def get_inbound_operation_status(operation_id, rate_limit: 2.0)
|
654
783
|
path = "/inbound/fba/2024-03-20/operations/#{operation_id}"
|
655
784
|
|
656
|
-
rate_limit
|
785
|
+
meter(rate_limit).get(path)
|
657
786
|
end
|
658
787
|
end
|
659
788
|
end
|