peddler 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +15 -14
  4. data/lib/mws/cart_information/client.rb +72 -0
  5. data/lib/mws/cart_information.rb +1 -69
  6. data/lib/mws/customer_information/client.rb +79 -0
  7. data/lib/mws/customer_information.rb +1 -77
  8. data/lib/mws/feeds/client.rb +112 -0
  9. data/lib/mws/feeds.rb +1 -110
  10. data/lib/mws/fulfillment_inbound_shipment/client.rb +233 -0
  11. data/lib/mws/fulfillment_inbound_shipment.rb +1 -231
  12. data/lib/mws/fulfillment_inventory/client.rb +53 -0
  13. data/lib/mws/fulfillment_inventory.rb +1 -51
  14. data/lib/mws/fulfillment_outbound_shipment/client.rb +171 -0
  15. data/lib/mws/fulfillment_outbound_shipment.rb +1 -168
  16. data/lib/mws/off_amazon_payments/client.rb +362 -0
  17. data/lib/mws/off_amazon_payments.rb +1 -360
  18. data/lib/mws/orders/client.rb +102 -0
  19. data/lib/mws/orders.rb +1 -98
  20. data/lib/mws/products/client.rb +234 -0
  21. data/lib/mws/products.rb +1 -232
  22. data/lib/mws/recommendations/client.rb +71 -0
  23. data/lib/mws/recommendations.rb +1 -66
  24. data/lib/mws/reports/client.rb +220 -0
  25. data/lib/mws/reports.rb +1 -220
  26. data/lib/mws/sellers/client.rb +42 -0
  27. data/lib/mws/sellers.rb +1 -40
  28. data/lib/mws/subscriptions/client.rb +177 -0
  29. data/lib/mws/subscriptions.rb +1 -169
  30. data/lib/mws.rb +2 -2
  31. data/lib/peddler/client.rb +3 -3
  32. data/lib/peddler/flat_file_parser.rb +3 -3
  33. data/lib/peddler/operation.rb +2 -3
  34. data/lib/peddler/structured_list.rb +1 -3
  35. data/lib/peddler/version.rb +1 -1
  36. data/lib/peddler/xml_parser.rb +1 -1
  37. data/test/integration/test_cart_information.rb +2 -2
  38. data/test/integration/test_customer_information.rb +2 -2
  39. data/test/integration/test_feeds.rb +2 -2
  40. data/test/integration/test_fulfillment_inbound_shipment.rb +2 -2
  41. data/test/integration/test_fulfillment_inventory.rb +3 -7
  42. data/test/integration/test_fulfillment_outbound_shipment.rb +2 -49
  43. data/test/integration/test_off_amazon_payments.rb +2 -2
  44. data/test/integration/test_orders.rb +2 -13
  45. data/test/integration/test_products.rb +2 -2
  46. data/test/integration/test_recommendations.rb +2 -11
  47. data/test/integration/test_reports.rb +2 -3
  48. data/test/integration/test_sellers.rb +2 -9
  49. data/test/integration/test_subscriptions.rb +2 -2
  50. data/test/integration_test_helper.rb +49 -0
  51. data/test/mws.yml +16 -0
  52. data/test/mws.yml.bak +16 -0
  53. data/test/test_helper.rb +7 -0
  54. data/test/unit/mws/test_off_amazon_payments_client.rb +9 -0
  55. data/test/unit/mws/test_products_client.rb +9 -0
  56. data/test/unit/peddler/test_client.rb +2 -2
  57. data/test/unit/peddler/test_flat_file_parser.rb +2 -2
  58. data/test/unit/peddler/test_operation.rb +2 -2
  59. data/test/unit/peddler/test_parser.rb +2 -2
  60. data/test/unit/peddler/test_structured_list.rb +2 -2
  61. data/test/unit/peddler/test_xml_parser.rb +2 -2
  62. data/test/unit/test_mws.rb +3 -3
  63. data/test/vcr_cassettes/CartInformation.yml +37 -725
  64. data/test/vcr_cassettes/CustomerInformation.yml +37 -728
  65. data/test/vcr_cassettes/Feeds.yml +100 -528
  66. data/test/vcr_cassettes/FulfillmentInboundShipment.yml +39 -728
  67. data/test/vcr_cassettes/FulfillmentInventory.yml +96 -997
  68. data/test/vcr_cassettes/FulfillmentOutboundShipment.yml +39 -725
  69. data/test/vcr_cassettes/OffAmazonPayments.yml +36 -727
  70. data/test/vcr_cassettes/Orders.yml +38 -29855
  71. data/test/vcr_cassettes/Products.yml +1300 -3871
  72. data/test/vcr_cassettes/Recommendations.yml +8934 -15590
  73. data/test/vcr_cassettes/Reports.yml +288 -1326
  74. data/test/vcr_cassettes/Sellers.yml +38 -1178
  75. data/test/vcr_cassettes/Subscriptions.yml +244 -1066
  76. metadata +27 -98
  77. data/test/helper.rb +0 -3
  78. data/test/integration_helper.rb +0 -49
  79. data/test/mws.yml.1 +0 -32
  80. data/test/mws.yml.example +0 -4
  81. data/test/unit/mws/test_off_amazon_payments.rb +0 -9
  82. data/test/unit/mws/test_products.rb +0 -9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeff
