peddler 3.0.0.beta1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +96 -106
- data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +34 -22
- data/lib/peddler/api/aplus_content_2020_11_01.rb +86 -48
- data/lib/peddler/api/application_integrations_2024_04_01.rb +56 -0
- data/lib/peddler/api/application_management_2023_11_30.rb +12 -2
- data/lib/peddler/api/catalog_items_2020_12_01.rb +31 -20
- data/lib/peddler/api/catalog_items_2022_04_01.rb +35 -25
- data/lib/peddler/api/catalog_items_v0.rb +39 -26
- data/lib/peddler/api/data_kiosk_2023_11_15.rb +41 -25
- data/lib/peddler/api/easy_ship_2022_03_23.rb +62 -43
- data/lib/peddler/api/fba_inbound_eligibility_v1.rb +13 -5
- data/lib/peddler/api/fba_inventory_v1.rb +40 -24
- data/lib/peddler/api/feeds_2021_06_30.rb +43 -25
- data/lib/peddler/api/finances_2024_06_19.rb +50 -0
- data/lib/peddler/api/finances_v0.rb +86 -59
- data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +304 -205
- data/lib/peddler/api/fulfillment_inbound_v0.rb +112 -74
- data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +90 -53
- data/lib/peddler/api/invoices_2024_06_19.rb +180 -0
- data/lib/peddler/api/listings_items_2020_09_01.rb +44 -33
- data/lib/peddler/api/listings_items_2021_08_01.rb +76 -60
- data/lib/peddler/api/listings_restrictions_2021_08_01.rb +19 -9
- data/lib/peddler/api/merchant_fulfillment_v0.rb +31 -15
- data/lib/peddler/api/messaging_v1.rb +93 -61
- data/lib/peddler/api/notifications_v1.rb +54 -23
- data/lib/peddler/api/orders_v0.rb +87 -72
- data/lib/peddler/api/product_fees_v0.rb +39 -31
- data/lib/peddler/api/product_pricing_2022_05_01.rb +17 -6
- data/lib/peddler/api/product_pricing_v0.rb +63 -45
- data/lib/peddler/api/product_type_definitions_2020_09_01.rb +29 -18
- data/lib/peddler/api/replenishment_2022_11_07.rb +21 -9
- data/lib/peddler/api/reports_2021_06_30.rb +60 -36
- data/lib/peddler/api/sales_v1.rb +20 -12
- data/lib/peddler/api/sellers_v1.rb +16 -4
- data/lib/peddler/api/services_v1.rb +138 -98
- data/lib/peddler/api/shipment_invoicing_v0.rb +25 -12
- data/lib/peddler/api/shipping_v1.rb +54 -29
- data/lib/peddler/api/shipping_v2.rb +132 -80
- data/lib/peddler/api/solicitations_v1.rb +18 -8
- data/lib/peddler/api/supply_sources_2020_07_01.rb +33 -15
- data/lib/peddler/api/tokens_2021_03_01.rb +13 -5
- data/lib/peddler/api/uploads_2020_11_01.rb +16 -6
- data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +12 -4
- data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +29 -17
- data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +29 -17
- data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +11 -3
- data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +14 -4
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +74 -48
- data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +74 -50
- data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +11 -3
- data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +11 -3
- data/lib/peddler/api/vendor_invoices_v1.rb +11 -3
- data/lib/peddler/api/vendor_orders_v1.rb +54 -43
- data/lib/peddler/api/vendor_shipments_v1.rb +63 -51
- data/lib/peddler/api/vendor_transaction_status_v1.rb +12 -3
- data/lib/peddler/api.rb +41 -18
- data/lib/peddler/endpoint.rb +51 -0
- data/lib/peddler/error.rb +1 -0
- data/lib/peddler/marketplace.rb +49 -0
- data/lib/peddler/token.rb +70 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler.rb +56 -52
- metadata +10 -6
- data/lib/peddler/access_token.rb +0 -76
- data/lib/peddler/region.rb +0 -30
@@ -3,6 +3,12 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
+
class << self
|
7
|
+
def vendor_direct_fulfillment_shipping_2021_12_28(...)
|
8
|
+
API::VendorDirectFulfillmentShipping20211228.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# Selling Partner API for Direct Fulfillment Shipping
|
8
14
|
#
|
@@ -13,19 +19,21 @@ module Peddler
|
|
13
19
|
# using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to
|
14
20
|
# search must not be more than 7 days.
|
15
21
|
#
|
16
|
-
# @
|
22
|
+
# @note This operation can make a dynamic sandbox call.
|
23
|
+
# @param ship_from_party_id [String] The vendor warehouseId for order fulfillment. If not specified, the result
|
17
24
|
# will contain orders for all warehouses.
|
18
|
-
# @param [Integer]
|
19
|
-
# @param [String]
|
25
|
+
# @param limit [Integer] The limit to the number of records returned.
|
26
|
+
# @param created_after [String] Shipping labels that became available after this date and time will be included in
|
20
27
|
# the result. Must be in ISO-8601 date/time format.
|
21
|
-
# @param [String]
|
28
|
+
# @param created_before [String] Shipping labels that became available before this date and time will be included
|
22
29
|
# in the result. Must be in ISO-8601 date/time format.
|
23
|
-
# @param [String]
|
24
|
-
# @param [String]
|
30
|
+
# @param sort_order [String] Sort ASC or DESC by order creation date.
|
31
|
+
# @param next_token [String] Used for pagination when there are more ship labels than the specified result size
|
25
32
|
# limit. The token value is returned in the previous API call.
|
33
|
+
# @param rate_limit [Float] Requests per second
|
26
34
|
# @return [Hash] The API response
|
27
|
-
def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order:
|
28
|
-
next_token: nil)
|
35
|
+
def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
|
36
|
+
next_token: nil, rate_limit: 10.0)
|
29
37
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
|
30
38
|
params = {
|
31
39
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -36,81 +44,93 @@ module Peddler
|
|
36
44
|
"nextToken" => next_token,
|
37
45
|
}.compact
|
38
46
|
|
39
|
-
rate_limit
|
47
|
+
meter(rate_limit).get(path, params:)
|
40
48
|
end
|
41
49
|
|
42
50
|
# Creates a shipping label for a purchase order and returns a transactionId for reference.
|
43
51
|
#
|
44
|
-
# @
|
52
|
+
# @note This operation can make a dynamic sandbox call.
|
53
|
+
# @param body [Hash] Request body that contains the shipping labels data.
|
54
|
+
# @param rate_limit [Float] Requests per second
|
45
55
|
# @return [Hash] The API response
|
46
|
-
def submit_shipping_label_request(body)
|
56
|
+
def submit_shipping_label_request(body, rate_limit: 10.0)
|
47
57
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
|
48
58
|
|
49
|
-
rate_limit
|
59
|
+
meter(rate_limit).post(path, body:)
|
50
60
|
end
|
51
61
|
|
52
62
|
# Returns a shipping label for the purchaseOrderNumber that you specify.
|
53
63
|
#
|
54
|
-
# @
|
64
|
+
# @note This operation can make a dynamic sandbox call.
|
65
|
+
# @param purchase_order_number [String] The purchase order number for which you want to return the shipping label.
|
55
66
|
# Should be the same `purchaseOrderNumber` as received in the order.
|
67
|
+
# @param rate_limit [Float] Requests per second
|
56
68
|
# @return [Hash] The API response
|
57
|
-
def get_shipping_label(purchase_order_number)
|
69
|
+
def get_shipping_label(purchase_order_number, rate_limit: 10.0)
|
58
70
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{purchase_order_number}"
|
59
71
|
|
60
|
-
rate_limit
|
72
|
+
meter(rate_limit).get(path)
|
61
73
|
end
|
62
74
|
|
63
75
|
# Creates shipping labels for a purchase order and returns the labels.
|
64
76
|
#
|
65
|
-
# @
|
77
|
+
# @note This operation can make a dynamic sandbox call.
|
78
|
+
# @param purchase_order_number [String] The purchase order number for which you want to return the shipping
|
66
79
|
# labels. It should be the same purchaseOrderNumber as received in the order.
|
67
|
-
# @param [Hash]
|
80
|
+
# @param body [Hash] The request payload that contains parameters for creating shipping labels.
|
81
|
+
# @param rate_limit [Float] Requests per second
|
68
82
|
# @return [Hash] The API response
|
69
|
-
def create_shipping_labels(purchase_order_number, body)
|
83
|
+
def create_shipping_labels(purchase_order_number, body, rate_limit: 10.0)
|
70
84
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{purchase_order_number}"
|
71
85
|
|
72
|
-
rate_limit
|
86
|
+
meter(rate_limit).post(path, body:)
|
73
87
|
end
|
74
88
|
|
75
89
|
# Submits one or more shipment confirmations for vendor orders.
|
76
90
|
#
|
77
|
-
# @
|
91
|
+
# @note This operation can make a dynamic sandbox call.
|
92
|
+
# @param body [Hash] Request body containing the shipment confirmations data.
|
93
|
+
# @param rate_limit [Float] Requests per second
|
78
94
|
# @return [Hash] The API response
|
79
|
-
def submit_shipment_confirmations(body)
|
95
|
+
def submit_shipment_confirmations(body, rate_limit: 10.0)
|
80
96
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentConfirmations"
|
81
97
|
|
82
|
-
rate_limit
|
98
|
+
meter(rate_limit).post(path, body:)
|
83
99
|
end
|
84
100
|
|
85
101
|
# This operation is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API submits a shipment
|
86
102
|
# status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their
|
87
103
|
# order, when the package is outside of Amazon Network visibility.
|
88
104
|
#
|
89
|
-
# @
|
105
|
+
# @note This operation can make a dynamic sandbox call.
|
106
|
+
# @param body [Hash] Request body that contains the shipment status update data.
|
107
|
+
# @param rate_limit [Float] Requests per second
|
90
108
|
# @return [Hash] The API response
|
91
|
-
def submit_shipment_status_updates(body)
|
109
|
+
def submit_shipment_status_updates(body, rate_limit: 10.0)
|
92
110
|
path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentStatusUpdates"
|
93
111
|
|
94
|
-
rate_limit
|
112
|
+
meter(rate_limit).post(path, body:)
|
95
113
|
end
|
96
114
|
|
97
115
|
# Returns a list of customer invoices created during a time frame that you specify. You define the time frame
|
98
116
|
# using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to
|
99
117
|
# search must be no more than 7 days.
|
100
118
|
#
|
101
|
-
# @
|
119
|
+
# @note This operation can make a dynamic sandbox call.
|
120
|
+
# @param ship_from_party_id [String] The vendor warehouseId for order fulfillment. If not specified, the result
|
102
121
|
# will contain orders for all warehouses.
|
103
|
-
# @param [Integer]
|
104
|
-
# @param [String]
|
122
|
+
# @param limit [Integer] The limit to the number of records returned
|
123
|
+
# @param created_after [String] Orders that became available after this date and time will be included in the
|
105
124
|
# result. Must be in ISO-8601 date/time format.
|
106
|
-
# @param [String]
|
125
|
+
# @param created_before [String] Orders that became available before this date and time will be included in the
|
107
126
|
# result. Must be in ISO-8601 date/time format.
|
108
|
-
# @param [String]
|
109
|
-
# @param [String]
|
127
|
+
# @param sort_order [String] Sort ASC or DESC by order creation date.
|
128
|
+
# @param next_token [String] Used for pagination when there are more orders than the specified result size limit.
|
110
129
|
# The token value is returned in the previous API call.
|
130
|
+
# @param rate_limit [Float] Requests per second
|
111
131
|
# @return [Hash] The API response
|
112
132
|
def get_customer_invoices(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: nil,
|
113
|
-
next_token: nil)
|
133
|
+
next_token: nil, rate_limit: 10.0)
|
114
134
|
path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices"
|
115
135
|
params = {
|
116
136
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -121,35 +141,39 @@ module Peddler
|
|
121
141
|
"nextToken" => next_token,
|
122
142
|
}.compact
|
123
143
|
|
124
|
-
rate_limit
|
144
|
+
meter(rate_limit).get(path, params:)
|
125
145
|
end
|
126
146
|
|
127
147
|
# Returns a customer invoice based on the purchaseOrderNumber that you specify.
|
128
148
|
#
|
129
|
-
# @
|
149
|
+
# @note This operation can make a dynamic sandbox call.
|
150
|
+
# @param purchase_order_number [String] Purchase order number of the shipment for which to return the invoice.
|
151
|
+
# @param rate_limit [Float] Requests per second
|
130
152
|
# @return [Hash] The API response
|
131
|
-
def get_customer_invoice(purchase_order_number)
|
153
|
+
def get_customer_invoice(purchase_order_number, rate_limit: 10.0)
|
132
154
|
path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices/#{purchase_order_number}"
|
133
155
|
|
134
|
-
rate_limit
|
156
|
+
meter(rate_limit).get(path)
|
135
157
|
end
|
136
158
|
|
137
159
|
# Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search
|
138
160
|
# must not be more than 7 days.
|
139
161
|
#
|
140
|
-
# @
|
162
|
+
# @note This operation can make a dynamic sandbox call.
|
163
|
+
# @param ship_from_party_id [String] The vendor warehouseId for order fulfillment. If not specified the result
|
141
164
|
# will contain orders for all warehouses.
|
142
|
-
# @param [Integer]
|
143
|
-
# @param [String]
|
165
|
+
# @param limit [Integer] The limit to the number of records returned
|
166
|
+
# @param created_after [String] Packing slips that became available after this date and time will be included in
|
144
167
|
# the result. Must be in ISO-8601 date/time format.
|
145
|
-
# @param [String]
|
168
|
+
# @param created_before [String] Packing slips that became available before this date and time will be included in
|
146
169
|
# the result. Must be in ISO-8601 date/time format.
|
147
|
-
# @param [String]
|
148
|
-
# @param [String]
|
170
|
+
# @param sort_order [String] Sort ASC or DESC by packing slip creation date.
|
171
|
+
# @param next_token [String] Used for pagination when there are more packing slips than the specified result size
|
149
172
|
# limit. The token value is returned in the previous API call.
|
173
|
+
# @param rate_limit [Float] Requests per second
|
150
174
|
# @return [Hash] The API response
|
151
|
-
def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order:
|
152
|
-
next_token: nil)
|
175
|
+
def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
|
176
|
+
next_token: nil, rate_limit: 10.0)
|
153
177
|
path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips"
|
154
178
|
params = {
|
155
179
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -160,17 +184,19 @@ module Peddler
|
|
160
184
|
"nextToken" => next_token,
|
161
185
|
}.compact
|
162
186
|
|
163
|
-
rate_limit
|
187
|
+
meter(rate_limit).get(path, params:)
|
164
188
|
end
|
165
189
|
|
166
190
|
# Returns a packing slip based on the purchaseOrderNumber that you specify.
|
167
191
|
#
|
168
|
-
# @
|
192
|
+
# @note This operation can make a dynamic sandbox call.
|
193
|
+
# @param purchase_order_number [String] The purchaseOrderNumber for the packing slip you want.
|
194
|
+
# @param rate_limit [Float] Requests per second
|
169
195
|
# @return [Hash] The API response
|
170
|
-
def get_packing_slip(purchase_order_number)
|
196
|
+
def get_packing_slip(purchase_order_number, rate_limit: 10.0)
|
171
197
|
path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips/#{purchase_order_number}"
|
172
198
|
|
173
|
-
rate_limit
|
199
|
+
meter(rate_limit).get(path)
|
174
200
|
end
|
175
201
|
end
|
176
202
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
+
class << self
|
7
|
+
def vendor_direct_fulfillment_shipping_v1(...)
|
8
|
+
API::VendorDirectFulfillmentShippingV1.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# Selling Partner API for Direct Fulfillment Shipping
|
8
14
|
#
|
@@ -13,19 +19,21 @@ module Peddler
|
|
13
19
|
# using the `createdAfter` and `createdBefore` parameters. You must use both of these parameters. The date range
|
14
20
|
# to search must not be more than 7 days.
|
15
21
|
#
|
16
|
-
# @
|
22
|
+
# @note This operation can make a static sandbox call.
|
23
|
+
# @param ship_from_party_id [String] The vendor `warehouseId` for order fulfillment. If not specified, the result
|
17
24
|
# will contain orders for all warehouses.
|
18
|
-
# @param [Integer]
|
19
|
-
# @param [String]
|
20
|
-
# the result. Must be in
|
21
|
-
# @param [String]
|
22
|
-
# in the result. Must be in
|
23
|
-
# @param [String]
|
24
|
-
# @param [String]
|
25
|
+
# @param limit [Integer] The limit to the number of records returned.
|
26
|
+
# @param created_after [String] Shipping labels that became available after this date and time will be included in
|
27
|
+
# the result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
28
|
+
# @param created_before [String] Shipping labels that became available before this date and time will be included
|
29
|
+
# in the result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
30
|
+
# @param sort_order [String] Sort ASC or DESC by order creation date.
|
31
|
+
# @param next_token [String] Used for pagination when there are more ship labels than the specified result size
|
25
32
|
# limit. The token value is returned in the previous API call.
|
33
|
+
# @param rate_limit [Float] Requests per second
|
26
34
|
# @return [Hash] The API response
|
27
|
-
def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order:
|
28
|
-
next_token: nil)
|
35
|
+
def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
|
36
|
+
next_token: nil, rate_limit: 10.0)
|
29
37
|
path = "/vendor/directFulfillment/shipping/v1/shippingLabels"
|
30
38
|
params = {
|
31
39
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -36,69 +44,79 @@ module Peddler
|
|
36
44
|
"nextToken" => next_token,
|
37
45
|
}.compact
|
38
46
|
|
39
|
-
rate_limit
|
47
|
+
meter(rate_limit).get(path, params:)
|
40
48
|
end
|
41
49
|
|
42
50
|
# Creates a shipping label for a purchase order and returns a `transactionId` for reference.
|
43
51
|
#
|
44
|
-
# @
|
52
|
+
# @note This operation can make a static sandbox call.
|
53
|
+
# @param body [Hash] Request body containing one or more shipping labels data.
|
54
|
+
# @param rate_limit [Float] Requests per second
|
45
55
|
# @return [Hash] The API response
|
46
|
-
def submit_shipping_label_request(body)
|
56
|
+
def submit_shipping_label_request(body, rate_limit: 10.0)
|
47
57
|
path = "/vendor/directFulfillment/shipping/v1/shippingLabels"
|
48
58
|
|
49
|
-
rate_limit
|
59
|
+
meter(rate_limit).post(path, body:)
|
50
60
|
end
|
51
61
|
|
52
62
|
# Returns a shipping label for the `purchaseOrderNumber` that you specify.
|
53
63
|
#
|
54
|
-
# @
|
64
|
+
# @note This operation can make a static sandbox call.
|
65
|
+
# @param purchase_order_number [String] The purchase order number for which you want to return the shipping label.
|
55
66
|
# It should be the same `purchaseOrderNumber` as received in the order.
|
67
|
+
# @param rate_limit [Float] Requests per second
|
56
68
|
# @return [Hash] The API response
|
57
|
-
def get_shipping_label(purchase_order_number)
|
69
|
+
def get_shipping_label(purchase_order_number, rate_limit: 10.0)
|
58
70
|
path = "/vendor/directFulfillment/shipping/v1/shippingLabels/#{purchase_order_number}"
|
59
71
|
|
60
|
-
rate_limit
|
72
|
+
meter(rate_limit).get(path)
|
61
73
|
end
|
62
74
|
|
63
75
|
# Submits one or more shipment confirmations for vendor orders.
|
64
76
|
#
|
65
|
-
# @
|
77
|
+
# @note This operation can make a static sandbox call.
|
78
|
+
# @param body [Hash] Request body containing the shipment confirmations data.
|
79
|
+
# @param rate_limit [Float] Requests per second
|
66
80
|
# @return [Hash] The API response
|
67
|
-
def submit_shipment_confirmations(body)
|
81
|
+
def submit_shipment_confirmations(body, rate_limit: 10.0)
|
68
82
|
path = "/vendor/directFulfillment/shipping/v1/shipmentConfirmations"
|
69
83
|
|
70
|
-
rate_limit
|
84
|
+
meter(rate_limit).post(path, body:)
|
71
85
|
end
|
72
86
|
|
73
87
|
# This API call is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API will submit a shipment
|
74
88
|
# status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their
|
75
89
|
# order, when the package is outside of Amazon Network visibility.
|
76
90
|
#
|
77
|
-
# @
|
91
|
+
# @note This operation can make a static sandbox call.
|
92
|
+
# @param body [Hash] Request body containing the shipment status update data.
|
93
|
+
# @param rate_limit [Float] Requests per second
|
78
94
|
# @return [Hash] The API response
|
79
|
-
def submit_shipment_status_updates(body)
|
95
|
+
def submit_shipment_status_updates(body, rate_limit: 10.0)
|
80
96
|
path = "/vendor/directFulfillment/shipping/v1/shipmentStatusUpdates"
|
81
97
|
|
82
|
-
rate_limit
|
98
|
+
meter(rate_limit).post(path, body:)
|
83
99
|
end
|
84
100
|
|
85
101
|
# Returns a list of customer invoices created during a time frame that you specify. You define the time frame
|
86
102
|
# using the `createdAfter` and `createdBefore` parameters. You must use both of these parameters. The date range
|
87
103
|
# to search must be no more than 7 days.
|
88
104
|
#
|
89
|
-
# @
|
105
|
+
# @note This operation can make a static sandbox call.
|
106
|
+
# @param ship_from_party_id [String] The vendor `warehouseId` for order fulfillment. If not specified, the result
|
90
107
|
# will contain orders for all warehouses.
|
91
|
-
# @param [Integer]
|
92
|
-
# @param [String]
|
93
|
-
# result. Must be in
|
94
|
-
# @param [String]
|
95
|
-
# result. Must be in
|
96
|
-
# @param [String]
|
97
|
-
# @param [String]
|
108
|
+
# @param limit [Integer] The limit to the number of records returned
|
109
|
+
# @param created_after [String] Orders that became available after this date and time will be included in the
|
110
|
+
# result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
111
|
+
# @param created_before [String] Orders that became available before this date and time will be included in the
|
112
|
+
# result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
113
|
+
# @param sort_order [String] Sort ASC or DESC by order creation date.
|
114
|
+
# @param next_token [String] Used for pagination when there are more orders than the specified result size limit.
|
98
115
|
# The token value is returned in the previous API call.
|
116
|
+
# @param rate_limit [Float] Requests per second
|
99
117
|
# @return [Hash] The API response
|
100
118
|
def get_customer_invoices(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: nil,
|
101
|
-
next_token: nil)
|
119
|
+
next_token: nil, rate_limit: 10.0)
|
102
120
|
path = "/vendor/directFulfillment/shipping/v1/customerInvoices"
|
103
121
|
params = {
|
104
122
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -109,35 +127,39 @@ module Peddler
|
|
109
127
|
"nextToken" => next_token,
|
110
128
|
}.compact
|
111
129
|
|
112
|
-
rate_limit
|
130
|
+
meter(rate_limit).get(path, params:)
|
113
131
|
end
|
114
132
|
|
115
133
|
# Returns a customer invoice based on the `purchaseOrderNumber` that you specify.
|
116
134
|
#
|
117
|
-
# @
|
135
|
+
# @note This operation can make a static sandbox call.
|
136
|
+
# @param purchase_order_number [String] Purchase order number of the shipment for which to return the invoice.
|
137
|
+
# @param rate_limit [Float] Requests per second
|
118
138
|
# @return [Hash] The API response
|
119
|
-
def get_customer_invoice(purchase_order_number)
|
139
|
+
def get_customer_invoice(purchase_order_number, rate_limit: 10.0)
|
120
140
|
path = "/vendor/directFulfillment/shipping/v1/customerInvoices/#{purchase_order_number}"
|
121
141
|
|
122
|
-
rate_limit
|
142
|
+
meter(rate_limit).get(path)
|
123
143
|
end
|
124
144
|
|
125
145
|
# Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search
|
126
146
|
# must not be more than 7 days.
|
127
147
|
#
|
128
|
-
# @
|
148
|
+
# @note This operation can make a static sandbox call.
|
149
|
+
# @param ship_from_party_id [String] The vendor `warehouseId` for order fulfillment. If not specified the result
|
129
150
|
# will contain orders for all warehouses.
|
130
|
-
# @param [Integer]
|
131
|
-
# @param [String]
|
132
|
-
# the result. Must be in
|
133
|
-
# @param [String]
|
134
|
-
# the result. Must be in
|
135
|
-
# @param [String]
|
136
|
-
# @param [String]
|
151
|
+
# @param limit [Integer] The limit to the number of records returned
|
152
|
+
# @param created_after [String] Packing slips that became available after this date and time will be included in
|
153
|
+
# the result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
154
|
+
# @param created_before [String] Packing slips that became available before this date and time will be included in
|
155
|
+
# the result. Must be in {https://developer-docs.amazon.com/sp-api/docs/iso-8601 ISO 8601} date/time format.
|
156
|
+
# @param sort_order [String] Sort ASC or DESC by packing slip creation date.
|
157
|
+
# @param next_token [String] Used for pagination when there are more packing slips than the specified result size
|
137
158
|
# limit. The token value is returned in the previous API call.
|
159
|
+
# @param rate_limit [Float] Requests per second
|
138
160
|
# @return [Hash] The API response
|
139
|
-
def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order:
|
140
|
-
next_token: nil)
|
161
|
+
def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC",
|
162
|
+
next_token: nil, rate_limit: 10.0)
|
141
163
|
path = "/vendor/directFulfillment/shipping/v1/packingSlips"
|
142
164
|
params = {
|
143
165
|
"shipFromPartyId" => ship_from_party_id,
|
@@ -148,17 +170,19 @@ module Peddler
|
|
148
170
|
"nextToken" => next_token,
|
149
171
|
}.compact
|
150
172
|
|
151
|
-
rate_limit
|
173
|
+
meter(rate_limit).get(path, params:)
|
152
174
|
end
|
153
175
|
|
154
176
|
# Returns a packing slip based on the `purchaseOrderNumber` that you specify.
|
155
177
|
#
|
156
|
-
# @
|
178
|
+
# @note This operation can make a static sandbox call.
|
179
|
+
# @param purchase_order_number [String] The `purchaseOrderNumber` for the packing slip you want.
|
180
|
+
# @param rate_limit [Float] Requests per second
|
157
181
|
# @return [Hash] The API response
|
158
|
-
def get_packing_slip(purchase_order_number)
|
182
|
+
def get_packing_slip(purchase_order_number, rate_limit: 10.0)
|
159
183
|
path = "/vendor/directFulfillment/shipping/v1/packingSlips/#{purchase_order_number}"
|
160
184
|
|
161
|
-
rate_limit
|
185
|
+
meter(rate_limit).get(path)
|
162
186
|
end
|
163
187
|
end
|
164
188
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
+
class << self
|
7
|
+
def vendor_direct_fulfillment_transactions_2021_12_28(...)
|
8
|
+
API::VendorDirectFulfillmentTransactions20211228.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# Selling Partner API for Direct Fulfillment Transaction Status
|
8
14
|
#
|
@@ -11,13 +17,15 @@ module Peddler
|
|
11
17
|
class VendorDirectFulfillmentTransactions20211228 < API
|
12
18
|
# Returns the status of the transaction indicated by the specified `transactionId`.
|
13
19
|
#
|
14
|
-
# @
|
20
|
+
# @note This operation can make a dynamic sandbox call.
|
21
|
+
# @param transaction_id [String] Previously returned in the response to the POST request of a specific
|
15
22
|
# transaction.
|
23
|
+
# @param rate_limit [Float] Requests per second
|
16
24
|
# @return [Hash] The API response
|
17
|
-
def get_transaction_status(transaction_id)
|
25
|
+
def get_transaction_status(transaction_id, rate_limit: 10.0)
|
18
26
|
path = "/vendor/directFulfillment/transactions/2021-12-28/transactions/#{transaction_id}"
|
19
27
|
|
20
|
-
rate_limit
|
28
|
+
meter(rate_limit).get(path)
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
+
class << self
|
7
|
+
def vendor_direct_fulfillment_transactions_v1(...)
|
8
|
+
API::VendorDirectFulfillmentTransactionsV1.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# Selling Partner API for Direct Fulfillment Transaction Status
|
8
14
|
#
|
@@ -11,13 +17,15 @@ module Peddler
|
|
11
17
|
class VendorDirectFulfillmentTransactionsV1 < API
|
12
18
|
# Returns the status of the transaction indicated by the specified `transactionId`.
|
13
19
|
#
|
14
|
-
# @
|
20
|
+
# @note This operation can make a static sandbox call.
|
21
|
+
# @param transaction_id [String] Previously returned in the response to the POST request of a specific
|
15
22
|
# transaction.
|
23
|
+
# @param rate_limit [Float] Requests per second
|
16
24
|
# @return [Hash] The API response
|
17
|
-
def get_transaction_status(transaction_id)
|
25
|
+
def get_transaction_status(transaction_id, rate_limit: 10.0)
|
18
26
|
path = "/vendor/directFulfillment/transactions/v1/transactions/#{transaction_id}"
|
19
27
|
|
20
|
-
rate_limit
|
28
|
+
meter(rate_limit).get(path)
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
require "peddler/api"
|
4
4
|
|
5
5
|
module Peddler
|
6
|
+
class << self
|
7
|
+
def vendor_invoices_v1(...)
|
8
|
+
API::VendorInvoicesV1.new(...)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
class API
|
7
13
|
# Selling Partner API for Retail Procurement Payments
|
8
14
|
#
|
@@ -10,12 +16,14 @@ module Peddler
|
|
10
16
|
class VendorInvoicesV1 < API
|
11
17
|
# Submit new invoices to Amazon.
|
12
18
|
#
|
13
|
-
# @
|
19
|
+
# @note This operation can make a static sandbox call.
|
20
|
+
# @param body [Hash] The request body containing the invoice data to submit.
|
21
|
+
# @param rate_limit [Float] Requests per second
|
14
22
|
# @return [Hash] The API response
|
15
|
-
def submit_invoices(body)
|
23
|
+
def submit_invoices(body, rate_limit: 10.0)
|
16
24
|
path = "/vendor/payments/v1/invoices"
|
17
25
|
|
18
|
-
rate_limit
|
26
|
+
meter(rate_limit).post(path, body:)
|
19
27
|
end
|
20
28
|
end
|
21
29
|
end
|