Class: MWS::Feeds::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Feeds::Client
- Defined in:
- lib/mws/feeds/client.rb
Overview
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.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#cancel_feed_submissions(opts = {}) ⇒ Peddler::XMLParser
Cancels one or more feed submissions.
-
#get_feed_submission_count(opts = {}) ⇒ Peddler::XMLParser
Counts submitted feeds.
-
#get_feed_submission_list(opts = {}) ⇒ Peddler::XMLParser
Lists feed submissions.
-
#get_feed_submission_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of feed submissions.
-
#get_feed_submission_result(feed_submission_id) ⇒ Peddler::XMLParser, Peddler::FlatFileParser
Gets the processing report for a feed and its Content-MD5 header.
-
#submit_feed(feed_content, feed_type, opts = {}) ⇒ Peddler::XMLParser
Uploads a feed.
Methods inherited from Peddler::Client
#aws_endpoint, #defaults, #error_handler, #headers, #initialize, #marketplace, #marketplace_id, #marketplace_id=, on_error, #on_error, #operation, path, #run, version
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#cancel_feed_submissions(opts = {}) ⇒ Peddler::XMLParser
Cancels one or more feed submissions
95 96 97 98 99 100 101 102 |
# File 'lib/mws/feeds/client.rb', line 95 def cancel_feed_submissions(opts = {}) operation('CancelFeedSubmissions') .add(opts) .structure!('FeedSubmissionIdList', 'Id') .structure!('FeedTypeList', 'Type') run end |
#get_feed_submission_count(opts = {}) ⇒ Peddler::XMLParser
Counts submitted feeds
76 77 78 79 80 81 82 83 |
# File 'lib/mws/feeds/client.rb', line 76 def get_feed_submission_count(opts = {}) operation('GetFeedSubmissionCount') .add(opts) .structure!('FeedTypeList', 'Type') .structure!('FeedProcessingStatusList', 'Status') run end |
#get_feed_submission_list(opts = {}) ⇒ Peddler::XMLParser
Lists feed submissions
44 45 46 47 48 49 50 51 52 |
# File 'lib/mws/feeds/client.rb', line 44 def get_feed_submission_list(opts = {}) operation('GetFeedSubmissionList') .add(opts) .structure!('FeedSubmissionIdList', 'Id') .structure!('FeedTypeList', 'Type') .structure!('FeedProcessingStatusList', 'Status') run end |
#get_feed_submission_list_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of feed submissions
59 60 61 62 63 64 |
# File 'lib/mws/feeds/client.rb', line 59 def get_feed_submission_list_by_next_token(next_token) operation('GetFeedSubmissionListByNextToken') .add('NextToken' => next_token) run end |
#get_feed_submission_result(feed_submission_id) ⇒ Peddler::XMLParser, Peddler::FlatFileParser
Gets the processing report for a feed and its Content-MD5 header
110 111 112 113 114 115 |
# File 'lib/mws/feeds/client.rb', line 110 def get_feed_submission_result(feed_submission_id) operation('GetFeedSubmissionResult') .add('FeedSubmissionId' => feed_submission_id) run end |
#submit_feed(feed_content, feed_type, opts = {}) ⇒ Peddler::XMLParser
Feed size is limited to 2,147,483,647 bytes (2^31 -1) per feed.
Uploads a feed
23 24 25 26 27 28 29 30 |
# File 'lib/mws/feeds/client.rb', line 23 def submit_feed(feed_content, feed_type, opts = {}) self.body = feed_content operation('SubmitFeed') .add(opts.update('FeedType' => feed_type)) .structure!('MarketplaceIdList', 'Id') run end |