peddler 0.6.5 → 0.7.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 +62 -81
- data/lib/mws/cart_information.rb +13 -0
- data/lib/mws/customer_information.rb +16 -0
- data/lib/mws/feeds.rb +110 -1
- data/lib/mws/fulfillment_inbound_shipment.rb +13 -1
- data/lib/mws/fulfillment_inventory.rb +15 -1
- data/lib/mws/fulfillment_outbound_shipment.rb +17 -1
- data/lib/mws/off_amazon_payments.rb +15 -1
- data/lib/mws/orders.rb +100 -1
- data/lib/mws/products.rb +238 -1
- data/lib/mws/recommendations.rb +13 -1
- data/lib/mws/reports.rb +221 -1
- data/lib/mws/sellers.rb +40 -1
- data/lib/mws/subscriptions.rb +175 -1
- data/lib/peddler/client.rb +77 -37
- data/lib/peddler/csv_parser.rb +42 -0
- data/lib/peddler/operation.rb +44 -0
- data/lib/peddler/parser.rb +21 -0
- data/lib/peddler/structured_list.rb +22 -0
- data/lib/peddler/version.rb +1 -1
- data/lib/peddler/xml_parser.rb +25 -0
- data/lib/peddler.rb +2 -0
- data/test/helper.rb +1 -1
- data/test/integration/test_feeds.rb +18 -0
- data/test/integration/test_orders.rb +22 -0
- data/test/integration/test_products.rb +53 -0
- data/test/integration/test_reports.rb +47 -0
- data/test/integration/test_sellers.rb +18 -0
- data/test/integration/test_subscriptions.rb +26 -0
- data/test/integration_helper.rb +41 -8
- data/test/mws.yml +32 -0
- data/test/mws.yml.example +4 -0
- data/test/unit/peddler/test_client.rb +97 -0
- data/test/unit/peddler/test_csv_parser.rb +24 -0
- data/test/unit/peddler/test_operation.rb +34 -0
- data/test/{peddler/request → unit/peddler}/test_structured_list.rb +5 -5
- data/test/unit/peddler/test_xml_parser.rb +19 -0
- data/test/{test_peddler.rb → unit/test_peddler.rb} +2 -2
- data/test/vcr_cassettes/Feeds.yml +695 -0
- data/test/vcr_cassettes/Orders.yml +29855 -0
- data/test/vcr_cassettes/Products.yml +8597 -0
- data/test/vcr_cassettes/Reports.yml +1881 -0
- data/test/vcr_cassettes/Sellers.yml +697 -0
- data/test/vcr_cassettes/Subscriptions.yml +1369 -0
- metadata +91 -297
- data/lib/mws/feeds/client.rb +0 -116
- data/lib/mws/feeds/parsers/feed.rb +0 -14
- data/lib/mws/feeds/parsers/feed_submission_count.rb +0 -10
- data/lib/mws/feeds/parsers/feed_submission_info.rb +0 -25
- data/lib/mws/feeds/parsers/feed_submission_list.rb +0 -23
- data/lib/mws/feeds/parsers/feed_submission_result.rb +0 -10
- data/lib/mws/feeds/parsers/feed_submissions.rb +0 -18
- data/lib/mws/feeds/requests/feed.rb +0 -38
- data/lib/mws/feeds/requests/feed_submission_count.rb +0 -20
- data/lib/mws/feeds/requests/feed_submission_list.rb +0 -30
- data/lib/mws/feeds/requests/feed_submission_result.rb +0 -18
- data/lib/mws/feeds/requests/feed_submissions.rb +0 -20
- data/lib/mws/fulfillment_inbound_shipment/client.rb +0 -7
- data/lib/mws/fulfillment_inventory/client.rb +0 -7
- data/lib/mws/fulfillment_outbound_shipment/client.rb +0 -7
- data/lib/mws/off_amazon_payments/client.rb +0 -7
- data/lib/mws/orders/client.rb +0 -98
- data/lib/mws/orders/parsers/invoice_data.rb +0 -25
- data/lib/mws/orders/parsers/order.rb +0 -113
- data/lib/mws/orders/parsers/order_item.rb +0 -110
- data/lib/mws/orders/parsers/order_items.rb +0 -23
- data/lib/mws/orders/parsers/orders.rb +0 -23
- data/lib/mws/orders/parsers/payment_execution_detail.rb +0 -20
- data/lib/mws/orders/parsers/payment_execution_detail_item.rb +0 -17
- data/lib/mws/orders/parsers/service_status.rb +0 -36
- data/lib/mws/orders/parsers/service_status_message.rb +0 -17
- data/lib/mws/orders/parsers/shipping_address.rb +0 -37
- data/lib/mws/orders/requests/order_items.rb +0 -28
- data/lib/mws/orders/requests/orders.rb +0 -41
- data/lib/mws/orders/requests/service_status.rb +0 -15
- data/lib/mws/products/client.rb +0 -7
- data/lib/mws/recommendations/client.rb +0 -7
- data/lib/mws/reports/client.rb +0 -249
- data/lib/mws/reports/parsers/report.rb +0 -10
- data/lib/mws/reports/parsers/report_acknowledgements.rb +0 -20
- data/lib/mws/reports/parsers/report_count.rb +0 -10
- data/lib/mws/reports/parsers/report_info.rb +0 -29
- data/lib/mws/reports/parsers/report_list.rb +0 -23
- data/lib/mws/reports/parsers/report_request.rb +0 -14
- data/lib/mws/reports/parsers/report_request_count.rb +0 -10
- data/lib/mws/reports/parsers/report_request_info.rb +0 -49
- data/lib/mws/reports/parsers/report_request_list.rb +0 -23
- data/lib/mws/reports/parsers/report_requests.rb +0 -18
- data/lib/mws/reports/parsers/report_schedule.rb +0 -21
- data/lib/mws/reports/parsers/report_schedule_count.rb +0 -10
- data/lib/mws/reports/parsers/report_schedule_list.rb +0 -23
- data/lib/mws/reports/parsers/report_scheduler.rb +0 -19
- data/lib/mws/reports/requests/report.rb +0 -18
- data/lib/mws/reports/requests/report_acknowledgements.rb +0 -27
- data/lib/mws/reports/requests/report_count.rb +0 -20
- data/lib/mws/reports/requests/report_list.rb +0 -30
- data/lib/mws/reports/requests/report_request.rb +0 -21
- data/lib/mws/reports/requests/report_request_count.rb +0 -20
- data/lib/mws/reports/requests/report_request_list.rb +0 -30
- data/lib/mws/reports/requests/report_requests.rb +0 -20
- data/lib/mws/reports/requests/report_schedule_count.rb +0 -19
- data/lib/mws/reports/requests/report_schedule_list.rb +0 -23
- data/lib/mws/reports/requests/report_scheduler.rb +0 -29
- data/lib/mws/sellers/client.rb +0 -53
- data/lib/mws/sellers/parsers/marketplace.rb +0 -33
- data/lib/mws/sellers/parsers/marketplace_participations.rb +0 -32
- data/lib/mws/sellers/parsers/participation.rb +0 -21
- data/lib/mws/sellers/parsers/service_status.rb +0 -36
- data/lib/mws/sellers/parsers/service_status_message.rb +0 -17
- data/lib/mws/sellers/requests/marketplace_participations.rb +0 -27
- data/lib/mws/sellers/requests/service_status.rb +0 -15
- data/lib/mws/subscriptions/client.rb +0 -7
- data/lib/peddler/parsers/base.rb +0 -15
- data/lib/peddler/parsers/collection.rb +0 -23
- data/lib/peddler/parsers/counter.rb +0 -13
- data/lib/peddler/parsers/model.rb +0 -42
- data/lib/peddler/parsers/text.rb +0 -8
- data/lib/peddler/parsers/tokenable.rb +0 -13
- data/lib/peddler/parsers/xml.rb +0 -30
- data/lib/peddler/request/parameters.rb +0 -57
- data/lib/peddler/request/structured_list.rb +0 -48
- data/lib/peddler/request.rb +0 -52
- data/lib/peddler/response/base.rb +0 -0
- data/lib/peddler/response/payload/base.rb +0 -0
- data/lib/peddler/response/payload/csv.rb +0 -0
- data/lib/peddler/response/payload/xml.rb +0 -0
- data/lib/peddler/response.rb +0 -27
- data/test/fixtures/feeds/feed_submission.xml +0 -14
- data/test/fixtures/feeds/feed_submission_count.xml +0 -9
- data/test/fixtures/feeds/feed_submission_list.xml +0 -17
- data/test/fixtures/feeds/feed_submissions.xml +0 -15
- data/test/fixtures/mws.yml +0 -12
- data/test/fixtures/mws.yml.example +0 -4
- data/test/fixtures/orders/order_items.xml +0 -83
- data/test/fixtures/orders/orders.xml +0 -109
- data/test/fixtures/orders/service_status.xml +0 -19
- data/test/fixtures/reports/report.xml +0 -8
- data/test/fixtures/reports/report_acknowledgements.xml +0 -18
- data/test/fixtures/reports/report_count.xml +0 -9
- data/test/fixtures/reports/report_list.xml +0 -17
- data/test/fixtures/reports/report_request_count.xml +0 -9
- data/test/fixtures/reports/report_request_list.xml +0 -24
- data/test/fixtures/reports/report_requests.xml +0 -19
- data/test/fixtures/reports/report_schedule_count.xml +0 -10
- data/test/fixtures/reports/report_schedule_list.xml +0 -16
- data/test/fixtures/reports/report_scheduler.xml +0 -15
- data/test/fixtures/sellers/market_participations.xml +0 -27
- data/test/fixtures/sellers/service_status.xml +0 -9
- data/test/integration/feeds/test_feed_submission_count.rb +0 -13
- data/test/integration/feeds/test_feed_submission_list.rb +0 -17
- data/test/integration/feeds/test_feed_submission_result.rb +0 -15
- data/test/integration/orders/test_order_items.rb +0 -19
- data/test/integration/orders/test_orders.rb +0 -23
- data/test/integration/orders/test_service_status.rb +0 -12
- data/test/integration/reports/test_report.rb +0 -15
- data/test/integration/reports/test_report_count.rb +0 -13
- data/test/integration/reports/test_report_list.rb +0 -17
- data/test/integration/reports/test_report_request_count.rb +0 -13
- data/test/integration/reports/test_report_request_list.rb +0 -17
- data/test/integration/reports/test_report_schedule_count.rb +0 -13
- data/test/integration/reports/test_report_schedule_list.rb +0 -13
- data/test/integration/reports/test_report_scheduler.rb +0 -16
- data/test/integration/sellers/test_marketplace_participations.rb +0 -13
- data/test/integration/sellers/test_service_status.rb +0 -12
- data/test/mws/feeds/parsers/test_feed.rb +0 -13
- data/test/mws/feeds/parsers/test_feed_submission_count.rb +0 -13
- data/test/mws/feeds/parsers/test_feed_submission_info.rb +0 -25
- data/test/mws/feeds/parsers/test_feed_submission_list.rb +0 -18
- data/test/mws/feeds/parsers/test_feed_submission_result.rb +0 -13
- data/test/mws/feeds/parsers/test_feed_submissions.rb +0 -17
- data/test/mws/feeds/requests/test_feed.rb +0 -63
- data/test/mws/feeds/requests/test_feed_submission_count.rb +0 -23
- data/test/mws/feeds/requests/test_feed_submission_list.rb +0 -37
- data/test/mws/feeds/requests/test_feed_submissions.rb +0 -29
- data/test/mws/orders/parsers/test_order.rb +0 -86
- data/test/mws/orders/parsers/test_order_item.rb +0 -69
- data/test/mws/orders/parsers/test_order_items.rb +0 -18
- data/test/mws/orders/parsers/test_orders.rb +0 -18
- data/test/mws/orders/parsers/test_payment_execution_detail.rb +0 -14
- data/test/mws/orders/parsers/test_payment_execution_detail_item.rb +0 -17
- data/test/mws/orders/parsers/test_service_status.rb +0 -39
- data/test/mws/orders/parsers/test_service_status_message.rb +0 -17
- data/test/mws/orders/parsers/test_shipping_address.rb +0 -36
- data/test/mws/orders/requests/test_order_items.rb +0 -36
- data/test/mws/orders/requests/test_orders.rb +0 -46
- data/test/mws/orders/requests/test_service_status.rb +0 -25
- data/test/mws/reports/parsers/test_report_acknowledgments.rb +0 -14
- data/test/mws/reports/parsers/test_report_count.rb +0 -13
- data/test/mws/reports/parsers/test_report_info.rb +0 -29
- data/test/mws/reports/parsers/test_report_list.rb +0 -18
- data/test/mws/reports/parsers/test_report_request.rb +0 -13
- data/test/mws/reports/parsers/test_report_request_count.rb +0 -13
- data/test/mws/reports/parsers/test_report_request_info.rb +0 -49
- data/test/mws/reports/parsers/test_report_request_list.rb +0 -18
- data/test/mws/reports/parsers/test_report_requests.rb +0 -17
- data/test/mws/reports/parsers/test_report_schedule_count.rb +0 -13
- data/test/mws/reports/parsers/test_report_schedule_list.rb +0 -18
- data/test/mws/reports/parsers/test_report_scheduler.rb +0 -17
- data/test/mws/reports/requests/test_acknowledgements.rb +0 -36
- data/test/mws/reports/requests/test_report_count.rb +0 -23
- data/test/mws/reports/requests/test_report_list.rb +0 -39
- data/test/mws/reports/requests/test_report_request.rb +0 -31
- data/test/mws/reports/requests/test_report_request_count.rb +0 -23
- data/test/mws/reports/requests/test_report_request_list.rb +0 -44
- data/test/mws/reports/requests/test_report_requests.rb +0 -29
- data/test/mws/reports/requests/test_report_schedule_count.rb +0 -22
- data/test/mws/reports/requests/test_report_schedule_list.rb +0 -36
- data/test/mws/reports/requests/test_report_scheduler.rb +0 -33
- data/test/mws/sellers/parsers/test_market_participations.rb +0 -19
- data/test/mws/sellers/parsers/test_service_status.rb +0 -35
- data/test/mws/sellers/requests/test_marketplace_participation_list.rb +0 -39
- data/test/mws/sellers/requests/test_service_status.rb +0 -25
- data/test/parser_helper.rb +0 -11
- data/test/peddler/parsers/test_collection.rb +0 -8
- data/test/peddler/parsers/test_model.rb +0 -70
- data/test/peddler/request/test_parameters.rb +0 -35
- data/test/peddler/test_client.rb +0 -42
- data/test/request_helper.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978fab72406158760e9606e86cc0de2447e69cda
|
4
|
+
data.tar.gz: 319ef1c73de0d04380c26803cfb0769520f5dc44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a26b4759845d63041ad84ad50a8c945ddabb2eb258f26df0274bb31de4e2e22ded66717643fa9c9dd644dae75e24e06a3fe42401a8136744b014a6528bc6f4b
|
7
|
+
data.tar.gz: ddf1a2946fc222ff841903d537ada2cec094d5296996995cd0f179321c64ebb057c58e88733e87506290eb8f33ba43cd5e0cc0e2f17fb6ad53b5fa90519ae7fe
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,162 +1,143 @@
|
|
1
1
|
# Peddler
|
2
2
|
|
3
|
-
[![Build Status][
|
3
|
+
[![Build Status][1]][2]
|
4
4
|
|
5
|
-
![Peddler][
|
5
|
+
![Peddler][3]
|
6
6
|
|
7
|
-
**Peddler** is a
|
7
|
+
**Peddler** is a Ruby interface to the [Amazon MWS API][4], a collection of web services that help Amazon sellers to programmatically exchange data on their listings, orders, payments, reports, and more.
|
8
|
+
|
9
|
+
To use Amazon MWS, you must have an eligible seller account.
|
8
10
|
|
9
11
|
## Configuration
|
10
12
|
|
11
|
-
Require the library
|
13
|
+
Require the entire library or a particular API section.
|
12
14
|
|
13
15
|
```ruby
|
14
16
|
require 'peddler'
|
17
|
+
# require 'mws/orders'
|
15
18
|
```
|
16
19
|
|
17
|
-
|
20
|
+
Instantiate a client.
|
18
21
|
|
19
22
|
```ruby
|
20
|
-
|
23
|
+
client = MWS::Orders.new
|
21
24
|
```
|
22
25
|
|
23
|
-
|
26
|
+
Set the credentials.
|
24
27
|
|
25
28
|
```ruby
|
26
|
-
client
|
29
|
+
client.configure do |c|
|
30
|
+
c.marketplace_id = 'A1F83G8C2ARO7P'
|
31
|
+
c.merchant_id = 'A2A9WNXCU02UZW'
|
32
|
+
c.aws_access_key_id = 'AKIVICHZMZ2JRSSLC27W'
|
33
|
+
c.aws_secret_access_key = 'rOMa3ydPBTJ3AD0bxERTOX0Fv0fAC6Q0s6/czMZO'
|
34
|
+
end
|
27
35
|
```
|
28
36
|
|
29
|
-
|
37
|
+
If you have only a single set of credentials, you may prefer to use environment variables.
|
30
38
|
|
31
39
|
```sh
|
32
|
-
export
|
33
|
-
export
|
34
|
-
export
|
40
|
+
export MWS_MARKETPLACE_ID="A1F83G8C2ARO7P"
|
41
|
+
export MWS_MERCHANT_ID="A2A9WNXCU02UZW"
|
42
|
+
export AWS_ACCESS_KEY_ID="AKIVICHZMZ2JRSSLC27W"
|
43
|
+
export AWS_SECRET_ACCESS_KEY="rOMa3ydPBTJ3AD0bxERTOX0Fv0fAC6Q0s6/czMZO"
|
35
44
|
```
|
36
45
|
|
37
|
-
|
46
|
+
## Usage
|
38
47
|
|
39
|
-
|
40
|
-
client = MWS::Orders::Client.new('US')
|
41
|
-
```
|
48
|
+
### Cart Information
|
42
49
|
|
43
|
-
|
50
|
+
**Not implemented**
|
44
51
|
|
45
|
-
|
52
|
+
With the MWS Cart Information API, you can retrieve shopping carts that your Amazon Webstore customers have created. The Cart Information API enables you to programmatically integrate Amazon Webstore cart information with your CRM systems, marketing applications, and other systems that require cart data.
|
53
|
+
|
54
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/CartInformation)
|
55
|
+
|
56
|
+
### Customer Information
|
57
|
+
|
58
|
+
**Not implemented**
|
59
|
+
|
60
|
+
With the MWS Customer Information API, you can retrieve information from the customer accounts of your Amazon Webstore customers. This customer information includes customer name, contact information, customer account type, and associated Amazon Webstore marketplaces. The Customer Information API enables you to programmatically integrate Amazon Webstore customer account information with your CRM systems, marketing applications, and other systems that require customer data.
|
61
|
+
|
62
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/CustomerInformation)
|
46
63
|
|
47
64
|
### Feeds
|
48
65
|
|
49
66
|
The MWS Feeds API lets you upload inventory and order data to Amazon. You can also use this API to get information about the processing of feeds.
|
50
67
|
|
51
|
-
[Read
|
68
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Feeds)
|
52
69
|
|
53
70
|
### Fulfillment Inbound Shipment
|
54
71
|
|
55
|
-
|
72
|
+
**Not implemented**
|
56
73
|
|
57
|
-
|
74
|
+
With the MWS Fulfillment Inbound Shipment API, you can create and update inbound shipments of inventory in the Amazon Fulfillment Network. You can also also request lists of inbound shipments or inbound shipment items based on criteria that you specify.
|
58
75
|
|
59
|
-
|
60
|
-
client = MWS::FulfillmentInboundShipment::Client.new('GB')
|
61
|
-
```
|
62
|
-
|
63
|
-
Pull requests are welcome!
|
76
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/FulfillmentInboundShipment)
|
64
77
|
|
65
78
|
### Fulfillment Inventory
|
66
79
|
|
67
|
-
|
80
|
+
**Not implemented**
|
68
81
|
|
69
|
-
|
82
|
+
The MWS Fulfillment Inventory API can help you stay up-to-date on the availability of your inventory in the Amazon Fulfillment Network. The Fulfillment Inventory API reports real-time availability information for your Amazon Fulfillment Network inventory regardless of whether you are selling your inventory on Amazon's retail web site or through other retail channels.
|
70
83
|
|
71
|
-
|
72
|
-
client = MWS::FulfillmentInventory::Client.new('GB')
|
73
|
-
```
|
74
|
-
|
75
|
-
Pull requests are welcome!
|
84
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/FulfillmentInventory)
|
76
85
|
|
77
86
|
### Fulfillment Outbound Shipment
|
78
87
|
|
79
|
-
|
88
|
+
**Not implemented**
|
80
89
|
|
81
|
-
|
90
|
+
The MWS Fulfillment Outbound Shipment API enables you to fulfill orders placed through channels other than Amazon's retail web site, using your inventory in the Amazon Fulfillment Network. You can request previews of potential fulfillment orders that return estimated shipping fees and shipping dates based on shipping speed. You can get detailed item-level, shipment-level, and order-level information for any existing fulfillment order that you specify. You can also request lists of existing fulfillment orders based on when they were fulfilled and by the fulfillment method associated with them.
|
82
91
|
|
83
|
-
|
84
|
-
client = MWS::FulfillmentOutboundShipment::Client.new('GB')
|
85
|
-
```
|
86
|
-
|
87
|
-
Pull requests are welcome!
|
92
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/FulfillmentOutboundShipment)
|
88
93
|
|
89
94
|
### Off Amazon Payments
|
90
95
|
|
91
|
-
|
96
|
+
**Not implemented**
|
92
97
|
|
93
|
-
|
98
|
+
The MWS Off-Amazon Payments API helps you to process payments for purchases made by buyers on your website using the Login and Pay with Amazon service. This API enables you to programmatically retrieve shipping and payment information provided by the buyer from their Amazon account. It allows you to authorize, capture, and refund payments, enabling a variety of payments scenarios.
|
94
99
|
|
95
|
-
|
96
|
-
client = MWS::OffAmazonPayments::Client.new('GB')
|
97
|
-
```
|
98
|
-
|
99
|
-
Pull requests are welcome!
|
100
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/OffAmazonPayments)
|
100
101
|
|
101
102
|
### Orders
|
102
103
|
|
103
104
|
With the MWS Orders API, you can list orders created or updated during a time frame you specify or retrieve information about specific orders.
|
104
105
|
|
105
|
-
[Read
|
106
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Orders)
|
106
107
|
|
107
108
|
### Products
|
108
109
|
|
109
|
-
The Products API helps you get information to match your products to existing product listings on Amazon Marketplace websites and to make sourcing and pricing decisions for listing those products on Amazon Marketplace websites.
|
110
|
+
The MWS Products API helps you get information to match your products to existing product listings on Amazon Marketplace websites and to make sourcing and pricing decisions for listing those products on Amazon Marketplace websites.
|
110
111
|
|
111
|
-
|
112
|
-
|
113
|
-
```ruby
|
114
|
-
client = MWS::Products::Client.new('GB')
|
115
|
-
```
|
116
|
-
|
117
|
-
Pull requests are welcome!
|
112
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Products)
|
118
113
|
|
119
114
|
### Recommendations
|
120
115
|
|
121
|
-
|
116
|
+
**Not implemented**
|
122
117
|
|
123
|
-
|
124
|
-
|
125
|
-
```ruby
|
126
|
-
client = MWS::Recommendations::Client.new('GB')
|
127
|
-
```
|
118
|
+
The Recommendations API enables you to programmatically retrieve Amazon Selling Coach recommendations by recommendation category. A recommendation is an actionable, timely, and personalized opportunity to increase your sales and performance.
|
128
119
|
|
129
|
-
|
120
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Recommendations)
|
130
121
|
|
131
122
|
### Reports
|
132
123
|
|
133
124
|
The Reports API lets you request reports about your inventory and orders.
|
134
125
|
|
135
|
-
[Read
|
126
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Reports)
|
136
127
|
|
137
128
|
### Sellers
|
138
129
|
|
139
130
|
The Sellers API lets sellers retrieve information about their seller account, such as the marketplaces they participate in.
|
140
131
|
|
141
|
-
[Read
|
132
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Sellers)
|
142
133
|
|
143
134
|
### Subscriptions
|
144
135
|
|
145
|
-
The Amazon MWS Subscriptions API enables you to subscribe to receive notifications that are relevant to your business with Amazon. With the operations in the Subscriptions API section, you can register to receive important information from Amazon without having to poll the Amazon MWS service. Instead, the information is sent directly to you when an event occurs to which you are subscribed.
|
146
|
-
|
147
|
-
While this API is not implemented yet, you may still use the raw client like so:
|
148
|
-
|
149
|
-
```ruby
|
150
|
-
client = MWS::Subscriptions::Client.new('GB')
|
151
|
-
```
|
136
|
+
The Amazon MWS Subscriptions API section enables you to subscribe to receive notifications that are relevant to your business with Amazon. With the operations in the Subscriptions API section, you can register to receive important information from Amazon without having to poll the Amazon MWS service. Instead, the information is sent directly to you when an event occurs to which you are subscribed.
|
152
137
|
|
153
|
-
|
138
|
+
[Read more](http://rubydoc.info/gems/peddler/MWS/Subscriptions)
|
154
139
|
|
155
|
-
[
|
156
|
-
[
|
157
|
-
[
|
158
|
-
[
|
159
|
-
[feeds-api]: https://github.com/papercavalier/peddler/blob/master/lib/mws/feeds/client.rb
|
160
|
-
[orders-api]: https://github.com/papercavalier/peddler/blob/master/lib/mws/orders/client.rb
|
161
|
-
[reports-api]: https://github.com/papercavalier/peddler/blob/master/lib/mws/reports/client.rb
|
162
|
-
[sellers-api]: https://github.com/papercavalier/peddler/blob/master/lib/mws/sellers/client.rb
|
140
|
+
[1]: https://travis-ci.org/hakanensari/peddler.png
|
141
|
+
[2]:https://travis-ci.org/hakanensari/peddler
|
142
|
+
[3]: http://f.cl.ly/items/231z2m0r1Q2o2q1n0w1N/peddler.jpg
|
143
|
+
[4]: https://developer.amazonservices.com/
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# With the Cart Information API, you can retrieve shopping carts that your
|
5
|
+
# Amazon Webstore customers have created. The Cart Information API enables you
|
6
|
+
# to programmatically integrate Amazon Webstore cart information with your CRM
|
7
|
+
# systems, marketing applications, and other systems that require cart data.
|
8
|
+
#
|
9
|
+
# @todo Not implemented
|
10
|
+
class CartInformation < ::Peddler::Client
|
11
|
+
path 'CartInformation/2014-03-01'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# With the Customer Information API, you can retrieve information from the
|
5
|
+
# customer accounts of your Amazon Webstore customers. This customer
|
6
|
+
# information includes customer name, contact information, customer account
|
7
|
+
# type, and associated Amazon Webstore marketplaces. The Customer Information
|
8
|
+
# API enables you to programmatically integrate Amazon Webstore customer
|
9
|
+
# account information with your CRM systems, marketing applications, and other
|
10
|
+
# systems that require customer data.
|
11
|
+
#
|
12
|
+
# @todo Not implemented
|
13
|
+
class CustomerInformation < ::Peddler::Client
|
14
|
+
path 'CustomerInformation/2014-03-01'
|
15
|
+
end
|
16
|
+
end
|
data/lib/mws/feeds.rb
CHANGED
@@ -1 +1,110 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# The MWS Feeds API lets you upload inventory and order data to Amazon. You
|
5
|
+
# can also use this API to get information about the processing of feeds.
|
6
|
+
class Feeds < ::Peddler::Client
|
7
|
+
# Uploads a feed
|
8
|
+
#
|
9
|
+
# @note Feed size is limited to 2,147,483,647 bytes (2^31 -1) per feed
|
10
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html
|
11
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
|
12
|
+
# @param feed_content [String] an XML or flat file feed
|
13
|
+
# @param feed_type [String] the feed type
|
14
|
+
# @param opts [Hash]
|
15
|
+
# @option opts [Array<String>, String] :marketplace_id_list
|
16
|
+
# @option opts [Boolean] :purge_and_replace
|
17
|
+
# @return [Peddler::Parser]
|
18
|
+
def submit_feed(content, feed_type, opts = {})
|
19
|
+
self.body = content
|
20
|
+
operation('SubmitFeed')
|
21
|
+
.add(opts.merge('FeedType' => feed_type))
|
22
|
+
.structure!('MarketplaceId', 'Id')
|
23
|
+
|
24
|
+
run
|
25
|
+
end
|
26
|
+
|
27
|
+
# List feed submissions
|
28
|
+
#
|
29
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionList.html
|
30
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
|
31
|
+
# @param opts [Hash]
|
32
|
+
# @option opts [Array<String>, String] :feed_submission_id_list
|
33
|
+
# @option opts [Integer] :max_count
|
34
|
+
# @option opts [Array<String>, String] :feed_type_list
|
35
|
+
# @option opts [Array<String>, String] :feed_processing_status_list
|
36
|
+
# @option opts [String, #iso8601] :submitted_from_date
|
37
|
+
# @option opts [String, #iso8601] :submitted_to_date
|
38
|
+
# @return [Peddler::Parser]
|
39
|
+
def get_feed_submission_list(opts = {})
|
40
|
+
operation('GetFeedSubmissionList')
|
41
|
+
.add(opts)
|
42
|
+
.structure!('FeedSubmissionIdList', 'Id')
|
43
|
+
.structure!('FeedTypeList', 'Type')
|
44
|
+
.structure!('FeedProcessingStatusList', 'Status')
|
45
|
+
|
46
|
+
run
|
47
|
+
end
|
48
|
+
|
49
|
+
# List the next page of feed submissions
|
50
|
+
#
|
51
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionListByNextToken.html
|
52
|
+
# @param next_token [String]
|
53
|
+
# @return [Peddler::Parser]
|
54
|
+
# @return false if there are no more pages
|
55
|
+
def get_feed_submission_list_by_next_token(next_token)
|
56
|
+
operation('GetFeedSubmissionListByNextToken')
|
57
|
+
.add('NextToken' => next_token)
|
58
|
+
|
59
|
+
run
|
60
|
+
end
|
61
|
+
|
62
|
+
# Counts submitted feeds
|
63
|
+
#
|
64
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionCount.html
|
65
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
|
66
|
+
# @param opts [Hash]
|
67
|
+
# @option opts [Array<String>, String] :feed_type_list
|
68
|
+
# @option opts [Array<String>, String] :feed_processing_status_list
|
69
|
+
# @option opts [String, #iso8601] :submitted_from_date
|
70
|
+
# @option opts [String, #iso8601] :submitted_to_date
|
71
|
+
# @return [Peddler::Parser]
|
72
|
+
def get_feed_submission_count(opts = {})
|
73
|
+
operation('GetFeedSubmissionCount')
|
74
|
+
.add(opts)
|
75
|
+
.structure!('FeedTypeList', 'Type')
|
76
|
+
.structure!('FeedProcessingStatusList', 'Status')
|
77
|
+
|
78
|
+
run
|
79
|
+
end
|
80
|
+
|
81
|
+
# Cancel one or more feed submissions
|
82
|
+
#
|
83
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_CancelFeedSubmissions.html
|
84
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
|
85
|
+
# @param opts [Hash]
|
86
|
+
# @option opts [Array<String>, String] :feed_submission_id_list
|
87
|
+
# @option opts [Array<String>, String] :feed_type_list
|
88
|
+
# @option opts [String, #iso8601] :submitted_from_date
|
89
|
+
# @option opts [String, #iso8601] :submitted_to_date
|
90
|
+
# @return [Peddler::Parser]
|
91
|
+
def cancel_feed_submissions(opts = {})
|
92
|
+
operation('CancelFeedSubmissions')
|
93
|
+
.add(opts)
|
94
|
+
|
95
|
+
run
|
96
|
+
end
|
97
|
+
|
98
|
+
# Gets the processing report for a feed and its Content-MD5 header
|
99
|
+
#
|
100
|
+
# @see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionResult.html
|
101
|
+
# @param feed_submission_id [Integer, String]
|
102
|
+
# @return Peddler::Parser
|
103
|
+
def get_feed_submission_result(feed_submission_id)
|
104
|
+
operation('GetFeedSubmissionResult')
|
105
|
+
.add('FeedSubmissionId' => feed_submission_id)
|
106
|
+
|
107
|
+
run
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -1 +1,13 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
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
|
+
#
|
9
|
+
# @todo Not implemented
|
10
|
+
class FulfillmentInboundShipment < ::Peddler::Client
|
11
|
+
path 'FulfillmentInboundShipment/2010-10-01'
|
12
|
+
end
|
13
|
+
end
|
@@ -1 +1,15 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
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
|
+
#
|
11
|
+
# @todo Not implemented
|
12
|
+
class FulfillmentInventory < ::Peddler::Client
|
13
|
+
path 'FulfillmentInventory/2010-10-01'
|
14
|
+
end
|
15
|
+
end
|
@@ -1 +1,17 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# The Fulfillment Outbound Shipment API enables you to fulfill orders placed
|
5
|
+
# through channels other than Amazon's retail web site, using your inventory
|
6
|
+
# in the Amazon Fulfillment Network. You can request previews of potential
|
7
|
+
# fulfillment orders that return estimated shipping fees and shipping dates
|
8
|
+
# based on shipping speed. You can get detailed item-level, shipment-level,
|
9
|
+
# and order-level information for any existing fulfillment order that you
|
10
|
+
# specify. You can also request lists of existing fulfillment orders based on
|
11
|
+
# when they were fulfilled and by the fulfillment method associated with them.
|
12
|
+
#
|
13
|
+
# @todo Not implemented
|
14
|
+
class FulfillmentOutboundShipment < ::Peddler::Client
|
15
|
+
path 'FulfillmentOutboundShipment/2010-10-01'
|
16
|
+
end
|
17
|
+
end
|
@@ -1 +1,15 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# The Off-Amazon Payments API helps you to process payments for purchases
|
5
|
+
# made by buyers on your website using the Login and Pay with Amazon service.
|
6
|
+
# This API enables you to programmatically retrieve shipping and payment
|
7
|
+
# information provided by the buyer from their Amazon account. It allows you
|
8
|
+
# to authorize, capture, and refund payments, enabling a variety of payments
|
9
|
+
# scenarios.
|
10
|
+
#
|
11
|
+
# @todo Not implemented
|
12
|
+
class OffAmazonPayments < ::Peddler::Client
|
13
|
+
path 'OffAmazonPayments/2013-01-01/'
|
14
|
+
end
|
15
|
+
end
|
data/lib/mws/orders.rb
CHANGED
@@ -1 +1,100 @@
|
|
1
|
-
require '
|
1
|
+
require 'peddler/client'
|
2
|
+
|
3
|
+
module MWS
|
4
|
+
# With the MWS Orders API, you can list orders created or updated during a
|
5
|
+
# time frame you specify or retrieve information about specific orders.
|
6
|
+
class Orders < ::Peddler::Client
|
7
|
+
path 'Orders/2013-09-01'
|
8
|
+
|
9
|
+
# Lists orders
|
10
|
+
#
|
11
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_ListOrders.html
|
12
|
+
# @param opts [Hash]
|
13
|
+
# @option opts [String, #iso8601] :created_after
|
14
|
+
# @option opts [String, #iso8601] :created_before
|
15
|
+
# @option opts [String, #iso8601] :last_updated_after
|
16
|
+
# @option opts [String, #iso8601] :last_updated_before
|
17
|
+
# @option opts [Array<String>, String] :order_status
|
18
|
+
# @option opts [Array<String>, String] :marketplace_id
|
19
|
+
# @option opts [Array<String>, String] :fulfillment_channel
|
20
|
+
# @option opts [Array<String>, String] :payment_method
|
21
|
+
# @option opts [String] :buyer_email
|
22
|
+
# @option opts [String] :seller_order_id
|
23
|
+
# @option opts [String] :max_results_per_page
|
24
|
+
# @option opts [String] :tfm_shipment_status
|
25
|
+
# @return [Peddler::Parser]
|
26
|
+
def list_orders(opts = {})
|
27
|
+
opts[:marketplace_id] ||= marketplace_id
|
28
|
+
opts['TFMShipmentStatus'] = opts.delete(:tfm_shipment_status) if opts.has_key?(:tfm_shipment_status)
|
29
|
+
|
30
|
+
operation('ListOrders')
|
31
|
+
.add(opts)
|
32
|
+
.structure!('OrderStatus', 'Status')
|
33
|
+
.structure!('MarketplaceId', 'Id')
|
34
|
+
.structure!('PaymentMethod')
|
35
|
+
.structure!('TFMShipmentStatus', 'Status')
|
36
|
+
|
37
|
+
run
|
38
|
+
end
|
39
|
+
|
40
|
+
# Lists the next page of orders
|
41
|
+
#
|
42
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_ListOrdersByNextToken.html
|
43
|
+
# @param next_token [String]
|
44
|
+
# @return [Peddler::Parser]
|
45
|
+
# @return false if there are no more pages
|
46
|
+
def list_orders_by_next_token(next_token)
|
47
|
+
operation('ListOrdersByNextToken')
|
48
|
+
.add('NextToken' => next_token)
|
49
|
+
|
50
|
+
run
|
51
|
+
end
|
52
|
+
|
53
|
+
# Gets one or more orders
|
54
|
+
#
|
55
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_GetOrder.html
|
56
|
+
# @param amazon_order_ids [Array<String>]
|
57
|
+
# @return [Peddler::Parser]
|
58
|
+
def get_order(*amazon_order_ids)
|
59
|
+
operation('GetOrder')
|
60
|
+
.add('AmazonOrderId' => amazon_order_ids)
|
61
|
+
.structure!('AmazonOrderId', 'Id')
|
62
|
+
|
63
|
+
run
|
64
|
+
end
|
65
|
+
|
66
|
+
# Lists order items for an order
|
67
|
+
#
|
68
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_ListOrderItems.html
|
69
|
+
# @param amazon_order_id [String]
|
70
|
+
# @return [Peddler::Parser]
|
71
|
+
def list_order_items(amazon_order_id)
|
72
|
+
operation('ListOrderItems')
|
73
|
+
.add('AmazonOrderId' => amazon_order_id)
|
74
|
+
|
75
|
+
run
|
76
|
+
end
|
77
|
+
|
78
|
+
# Lists the next page of order items for an order
|
79
|
+
#
|
80
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_ListOrderItemsByNextToken.html
|
81
|
+
# @param next_token [String]
|
82
|
+
# @return [Peddler::Parser]
|
83
|
+
# @return false if there are no more pages
|
84
|
+
def list_order_items_by_next_token(next_token)
|
85
|
+
operation('ListOrderItemsByNextToken')
|
86
|
+
.add('NextToken' => next_token)
|
87
|
+
|
88
|
+
run
|
89
|
+
end
|
90
|
+
|
91
|
+
# Gets the service status of the API
|
92
|
+
#
|
93
|
+
# @see http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/MWS_GetServiceStatus.html
|
94
|
+
# @return Peddler::Parser
|
95
|
+
def get_service_status
|
96
|
+
operation('GetServiceStatus')
|
97
|
+
run
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|