peddler 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/mws/fulfillment_inbound_shipment.rb +84 -0
- data/lib/mws/fulfillment_inventory.rb +20 -0
- data/lib/mws/fulfillment_outbound_shipment.rb +53 -0
- data/lib/mws/off_amazon_payments.rb +1 -1
- data/lib/peddler/client.rb +3 -1
- data/lib/peddler/flat_file_parser.rb +53 -0
- data/lib/peddler/parser.rb +15 -11
- data/lib/peddler/version.rb +1 -1
- data/test/integration/test_fulfillment_inbound_shipment.rb +11 -0
- data/test/integration/test_fulfillment_inventory.rb +11 -0
- data/test/integration/test_fulfillment_outbound_shipment.rb +11 -0
- data/test/unit/peddler/test_client.rb +1 -1
- data/test/unit/peddler/{test_csv_parser.rb → test_flat_file_parser.rb} +21 -3
- data/test/unit/peddler/test_xml_parser.rb +2 -2
- data/test/vcr_cassettes/FulfillmentInboundShipment.yml +369 -0
- data/test/vcr_cassettes/FulfillmentInventory.yml +369 -0
- data/test/vcr_cassettes/FulfillmentOutboundShipment.yml +370 -0
- data/test/vcr_cassettes/Reports.yml +6563 -0
- metadata +17 -5
- data/lib/peddler/csv_parser.rb +0 -42
@@ -0,0 +1,369 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://mws-eu.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAIORT7554FEBW7UBQ&Action=GetServiceStatus&SellerId=A7ZXDJZD3UIRG&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A51Z&Signature=ox%2B8%2F%2B8tOqkKFWFVzTsI81mxBk5Tm1sBTlH1yKPyJb4%3D
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
Date:
|
18
|
+
- Sun, 13 Apr 2014 21:05:52 GMT
|
19
|
+
Server:
|
20
|
+
- AmazonMWS
|
21
|
+
x-mws-request-id:
|
22
|
+
- fe4bb9eb-d668-4c4d-b6a0-a98fdbcfdcc2
|
23
|
+
x-mws-timestamp:
|
24
|
+
- '2014-04-13T21:05:52.110Z'
|
25
|
+
x-mws-response-context:
|
26
|
+
- fwrJQ9dYGmpHkaTBSBJ36KQjuVmOIMX1LjAylVsC8/b0vEM3UgNxXhUbP1z6+gm3uyPunEHxPQpH
|
27
|
+
hiCGXn7G1w==
|
28
|
+
Content-Type:
|
29
|
+
- text/xml
|
30
|
+
Content-Length:
|
31
|
+
- '390'
|
32
|
+
Vary:
|
33
|
+
- User-Agent
|
34
|
+
body:
|
35
|
+
encoding: UTF-8
|
36
|
+
string: |
|
37
|
+
<?xml version="1.0"?>
|
38
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
39
|
+
<GetServiceStatusResult>
|
40
|
+
<Status>GREEN</Status>
|
41
|
+
<Timestamp>2014-04-13T21:05:52.110Z</Timestamp>
|
42
|
+
</GetServiceStatusResult>
|
43
|
+
<ResponseMetadata>
|
44
|
+
<RequestId>fe4bb9eb-d668-4c4d-b6a0-a98fdbcfdcc2</RequestId>
|
45
|
+
</ResponseMetadata>
|
46
|
+
</GetServiceStatusResponse>
|
47
|
+
http_version:
|
48
|
+
recorded_at: Sun, 13 Apr 2014 21:05:52 GMT
|
49
|
+
- request:
|
50
|
+
method: post
|
51
|
+
uri: https://mws.amazonservices.ca/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAITHQMZUJROSOP27Q&Action=GetServiceStatus&SellerId=A2A7WNXBU01UJW&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A52Z&Signature=7jIu0XjtDtyyPNJTQXEHWG%2BQFKjdrZMfeAgFxr7fmxk%3D
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
User-Agent:
|
57
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 200
|
61
|
+
message:
|
62
|
+
headers:
|
63
|
+
Date:
|
64
|
+
- Sun, 13 Apr 2014 21:05:52 GMT
|
65
|
+
Server:
|
66
|
+
- AmazonMWS
|
67
|
+
x-mws-request-id:
|
68
|
+
- 58f0ca6d-95d7-4368-bf9e-561c093eccd7
|
69
|
+
x-mws-timestamp:
|
70
|
+
- '2014-04-13T21:05:52.946Z'
|
71
|
+
x-mws-response-context:
|
72
|
+
- tBnKoyGWM9rEVKUetjP9CSozU7yKnanytHU40kB/Ig5HsBX/DJxjyc7V1rPbNvlsi4q+SjUy578=
|
73
|
+
Content-Type:
|
74
|
+
- text/xml
|
75
|
+
Content-Length:
|
76
|
+
- '390'
|
77
|
+
Vary:
|
78
|
+
- User-Agent
|
79
|
+
body:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: |
|
82
|
+
<?xml version="1.0"?>
|
83
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
84
|
+
<GetServiceStatusResult>
|
85
|
+
<Status>GREEN</Status>
|
86
|
+
<Timestamp>2014-04-13T21:05:52.946Z</Timestamp>
|
87
|
+
</GetServiceStatusResult>
|
88
|
+
<ResponseMetadata>
|
89
|
+
<RequestId>58f0ca6d-95d7-4368-bf9e-561c093eccd7</RequestId>
|
90
|
+
</ResponseMetadata>
|
91
|
+
</GetServiceStatusResponse>
|
92
|
+
http_version:
|
93
|
+
recorded_at: Sun, 13 Apr 2014 21:05:53 GMT
|
94
|
+
- request:
|
95
|
+
method: post
|
96
|
+
uri: https://mws.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAJ767ZET2BZR4UDDQ&Action=GetServiceStatus&SellerId=A2H6NH4SQYFZ4M&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A53Z&Signature=pIwvSqCq1pDwkfAKkSzcPsk2q9ioUpPgNcehze9kvf4%3D
|
97
|
+
body:
|
98
|
+
encoding: US-ASCII
|
99
|
+
string: ''
|
100
|
+
headers:
|
101
|
+
User-Agent:
|
102
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
103
|
+
response:
|
104
|
+
status:
|
105
|
+
code: 200
|
106
|
+
message:
|
107
|
+
headers:
|
108
|
+
Date:
|
109
|
+
- Sun, 13 Apr 2014 21:05:52 GMT
|
110
|
+
Server:
|
111
|
+
- AmazonMWS
|
112
|
+
x-mws-request-id:
|
113
|
+
- 872607aa-7f2d-47e2-9d91-2e27633bdd6d
|
114
|
+
x-mws-timestamp:
|
115
|
+
- '2014-04-13T21:05:53.373Z'
|
116
|
+
x-mws-response-context:
|
117
|
+
- CC4iNteLh3p+T3SdBPVahvq761obARrzMMC7EZ2TsEK66i2mBQ70F9kwXt2vSHxoSF8U9w6YN9I=
|
118
|
+
Content-Type:
|
119
|
+
- text/xml
|
120
|
+
Content-Length:
|
121
|
+
- '390'
|
122
|
+
Vary:
|
123
|
+
- User-Agent
|
124
|
+
body:
|
125
|
+
encoding: UTF-8
|
126
|
+
string: |
|
127
|
+
<?xml version="1.0"?>
|
128
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
129
|
+
<GetServiceStatusResult>
|
130
|
+
<Status>GREEN</Status>
|
131
|
+
<Timestamp>2014-04-13T21:05:53.373Z</Timestamp>
|
132
|
+
</GetServiceStatusResult>
|
133
|
+
<ResponseMetadata>
|
134
|
+
<RequestId>872607aa-7f2d-47e2-9d91-2e27633bdd6d</RequestId>
|
135
|
+
</ResponseMetadata>
|
136
|
+
</GetServiceStatusResponse>
|
137
|
+
http_version:
|
138
|
+
recorded_at: Sun, 13 Apr 2014 21:05:53 GMT
|
139
|
+
- request:
|
140
|
+
method: post
|
141
|
+
uri: https://mws.amazonservices.jp/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAJ5RDDSRROM6GXQ5Q&Action=GetServiceStatus&SellerId=A7BU5WGNVGQ1I&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A53Z&Signature=QmrZdrrYPE4C50SmX0o6RQeZX%2F%2BGvPgRCsZ5URbrfa8%3D
|
142
|
+
body:
|
143
|
+
encoding: US-ASCII
|
144
|
+
string: ''
|
145
|
+
headers:
|
146
|
+
User-Agent:
|
147
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
148
|
+
response:
|
149
|
+
status:
|
150
|
+
code: 200
|
151
|
+
message:
|
152
|
+
headers:
|
153
|
+
Date:
|
154
|
+
- Sun, 13 Apr 2014 21:05:53 GMT
|
155
|
+
Server:
|
156
|
+
- AmazonMWS
|
157
|
+
x-mws-request-id:
|
158
|
+
- b603f4a9-b31a-4f5d-b40d-386be9cb2905
|
159
|
+
x-mws-timestamp:
|
160
|
+
- '2014-04-13T21:05:54.117Z'
|
161
|
+
x-mws-response-context:
|
162
|
+
- 2uOlskyOMO44KVKQyKqVbYCgdVdI/sja/ZbjjvGEmOhnoPvJExqp7kX4JYUXu9we5Ur5I1mk8RxI
|
163
|
+
3POPcK4dKA==
|
164
|
+
Content-Type:
|
165
|
+
- text/xml
|
166
|
+
Content-Length:
|
167
|
+
- '390'
|
168
|
+
Vary:
|
169
|
+
- User-Agent
|
170
|
+
body:
|
171
|
+
encoding: UTF-8
|
172
|
+
string: |
|
173
|
+
<?xml version="1.0"?>
|
174
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
175
|
+
<GetServiceStatusResult>
|
176
|
+
<Status>GREEN</Status>
|
177
|
+
<Timestamp>2014-04-13T21:05:54.117Z</Timestamp>
|
178
|
+
</GetServiceStatusResult>
|
179
|
+
<ResponseMetadata>
|
180
|
+
<RequestId>b603f4a9-b31a-4f5d-b40d-386be9cb2905</RequestId>
|
181
|
+
</ResponseMetadata>
|
182
|
+
</GetServiceStatusResponse>
|
183
|
+
http_version:
|
184
|
+
recorded_at: Sun, 13 Apr 2014 21:05:54 GMT
|
185
|
+
- request:
|
186
|
+
method: post
|
187
|
+
uri: https://mws-eu.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAI6X4QZRXSHGHABJA&Action=GetServiceStatus&SellerId=A2NEU7G6RGUKF&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A54Z&Signature=FIx3BWBmP1SVvG%2B3OLlefNIFawIXHafQxOPqcjeiSRA%3D
|
188
|
+
body:
|
189
|
+
encoding: US-ASCII
|
190
|
+
string: ''
|
191
|
+
headers:
|
192
|
+
User-Agent:
|
193
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
194
|
+
response:
|
195
|
+
status:
|
196
|
+
code: 200
|
197
|
+
message:
|
198
|
+
headers:
|
199
|
+
Date:
|
200
|
+
- Sun, 13 Apr 2014 21:05:54 GMT
|
201
|
+
Server:
|
202
|
+
- AmazonMWS
|
203
|
+
x-mws-request-id:
|
204
|
+
- 965356cd-57b8-46c8-a307-c40ac8ce6508
|
205
|
+
x-mws-timestamp:
|
206
|
+
- '2014-04-13T21:05:54.332Z'
|
207
|
+
x-mws-response-context:
|
208
|
+
- rC/wBIK5wpp9eOFJUhR3YOm/oaeXTYZQiJGSxyr62/9S+BBikqWE+0kXXw9yzhAS5vEHGzn+X3u6
|
209
|
+
jNO5pTEZBA==
|
210
|
+
Content-Type:
|
211
|
+
- text/xml
|
212
|
+
Content-Length:
|
213
|
+
- '390'
|
214
|
+
Vary:
|
215
|
+
- User-Agent
|
216
|
+
body:
|
217
|
+
encoding: UTF-8
|
218
|
+
string: |
|
219
|
+
<?xml version="1.0"?>
|
220
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
221
|
+
<GetServiceStatusResult>
|
222
|
+
<Status>GREEN</Status>
|
223
|
+
<Timestamp>2014-04-13T21:05:54.332Z</Timestamp>
|
224
|
+
</GetServiceStatusResult>
|
225
|
+
<ResponseMetadata>
|
226
|
+
<RequestId>965356cd-57b8-46c8-a307-c40ac8ce6508</RequestId>
|
227
|
+
</ResponseMetadata>
|
228
|
+
</GetServiceStatusResponse>
|
229
|
+
http_version:
|
230
|
+
recorded_at: Sun, 13 Apr 2014 21:05:54 GMT
|
231
|
+
- request:
|
232
|
+
method: post
|
233
|
+
uri: https://mws-eu.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAJLUHOXLR5S2L6A6A&Action=GetServiceStatus&SellerId=A2APQUVDBVWV7E&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A54Z&Signature=XmZ5dEJOLHLZHI7imUkE57QKWfbXVYLG0qWS8cAtBXw%3D
|
234
|
+
body:
|
235
|
+
encoding: US-ASCII
|
236
|
+
string: ''
|
237
|
+
headers:
|
238
|
+
User-Agent:
|
239
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
240
|
+
response:
|
241
|
+
status:
|
242
|
+
code: 200
|
243
|
+
message:
|
244
|
+
headers:
|
245
|
+
Date:
|
246
|
+
- Sun, 13 Apr 2014 21:05:54 GMT
|
247
|
+
Server:
|
248
|
+
- AmazonMWS
|
249
|
+
x-mws-request-id:
|
250
|
+
- a71bc5cd-f5e6-4276-8853-1103e3cd5791
|
251
|
+
x-mws-timestamp:
|
252
|
+
- '2014-04-13T21:05:54.474Z'
|
253
|
+
x-mws-response-context:
|
254
|
+
- sgyymAkxGWmZwPD3Yej46EiBuEozeXbBBnwRKMic7NLkI+icjYMow42K79PW2HlQhBiM6nHA+IsO
|
255
|
+
lC1e1nnREA==
|
256
|
+
Content-Type:
|
257
|
+
- text/xml
|
258
|
+
Content-Length:
|
259
|
+
- '390'
|
260
|
+
Vary:
|
261
|
+
- User-Agent
|
262
|
+
body:
|
263
|
+
encoding: UTF-8
|
264
|
+
string: |
|
265
|
+
<?xml version="1.0"?>
|
266
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
267
|
+
<GetServiceStatusResult>
|
268
|
+
<Status>GREEN</Status>
|
269
|
+
<Timestamp>2014-04-13T21:05:54.474Z</Timestamp>
|
270
|
+
</GetServiceStatusResult>
|
271
|
+
<ResponseMetadata>
|
272
|
+
<RequestId>a71bc5cd-f5e6-4276-8853-1103e3cd5791</RequestId>
|
273
|
+
</ResponseMetadata>
|
274
|
+
</GetServiceStatusResponse>
|
275
|
+
http_version:
|
276
|
+
recorded_at: Sun, 13 Apr 2014 21:05:54 GMT
|
277
|
+
- request:
|
278
|
+
method: post
|
279
|
+
uri: https://mws-eu.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAJJDQ2MJTMPXKJE4A&Action=GetServiceStatus&SellerId=A2D9DZ30GEWP6N&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A54Z&Signature=%2BH%2Fj8OwIRmkq8XI2tKaJOxumtV4uOkBhKATYn6zjbFs%3D
|
280
|
+
body:
|
281
|
+
encoding: US-ASCII
|
282
|
+
string: ''
|
283
|
+
headers:
|
284
|
+
User-Agent:
|
285
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
286
|
+
response:
|
287
|
+
status:
|
288
|
+
code: 200
|
289
|
+
message:
|
290
|
+
headers:
|
291
|
+
Date:
|
292
|
+
- Sun, 13 Apr 2014 21:05:54 GMT
|
293
|
+
Server:
|
294
|
+
- AmazonMWS
|
295
|
+
x-mws-request-id:
|
296
|
+
- 999c8eae-264c-4e63-aad8-7e7083cbedf3
|
297
|
+
x-mws-timestamp:
|
298
|
+
- '2014-04-13T21:05:54.620Z'
|
299
|
+
x-mws-response-context:
|
300
|
+
- opJV7lfwbklyBBL/eC7XJ/mSouGc1L2FuTi6BYeIAFdvTftvUIYhgf5M1gP7eWLiJl5H6pOvEjTL
|
301
|
+
Dlb5tGDvww==
|
302
|
+
Content-Type:
|
303
|
+
- text/xml
|
304
|
+
Content-Length:
|
305
|
+
- '390'
|
306
|
+
Vary:
|
307
|
+
- User-Agent
|
308
|
+
body:
|
309
|
+
encoding: UTF-8
|
310
|
+
string: |
|
311
|
+
<?xml version="1.0"?>
|
312
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
313
|
+
<GetServiceStatusResult>
|
314
|
+
<Status>GREEN</Status>
|
315
|
+
<Timestamp>2014-04-13T21:05:54.620Z</Timestamp>
|
316
|
+
</GetServiceStatusResult>
|
317
|
+
<ResponseMetadata>
|
318
|
+
<RequestId>999c8eae-264c-4e63-aad8-7e7083cbedf3</RequestId>
|
319
|
+
</ResponseMetadata>
|
320
|
+
</GetServiceStatusResponse>
|
321
|
+
http_version:
|
322
|
+
recorded_at: Sun, 13 Apr 2014 21:05:54 GMT
|
323
|
+
- request:
|
324
|
+
method: post
|
325
|
+
uri: https://mws-eu.amazonservices.com/FulfillmentInboundShipment/2010-10-01?AWSAccessKeyId=AKIAI4ZNSD76DH7UBRDA&Action=GetServiceStatus&SellerId=A2DP6GIDYN6OTH&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2014-04-13T21%3A05%3A54Z&Signature=k%2FxixVj28htbQwGg3qY6UmYqy7kmf3YsqHvhSs7mnGA%3D
|
326
|
+
body:
|
327
|
+
encoding: US-ASCII
|
328
|
+
string: ''
|
329
|
+
headers:
|
330
|
+
User-Agent:
|
331
|
+
- Jeff/1.0.1 (Language=Ruby; Hakans-MacBook-Pro.local)
|
332
|
+
response:
|
333
|
+
status:
|
334
|
+
code: 200
|
335
|
+
message:
|
336
|
+
headers:
|
337
|
+
Date:
|
338
|
+
- Sun, 13 Apr 2014 21:05:54 GMT
|
339
|
+
Server:
|
340
|
+
- AmazonMWS
|
341
|
+
x-mws-request-id:
|
342
|
+
- 1856f937-13b4-41aa-acba-33f95e2984f0
|
343
|
+
x-mws-timestamp:
|
344
|
+
- '2014-04-13T21:05:54.777Z'
|
345
|
+
x-mws-response-context:
|
346
|
+
- vyHlJ0Giv+G/15DwnuzohK9Ox/3T3rPIJKdnd5rhwN5XWnyA4pG9tpEas+hpEGgP+unl2Wp8d9Re
|
347
|
+
BSvqixrSWw==
|
348
|
+
Content-Type:
|
349
|
+
- text/xml
|
350
|
+
Content-Length:
|
351
|
+
- '390'
|
352
|
+
Vary:
|
353
|
+
- User-Agent
|
354
|
+
body:
|
355
|
+
encoding: UTF-8
|
356
|
+
string: |
|
357
|
+
<?xml version="1.0"?>
|
358
|
+
<GetServiceStatusResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
|
359
|
+
<GetServiceStatusResult>
|
360
|
+
<Status>GREEN</Status>
|
361
|
+
<Timestamp>2014-04-13T21:05:54.777Z</Timestamp>
|
362
|
+
</GetServiceStatusResult>
|
363
|
+
<ResponseMetadata>
|
364
|
+
<RequestId>1856f937-13b4-41aa-acba-33f95e2984f0</RequestId>
|
365
|
+
</ResponseMetadata>
|
366
|
+
</GetServiceStatusResponse>
|
367
|
+
http_version:
|
368
|
+
recorded_at: Sun, 13 Apr 2014 21:05:54 GMT
|
369
|
+
recorded_with: VCR 2.9.0
|