peddler 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 233e93c483e593d875c4a97767c0c8640aca7427
4
- data.tar.gz: 86e73921f108f7626929a4bc81f3f217e7f83f51
3
+ metadata.gz: cad0d772cd32087cb891849c040fb161ad9fc36b
4
+ data.tar.gz: 2aba24f68a6c1f9e7af5edcc28e01771410380e2
5
5
  SHA512:
6
- metadata.gz: 5b835edc32f9885a86f355925f989cfe500e1687a9f2735b4952503ec9f5ad84050bbb4ea027790b346c78a642e1b8f0ddfe5a1808990bb8e205f7f7b8517abe
7
- data.tar.gz: 8a2d781a5f3b3050daff127f2123d76caa75d8c7d84c295a56d65277fa8b155cf0a06ac18cdd1fcb7f7a0b2e9c8cb12313a075c40d4dbd8903fc85f36ca9a6b1
6
+ metadata.gz: d441e1b485e7f5a3da527074010004b187eb054cf53497d59109be8747f4a5bdfed7fd9fcaa3ca9b4c7e200663f023458ddc7822478aea743a749b047d239e5d
7
+ data.tar.gz: 1ad7baacb964620e022288cd3ceab5a76014ae18f6d896c9d99b9e3fe165f3ea43407d836e2136f62779e40dcb52b9424ac02c461ec99b1df7f0cbe10acf2e95
@@ -20,7 +20,7 @@ module MWS
20
20
  self.body = feed_content
21
21
  operation('SubmitFeed')
22
22
  .add(opts.update('FeedType' => feed_type))
23
- .structure!('MarketplaceId', 'Id')
23
+ .structure!('MarketplaceIdList', 'Id')
24
24
 
25
25
  run
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Peddler
2
- VERSION = '0.12.1'
2
+ VERSION = '0.12.2'
3
3
  end
@@ -0,0 +1,51 @@
1
+ require 'test_helper'
2
+ require 'mws/feeds/client'
3
+
4
+ class TestFeedsClient < MiniTest::Test
5
+ def setup
6
+ @client = MWS::Feeds::Client.new
7
+ end
8
+
9
+ def test_submit_feed_has_marketplace_id_list
10
+ @client.stub(:run, nil) do
11
+ @client.marketplace_id = 'A1F83G8C2ARO7P'
12
+ @client.submit_feed('content', 'type', marketplace_id_list: '1')
13
+ @client.operation.key?('MarketplaceIdList.Id.1')
14
+ end
15
+ end
16
+
17
+ def test_get_feed_submission_list_has_feed_submission_id_list
18
+ @client.stub(:run, nil) do
19
+ @client.get_feed_submission_list(feed_submission_id_list: '1')
20
+ @client.operation.key?('FeedSubmissionIdList.Status.1')
21
+ end
22
+ end
23
+
24
+ def test_get_feed_submission_list_has_feed_type_list
25
+ @client.stub(:run, nil) do
26
+ @client.get_feed_submission_list(feed_type_list: '1')
27
+ @client.operation.key?('FeedTypeList.Type.1')
28
+ end
29
+ end
30
+
31
+ def test_get_feed_submission_list_has_feed_processing_status_list
32
+ @client.stub(:run, nil) do
33
+ @client.get_feed_submission_list(feed_processing_status_list: '1')
34
+ @client.operation.key?('FeedProcessingStatusList.Status.1')
35
+ end
36
+ end
37
+
38
+ def test_get_feed_submission_count_has_feed_type_list
39
+ @client.stub(:run, nil) do
40
+ @client.get_feed_submission_count(feed_type_list: '1')
41
+ @client.operation.key?('FeedTypeList.Type.1')
42
+ end
43
+ end
44
+
45
+ def test_get_feed_submission_count_has_feed_processing_status_list
46
+ @client.stub(:run, nil) do
47
+ @client.get_feed_submission_count(feed_processing_status_list: '1')
48
+ @client.operation.key?('FeedProcessingStatusList.Status.1')
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,44 @@
1
+ require 'test_helper'
2
+ require 'mws/orders/client'
3
+
4
+ class TestOrdersClient < MiniTest::Test
5
+ def setup
6
+ @client = MWS::Orders::Client.new
7
+ end
8
+
9
+ def test_list_orders_has_marketplace_id
10
+ @client.stub(:run, nil) do
11
+ @client.list_orders(marketplace_id: '1')
12
+ @client.operation.key?('MarketplaceId.Id.1')
13
+ end
14
+ end
15
+
16
+ def test_list_orders_has_order_status
17
+ @client.stub(:run, nil) do
18
+ @client.list_orders(order_status: '1')
19
+ @client.operation.key?('OrderStatus.Status.1')
20
+ end
21
+ end
22
+
23
+ def test_list_orders_has_tfm_shipment_status
24
+ @client.stub(:run, nil) do
25
+ @client.list_orders(tfm_shipment_status: '1')
26
+ @client.operation.key?('TFMShipmentStatus.Status.1')
27
+ end
28
+ end
29
+
30
+ def test_list_orders_has_payment_method
31
+ @client.stub(:run, nil) do
32
+ @client.list_orders(payment_method: '1')
33
+ @client.operation.key?('PaymentMethod.1')
34
+ end
35
+ end
36
+
37
+ def test_get_order_has_amazon_order_ids
38
+ @client.stub(:run, nil) do
39
+ @client.get_order('1', '2')
40
+ @client.operation.key?('AmazonOrderId.Id.1')
41
+ @client.operation.key?('AmazonOrderId.Id.2')
42
+ end
43
+ end
44
+ end
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.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-06 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeff
@@ -102,7 +102,9 @@ files:
102
102
  - test/integration_test_helper.rb
103
103
  - test/mws.yml
104
104
  - test/test_helper.rb
105
+ - test/unit/mws/test_feeds_client.rb
105
106
  - test/unit/mws/test_off_amazon_payments_client.rb
107
+ - test/unit/mws/test_orders_client.rb
106
108
  - test/unit/mws/test_products_client.rb
107
109
  - test/unit/peddler/test_client.rb
108
110
  - test/unit/peddler/test_flat_file_parser.rb
@@ -168,7 +170,9 @@ test_files:
168
170
  - test/integration_test_helper.rb
169
171
  - test/mws.yml
170
172
  - test/test_helper.rb
173
+ - test/unit/mws/test_feeds_client.rb
171
174
  - test/unit/mws/test_off_amazon_payments_client.rb
175
+ - test/unit/mws/test_orders_client.rb
172
176
  - test/unit/mws/test_products_client.rb
173
177
  - test/unit/peddler/test_client.rb
174
178
  - test/unit/peddler/test_flat_file_parser.rb