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.
Constant Summary
Constants inherited from Peddler::Client
Peddler::Client::BadMarketplaceId, Peddler::Client::HOSTS
Instance Attribute Summary
Attributes inherited from Peddler::Client
#body, #marketplace_id, #merchant_id, #path
Instance Method Summary collapse
-
#cancel_feed_submissions(opts = {}) ⇒ Peddler::XMLParser
Cancel one or more feed submissions.
-
#get_feed_submission_count(opts = {}) ⇒ Peddler::XMLParser
Counts submitted feeds.
-
#get_feed_submission_list(opts = {}) ⇒ Peddler::XMLParser
List feed submissions.
-
#get_feed_submission_list_by_next_token(next_token) ⇒ Peddler::XMLParser
List the next page of feed submissions.
-
#get_feed_submission_result(feed_submission_id) ⇒ Peddler::XMLParser, Peddler::CSVParser
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, #headers, inherited, #initialize, #operation, parser, parser=, path, #run
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#cancel_feed_submissions(opts = {}) ⇒ Peddler::XMLParser
Cancel one or more feed submissions
91 92 93 94 95 96 |
# File 'lib/mws/feeds/client.rb', line 91 def cancel_feed_submissions(opts = {}) operation('CancelFeedSubmissions') .add(opts) run end |
#get_feed_submission_count(opts = {}) ⇒ Peddler::XMLParser
Counts submitted feeds
72 73 74 75 76 77 78 79 |
# File 'lib/mws/feeds/client.rb', line 72 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
List feed submissions
40 41 42 43 44 45 46 47 48 |
# File 'lib/mws/feeds/client.rb', line 40 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
List the next page of feed submissions
55 56 57 58 59 60 |
# File 'lib/mws/feeds/client.rb', line 55 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::CSVParser
Gets the processing report for a feed and its Content-MD5 header
104 105 106 107 108 109 |
# File 'lib/mws/feeds/client.rb', line 104 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
19 20 21 22 23 24 25 26 |
# File 'lib/mws/feeds/client.rb', line 19 def submit_feed(feed_content, feed_type, opts = {}) self.body = feed_content operation('SubmitFeed') .add(opts.merge('FeedType' => feed_type)) .structure!('MarketplaceId', 'Id') run end |