muffin_man 2.3.0 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +28 -11
- data/lib/muffin_man/fulfillment_inbound/v20240320.rb +99 -0
- data/lib/muffin_man/listings_restrictions/v20210801.rb +36 -0
- data/lib/muffin_man/vendor_direct_fulfillment_inventory/v1.rb +20 -0
- data/lib/muffin_man/vendor_direct_fulfillment_orders/v20211228.rb +40 -0
- data/lib/muffin_man/vendor_direct_fulfillment_payments/v1.rb +14 -0
- data/lib/muffin_man/vendor_direct_fulfillment_shipping/v20211228.rb +97 -0
- data/lib/muffin_man/vendor_direct_fulfillment_transactions/v20211228.rb +13 -0
- data/lib/muffin_man/vendor_invoices/v1.rb +14 -0
- data/lib/muffin_man/vendor_orders/v1.rb +65 -0
- data/lib/muffin_man/vendor_shipments/v1.rb +55 -0
- data/lib/muffin_man/vendor_transaction_status/v1.rb +13 -0
- data/lib/muffin_man/version.rb +1 -1
- data/lib/muffin_man.rb +10 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ce4c06aa97acdef0dd6d1a1959a89b038fd99dfbdc718e07cd119338137db7
|
4
|
+
data.tar.gz: 0bac02da9b9af7875324101073e30e0012215fe8f02bd17c0d53a645528924d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e3add57e41ca34546a36d24a9006a08d059482dc6d9b25b7a9b91d8d4095a89cb19a35a5c3f4b0ea4d6d4d7a30c2c26f4ef32461654598ddf9dbd183c51fdf
|
7
|
+
data.tar.gz: 3862fc6c73824469f13ce291e5eb50ddd58d9f07cdc6f6ad9490977e527642a54889003863a84b5d39b15d3aa19bdd9af05ad6c150f846335a8212e04da4e358
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# 2.4.1 [#73](https://github.com/patterninc/muffin_man/pull/73)
|
2
|
+
|
3
|
+
- Support for Listings Restrictions API v2021-08-01
|
4
|
+
# 2.4.0 [#72](https://github.com/patterninc/muffin_man/pull/72)
|
5
|
+
|
6
|
+
- Support for the following:
|
7
|
+
Vendor Direct Fulfillment Inventory API v1
|
8
|
+
Vendor Direct Fulfillment Orders API v2021-12-28
|
9
|
+
Vendor Direct Fulfillment Payments API v1
|
10
|
+
Vendor Direct Fulfillment Shipping API v2021-12-28
|
11
|
+
Vendor Direct Fulfillment Transactions API v2021-12-28
|
12
|
+
Vendor Invoices API v1
|
13
|
+
Vendor Orders API v1
|
14
|
+
Vendor Shipments API v1
|
15
|
+
Vendor Transaction Status API v1
|
16
|
+
|
1
17
|
# 2.2.0 [#66](https://github.com/patterninc/muffin_man/pull/66)
|
2
18
|
|
3
19
|
- Support for Data Kiosk API v2023-11-15
|
data/README.md
CHANGED
@@ -6,17 +6,34 @@ MuffinMan is a ruby interface to the Amazon Selling Partner API. For more inform
|
|
6
6
|
|
7
7
|
As of now, this gem only supports portions of the following APIs with more to come:
|
8
8
|
|
9
|
-
- `
|
10
|
-
- `
|
11
|
-
- `
|
12
|
-
- `
|
13
|
-
- `
|
14
|
-
- `
|
15
|
-
- `
|
16
|
-
- `
|
17
|
-
- `
|
18
|
-
- `
|
19
|
-
- `
|
9
|
+
- `Amazon Warehousing and Distribution API v2024-05-09`
|
10
|
+
- `Catalog Items API v2022-04-01`
|
11
|
+
- `Data Kiosk API v2023-11-15`
|
12
|
+
- `FBA Inventory API v1`
|
13
|
+
- `Feeds API v2021-06-30`
|
14
|
+
- `Finances API v0`
|
15
|
+
- `Fulfillment Inbound API v2024-03-20`
|
16
|
+
- `Fulfillment Outbound API v2020-07-01`
|
17
|
+
- `Listings API v2021-08-01`
|
18
|
+
- `Listings API v2020-09-01`
|
19
|
+
- `Listings Restrictions API v2021-08-01`
|
20
|
+
- `Merchant Fulfillment API v0`
|
21
|
+
- `Notifications API v1`
|
22
|
+
- `Orders API v0`
|
23
|
+
- `Product Fees API v0`
|
24
|
+
- `Product Pricing API v0`
|
25
|
+
- `Reports API v2021-06-30`
|
26
|
+
- `Solicitations API v1`
|
27
|
+
- `Tokens API v2021-03-01`
|
28
|
+
- `Vendor Direct Fulfillment Transactions API v1`
|
29
|
+
- `Vendor Direct Fulfillment Orders API v2021-12-28`
|
30
|
+
- `Vendor Direct Fulfillment Payments API v1`
|
31
|
+
- `Vendor Direct Fulfillment Shipping API v2021-12-28`
|
32
|
+
- `Vendor Direct Fulfillment Transactions API v2021-12-28`
|
33
|
+
- `Vendor Invoices API v1`
|
34
|
+
- `Vendor Orders API v1`
|
35
|
+
- `Vendor Shipments API v1`
|
36
|
+
- `Vendor Transaction Status API v1`
|
20
37
|
|
21
38
|
## Installation
|
22
39
|
|
@@ -117,6 +117,105 @@ module MuffinMan
|
|
117
117
|
@request_type = "GET"
|
118
118
|
call_api
|
119
119
|
end
|
120
|
+
|
121
|
+
def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil)
|
122
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets"
|
123
|
+
@query_params = {}
|
124
|
+
@query_params["pageSize"] = page_size if page_size
|
125
|
+
@query_params["paginationToken"] = pagination_token if pagination_token
|
126
|
+
@request_type = "GET"
|
127
|
+
call_api
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: nil, pagination_token: nil)
|
131
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" # rubocop:disable Layout/LineLength
|
132
|
+
@query_params = {}
|
133
|
+
@query_params["pageSize"] = page_size if page_size
|
134
|
+
@query_params["paginationToken"] = pagination_token if pagination_token
|
135
|
+
@request_type = "GET"
|
136
|
+
call_api
|
137
|
+
end
|
138
|
+
|
139
|
+
def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body)
|
140
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" # rubocop:disable Layout/LineLength
|
141
|
+
@request_body = body
|
142
|
+
@request_type = "POST"
|
143
|
+
call_api
|
144
|
+
end
|
145
|
+
|
146
|
+
def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body)
|
147
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule" # rubocop:disable Layout/LineLength
|
148
|
+
@request_body = body
|
149
|
+
@request_type = "POST"
|
150
|
+
call_api
|
151
|
+
end
|
152
|
+
|
153
|
+
def list_transportation_options(inbound_plan_id, page_size: nil, pagination_token: nil, placement_option_id: nil,
|
154
|
+
shipment_id: nil)
|
155
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions"
|
156
|
+
@query_params = {}
|
157
|
+
@query_params["pageSize"] = page_size if page_size
|
158
|
+
@query_params["paginationToken"] = pagination_token if pagination_token
|
159
|
+
@query_params["placementOptionId"] = placement_option_id if placement_option_id
|
160
|
+
@query_params["shipmentId"] = shipment_id if shipment_id
|
161
|
+
@request_type = "GET"
|
162
|
+
call_api
|
163
|
+
end
|
164
|
+
|
165
|
+
def generate_transportation_options(inbound_plan_id, body)
|
166
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions"
|
167
|
+
@request_body = body
|
168
|
+
@request_type = "POST"
|
169
|
+
call_api
|
170
|
+
end
|
171
|
+
|
172
|
+
def confirm_transportation_options(inbound_plan_id, body)
|
173
|
+
@local_var_path = "#{INBOUND_PATH}/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation"
|
174
|
+
@request_body = body
|
175
|
+
@request_type = "POST"
|
176
|
+
call_api
|
177
|
+
end
|
178
|
+
|
179
|
+
def list_item_compliance_details(mskus, marketplace_id)
|
180
|
+
@local_var_path = "#{INBOUND_PATH}/items/compliance"
|
181
|
+
@query_params = {}
|
182
|
+
@query_params["mskus"] = mskus
|
183
|
+
@query_params["marketplaceId"] = marketplace_id
|
184
|
+
@request_type = "GET"
|
185
|
+
call_api
|
186
|
+
end
|
187
|
+
|
188
|
+
def update_item_compliance_details(marketplace_id, body)
|
189
|
+
@local_var_path = "#{INBOUND_PATH}/items/compliance"
|
190
|
+
@query_params = {}
|
191
|
+
@query_params["marketplaceId"] = marketplace_id
|
192
|
+
@request_body = body
|
193
|
+
@request_type = "PUT"
|
194
|
+
call_api
|
195
|
+
end
|
196
|
+
|
197
|
+
def create_marketplace_item_labels(body)
|
198
|
+
@local_var_path = "#{INBOUND_PATH}/items/labels"
|
199
|
+
@request_body = body
|
200
|
+
@request_type = "POST"
|
201
|
+
call_api
|
202
|
+
end
|
203
|
+
|
204
|
+
def list_prep_details(marketplace_id, mskus)
|
205
|
+
@local_var_path = "#{INBOUND_PATH}/items/prepDetails"
|
206
|
+
@query_params = {}
|
207
|
+
@query_params["marketplaceId"] = marketplace_id
|
208
|
+
@query_params["mskus"] = mskus
|
209
|
+
@request_type = "GET"
|
210
|
+
call_api
|
211
|
+
end
|
212
|
+
|
213
|
+
def set_prep_details(body) # rubocop:disable Naming/AccessorMethodName
|
214
|
+
@local_var_path = "#{INBOUND_PATH}/items/prepDetails"
|
215
|
+
@request_body = body
|
216
|
+
@request_type = "POST"
|
217
|
+
call_api
|
218
|
+
end
|
120
219
|
end
|
121
220
|
end
|
122
221
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module ListingsRestrictions
|
5
|
+
class V20210801 < SpApiClient
|
6
|
+
def get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type = nil, reason_locale = nil)
|
7
|
+
# Options for condition_type:
|
8
|
+
# new_new
|
9
|
+
# new_open_box
|
10
|
+
# new_oem
|
11
|
+
# refurbished_refurbished
|
12
|
+
# used_like_new
|
13
|
+
# used_very_good
|
14
|
+
# used_good
|
15
|
+
# used_acceptable
|
16
|
+
# collectible_like_new
|
17
|
+
# collectible_very_good
|
18
|
+
# collectible_good
|
19
|
+
# collectible_acceptable
|
20
|
+
# club_club
|
21
|
+
|
22
|
+
@local_var_path = "/listings/2021-08-01/restrictions"
|
23
|
+
@marketplace_ids = marketplace_ids.is_a?(Array) ? marketplace_ids : [marketplace_ids]
|
24
|
+
@query_params = {
|
25
|
+
"marketplaceIds" => @marketplace_ids.join(",")
|
26
|
+
}
|
27
|
+
@query_params["asin"] = asin if asin
|
28
|
+
@query_params["conditionType"] = condition_type if condition_type
|
29
|
+
@query_params["sellerId"] = seller_id if seller_id
|
30
|
+
@query_params["reason_locale"] = reason_locale if reason_locale
|
31
|
+
@request_type = "GET"
|
32
|
+
call_api
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorDirectFulfillmentInventory
|
5
|
+
class V1 < SpApiClient
|
6
|
+
def submit_inventory_update(warehouse_id, selling_party, is_full_update, items)
|
7
|
+
@local_var_path = "/vendor/directFulfillment/inventory/v1/warehouses/#{warehouse_id}/items"
|
8
|
+
@request_body = {
|
9
|
+
"inventory" => {
|
10
|
+
"sellingParty" => selling_party,
|
11
|
+
"isFullUpdate" => is_full_update,
|
12
|
+
"items" => items
|
13
|
+
}
|
14
|
+
}
|
15
|
+
@request_type = "POST"
|
16
|
+
call_api
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorDirectFulfillmentOrders
|
5
|
+
class V20211228 < SpApiClient
|
6
|
+
GET_ORDERS_PARAMS = %w[
|
7
|
+
shipFromPartyId
|
8
|
+
status
|
9
|
+
limit
|
10
|
+
sortOrder
|
11
|
+
nextToken
|
12
|
+
includeDetails
|
13
|
+
].freeze
|
14
|
+
|
15
|
+
def get_orders(created_after, created_before, params = {})
|
16
|
+
@local_var_path = "/vendor/directFulfillment/orders/2021-12-28/purchaseOrders"
|
17
|
+
@query_params = {
|
18
|
+
"createdAfter" => created_after,
|
19
|
+
"createdBefore" => created_before
|
20
|
+
}
|
21
|
+
@query_params.merge!(params.slice(*GET_ORDERS_PARAMS))
|
22
|
+
@request_type = "GET"
|
23
|
+
call_api
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_order(purchase_order_number)
|
27
|
+
@local_var_path = "/vendor/directFulfillment/orders/2021-12-28/purchaseOrders/#{purchase_order_number}"
|
28
|
+
@request_type = "GET"
|
29
|
+
call_api
|
30
|
+
end
|
31
|
+
|
32
|
+
def submit_acknowledgement(order_acknowledgements)
|
33
|
+
@local_var_path = "/vendor/directFulfillment/orders/2021-12-28/acknowledgements"
|
34
|
+
@request_body = { "orderAcknowledgements" => order_acknowledgements }
|
35
|
+
@request_type = "POST"
|
36
|
+
call_api
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorDirectFulfillmentPayments
|
5
|
+
class V1 < SpApiClient
|
6
|
+
def submit_invoice(invoices)
|
7
|
+
@local_var_path = "/vendor/directFulfillment/payments/v1/invoices"
|
8
|
+
@request_body = { "invoices" => invoices }
|
9
|
+
@request_type = "POST"
|
10
|
+
call_api
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorDirectFulfillmentShipping
|
5
|
+
class V20211228 < SpApiClient
|
6
|
+
VENDOR_DIRECT_FULFILLMENT_SHIPPING_PARAMS = %w[
|
7
|
+
shipFromPartyId
|
8
|
+
limit
|
9
|
+
sortOrder
|
10
|
+
nextToken
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
def get_shipping_labels(created_after, created_before, params = {})
|
14
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
|
15
|
+
@query_params = {
|
16
|
+
"createdAfter" => created_after,
|
17
|
+
"createdBefore" => created_before
|
18
|
+
}
|
19
|
+
@query_params.merge!(params.slice(*VENDOR_DIRECT_FULFILLMENT_SHIPPING_PARAMS))
|
20
|
+
@request_type = "GET"
|
21
|
+
call_api
|
22
|
+
end
|
23
|
+
|
24
|
+
def submit_shipping_label_request(shipping_label_requests)
|
25
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels"
|
26
|
+
@request_body = { "shippingLabelRequests" => shipping_label_requests }
|
27
|
+
@request_type = "POST"
|
28
|
+
call_api
|
29
|
+
end
|
30
|
+
|
31
|
+
def get_shipping_label(purchase_order_number)
|
32
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{purchase_order_number}"
|
33
|
+
@request_type = "GET"
|
34
|
+
call_api
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_shipping_labels(purchase_order_number, selling_party, ship_from_party, containers: nil)
|
38
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shippingLabels/#{purchase_order_number}"
|
39
|
+
@request_body = {
|
40
|
+
"sellingParty" => selling_party,
|
41
|
+
"shipFromParty" => ship_from_party
|
42
|
+
}
|
43
|
+
@request_body["containers"] = containers if containers
|
44
|
+
@request_type = "POST"
|
45
|
+
call_api
|
46
|
+
end
|
47
|
+
|
48
|
+
def submit_shipment_confirmations(shipment_confirmations)
|
49
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentConfirmations"
|
50
|
+
@request_body = { "shipmentConfirmations" => shipment_confirmations }
|
51
|
+
@request_type = "POST"
|
52
|
+
call_api
|
53
|
+
end
|
54
|
+
|
55
|
+
def submit_shipment_status_updates(shipment_status_updates)
|
56
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/shipmentStatusUpdates"
|
57
|
+
@request_body = { "shipmentStatusUpdates" => shipment_status_updates }
|
58
|
+
@request_type = "POST"
|
59
|
+
call_api
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_customer_invoices(created_after, created_before, params = {})
|
63
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices"
|
64
|
+
@query_params = {
|
65
|
+
"createdAfter" => created_after,
|
66
|
+
"createdBefore" => created_before
|
67
|
+
}
|
68
|
+
@query_params.merge!(params.slice(*VENDOR_DIRECT_FULFILLMENT_SHIPPING_PARAMS))
|
69
|
+
@request_type = "GET"
|
70
|
+
call_api
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_customer_invoice(purchase_order_number)
|
74
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/customerInvoices/#{purchase_order_number}"
|
75
|
+
@request_type = "GET"
|
76
|
+
call_api
|
77
|
+
end
|
78
|
+
|
79
|
+
def get_packing_slips(created_after, created_before, params = {})
|
80
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips"
|
81
|
+
@query_params = {
|
82
|
+
"createdAfter" => created_after,
|
83
|
+
"createdBefore" => created_before
|
84
|
+
}
|
85
|
+
@query_params.merge!(params.slice(*VENDOR_DIRECT_FULFILLMENT_SHIPPING_PARAMS))
|
86
|
+
@request_type = "GET"
|
87
|
+
call_api
|
88
|
+
end
|
89
|
+
|
90
|
+
def get_packing_slip(purchase_order_number)
|
91
|
+
@local_var_path = "/vendor/directFulfillment/shipping/2021-12-28/packingSlips/#{purchase_order_number}"
|
92
|
+
@request_type = "GET"
|
93
|
+
call_api
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorDirectFulfillmentTransactions
|
5
|
+
class V20211228 < SpApiClient
|
6
|
+
def get_transaction_status(transaction_id)
|
7
|
+
@local_var_path = "/vendor/directFulfillment/transactions/2021-12-28/transactions/#{transaction_id}"
|
8
|
+
@request_type = "GET"
|
9
|
+
call_api
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorInvoices
|
5
|
+
class V1 < SpApiClient
|
6
|
+
def submit_invoices(invoices)
|
7
|
+
@local_var_path = "/vendor/payments/v1/invoices"
|
8
|
+
@request_body = { "invoices" => invoices }
|
9
|
+
@request_type = "POST"
|
10
|
+
call_api
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorOrders
|
5
|
+
class V1 < SpApiClient
|
6
|
+
GET_PURCHASE_ORDERS_PARAMS = %w[
|
7
|
+
limit
|
8
|
+
createdAfter
|
9
|
+
createdBefore
|
10
|
+
sortOrder
|
11
|
+
nextToken
|
12
|
+
includeDetails
|
13
|
+
changedAfter
|
14
|
+
changedBefore
|
15
|
+
poItemState
|
16
|
+
isPOChanged
|
17
|
+
purchaseOrderState
|
18
|
+
orderingVendorCode
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
GET_PURCHASE_ORDERS_STATUS_PARAMS = %w[
|
22
|
+
limit
|
23
|
+
sortOrder
|
24
|
+
nextToken
|
25
|
+
createdAfter
|
26
|
+
createdBefore
|
27
|
+
updatedAfter
|
28
|
+
updatedBefore
|
29
|
+
purchaseOrderNumber
|
30
|
+
purchaseOrderStatus
|
31
|
+
itemConfirmationStatus
|
32
|
+
itemReceiveStatus
|
33
|
+
orderingVendorCode
|
34
|
+
shipToPartyId
|
35
|
+
].freeze
|
36
|
+
|
37
|
+
def get_purchase_orders(params = {})
|
38
|
+
@local_var_path = "/vendor/orders/v1/purchaseOrders"
|
39
|
+
@query_params = params.slice(*GET_PURCHASE_ORDERS_PARAMS)
|
40
|
+
@request_type = "GET"
|
41
|
+
call_api
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_purchase_order(purchase_order_number)
|
45
|
+
@local_var_path = "/vendor/orders/v1/purchaseOrders/#{purchase_order_number}"
|
46
|
+
@request_type = "GET"
|
47
|
+
call_api
|
48
|
+
end
|
49
|
+
|
50
|
+
def submit_acknowledgement(acknowledgements)
|
51
|
+
@local_var_path = "/vendor/orders/v1/acknowledgements"
|
52
|
+
@request_body = { "acknowledgements" => acknowledgements }
|
53
|
+
@request_type = "POST"
|
54
|
+
call_api
|
55
|
+
end
|
56
|
+
|
57
|
+
def get_purchase_orders_status(params = {})
|
58
|
+
@local_var_path = "/vendor/orders/v1/purchaseOrdersStatus"
|
59
|
+
@query_params = params.slice(*GET_PURCHASE_ORDERS_STATUS_PARAMS)
|
60
|
+
@request_type = "GET"
|
61
|
+
call_api
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorShipments
|
5
|
+
class V1 < SpApiClient
|
6
|
+
GET_SHIPMENT_DETAILS_PARAMS = %w[
|
7
|
+
limit
|
8
|
+
sortOrder
|
9
|
+
nextToken
|
10
|
+
createdAfter
|
11
|
+
createdBefore
|
12
|
+
shipmentConfirmedBefore
|
13
|
+
shipmentConfirmedAfter
|
14
|
+
packageLabelCreatedBefore
|
15
|
+
packageLabelCreatedAfter
|
16
|
+
shippedBefore
|
17
|
+
shippedAfter
|
18
|
+
estimatedDeliveryBefore
|
19
|
+
estimatedDeliveryAfter
|
20
|
+
shipmentDeliveryBefore
|
21
|
+
shipmentDeliveryAfter
|
22
|
+
requestedPickUpBefore
|
23
|
+
requestedPickUpAfter
|
24
|
+
scheduledPickUpBefore
|
25
|
+
scheduledPickUpAfter
|
26
|
+
currentShipmentStatus
|
27
|
+
vendorShipmentIdentifier
|
28
|
+
buyerReferenceNumber
|
29
|
+
buyerWarehouseCode
|
30
|
+
sellerWarehouseCode
|
31
|
+
].freeze
|
32
|
+
|
33
|
+
def submit_shipment_confirmations(shipment_confirmations)
|
34
|
+
@local_var_path = "/vendor/shipping/v1/shipmentConfirmations"
|
35
|
+
@request_body = { "shipmentConfirmations" => shipment_confirmations }
|
36
|
+
@request_type = "POST"
|
37
|
+
call_api
|
38
|
+
end
|
39
|
+
|
40
|
+
def get_shipment_details(params = {})
|
41
|
+
@local_var_path = "/vendor/shipping/v1/shipments"
|
42
|
+
@query_params = params.slice(*GET_SHIPMENT_DETAILS_PARAMS)
|
43
|
+
@request_type = "GET"
|
44
|
+
call_api
|
45
|
+
end
|
46
|
+
|
47
|
+
def submit_shipments(shipments)
|
48
|
+
@local_var_path = "/vendor/shipping/v1/shipments"
|
49
|
+
@request_body = { "shipments" => shipments }
|
50
|
+
@request_type = "POST"
|
51
|
+
call_api
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MuffinMan
|
4
|
+
module VendorTransactionStatus
|
5
|
+
class V1 < SpApiClient
|
6
|
+
def get_transaction(transaction_id)
|
7
|
+
@local_var_path = "/vendor/transactions/v1/transactions/#{transaction_id}"
|
8
|
+
@request_type = "GET"
|
9
|
+
call_api
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/muffin_man/version.rb
CHANGED
data/lib/muffin_man.rb
CHANGED
@@ -14,6 +14,7 @@ require "muffin_man/tokens/v20210301"
|
|
14
14
|
require "muffin_man/product_pricing/v0"
|
15
15
|
require "muffin_man/listings/v20210801"
|
16
16
|
require "muffin_man/listings/v20200901"
|
17
|
+
require "muffin_man/listings_restrictions/v20210801"
|
17
18
|
require "muffin_man/fulfillment_inbound/v0"
|
18
19
|
require "muffin_man/fulfillment_inbound/v1"
|
19
20
|
require "muffin_man/fulfillment_inbound/v20240320"
|
@@ -24,6 +25,15 @@ require "muffin_man/feeds/v20210630"
|
|
24
25
|
require "muffin_man/notifications/v1"
|
25
26
|
require "muffin_man/merchant_fulfillment/v0"
|
26
27
|
require "muffin_man/awd/v20240509"
|
28
|
+
require "muffin_man/vendor_direct_fulfillment_inventory/v1"
|
29
|
+
require "muffin_man/vendor_direct_fulfillment_orders/v20211228"
|
30
|
+
require "muffin_man/vendor_direct_fulfillment_payments/v1"
|
31
|
+
require "muffin_man/vendor_direct_fulfillment_shipping/v20211228"
|
32
|
+
require "muffin_man/vendor_direct_fulfillment_transactions/v20211228"
|
33
|
+
require "muffin_man/vendor_invoices/v1"
|
34
|
+
require "muffin_man/vendor_orders/v1"
|
35
|
+
require "muffin_man/vendor_shipments/v1"
|
36
|
+
require "muffin_man/vendor_transaction_status/v1"
|
27
37
|
|
28
38
|
module MuffinMan
|
29
39
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muffin_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- lib/muffin_man/fulfillment_outbound/v20200701.rb
|
170
170
|
- lib/muffin_man/listings/v20200901.rb
|
171
171
|
- lib/muffin_man/listings/v20210801.rb
|
172
|
+
- lib/muffin_man/listings_restrictions/v20210801.rb
|
172
173
|
- lib/muffin_man/lwa/auth_helper.rb
|
173
174
|
- lib/muffin_man/merchant_fulfillment/v0.rb
|
174
175
|
- lib/muffin_man/notifications/v1.rb
|
@@ -188,6 +189,15 @@ files:
|
|
188
189
|
- lib/muffin_man/solicitations/v1.rb
|
189
190
|
- lib/muffin_man/sp_api_client.rb
|
190
191
|
- lib/muffin_man/tokens/v20210301.rb
|
192
|
+
- lib/muffin_man/vendor_direct_fulfillment_inventory/v1.rb
|
193
|
+
- lib/muffin_man/vendor_direct_fulfillment_orders/v20211228.rb
|
194
|
+
- lib/muffin_man/vendor_direct_fulfillment_payments/v1.rb
|
195
|
+
- lib/muffin_man/vendor_direct_fulfillment_shipping/v20211228.rb
|
196
|
+
- lib/muffin_man/vendor_direct_fulfillment_transactions/v20211228.rb
|
197
|
+
- lib/muffin_man/vendor_invoices/v1.rb
|
198
|
+
- lib/muffin_man/vendor_orders/v1.rb
|
199
|
+
- lib/muffin_man/vendor_shipments/v1.rb
|
200
|
+
- lib/muffin_man/vendor_transaction_status/v1.rb
|
191
201
|
- lib/muffin_man/version.rb
|
192
202
|
- lib/sp_api_helpers.rb
|
193
203
|
- muffin_man.gemspec
|