peddler 4.0.1 → 4.2.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 +15 -4
- data/lib/peddler/api.rb +13 -4
- data/lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb +119 -2
- data/lib/peddler/apis/aplus_content_2020_11_01.rb +59 -49
- data/lib/peddler/apis/catalog_items_2022_04_01.rb +34 -33
- data/lib/peddler/apis/catalog_items_v0.rb +2 -4
- data/lib/peddler/apis/easy_ship_2022_03_23.rb +19 -18
- data/lib/peddler/apis/fba_inventory_v1.rb +3 -6
- data/lib/peddler/apis/feeds_2021_06_30.rb +1 -1
- data/lib/peddler/apis/finances_2024_06_01.rb +53 -0
- data/lib/peddler/apis/finances_2024_06_19.rb +14 -17
- data/lib/peddler/apis/fulfillment_inbound_2024_03_20.rb +10 -5
- data/lib/peddler/apis/fulfillment_inbound_v0.rb +2 -170
- data/lib/peddler/apis/fulfillment_outbound_2020_07_01.rb +1 -2
- data/lib/peddler/apis/listings_items_2021_08_01.rb +77 -5
- data/lib/peddler/apis/messaging_v1.rb +51 -51
- data/lib/peddler/apis/orders_v0.rb +1 -1
- data/lib/peddler/apis/product_pricing_v0.rb +3 -2
- data/lib/peddler/apis/reports_2021_06_30.rb +1 -1
- data/lib/peddler/apis/sellers_v1.rb +1 -1
- data/lib/peddler/apis/shipping_v1.rb +12 -12
- data/lib/peddler/apis/shipping_v2.rb +46 -20
- data/lib/peddler/apis/supply_sources_2020_07_01.rb +6 -12
- data/lib/peddler/apis/uploads_2020_11_01.rb +9 -8
- data/lib/peddler/apis/vehicles_2024_11_01.rb +40 -0
- data/lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +2 -4
- data/lib/peddler/apis/vendor_direct_fulfillment_shipping_2021_12_28.rb +40 -27
- data/lib/peddler/apis/vendor_invoices_v1.rb +1 -1
- data/lib/peddler/apis/vendor_shipments_v1.rb +40 -1
- data/lib/peddler/error.rb +11 -1
- data/lib/peddler/token.rb +12 -12
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +2 -0
- metadata +5 -8
- data/lib/peddler/json_feed_document.rb +0 -31
@@ -24,8 +24,8 @@ module Peddler
|
|
24
24
|
# @note This operation can make a static sandbox call.
|
25
25
|
# @param amazon_order_id [String] An Amazon order identifier. This specifies the order for which you want a list
|
26
26
|
# of available message types.
|
27
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
28
|
-
# order was placed.
|
27
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
28
|
+
# order was placed. You can only specify one marketplace.
|
29
29
|
# @param rate_limit [Float] Requests per second
|
30
30
|
# @return [Peddler::Response] The API response
|
31
31
|
def get_messaging_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
@@ -41,11 +41,11 @@ module Peddler
|
|
41
41
|
# initials, etc.
|
42
42
|
#
|
43
43
|
# @note This operation can make a static sandbox call.
|
44
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
44
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
45
45
|
# sent.
|
46
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
47
|
-
# order was placed.
|
48
|
-
# @param body [Hash]
|
46
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
47
|
+
# order was placed. You can only specify one marketplace.
|
48
|
+
# @param body [Hash] This contains the message body for a message.
|
49
49
|
# @param rate_limit [Float] Requests per second
|
50
50
|
# @return [Peddler::Response] The API response
|
51
51
|
def confirm_customization_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -60,11 +60,11 @@ module Peddler
|
|
60
60
|
# Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.
|
61
61
|
#
|
62
62
|
# @note This operation can make a static sandbox call.
|
63
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
63
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
64
64
|
# sent.
|
65
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
66
|
-
# order was placed.
|
67
|
-
# @param body [Hash]
|
65
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
66
|
+
# order was placed. You can only specify one marketplace.
|
67
|
+
# @param body [Hash] This contains the message body for a message.
|
68
68
|
# @param rate_limit [Float] Requests per second
|
69
69
|
# @return [Peddler::Response] The API response
|
70
70
|
def create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -80,11 +80,11 @@ module Peddler
|
|
80
80
|
# This message should only be used to deliver documents that are required by law.
|
81
81
|
#
|
82
82
|
# @note This operation can make a static sandbox call.
|
83
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
83
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
84
84
|
# sent.
|
85
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
86
|
-
# order was placed.
|
87
|
-
# @param body [Hash]
|
85
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
86
|
+
# order was placed. You can only specify one marketplace.
|
87
|
+
# @param body [Hash] This contains the message body for a message.
|
88
88
|
# @param rate_limit [Float] Requests per second
|
89
89
|
# @return [Peddler::Response] The API response
|
90
90
|
def create_legal_disclosure(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -100,10 +100,10 @@ module Peddler
|
|
100
100
|
# sent after the seller has resolved the buyer's problem.
|
101
101
|
#
|
102
102
|
# @note This operation can make a static sandbox call.
|
103
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
103
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
104
104
|
# sent.
|
105
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
106
|
-
# order was placed.
|
105
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
106
|
+
# order was placed. You can only specify one marketplace.
|
107
107
|
# @param rate_limit [Float] Requests per second
|
108
108
|
# @return [Peddler::Response] The API response
|
109
109
|
def create_negative_feedback_removal(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
@@ -118,11 +118,11 @@ module Peddler
|
|
118
118
|
# Sends a message to ask a buyer an order-related question prior to shipping their order.
|
119
119
|
#
|
120
120
|
# @note This operation can make a static sandbox call.
|
121
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
121
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
122
122
|
# sent.
|
123
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
124
|
-
# order was placed.
|
125
|
-
# @param body [Hash]
|
123
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
124
|
+
# order was placed. You can only specify one marketplace.
|
125
|
+
# @param body [Hash] This contains the message body for a message.
|
126
126
|
# @param rate_limit [Float] Requests per second
|
127
127
|
# @return [Peddler::Response] The API response
|
128
128
|
def create_confirm_order_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -138,11 +138,11 @@ module Peddler
|
|
138
138
|
# service call.
|
139
139
|
#
|
140
140
|
# @note This operation can make a static sandbox call.
|
141
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
141
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
142
142
|
# sent.
|
143
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
144
|
-
# order was placed.
|
145
|
-
# @param body [Hash]
|
143
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
144
|
+
# order was placed. You can only specify one marketplace.
|
145
|
+
# @param body [Hash] This contains the message body for a message.
|
146
146
|
# @param rate_limit [Float] Requests per second
|
147
147
|
# @return [Peddler::Response] The API response
|
148
148
|
def create_confirm_service_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -158,11 +158,11 @@ module Peddler
|
|
158
158
|
# Amazon Motors sellers.
|
159
159
|
#
|
160
160
|
# @note This operation can make a static sandbox call.
|
161
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
161
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
162
162
|
# sent.
|
163
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
164
|
-
# order was placed.
|
165
|
-
# @param body [Hash]
|
163
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
164
|
+
# order was placed. You can only specify one marketplace.
|
165
|
+
# @param body [Hash] This contains the message body for a message.
|
166
166
|
# @param rate_limit [Float] Requests per second
|
167
167
|
# @return [Peddler::Response] The API response
|
168
168
|
def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -177,11 +177,11 @@ module Peddler
|
|
177
177
|
# Sends a message to a buyer to provide details about warranty information on a purchase in their order.
|
178
178
|
#
|
179
179
|
# @note This operation can make a static sandbox call.
|
180
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
180
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
181
181
|
# sent.
|
182
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
183
|
-
# order was placed.
|
184
|
-
# @param body [Hash]
|
182
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
183
|
+
# order was placed. You can only specify one marketplace.
|
184
|
+
# @param body [Hash] This contains the message body for a message.
|
185
185
|
# @param rate_limit [Float] Requests per second
|
186
186
|
# @return [Peddler::Response] The API response
|
187
187
|
def create_warranty(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -196,10 +196,10 @@ module Peddler
|
|
196
196
|
# Returns a response containing attributes related to an order. This includes buyer preferences.
|
197
197
|
#
|
198
198
|
# @note This operation can make a static sandbox call.
|
199
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
199
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
200
200
|
# sent.
|
201
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
202
|
-
# order was placed.
|
201
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
202
|
+
# order was placed. You can only specify one marketplace.
|
203
203
|
# @param rate_limit [Float] Requests per second
|
204
204
|
# @return [Peddler::Response] The API response
|
205
205
|
def get_attributes(amazon_order_id, marketplace_ids, rate_limit: 1.0)
|
@@ -211,14 +211,15 @@ module Peddler
|
|
211
211
|
meter(rate_limit).get(path, params:)
|
212
212
|
end
|
213
213
|
|
214
|
-
# Sends a
|
214
|
+
# Sends a buyer a message to share a digital access key that is required to utilize digital content in their
|
215
|
+
# order.
|
215
216
|
#
|
216
217
|
# @note This operation can make a static sandbox call.
|
217
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
218
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
218
219
|
# sent.
|
219
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
220
|
-
# order was placed.
|
221
|
-
# @param body [Hash]
|
220
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
221
|
+
# order was placed. You can only specify one marketplace.
|
222
|
+
# @param body [Hash] This contains the message body for a message.
|
222
223
|
# @param rate_limit [Float] Requests per second
|
223
224
|
# @return [Peddler::Response] The API response
|
224
225
|
def create_digital_access_key(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -234,11 +235,11 @@ module Peddler
|
|
234
235
|
# order.
|
235
236
|
#
|
236
237
|
# @note This operation can make a static sandbox call.
|
237
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
238
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
238
239
|
# sent.
|
239
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
240
|
-
# order was placed.
|
241
|
-
# @param body [Hash]
|
240
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
241
|
+
# order was placed. You can only specify one marketplace.
|
242
|
+
# @param body [Hash] This contains the message body for a message.
|
242
243
|
# @param rate_limit [Float] Requests per second
|
243
244
|
# @return [Peddler::Response] The API response
|
244
245
|
def create_unexpected_problem(amazon_order_id, marketplace_ids, body, rate_limit: 1.0)
|
@@ -253,14 +254,13 @@ module Peddler
|
|
253
254
|
# Sends a message providing the buyer an invoice
|
254
255
|
#
|
255
256
|
# @note This operation can make a static sandbox call.
|
256
|
-
# @param amazon_order_id [String] An Amazon order identifier. This
|
257
|
+
# @param amazon_order_id [String] An Amazon order identifier. This identifies the order for which a message is
|
257
258
|
# sent.
|
258
|
-
# @param marketplace_ids [Array<String>] A marketplace identifier. This
|
259
|
-
# order was placed.
|
260
|
-
# @param body [Hash]
|
261
|
-
# @param rate_limit [Float] Requests per second
|
259
|
+
# @param marketplace_ids [Array<String>] A marketplace identifier. This identifies the marketplace in which the
|
260
|
+
# order was placed. You can only specify one marketplace.
|
261
|
+
# @param body [Hash] This contains the message body for a message.
|
262
262
|
# @return [Peddler::Response] The API response
|
263
|
-
def send_invoice(amazon_order_id, marketplace_ids, body
|
263
|
+
def send_invoice(amazon_order_id, marketplace_ids, body)
|
264
264
|
path = "/messaging/v1/orders/#{amazon_order_id}/messages/invoice"
|
265
265
|
params = {
|
266
266
|
"marketplaceIds" => marketplace_ids,
|
@@ -10,7 +10,7 @@ module Peddler
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module APIs
|
13
|
-
# Orders
|
13
|
+
# Selling Partner API for Orders
|
14
14
|
#
|
15
15
|
# Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop
|
16
16
|
# fast, flexible, and custom applications to manage order synchronization, perform order research, and create
|
@@ -135,7 +135,7 @@ module Peddler
|
|
135
135
|
# Returns the lowest priced offers for a batch of items based on ASIN.
|
136
136
|
#
|
137
137
|
# @note This operation can make a static sandbox call.
|
138
|
-
# @param get_item_offers_batch_request_body [Hash]
|
138
|
+
# @param get_item_offers_batch_request_body [Hash] The request associated with the `getItemOffersBatch` API call.
|
139
139
|
# @param rate_limit [Float] Requests per second
|
140
140
|
# @return [Peddler::Response] The API response
|
141
141
|
def get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1)
|
@@ -148,7 +148,8 @@ module Peddler
|
|
148
148
|
# Returns the lowest priced offers for a batch of listings by SKU.
|
149
149
|
#
|
150
150
|
# @note This operation can make a static sandbox call.
|
151
|
-
# @param get_listing_offers_batch_request_body [Hash]
|
151
|
+
# @param get_listing_offers_batch_request_body [Hash] The request associated with the `getListingOffersBatch` API
|
152
|
+
# call.
|
152
153
|
# @param rate_limit [Float] Requests per second
|
153
154
|
# @return [Peddler::Response] The API response
|
154
155
|
def get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5)
|
@@ -10,7 +10,7 @@ module Peddler
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module APIs
|
13
|
-
# Selling Partner API for Sellers
|
13
|
+
# The Selling Partner API for Sellers
|
14
14
|
#
|
15
15
|
# The [Selling Partner API for Sellers](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference)
|
16
16
|
# (Sellers API) provides essential information about seller accounts, such as: - The marketplaces a seller can list
|
@@ -21,7 +21,7 @@ module Peddler
|
|
21
21
|
# Create a new shipment.
|
22
22
|
#
|
23
23
|
# @note This operation can make a static sandbox call.
|
24
|
-
# @param body [Hash]
|
24
|
+
# @param body [Hash] CreateShipmentRequest Body
|
25
25
|
# @param rate_limit [Float] Requests per second
|
26
26
|
# @return [Peddler::Response] The API response
|
27
27
|
def create_shipment(body, rate_limit: 5.0)
|
@@ -33,7 +33,7 @@ module Peddler
|
|
33
33
|
# Return the entire shipment object for the shipmentId.
|
34
34
|
#
|
35
35
|
# @note This operation can make a static sandbox call.
|
36
|
-
# @param shipment_id [String]
|
36
|
+
# @param shipment_id [String] Shipment id to return the entire shipment object
|
37
37
|
# @param rate_limit [Float] Requests per second
|
38
38
|
# @return [Peddler::Response] The API response
|
39
39
|
def get_shipment(shipment_id, rate_limit: 5.0)
|
@@ -45,7 +45,7 @@ module Peddler
|
|
45
45
|
# Cancel a shipment by the given shipmentId.
|
46
46
|
#
|
47
47
|
# @note This operation can make a static sandbox call.
|
48
|
-
# @param shipment_id [String]
|
48
|
+
# @param shipment_id [String] Shipment Id to cancel a shipment
|
49
49
|
# @param rate_limit [Float] Requests per second
|
50
50
|
# @return [Peddler::Response] The API response
|
51
51
|
def cancel_shipment(shipment_id, rate_limit: 5.0)
|
@@ -57,8 +57,8 @@ module Peddler
|
|
57
57
|
# Purchase shipping labels based on a given rate.
|
58
58
|
#
|
59
59
|
# @note This operation can make a static sandbox call.
|
60
|
-
# @param shipment_id [String]
|
61
|
-
# @param body [Hash]
|
60
|
+
# @param shipment_id [String] Shipment id for purchase shipping label
|
61
|
+
# @param body [Hash] PurchaseShippingLabelRequest body
|
62
62
|
# @param rate_limit [Float] Requests per second
|
63
63
|
# @return [Peddler::Response] The API response
|
64
64
|
def purchase_labels(shipment_id, body, rate_limit: 5.0)
|
@@ -70,9 +70,9 @@ module Peddler
|
|
70
70
|
# Retrieve shipping label based on the shipment id and tracking id.
|
71
71
|
#
|
72
72
|
# @note This operation can make a static sandbox call.
|
73
|
-
# @param shipment_id [String]
|
74
|
-
# @param tracking_id [String]
|
75
|
-
# @param body [Hash]
|
73
|
+
# @param shipment_id [String] Shipment Id to retreive label
|
74
|
+
# @param tracking_id [String] Tracking Id
|
75
|
+
# @param body [Hash] RetrieveShippingLabelRequest body
|
76
76
|
# @param rate_limit [Float] Requests per second
|
77
77
|
# @return [Peddler::Response] The API response
|
78
78
|
def retrieve_shipping_label(shipment_id, tracking_id, body, rate_limit: 5.0)
|
@@ -84,7 +84,7 @@ module Peddler
|
|
84
84
|
# Purchase shipping labels.
|
85
85
|
#
|
86
86
|
# @note This operation can make a static sandbox call.
|
87
|
-
# @param body [Hash]
|
87
|
+
# @param body [Hash] PurchaseShipmentRequest body
|
88
88
|
# @param rate_limit [Float] Requests per second
|
89
89
|
# @return [Peddler::Response] The API response
|
90
90
|
def purchase_shipment(body, rate_limit: 5.0)
|
@@ -95,8 +95,8 @@ module Peddler
|
|
95
95
|
|
96
96
|
# Get service rates.
|
97
97
|
#
|
98
|
-
# @note This operation can make a
|
99
|
-
# @param body [Hash]
|
98
|
+
# @note This operation can make a dynamic sandbox call.
|
99
|
+
# @param body [Hash] GetRatesRequest body
|
100
100
|
# @param rate_limit [Float] Requests per second
|
101
101
|
# @return [Peddler::Response] The API response
|
102
102
|
def get_rates(body, rate_limit: 5.0)
|
@@ -119,7 +119,7 @@ module Peddler
|
|
119
119
|
# Return the tracking information of a shipment.
|
120
120
|
#
|
121
121
|
# @note This operation can make a static sandbox call.
|
122
|
-
# @param tracking_id [String]
|
122
|
+
# @param tracking_id [String] Tracking Id
|
123
123
|
# @param rate_limit [Float] Requests per second
|
124
124
|
# @return [Peddler::Response] The API response
|
125
125
|
def get_tracking_information(tracking_id, rate_limit: 1.0)
|
@@ -19,7 +19,7 @@ module Peddler
|
|
19
19
|
# Returns the available shipping service offerings.
|
20
20
|
#
|
21
21
|
# @note This operation can make a dynamic sandbox call.
|
22
|
-
# @param body [Hash]
|
22
|
+
# @param body [Hash] GetRatesRequest body
|
23
23
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
24
24
|
# AmazonShipping_UK.
|
25
25
|
# @param rate_limit [Float] Requests per second
|
@@ -33,7 +33,8 @@ module Peddler
|
|
33
33
|
# Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related
|
34
34
|
# details and documents.
|
35
35
|
#
|
36
|
-
# @
|
36
|
+
# @note This operation can make a dynamic sandbox call.
|
37
|
+
# @param body [Hash] DirectPurchaseRequest body
|
37
38
|
# @param x_amzn_idempotency_key [String] A unique value which the server uses to recognize subsequent retries of
|
38
39
|
# the same request.
|
39
40
|
# @param locale [String] The IETF Language Tag. Note that this only supports the primary language subtag with one
|
@@ -45,8 +46,6 @@ module Peddler
|
|
45
46
|
# @return [Peddler::Response] The API response
|
46
47
|
def direct_purchase_shipment(body, x_amzn_idempotency_key: nil, locale: nil, x_amzn_shipping_business_id: nil,
|
47
48
|
rate_limit: 80.0)
|
48
|
-
cannot_sandbox!
|
49
|
-
|
50
49
|
path = "/shipping/v2/shipments/directPurchase"
|
51
50
|
|
52
51
|
meter(rate_limit).post(path, body:)
|
@@ -58,7 +57,7 @@ module Peddler
|
|
58
57
|
# receive this error response, you must get the rates for the shipment again.
|
59
58
|
#
|
60
59
|
# @note This operation can make a dynamic sandbox call.
|
61
|
-
# @param body [Hash]
|
60
|
+
# @param body [Hash] PurchaseShipmentRequest body
|
62
61
|
# @param x_amzn_idempotency_key [String] A unique value which the server uses to recognize subsequent retries of
|
63
62
|
# the same request.
|
64
63
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
@@ -74,7 +73,7 @@ module Peddler
|
|
74
73
|
# Purchases a shipping service identifier and returns purchase-related details and documents.
|
75
74
|
#
|
76
75
|
# @note This operation can make a dynamic sandbox call.
|
77
|
-
# @param body [Hash]
|
76
|
+
# @param body [Hash] OneClickShipmentRequest body
|
78
77
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
79
78
|
# AmazonShipping_UK.
|
80
79
|
# @param rate_limit [Float] Requests per second
|
@@ -184,7 +183,7 @@ module Peddler
|
|
184
183
|
|
185
184
|
# This API will return Get all carrier accounts for a merchant.
|
186
185
|
#
|
187
|
-
# @param body [Hash]
|
186
|
+
# @param body [Hash] GetCarrierAccountsRequest body
|
188
187
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
189
188
|
# AmazonShipping_UK.
|
190
189
|
# @param rate_limit [Float] Requests per second
|
@@ -199,24 +198,23 @@ module Peddler
|
|
199
198
|
|
200
199
|
# This API associates/links the specified carrier account with the merchant.
|
201
200
|
#
|
202
|
-
# @
|
203
|
-
# @param
|
201
|
+
# @note This operation can make a dynamic sandbox call.
|
202
|
+
# @param carrier_id [String] An identifier for the carrier with which the seller's account is being linked.
|
203
|
+
# @param body [Hash] LinkCarrierAccountRequest body
|
204
204
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
205
205
|
# AmazonShipping_UK.
|
206
206
|
# @param rate_limit [Float] Requests per second
|
207
207
|
# @return [Peddler::Response] The API response
|
208
|
-
def link_carrier_account(carrier_id, body, x_amzn_shipping_business_id: nil, rate_limit:
|
209
|
-
cannot_sandbox!
|
210
|
-
|
208
|
+
def link_carrier_account(carrier_id, body, x_amzn_shipping_business_id: nil, rate_limit: 5.0)
|
211
209
|
path = "/shipping/v2/carrierAccounts/#{carrier_id}"
|
212
210
|
|
213
|
-
meter(rate_limit).
|
211
|
+
meter(rate_limit).post(path, body:)
|
214
212
|
end
|
215
213
|
|
216
214
|
# This API Unlink the specified carrier account with the merchant.
|
217
215
|
#
|
218
216
|
# @param carrier_id [String] carrier Id to unlink with merchant.
|
219
|
-
# @param body [Hash]
|
217
|
+
# @param body [Hash] UnlinkCarrierAccountRequest body
|
220
218
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
221
219
|
# AmazonShipping_UK.
|
222
220
|
# @param rate_limit [Float] Requests per second
|
@@ -231,7 +229,7 @@ module Peddler
|
|
231
229
|
|
232
230
|
# This API Call to generate the collection form.
|
233
231
|
#
|
234
|
-
# @param body [Hash]
|
232
|
+
# @param body [Hash] GenerateCollectionFormRequest body
|
235
233
|
# @param x_amzn_idempotency_key [String] A unique value which the server uses to recognize subsequent retries of
|
236
234
|
# the same request.
|
237
235
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
@@ -249,7 +247,7 @@ module Peddler
|
|
249
247
|
|
250
248
|
# This API Call to get the history of the previously generated collection forms.
|
251
249
|
#
|
252
|
-
# @param body [Hash]
|
250
|
+
# @param body [Hash] GetCollectionFormHistoryRequest body
|
253
251
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
254
252
|
# AmazonShipping_UK.
|
255
253
|
# @param rate_limit [Float] Requests per second
|
@@ -265,7 +263,7 @@ module Peddler
|
|
265
263
|
# This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments
|
266
264
|
# with an eligible carrier for manifesting shall be returned.
|
267
265
|
#
|
268
|
-
# @param body [Hash]
|
266
|
+
# @param body [Hash] GetUmanifestedShipmentsRequest body
|
269
267
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
270
268
|
# AmazonShipping_UK.
|
271
269
|
# @param rate_limit [Float] Requests per second
|
@@ -296,9 +294,9 @@ module Peddler
|
|
296
294
|
# Returns a list of access points in proximity of input postal code.
|
297
295
|
#
|
298
296
|
# @note This operation can make a dynamic sandbox call.
|
299
|
-
# @param access_point_types [Array<String>]
|
300
|
-
# @param country_code [String]
|
301
|
-
# @param postal_code [String]
|
297
|
+
# @param access_point_types [Array<String>] Access point types
|
298
|
+
# @param country_code [String] Country code for access point
|
299
|
+
# @param postal_code [String] postal code for access point
|
302
300
|
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
303
301
|
# AmazonShipping_UK.
|
304
302
|
# @param rate_limit [Float] Requests per second
|
@@ -314,6 +312,34 @@ module Peddler
|
|
314
312
|
|
315
313
|
meter(rate_limit).get(path, params:)
|
316
314
|
end
|
315
|
+
|
316
|
+
# This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.
|
317
|
+
#
|
318
|
+
# @note This operation can make a dynamic sandbox call.
|
319
|
+
# @param body [Hash] Request body for ndrFeedback operation
|
320
|
+
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
321
|
+
# AmazonShipping_UK.
|
322
|
+
# @param rate_limit [Float] Requests per second
|
323
|
+
# @return [Peddler::Response] The API response
|
324
|
+
def submit_ndr_feedback(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
|
325
|
+
path = "/shipping/v2/ndrFeedback"
|
326
|
+
|
327
|
+
meter(rate_limit).post(path, body:)
|
328
|
+
end
|
329
|
+
|
330
|
+
# This API will be used to create claim for single eligible shipment.
|
331
|
+
#
|
332
|
+
# @note This operation can make a dynamic sandbox call.
|
333
|
+
# @param body [Hash] Request body for the createClaim operation
|
334
|
+
# @param x_amzn_shipping_business_id [String] Amazon shipping business to assume for this request. The default is
|
335
|
+
# AmazonShipping_UK.
|
336
|
+
# @param rate_limit [Float] Requests per second
|
337
|
+
# @return [Peddler::Response] The API response
|
338
|
+
def create_claim(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
|
339
|
+
path = "/shipping/v2/claims"
|
340
|
+
|
341
|
+
meter(rate_limit).post(path, body:)
|
342
|
+
end
|
317
343
|
end
|
318
344
|
end
|
319
345
|
end
|
@@ -19,9 +19,8 @@ module Peddler
|
|
19
19
|
# @note This operation can make a static sandbox call.
|
20
20
|
# @param next_page_token [String] The pagination token to retrieve a specific page of results.
|
21
21
|
# @param page_size [Number] The number of supply sources to return per paginated request.
|
22
|
-
# @param rate_limit [Float] Requests per second
|
23
22
|
# @return [Peddler::Response] The API response
|
24
|
-
def get_supply_sources(next_page_token: nil, page_size: 10
|
23
|
+
def get_supply_sources(next_page_token: nil, page_size: 10)
|
25
24
|
path = "/supplySources/2020-07-01/supplySources"
|
26
25
|
params = {
|
27
26
|
"nextPageToken" => next_page_token,
|
@@ -35,9 +34,8 @@ module Peddler
|
|
35
34
|
#
|
36
35
|
# @note This operation can make a static sandbox call.
|
37
36
|
# @param payload [Hash] A request to create a supply source.
|
38
|
-
# @param rate_limit [Float] Requests per second
|
39
37
|
# @return [Peddler::Response] The API response
|
40
|
-
def create_supply_source(payload
|
38
|
+
def create_supply_source(payload)
|
41
39
|
path = "/supplySources/2020-07-01/supplySources"
|
42
40
|
body = payload
|
43
41
|
|
@@ -48,9 +46,8 @@ module Peddler
|
|
48
46
|
#
|
49
47
|
# @note This operation can make a static sandbox call.
|
50
48
|
# @param supply_source_id [String] The unique identifier of a supply source.
|
51
|
-
# @param rate_limit [Float] Requests per second
|
52
49
|
# @return [Peddler::Response] The API response
|
53
|
-
def get_supply_source(supply_source_id
|
50
|
+
def get_supply_source(supply_source_id)
|
54
51
|
path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}"
|
55
52
|
|
56
53
|
get(path)
|
@@ -61,9 +58,8 @@ module Peddler
|
|
61
58
|
# @note This operation can make a static sandbox call.
|
62
59
|
# @param supply_source_id [String] The unique identitier of a supply source.
|
63
60
|
# @param payload [Hash]
|
64
|
-
# @param rate_limit [Float] Requests per second
|
65
61
|
# @return [Peddler::Response] The API response
|
66
|
-
def update_supply_source(supply_source_id, payload: nil
|
62
|
+
def update_supply_source(supply_source_id, payload: nil)
|
67
63
|
path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}"
|
68
64
|
body = payload
|
69
65
|
|
@@ -74,9 +70,8 @@ module Peddler
|
|
74
70
|
#
|
75
71
|
# @note This operation can make a static sandbox call.
|
76
72
|
# @param supply_source_id [String] The unique identifier of a supply source.
|
77
|
-
# @param rate_limit [Float] Requests per second
|
78
73
|
# @return [Peddler::Response] The API response
|
79
|
-
def archive_supply_source(supply_source_id
|
74
|
+
def archive_supply_source(supply_source_id)
|
80
75
|
path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}"
|
81
76
|
|
82
77
|
delete(path)
|
@@ -87,9 +82,8 @@ module Peddler
|
|
87
82
|
# @note This operation can make a static sandbox call.
|
88
83
|
# @param supply_source_id [String] The unique identifier of a supply source.
|
89
84
|
# @param payload [Hash]
|
90
|
-
# @param rate_limit [Float] Requests per second
|
91
85
|
# @return [Peddler::Response] The API response
|
92
|
-
def update_supply_source_status(supply_source_id, payload: nil
|
86
|
+
def update_supply_source_status(supply_source_id, payload: nil)
|
93
87
|
path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}/status"
|
94
88
|
body = payload
|
95
89
|
|
@@ -18,18 +18,19 @@ module Peddler
|
|
18
18
|
# Creates an upload destination, returning the information required to upload a file to the destination and to
|
19
19
|
# programmatically access the file.
|
20
20
|
#
|
21
|
-
# @param marketplace_ids [Array<String>]
|
22
|
-
# the
|
21
|
+
# @param marketplace_ids [Array<String>] The marketplace ID is the globally unique identifier of a marketplace. To
|
22
|
+
# find the ID for your marketplace, refer to [Marketplace
|
23
|
+
# IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
23
24
|
# @param content_md5 [String] An MD5 hash of the content to be submitted to the upload destination. This value is
|
24
25
|
# used to determine if the data has been corrupted or tampered with during transit.
|
25
|
-
# @param resource [String] The
|
26
|
-
#
|
27
|
-
#
|
26
|
+
# @param resource [String] The upload destination for your resource. For example, if you create an upload
|
27
|
+
# destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be
|
28
|
+
# `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be
|
28
29
|
# `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you
|
29
|
-
#
|
30
|
+
# create an upload destination for an Aplus content document, the `{resource}` would be
|
30
31
|
# `aplus/2020-11-01/contentDocuments` and the path would be
|
31
|
-
# `/uploads/
|
32
|
-
# @param content_type [String] The content type of the file
|
32
|
+
# `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`.
|
33
|
+
# @param content_type [String] The content type of the file you upload.
|
33
34
|
# @param rate_limit [Float] Requests per second
|
34
35
|
# @return [Peddler::Response] The API response
|
35
36
|
def create_upload_destination_for_resource(marketplace_ids, content_md5, resource, content_type: nil,
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "peddler/api"
|
4
|
+
|
5
|
+
module Peddler
|
6
|
+
class << self
|
7
|
+
def vehicles_2024_11_01(...)
|
8
|
+
APIs::Vehicles20241101.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module APIs
|
13
|
+
# The Selling Partner API for Automotive.
|
14
|
+
#
|
15
|
+
# The Selling Partner API for Automotive provides programmatic access to information needed by selling partners to
|
16
|
+
# provide compatibility information about their listed products.
|
17
|
+
class Vehicles20241101 < API
|
18
|
+
# Get the latest collection of vehicles
|
19
|
+
#
|
20
|
+
# @note This operation can make a static sandbox call.
|
21
|
+
# @param page_token [String] A token to fetch a certain page when there are multiple pages worth of results.
|
22
|
+
# @param marketplace_id [String] An identifier for the marketplace in which the resource operates.
|
23
|
+
# @param vehicle_type [String] An identifier for vehicle type.
|
24
|
+
# @param updated_after [String] Date in ISO 8601 format, if provided only vehicles which are modified/added to
|
25
|
+
# Amazon's catalog after this date will be returned.
|
26
|
+
# @return [Peddler::Response] The API response
|
27
|
+
def get_vehicles(marketplace_id, vehicle_type, page_token: nil, updated_after: nil)
|
28
|
+
path = "/catalog/2024-11-01/automotive/vehicles"
|
29
|
+
params = {
|
30
|
+
"pageToken" => page_token,
|
31
|
+
"marketplaceId" => marketplace_id,
|
32
|
+
"vehicleType" => vehicle_type,
|
33
|
+
"updatedAfter" => updated_after,
|
34
|
+
}.compact
|
35
|
+
|
36
|
+
get(path, params:)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|