@@ -38,90 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '5.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest-emoji
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: vcr
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: yard
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
41
  description: A Ruby interface to the Amazon MWS API
126
42
  email:
127
43
  - hakanensari@me.com
@@ -133,18 +49,31 @@ files:
133
49
  - README.md
134
50
  - lib/mws.rb
135
51
  - lib/mws/cart_information.rb
52
+ - lib/mws/cart_information/client.rb
136
53
  - lib/mws/customer_information.rb
54
+ - lib/mws/customer_information/client.rb
137
55
  - lib/mws/feeds.rb
56
+ - lib/mws/feeds/client.rb
138
57
  - lib/mws/fulfillment_inbound_shipment.rb
58
+ - lib/mws/fulfillment_inbound_shipment/client.rb
139
59
  - lib/mws/fulfillment_inventory.rb
60
+ - lib/mws/fulfillment_inventory/client.rb
140
61
  - lib/mws/fulfillment_outbound_shipment.rb
62
+ - lib/mws/fulfillment_outbound_shipment/client.rb
141
63
  - lib/mws/off_amazon_payments.rb
64
+ - lib/mws/off_amazon_payments/client.rb
142
65
  - lib/mws/orders.rb
66
+ - lib/mws/orders/client.rb
143
67
  - lib/mws/products.rb
68
+ - lib/mws/products/client.rb
144
69
  - lib/mws/recommendations.rb
70
+ - lib/mws/recommendations/client.rb
145
71
  - lib/mws/reports.rb
72
+ - lib/mws/reports/client.rb
146
73
  - lib/mws/sellers.rb
74
+ - lib/mws/sellers/client.rb
147
75
  - lib/mws/subscriptions.rb
76
+ - lib/mws/subscriptions/client.rb
148
77
  - lib/peddler.rb
149
78
  - lib/peddler/client.rb
150
79
  - lib/peddler/flat_file_parser.rb
@@ -153,7 +82,6 @@ files:
153
82
  - lib/peddler/structured_list.rb
154
83
  - lib/peddler/version.rb
155
84
  - lib/peddler/xml_parser.rb
156
- - test/helper.rb
157
85
  - test/integration/test_cart_information.rb
158
86
  - test/integration/test_customer_information.rb
159
87
  - test/integration/test_feeds.rb
@@ -167,12 +95,13 @@ files:
167
95
  - test/integration/test_reports.rb
168
96
  - test/integration/test_sellers.rb
169
97
  - test/integration/test_subscriptions.rb
170
- - test/integration_helper.rb
171
- - test/mws.yml.1
172
- - test/mws.yml.example
98
+ - test/integration_test_helper.rb
99
+ - test/mws.yml
100
+ - test/mws.yml.bak
173
101
  - test/mws.yml.mop
174
- - test/unit/mws/test_off_amazon_payments.rb
175
- - test/unit/mws/test_products.rb
102
+ - test/test_helper.rb
103
+ - test/unit/mws/test_off_amazon_payments_client.rb
104
+ - test/unit/mws/test_products_client.rb
176
105
  - test/unit/peddler/test_client.rb
177
106
  - test/unit/peddler/test_flat_file_parser.rb
178
107
  - test/unit/peddler/test_operation.rb
@@ -218,7 +147,6 @@ signing_key:
218
147
  specification_version: 4
219
148
  summary: Wraps the Amazon MWS APIs
220
149
  test_files:
221
- - test/helper.rb
222
150
  - test/integration/test_cart_information.rb
223
151
  - test/integration/test_customer_information.rb
224
152
  - test/integration/test_feeds.rb
@@ -232,12 +160,13 @@ test_files:
232
160
  - test/integration/test_reports.rb
233
161
  - test/integration/test_sellers.rb
234
162
  - test/integration/test_subscriptions.rb
235
- - test/integration_helper.rb
236
- - test/mws.yml.1
237
- - test/mws.yml.example
163
+ - test/integration_test_helper.rb
164
+ - test/mws.yml
165
+ - test/mws.yml.bak
238
166
  - test/mws.yml.mop
239
- - test/unit/mws/test_off_amazon_payments.rb
240
- - test/unit/mws/test_products.rb
167
+ - test/test_helper.rb
168
+ - test/unit/mws/test_off_amazon_payments_client.rb
169
+ - test/unit/mws/test_products_client.rb
241
170
  - test/unit/peddler/test_client.rb
242
171
  - test/unit/peddler/test_flat_file_parser.rb
