peddler 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +237 -8
- data/lib/mws/feeds.rb +1 -0
- data/lib/mws/feeds/client.rb +97 -0
- data/lib/mws/feeds/parsers/feed.rb +14 -0
- data/lib/mws/feeds/parsers/feed_submission.rb +25 -0
- data/lib/mws/feeds/parsers/feed_submission_count.rb +13 -0
- data/lib/mws/feeds/parsers/feed_submission_list.rb +20 -0
- data/lib/mws/feeds/parsers/feed_submission_result.rb +10 -0
- data/lib/mws/feeds/parsers/feed_submissions.rb +18 -0
- data/lib/mws/feeds/requests/feed.rb +38 -0
- data/lib/mws/feeds/requests/feed_submission_count.rb +20 -0
- data/lib/mws/feeds/requests/feed_submission_list.rb +28 -0
- data/lib/mws/feeds/requests/feed_submission_result.rb +18 -0
- data/lib/mws/feeds/requests/feed_submissions.rb +20 -0
- data/lib/mws/fulfillment_inbound_shipment/client.rb +7 -0
- data/lib/mws/fulfillment_inventory/client.rb +7 -0
- data/lib/mws/fulfillment_outbound_shipment/client.rb +7 -0
- data/lib/mws/off_amazon_payments/client.rb +7 -0
- data/lib/mws/orders.rb +1 -0
- data/lib/mws/orders/client.rb +88 -0
- data/lib/mws/orders/parsers/invoice_data.rb +25 -0
- data/lib/mws/orders/parsers/order.rb +113 -0
- data/lib/mws/orders/parsers/order_item.rb +110 -0
- data/lib/mws/orders/parsers/order_items.rb +20 -0
- data/lib/mws/orders/parsers/orders.rb +20 -0
- data/lib/mws/orders/parsers/payment_execution_detail.rb +20 -0
- data/lib/mws/orders/parsers/payment_execution_detail_item.rb +17 -0
- data/lib/mws/orders/parsers/service_status.rb +36 -0
- data/lib/mws/orders/parsers/service_status_message.rb +17 -0
- data/lib/mws/orders/parsers/shipping_address.rb +37 -0
- data/lib/mws/orders/requests/order_items.rb +26 -0
- data/lib/mws/orders/requests/orders.rb +39 -0
- data/lib/mws/orders/requests/service_status.rb +15 -0
- data/lib/mws/products/client.rb +7 -0
- data/lib/mws/recommendations/client.rb +7 -0
- data/lib/mws/reports/client.rb +6 -0
- data/lib/mws/sellers/client.rb +7 -0
- data/lib/mws/subscriptions/client.rb +7 -0
- data/lib/peddler.rb +11 -1
- data/lib/peddler/client.rb +62 -0
- data/lib/peddler/parsers/base.rb +15 -0
- data/lib/peddler/parsers/collection.rb +23 -0
- data/lib/peddler/parsers/model.rb +43 -0
- data/lib/peddler/parsers/text.rb +13 -0
- data/lib/peddler/parsers/xml.rb +25 -0
- data/lib/peddler/request.rb +50 -0
- data/lib/peddler/request/parameters.rb +56 -0
- data/lib/peddler/request/structured_list.rb +43 -0
- data/lib/peddler/response_wrapper.rb +32 -0
- data/lib/peddler/version.rb +1 -1
- data/test/fixtures/feeds/feed_submission.xml +14 -0
- data/test/fixtures/feeds/feed_submission_count.xml +9 -0
- data/test/fixtures/feeds/feed_submission_list.xml +17 -0
- data/test/fixtures/feeds/feed_submissions.xml +15 -0
- data/test/fixtures/mws.yml +8 -0
- data/test/fixtures/mws.yml.example +4 -0
- data/test/fixtures/orders/order_items.xml +83 -0
- data/test/fixtures/orders/orders.xml +109 -0
- data/test/fixtures/orders/service_status.xml +19 -0
- data/test/helper.rb +5 -0
- data/test/integration/feeds/test_feed_submission_count.rb +13 -0
- data/test/integration/feeds/test_feed_submission_list.rb +15 -0
- data/test/integration/feeds/test_feed_submission_result.rb +15 -0
- data/test/integration/orders/test_order_items.rb +19 -0
- data/test/integration/orders/test_orders.rb +20 -0
- data/test/integration/orders/test_service_status.rb +12 -0
- data/test/integration_helper.rb +16 -0
- data/test/mws/feeds/parsers/test_feed.rb +13 -0
- data/test/mws/feeds/parsers/test_feed_submission.rb +25 -0
- data/test/mws/feeds/parsers/test_feed_submission_count.rb +13 -0
- data/test/mws/feeds/parsers/test_feed_submission_list.rb +14 -0
- data/test/mws/feeds/parsers/test_feed_submission_result.rb +13 -0
- data/test/mws/feeds/parsers/test_feed_submissions.rb +17 -0
- data/test/mws/feeds/requests/test_feed.rb +63 -0
- data/test/mws/feeds/requests/test_feed_submission_count.rb +23 -0
- data/test/mws/feeds/requests/test_feed_submission_list.rb +40 -0
- data/test/mws/feeds/requests/test_feed_submissions.rb +29 -0
- data/test/mws/orders/parsers/test_order.rb +86 -0
- data/test/mws/orders/parsers/test_order_item.rb +69 -0
- data/test/mws/orders/parsers/test_order_items.rb +14 -0
- data/test/mws/orders/parsers/test_orders.rb +14 -0
- data/test/mws/orders/parsers/test_payment_execution_detail.rb +14 -0
- data/test/mws/orders/parsers/test_payment_execution_detail_item.rb +17 -0
- data/test/mws/orders/parsers/test_service_status.rb +39 -0
- data/test/mws/orders/parsers/test_service_status_message.rb +17 -0
- data/test/mws/orders/parsers/test_shipping_address.rb +36 -0
- data/test/mws/orders/requests/test_order_items.rb +39 -0
- data/test/mws/orders/requests/test_orders.rb +49 -0
- data/test/mws/orders/requests/test_service_status.rb +25 -0
- data/test/parser_helper.rb +11 -0
- data/test/peddler/parsers/test_collection.rb +8 -0
- data/test/peddler/parsers/test_model.rb +34 -0
- data/test/peddler/request/test_parameters.rb +35 -0
- data/test/peddler/request/test_structured_list.rb +18 -0
- data/test/peddler/test_client.rb +42 -0
- data/test/request_helper.rb +20 -0
- metadata +213 -10
- data/lib/peddler/apis.rb +0 -45
- data/lib/peddler/service.rb +0 -83
- data/test/service_test.rb +0 -42
- data/test/test_helper.rb +0 -3
data/test/service_test.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require_relative 'test_helper'
|
2
|
-
|
3
|
-
class ServiceTest < MiniTest::Test
|
4
|
-
def setup
|
5
|
-
@klass = Class.new(Peddler::Service)
|
6
|
-
@service = @klass.new('US', 'key', 'secret', 'seller_id')
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_configures_path
|
10
|
-
@klass.path('Foo')
|
11
|
-
assert @service.endpoint.match(/Foo$/)
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_has_user_agent
|
15
|
-
refute @service.connection.data[:headers].empty?
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_gets_marketplace_ids
|
19
|
-
refute_equal @service.marketplace_id('US'), @service.marketplace_id('GB')
|
20
|
-
end
|
21
|
-
|
22
|
-
def test_inherits_parent_params
|
23
|
-
assert_equal Peddler::Service.params, @klass.params
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_inherits_parent_path
|
27
|
-
@klass.path 'foo'
|
28
|
-
assert_equal @klass.path, Class.new(@klass).path
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_defines_constants_on_service
|
32
|
-
refute_nil @klass.const_get(:HOSTS)
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_has_a_key
|
36
|
-
refute_nil @service.aws_access_key_id
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_has_a_secret
|
40
|
-
refute_nil @service.aws_secret_access_key
|
41
|
-
end
|
42
|
-
end
|
data/test/test_helper.rb
DELETED