peddler 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +15 -14
- data/lib/mws/cart_information/client.rb +72 -0
- data/lib/mws/cart_information.rb +1 -69
- data/lib/mws/customer_information/client.rb +79 -0
- data/lib/mws/customer_information.rb +1 -77
- data/lib/mws/feeds/client.rb +112 -0
- data/lib/mws/feeds.rb +1 -110
- data/lib/mws/fulfillment_inbound_shipment/client.rb +233 -0
- data/lib/mws/fulfillment_inbound_shipment.rb +1 -231
- data/lib/mws/fulfillment_inventory/client.rb +53 -0
- data/lib/mws/fulfillment_inventory.rb +1 -51
- data/lib/mws/fulfillment_outbound_shipment/client.rb +171 -0
- data/lib/mws/fulfillment_outbound_shipment.rb +1 -168
- data/lib/mws/off_amazon_payments/client.rb +362 -0
- data/lib/mws/off_amazon_payments.rb +1 -360
- data/lib/mws/orders/client.rb +102 -0
- data/lib/mws/orders.rb +1 -98
- data/lib/mws/products/client.rb +234 -0
- data/lib/mws/products.rb +1 -232
- data/lib/mws/recommendations/client.rb +71 -0
- data/lib/mws/recommendations.rb +1 -66
- data/lib/mws/reports/client.rb +220 -0
- data/lib/mws/reports.rb +1 -220
- data/lib/mws/sellers/client.rb +42 -0
- data/lib/mws/sellers.rb +1 -40
- data/lib/mws/subscriptions/client.rb +177 -0
- data/lib/mws/subscriptions.rb +1 -169
- data/lib/mws.rb +2 -2
- data/lib/peddler/client.rb +3 -3
- data/lib/peddler/flat_file_parser.rb +3 -3
- data/lib/peddler/operation.rb +2 -3
- data/lib/peddler/structured_list.rb +1 -3
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler/xml_parser.rb +1 -1
- data/test/integration/test_cart_information.rb +2 -2
- data/test/integration/test_customer_information.rb +2 -2
- data/test/integration/test_feeds.rb +2 -2
- data/test/integration/test_fulfillment_inbound_shipment.rb +2 -2
- data/test/integration/test_fulfillment_inventory.rb +3 -7
- data/test/integration/test_fulfillment_outbound_shipment.rb +2 -49
- data/test/integration/test_off_amazon_payments.rb +2 -2
- data/test/integration/test_orders.rb +2 -13
- data/test/integration/test_products.rb +2 -2
- data/test/integration/test_recommendations.rb +2 -11
- data/test/integration/test_reports.rb +2 -3
- data/test/integration/test_sellers.rb +2 -9
- data/test/integration/test_subscriptions.rb +2 -2
- data/test/integration_test_helper.rb +49 -0
- data/test/mws.yml +16 -0
- data/test/mws.yml.bak +16 -0
- data/test/test_helper.rb +7 -0
- data/test/unit/mws/test_off_amazon_payments_client.rb +9 -0
- data/test/unit/mws/test_products_client.rb +9 -0
- data/test/unit/peddler/test_client.rb +2 -2
- data/test/unit/peddler/test_flat_file_parser.rb +2 -2
- data/test/unit/peddler/test_operation.rb +2 -2
- data/test/unit/peddler/test_parser.rb +2 -2
- data/test/unit/peddler/test_structured_list.rb +2 -2
- data/test/unit/peddler/test_xml_parser.rb +2 -2
- data/test/unit/test_mws.rb +3 -3
- data/test/vcr_cassettes/CartInformation.yml +37 -725
- data/test/vcr_cassettes/CustomerInformation.yml +37 -728
- data/test/vcr_cassettes/Feeds.yml +100 -528
- data/test/vcr_cassettes/FulfillmentInboundShipment.yml +39 -728
- data/test/vcr_cassettes/FulfillmentInventory.yml +96 -997
- data/test/vcr_cassettes/FulfillmentOutboundShipment.yml +39 -725
- data/test/vcr_cassettes/OffAmazonPayments.yml +36 -727
- data/test/vcr_cassettes/Orders.yml +38 -29855
- data/test/vcr_cassettes/Products.yml +1300 -3871
- data/test/vcr_cassettes/Recommendations.yml +8934 -15590
- data/test/vcr_cassettes/Reports.yml +288 -1326
- data/test/vcr_cassettes/Sellers.yml +38 -1178
- data/test/vcr_cassettes/Subscriptions.yml +244 -1066
- metadata +27 -98
- data/test/helper.rb +0 -3
- data/test/integration_helper.rb +0 -49
- data/test/mws.yml.1 +0 -32
- data/test/mws.yml.example +0 -4
- data/test/unit/mws/test_off_amazon_payments.rb +0 -9
- data/test/unit/mws/test_products.rb +0 -9
@@ -0,0 +1,233 @@
|
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
module FulfillmentInboundShipment
|
5
|
+
# With the Fulfillment Inbound Shipment API, you can create and update
|
6
|
+
# inbound shipments of inventory in the Amazon Fulfillment Network. You can
|
7
|
+
# also request lists of inbound shipments or inbound shipment items based on
|
8
|
+
# criteria that you specify.
|
9
|
+
class Client < ::Peddler::Client
|
10
|
+
path '/FulfillmentInboundShipment/2010-10-01'
|
11
|
+
|
12
|
+
# Returns the information required to create an inbound shipment
|
13
|
+
#
|
14
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipmentPlan.html
|
15
|
+
# @param ship_from_address [Struct, Hash]
|
16
|
+
# @param inbound_shipment_plan_request_items [Array<Struct, Hash>]
|
17
|
+
# @param opts [Hash]
|
18
|
+
# @option opts [String] :label_prep_preference
|
19
|
+
# @return [Peddler::XMLParser]
|
20
|
+
def create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {})
|
21
|
+
operation('CreateInboundShipmentPlan')
|
22
|
+
.add(
|
23
|
+
opts.merge(
|
24
|
+
'ShipFromAddress' => ship_from_address,
|
25
|
+
'InboundShipmentPlanRequestItems' => inbound_shipment_plan_request_items
|
26
|
+
)
|
27
|
+
)
|
28
|
+
.structure!('InboundShipmentPlanRequestItems', 'member')
|
29
|
+
|
30
|
+
run
|
31
|
+
end
|
32
|
+
|
33
|
+
# Creates an inbound shipment
|
34
|
+
#
|
35
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipment.html
|
36
|
+
# @param shipment_id [String]
|
37
|
+
# @param inbound_shipment_header [Struct, Hash]
|
38
|
+
# @param opts [Hash]
|
39
|
+
# @option opts [Array<Struct, Hash>] :inbound_shipment_items
|
40
|
+
# @return [Peddler::XMLParser]
|
41
|
+
def create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
|
42
|
+
operation('CreateInboundShipment')
|
43
|
+
.add(
|
44
|
+
opts.merge(
|
45
|
+
'ShipmentId' => shipment_id,
|
46
|
+
'InboundShipmentHeader' => inbound_shipment_header
|
47
|
+
)
|
48
|
+
)
|
49
|
+
.structure!('InboundShipmentItems', 'member')
|
50
|
+
|
51
|
+
run
|
52
|
+
end
|
53
|
+
|
54
|
+
# Updates an existing inbound shipment
|
55
|
+
#
|
56
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_UpdateInboundShipment.html
|
57
|
+
# @param shipment_id [String]
|
58
|
+
# @param inbound_shipment_header [Struct, Hash]
|
59
|
+
# @param opts [Hash]
|
60
|
+
# @option opts [Array<Struct, Hash>] :inbound_shipment_items
|
61
|
+
# @return [Peddler::XMLParser]
|
62
|
+
def update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
|
63
|
+
operation('UpdateInboundShipment')
|
64
|
+
.add(
|
65
|
+
opts.merge(
|
66
|
+
'ShipmentId' => shipment_id,
|
67
|
+
'InboundShipmentHeader' => inbound_shipment_header
|
68
|
+
)
|
69
|
+
)
|
70
|
+
.structure!('InboundShipmentItems', 'member')
|
71
|
+
|
72
|
+
run
|
73
|
+
end
|
74
|
+
|
75
|
+
# Sends transportation information to Amazon about an inbound shipment
|
76
|
+
#
|
77
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_PutTransportContent.html
|
78
|
+
# @param shipment_id [String]
|
79
|
+
# @param is_partnered [Boolean]
|
80
|
+
# @param shipment_type [String]
|
81
|
+
# @param transport_details [Struct, Hash]
|
82
|
+
# @return [Peddler::XMLParser]
|
83
|
+
def put_transport_content(shipment_id, is_partnered, shipment_type, transport_details)
|
84
|
+
operation('PutTransportContent')
|
85
|
+
.add(
|
86
|
+
'ShipmentId' => shipment_id,
|
87
|
+
'IsPartnered' => is_partnered,
|
88
|
+
'ShipmentType' => shipment_type,
|
89
|
+
'TransportDetails' => transport_details
|
90
|
+
)
|
91
|
+
|
92
|
+
run
|
93
|
+
end
|
94
|
+
|
95
|
+
# Requests an estimate of the shipping cost for an inbound shipment
|
96
|
+
#
|
97
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_EstimateTransportRequest.html
|
98
|
+
# @param shipment_id [String]
|
99
|
+
# @return [Peddler::XMLParser]
|
100
|
+
def estimate_transport_request(shipment_id)
|
101
|
+
operation('EstimateTransportRequest').add('ShipmentId' => shipment_id)
|
102
|
+
run
|
103
|
+
end
|
104
|
+
|
105
|
+
# Returns current transportation information about an inbound shipment
|
106
|
+
#
|
107
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetTransportContent.html
|
108
|
+
# @param shipment_id [String]
|
109
|
+
# @return [Peddler::XMLParser]
|
110
|
+
def get_transport_content(shipment_id)
|
111
|
+
operation('GetTransportContent').add('ShipmentId' => shipment_id)
|
112
|
+
run
|
113
|
+
end
|
114
|
+
|
115
|
+
# Confirms that you accept the Amazon-partnered shipping estimate and you
|
116
|
+
# request that the Amazon-partnered carrier ship your inbound shipment
|
117
|
+
#
|
118
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ConfirmTransportRequest.html
|
119
|
+
# @param shipment_id [String]
|
120
|
+
# @return [Peddler::XMLParser]
|
121
|
+
def confirm_transport_request(shipment_id)
|
122
|
+
operation('ConfirmTransportRequest').add('ShipmentId' => shipment_id)
|
123
|
+
run
|
124
|
+
end
|
125
|
+
|
126
|
+
# Voids a previously-confirmed request to ship your inbound shipment using
|
127
|
+
# an Amazon-partnered carrier
|
128
|
+
#
|
129
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_VoidTransportRequest.html
|
130
|
+
# @param shipment_id [String]
|
131
|
+
# @return [Peddler::XMLParser]
|
132
|
+
def void_transport_request(shipment_id)
|
133
|
+
operation('VoidTransportRequest').add('ShipmentId' => shipment_id)
|
134
|
+
run
|
135
|
+
end
|
136
|
+
|
137
|
+
# Returns PDF document data for printing package labels for an inbound
|
138
|
+
# shipment
|
139
|
+
#
|
140
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPackageLabels.html
|
141
|
+
# @param shipment_id [String]
|
142
|
+
# @param page_type [String]
|
143
|
+
# @param opts [Hash]
|
144
|
+
# @option opts [Integer] :number_of_packages
|
145
|
+
# @return [Peddler::XMLParser]
|
146
|
+
def get_package_labels(shipment_id, page_type, opts = {})
|
147
|
+
operation('GetPackageLabels')
|
148
|
+
.add(opts.merge(
|
149
|
+
'ShipmentId' => shipment_id,
|
150
|
+
'PageType' => page_type
|
151
|
+
))
|
152
|
+
|
153
|
+
run
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns PDF document data for printing a bill of lading for an inbound
|
157
|
+
# shipment
|
158
|
+
#
|
159
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetBillOfLading.html
|
160
|
+
# @param shipment_id [String]
|
161
|
+
# @return [Peddler::XMLParser]
|
162
|
+
def get_bill_of_lading(shipment_id)
|
163
|
+
operation('GetBillOfLading').add('ShipmentId' => shipment_id)
|
164
|
+
run
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns a list of inbound shipments based on criteria that you specify
|
168
|
+
#
|
169
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipments.html
|
170
|
+
# @param opts [Hash]
|
171
|
+
# @option opts [Array<String>] :shipment_status_list
|
172
|
+
# @option opts [Array<String>] :shipment_id_list
|
173
|
+
# @option opts [String, #iso8601] :last_updated_after
|
174
|
+
# @option opts [String, #iso8601] :last_updated_before
|
175
|
+
# @return [Peddler::XMLParser]
|
176
|
+
def list_inbound_shipments(opts = {})
|
177
|
+
operation('ListInboundShipments')
|
178
|
+
.add(opts)
|
179
|
+
.structure!('ShipmentStatusList', 'member')
|
180
|
+
.structure!('ShipmentIdList', 'member')
|
181
|
+
|
182
|
+
run
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the next page of inbound shipments
|
186
|
+
#
|
187
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentsByNextToken.html
|
188
|
+
# @param next_token [String]
|
189
|
+
# @return [Peddler::XMLParser]
|
190
|
+
def list_inbound_shipments_by_next_token(next_token)
|
191
|
+
operation('ListInboundShipmentsByNextToken')
|
192
|
+
.add('NextToken' => next_token)
|
193
|
+
|
194
|
+
run
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns a list of items in a specified inbound shipment, or a list of
|
198
|
+
# items that were updated within a specified time frame
|
199
|
+
#
|
200
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItems.html
|
201
|
+
# @param opts [Hash]
|
202
|
+
# @option opts [String] :shipment_id
|
203
|
+
# @option opts [String, #iso8601] :last_updated_after
|
204
|
+
# @option opts [String, #iso8601] :last_updated_before
|
205
|
+
# @return [Peddler::XMLParser]
|
206
|
+
def list_inbound_shipment_items(opts = {})
|
207
|
+
operation('ListInboundShipmentItems').add(opts)
|
208
|
+
run
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the next page of inbound shipment items
|
212
|
+
#
|
213
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItemsByNextToken.html
|
214
|
+
# @param next_token [String]
|
215
|
+
# @return [Peddler::XMLParser]
|
216
|
+
def list_inbound_shipment_items_by_next_token(next_token)
|
217
|
+
operation('ListInboundShipmentItemsByNextToken')
|
218
|
+
.add('NextToken' => next_token)
|
219
|
+
|
220
|
+
run
|
221
|
+
end
|
222
|
+
|
223
|
+
# Gets the operational status of the API
|
224
|
+
#
|
225
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/MWS_GetServiceStatus.html
|
226
|
+
# @return [Peddler::XMLParser]
|
227
|
+
def get_service_status
|
228
|
+
operation('GetServiceStatus')
|
229
|
+
run
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
@@ -1,231 +1 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
module MWS
|
4
|
-
# With the Fulfillment Inbound Shipment API, you can create and update inbound
|
5
|
-
# shipments of inventory in the Amazon Fulfillment Network. You can also
|
6
|
-
# also request lists of inbound shipments or inbound shipment items based on
|
7
|
-
# criteria that you specify.
|
8
|
-
class FulfillmentInboundShipment < ::Peddler::Client
|
9
|
-
path '/FulfillmentInboundShipment/2010-10-01'
|
10
|
-
|
11
|
-
# Returns the information required to create an inbound shipment
|
12
|
-
#
|
13
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipmentPlan.html
|
14
|
-
# @param ship_from_address [Struct, Hash]
|
15
|
-
# @param inbound_shipment_plan_request_items [Array<Struct, Hash>]
|
16
|
-
# @param opts [Hash]
|
17
|
-
# @option opts [String] :label_prep_preference
|
18
|
-
# @return [Peddler::XMLParser]
|
19
|
-
def create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {})
|
20
|
-
operation('CreateInboundShipmentPlan')
|
21
|
-
.add(
|
22
|
-
opts.merge(
|
23
|
-
'ShipFromAddress' => ship_from_address,
|
24
|
-
'InboundShipmentPlanRequestItems' => inbound_shipment_plan_request_items
|
25
|
-
)
|
26
|
-
)
|
27
|
-
.structure!('InboundShipmentPlanRequestItems', 'member')
|
28
|
-
|
29
|
-
run
|
30
|
-
end
|
31
|
-
|
32
|
-
# Creates an inbound shipment
|
33
|
-
#
|
34
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_CreateInboundShipment.html
|
35
|
-
# @param shipment_id [String]
|
36
|
-
# @param inbound_shipment_header [Struct, Hash]
|
37
|
-
# @param opts [Hash]
|
38
|
-
# @option opts [Array<Struct, Hash>] :inbound_shipment_items
|
39
|
-
# @return [Peddler::XMLParser]
|
40
|
-
def create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
|
41
|
-
operation('CreateInboundShipment')
|
42
|
-
.add(
|
43
|
-
opts.merge(
|
44
|
-
'ShipmentId' => shipment_id,
|
45
|
-
'InboundShipmentHeader' => inbound_shipment_header
|
46
|
-
)
|
47
|
-
)
|
48
|
-
.structure!('InboundShipmentItems', 'member')
|
49
|
-
|
50
|
-
run
|
51
|
-
end
|
52
|
-
|
53
|
-
# Updates an existing inbound shipment
|
54
|
-
#
|
55
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_UpdateInboundShipment.html
|
56
|
-
# @param shipment_id [String]
|
57
|
-
# @param inbound_shipment_header [Struct, Hash]
|
58
|
-
# @param opts [Hash]
|
59
|
-
# @option opts [Array<Struct, Hash>] :inbound_shipment_items
|
60
|
-
# @return [Peddler::XMLParser]
|
61
|
-
def update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {})
|
62
|
-
operation('UpdateInboundShipment')
|
63
|
-
.add(
|
64
|
-
opts.merge(
|
65
|
-
'ShipmentId' => shipment_id,
|
66
|
-
'InboundShipmentHeader' => inbound_shipment_header
|
67
|
-
)
|
68
|
-
)
|
69
|
-
.structure!('InboundShipmentItems', 'member')
|
70
|
-
|
71
|
-
run
|
72
|
-
end
|
73
|
-
|
74
|
-
# Sends transportation information to Amazon about an inbound shipment
|
75
|
-
#
|
76
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_PutTransportContent.html
|
77
|
-
# @param shipment_id [String]
|
78
|
-
# @param is_partnered [Boolean]
|
79
|
-
# @param shipment_type [String]
|
80
|
-
# @param transport_details [Struct, Hash]
|
81
|
-
# @return [Peddler::XMLParser]
|
82
|
-
def put_transport_content(shipment_id, is_partnered, shipment_type, transport_details)
|
83
|
-
operation('PutTransportContent')
|
84
|
-
.add(
|
85
|
-
'ShipmentId' => shipment_id,
|
86
|
-
'IsPartnered' => is_partnered,
|
87
|
-
'ShipmentType' => shipment_type,
|
88
|
-
'TransportDetails' => transport_details
|
89
|
-
)
|
90
|
-
|
91
|
-
run
|
92
|
-
end
|
93
|
-
|
94
|
-
# Requests an estimate of the shipping cost for an inbound shipment
|
95
|
-
#
|
96
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_EstimateTransportRequest.html
|
97
|
-
# @param shipment_id [String]
|
98
|
-
# @return [Peddler::XMLParser]
|
99
|
-
def estimate_transport_request(shipment_id)
|
100
|
-
operation('EstimateTransportRequest').add('ShipmentId' => shipment_id)
|
101
|
-
run
|
102
|
-
end
|
103
|
-
|
104
|
-
# Returns current transportation information about an inbound shipment
|
105
|
-
#
|
106
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetTransportContent.html
|
107
|
-
# @param shipment_id [String]
|
108
|
-
# @return [Peddler::XMLParser]
|
109
|
-
def get_transport_content(shipment_id)
|
110
|
-
operation('GetTransportContent').add('ShipmentId' => shipment_id)
|
111
|
-
run
|
112
|
-
end
|
113
|
-
|
114
|
-
# Confirms that you accept the Amazon-partnered shipping estimate and you
|
115
|
-
# request that the Amazon-partnered carrier ship your inbound shipment
|
116
|
-
#
|
117
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ConfirmTransportRequest.html
|
118
|
-
# @param shipment_id [String]
|
119
|
-
# @return [Peddler::XMLParser]
|
120
|
-
def confirm_transport_request(shipment_id)
|
121
|
-
operation('ConfirmTransportRequest').add('ShipmentId' => shipment_id)
|
122
|
-
run
|
123
|
-
end
|
124
|
-
|
125
|
-
# Voids a previously-confirmed request to ship your inbound shipment using
|
126
|
-
# an Amazon-partnered carrier
|
127
|
-
#
|
128
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_VoidTransportRequest.html
|
129
|
-
# @param shipment_id [String]
|
130
|
-
# @return [Peddler::XMLParser]
|
131
|
-
def void_transport_request(shipment_id)
|
132
|
-
operation('VoidTransportRequest').add('ShipmentId' => shipment_id)
|
133
|
-
run
|
134
|
-
end
|
135
|
-
|
136
|
-
# Returns PDF document data for printing package labels for an inbound
|
137
|
-
# shipment
|
138
|
-
#
|
139
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetPackageLabels.html
|
140
|
-
# @param shipment_id [String]
|
141
|
-
# @param page_type [String]
|
142
|
-
# @param opts [Hash]
|
143
|
-
# @option opts [Integer] :number_of_packages
|
144
|
-
# @return [Peddler::XMLParser]
|
145
|
-
def get_package_labels(shipment_id, page_type, opts = {})
|
146
|
-
operation('GetPackageLabels')
|
147
|
-
.add(opts.merge(
|
148
|
-
'ShipmentId' => shipment_id,
|
149
|
-
'PageType' => page_type
|
150
|
-
))
|
151
|
-
|
152
|
-
run
|
153
|
-
end
|
154
|
-
|
155
|
-
# Returns PDF document data for printing a bill of lading for an inbound
|
156
|
-
# shipment
|
157
|
-
#
|
158
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_GetBillOfLading.html
|
159
|
-
# @param shipment_id [String]
|
160
|
-
# @return [Peddler::XMLParser]
|
161
|
-
def get_bill_of_lading(shipment_id)
|
162
|
-
operation('GetBillOfLading').add('ShipmentId' => shipment_id)
|
163
|
-
run
|
164
|
-
end
|
165
|
-
|
166
|
-
# Returns a list of inbound shipments based on criteria that you specify
|
167
|
-
#
|
168
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipments.html
|
169
|
-
# @param opts [Hash]
|
170
|
-
# @option opts [Array<String>] :shipment_status_list
|
171
|
-
# @option opts [Array<String>] :shipment_id_list
|
172
|
-
# @option opts [String, #iso8601] :last_updated_after
|
173
|
-
# @option opts [String, #iso8601] :last_updated_before
|
174
|
-
# @return [Peddler::XMLParser]
|
175
|
-
def list_inbound_shipments(opts = {})
|
176
|
-
operation('ListInboundShipments')
|
177
|
-
.add(opts)
|
178
|
-
.structure!('ShipmentStatusList', 'member')
|
179
|
-
.structure!('ShipmentIdList', 'member')
|
180
|
-
|
181
|
-
run
|
182
|
-
end
|
183
|
-
|
184
|
-
# Returns the next page of inbound shipments
|
185
|
-
#
|
186
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentsByNextToken.html
|
187
|
-
# @param next_token [String]
|
188
|
-
# @return [Peddler::XMLParser]
|
189
|
-
def list_inbound_shipments_by_next_token(next_token)
|
190
|
-
operation('ListInboundShipmentsByNextToken')
|
191
|
-
.add('NextToken' => next_token)
|
192
|
-
|
193
|
-
run
|
194
|
-
end
|
195
|
-
|
196
|
-
# Returns a list of items in a specified inbound shipment, or a list of
|
197
|
-
# items that were updated within a specified time frame
|
198
|
-
#
|
199
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItems.html
|
200
|
-
# @param opts [Hash]
|
201
|
-
# @option opts [String] :shipment_id
|
202
|
-
# @option opts [String, #iso8601] :last_updated_after
|
203
|
-
# @option opts [String, #iso8601] :last_updated_before
|
204
|
-
# @return [Peddler::XMLParser]
|
205
|
-
def list_inbound_shipment_items(opts = {})
|
206
|
-
operation('ListInboundShipmentItems').add(opts)
|
207
|
-
run
|
208
|
-
end
|
209
|
-
|
210
|
-
# Returns the next page of inbound shipment items
|
211
|
-
#
|
212
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/FBAInbound_ListInboundShipmentItemsByNextToken.html
|
213
|
-
# @param next_token [String]
|
214
|
-
# @return [Peddler::XMLParser]
|
215
|
-
def list_inbound_shipment_items_by_next_token(next_token)
|
216
|
-
operation('ListInboundShipmentItemsByNextToken')
|
217
|
-
.add('NextToken' => next_token)
|
218
|
-
|
219
|
-
run
|
220
|
-
end
|
221
|
-
|
222
|
-
# Gets the operational status of the API
|
223
|
-
#
|
224
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inbound/MWS_GetServiceStatus.html
|
225
|
-
# @return [Peddler::XMLParser]
|
226
|
-
def get_service_status
|
227
|
-
operation('GetServiceStatus')
|
228
|
-
run
|
229
|
-
end
|
230
|
-
end
|
231
|
-
end
|
1
|
+
require 'mws/fulfillment_inbound_shipment/client'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
module FulfillmentInventory
|
5
|
+
# The Fulfillment Inventory API can help you stay up-to-date on the
|
6
|
+
# availability of your inventory in the Amazon Fulfillment Network. The
|
7
|
+
# Fulfillment Inventory API reports real-time availability information for
|
8
|
+
# your Amazon Fulfillment Network inventory regardless of whether you are
|
9
|
+
# selling your inventory on Amazon's retail web site or through other retail
|
10
|
+
# channels.
|
11
|
+
class Client < ::Peddler::Client
|
12
|
+
path '/FulfillmentInventory/2010-10-01'
|
13
|
+
|
14
|
+
# Returns information about the availability of a seller's inventory
|
15
|
+
#
|
16
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
|
17
|
+
# @param opts [Hash]
|
18
|
+
# @option opts [Array<String>, String] :seller_skus
|
19
|
+
# @option opts [String, #iso8601] :query_start_date_time
|
20
|
+
# @option opts [String] :response_group
|
21
|
+
# @return [Peddler::XMLParser]
|
22
|
+
def list_inventory_supply(opts = {})
|
23
|
+
operation('ListInventorySupply')
|
24
|
+
.add(opts)
|
25
|
+
.structure!('SellerSkus', 'member')
|
26
|
+
|
27
|
+
run
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns the next page of information about the availability of a
|
31
|
+
# seller's inventory
|
32
|
+
#
|
33
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupplyByNextToken.html
|
34
|
+
# @param next_token [String]
|
35
|
+
# @return [Peddler::XMLParser]
|
36
|
+
def list_inventory_supply_by_next_token(next_token)
|
37
|
+
operation('ListInventorySupplyByNextToken')
|
38
|
+
.add('NextToken' => next_token)
|
39
|
+
|
40
|
+
run
|
41
|
+
end
|
42
|
+
|
43
|
+
# Gets the operational status of the API
|
44
|
+
#
|
45
|
+
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/MWS_GetServiceStatus.html
|
46
|
+
# @return [Peddler::XMLParser]
|
47
|
+
def get_service_status
|
48
|
+
operation('GetServiceStatus')
|
49
|
+
run
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -1,51 +1 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
module MWS
|
4
|
-
# The Fulfillment Inventory API can help you stay up-to-date on the
|
5
|
-
# availability of your inventory in the Amazon Fulfillment Network. The
|
6
|
-
# Fulfillment Inventory API reports real-time availability information for
|
7
|
-
# your Amazon Fulfillment Network inventory regardless of whether you are
|
8
|
-
# selling your inventory on Amazon's retail web site or through other retail
|
9
|
-
# channels.
|
10
|
-
class FulfillmentInventory < ::Peddler::Client
|
11
|
-
path '/FulfillmentInventory/2010-10-01'
|
12
|
-
|
13
|
-
# Returns information about the availability of a seller's inventory
|
14
|
-
#
|
15
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
|
16
|
-
# @param opts [Hash]
|
17
|
-
# @option opts [Array<String>, String] :seller_skus
|
18
|
-
# @option opts [String, #iso8601] :query_start_date_time
|
19
|
-
# @option opts [String] :response_group
|
20
|
-
# @return [Peddler::XMLParser]
|
21
|
-
def list_inventory_supply(opts = {})
|
22
|
-
operation('ListInventorySupply')
|
23
|
-
.add(opts)
|
24
|
-
.structure!('SellerSkus', 'member')
|
25
|
-
|
26
|
-
run
|
27
|
-
end
|
28
|
-
|
29
|
-
# Returns the next page of information about the availability of a seller's
|
30
|
-
# inventory
|
31
|
-
#
|
32
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupplyByNextToken.html
|
33
|
-
# @param next_token [String]
|
34
|
-
# @return [Peddler::XMLParser]
|
35
|
-
def list_inventory_supply_by_next_token(next_token)
|
36
|
-
operation('ListInventorySupplyByNextToken')
|
37
|
-
.add('NextToken' => next_token)
|
38
|
-
|
39
|
-
run
|
40
|
-
end
|
41
|
-
|
42
|
-
# Gets the operational status of the API
|
43
|
-
#
|
44
|
-
# @see http://docs.developer.amazonservices.com/en_US/fba_inventory/MWS_GetServiceStatus.html
|
45
|
-
# @return [Peddler::XMLParser]
|
46
|
-
def get_service_status
|
47
|
-
operation('GetServiceStatus')
|
48
|
-
run
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
1
|
+
require 'mws/fulfillment_inventory/client'
|