243
172
  - test/unit/peddler/test_operation.rb
data/test/helper.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'minitest/emoji'
3
- require 'pry'
@@ -1,49 +0,0 @@
1
- require 'yaml'
2
- require 'vcr'
3
-
4
- require 'helper'
5
-
6
- VCR.configure do |c|
7
- c.hook_into :excon
8
- c.cassette_library_dir = 'test/vcr_cassettes'
9
-
10
- c.before_record do |interaction|
11
- interaction.ignore! if interaction.response.status.code >= 400
12
- end
13
-
14
- nondeterministic_params = %w(Signature Timestamp StartDate CreatedAfter QueryStartDateTime)
15
- matcher = VCR.request_matchers.uri_without_param(*nondeterministic_params)
16
- c.default_cassette_options = {
17
- match_requests_on: [:method, matcher],
18
- record: :new_episodes
19
- }
20
- end
21
-
22
- class IntegrationTest < MiniTest::Test
23
- def api_name
24
- self.class.name.match(/(.*)Test/)[1]
25
- end
26
-
27
- def clients
28
- accounts = begin
29
- YAML.load_file(File.expand_path('../mws.yml', __FILE__)).shuffle
30
- rescue Errno::ENOENT
31
- warn('Skipping integration tests')
32
- []
33
- end
34
-
35
- accounts.map do |account|
36
- MWS.const_get(api_name).new.configure do |c|
37
- account.each { |k, v| c.send("#{k}=", v) }
38
- end
39
- end
40
- end
41
-
42
- def setup
43
- ENV['LIVE'] ? VCR.turn_off! : VCR.insert_cassette(api_name)
44
- end
45
-
46
- def teardown
47
- VCR.eject_cassette if VCR.turned_on?
48
- end
49
- end
data/test/mws.yml.1 DELETED
@@ -1,32 +0,0 @@
1
- - marketplace_id: A2EUQ1WTGCTBG2
2
- aws_access_key_id: AKIAITHQMZUJROSOP27Q
3
- aws_secret_access_key: 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
4
- merchant_id: A2A7WNXBU01UJW
5
- - marketplace_id: A1PA6795UKMFR9
6
- aws_access_key_id: AKIAIORT7554FEBW7UBQ
7
- aws_secret_access_key: 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
8
- merchant_id: A7ZXDJZD3UIRG
9
- - marketplace_id: A1RKKUPIHCS9HS
10
- aws_access_key_id: AKIAI6X4QZRXSHGHABJA
11
- aws_secret_access_key: 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
12
- merchant_id: A2NEU7G6RGUKF
13
- - marketplace_id: A13V1IB3VIYZZH
14
- aws_access_key_id: AKIAI4ZNSD76DH7UBRDA
15
- aws_secret_access_key: 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
16
- merchant_id: A2DP6GIDYN6OTH
17
- - marketplace_id: A1F83G8C2ARO7P
18
- aws_access_key_id: AKIAJJDQ2MJTMPXKJE4A
19
- aws_secret_access_key: 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
20
- merchant_id: A2D9DZ30GEWP6N
21
- - marketplace_id: APJ6JRA9NG5V4
22
- aws_access_key_id: AKIAJLUHOXLR5S2L6A6A
23
- aws_secret_access_key: 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
24
- merchant_id: A2APQUVDBVWV7E
25
- - marketplace_id: A1VC38T7YXB528
26
- aws_access_key_id: AKIAJ5RDDSRROM6GXQ5Q
27
- aws_secret_access_key: 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
28
- merchant_id: A7BU5WGNVGQ1I
29
- - marketplace_id: ATVPDKIKX0DER
30
- aws_access_key_id: AKIAJ767ZET2BZR4UDDQ
31
- aws_secret_access_key: rONa3ydPBTJ5JD0bxERTOX0Fv0fBK6Q986/cfMRO
32
- merchant_id: A2H6NH4SQYFZ4M
data/test/mws.yml.example DELETED
@@ -1,4 +0,0 @@
1
- - marketplace_id: 123
2
- merchant_id: 123
3
- aws_access_key_id: 123
4
- aws_secret_access_key: 123
@@ -1,9 +0,0 @@
1
- require 'helper'
2
- require 'mws/products'
3
-
4
- class MWSOffAmazonPaymentsTest < MiniTest::Test
5
- def test_sandbox
6
- client = MWS::OffAmazonPayments.new(marketplace_id: 'A1F83G8C2ARO7P').sandbox
7
- assert_includes client.aws_endpoint, 'OffAmazonPayments_Sandbox'
8
- end
9
- end
@@ -1,9 +0,0 @@
1
- require 'helper'
2
- require 'mws/products'
3
-
4
- class MWSProductsTest < MiniTest::Test
5
- def test_operation_includes_marketplace_id
6
- client = MWS::Products.new
7
- assert client.operation('Foo').has_key?('MarketplaceId')
8
- end
9
- end