Class: Peddler::APIs::Feeds20210630
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Feeds20210630
- Includes:
- Helpers::Feeds20210630
- Defined in:
- lib/peddler/apis/feeds_2021_06_30.rb,
lib/peddler/apis/feeds_2021_06_30/feed.rb,
lib/peddler/apis/feeds_2021_06_30/error.rb,
lib/peddler/apis/feeds_2021_06_30/feed_list.rb,
lib/peddler/apis/feeds_2021_06_30/error_list.rb,
lib/peddler/apis/feeds_2021_06_30/feed_document.rb,
lib/peddler/apis/feeds_2021_06_30/get_feeds_response.rb,
lib/peddler/apis/feeds_2021_06_30/create_feed_response.rb,
lib/peddler/apis/feeds_2021_06_30/create_feed_specification.rb,
lib/peddler/apis/feeds_2021_06_30/create_feed_document_response.rb,
lib/peddler/apis/feeds_2021_06_30/create_feed_document_specification.rb,
sig/peddler/apis/feeds_2021_06_30.rbs
Overview
Selling Partner API for Feeds
The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
Defined Under Namespace
Classes: CreateFeedDocumentResponse, CreateFeedDocumentSpecification, CreateFeedResponse, CreateFeedSpecification, Error, ErrorList, Feed, FeedDocument, FeedList, GetFeedsResponse
Constant Summary
Constants inherited from Peddler::API
Peddler::API::TRANSIENT_STATUSES
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #base_url, #endpoint, #retries
Instance Method Summary collapse
-
#cancel_feed(feed_id, rate_limit: 2.0) ⇒ Peddler::Response
Cancels the feed that you specify.
-
#create_feed(body, rate_limit: 0.0083) ⇒ Peddler::Response
Creates a feed.
-
#create_feed_document(body, rate_limit: 0.5) ⇒ Peddler::Response
Creates a feed document for the feed type that you specify.
-
#get_feed(feed_id, rate_limit: 2.0) ⇒ Peddler::Response
Returns feed details (including the
feedDocumentId, if available) for the feed that you specify. -
#get_feed_document(feed_document_id, enable_content_encoding_url_header: nil, rate_limit: 0.0222) ⇒ Peddler::Response
Returns the information required for retrieving a feed document's contents.
-
#get_feeds(feed_types: nil, marketplace_ids: nil, page_size: 10, processing_statuses: nil, created_since: nil, created_until: nil, next_token: nil, rate_limit: 0.0222) ⇒ Peddler::Response
Returns feed details for the feeds that match the filters that you specify.
Methods included from Helpers::Feeds20210630
#download_result_feed_document, #upload_feed_document
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#cancel_feed(feed_id, rate_limit: 2.0) ⇒ Peddler::Response
73 74 75 76 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 73 def cancel_feed(feed_id, rate_limit: 2.0) path = "/feeds/2021-06-30/feeds/#{percent_encode(feed_id)}" delete(path, rate_limit:) end |
#create_feed(body, rate_limit: 0.0083) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a feed. Upload the contents of the feed document before calling this operation.
58 59 60 61 62 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 58 def create_feed(body, rate_limit: 0.0083) path = "/feeds/2021-06-30/feeds" parser = -> { CreateFeedResponse } post(path, body:, rate_limit:, parser:) end |
#create_feed_document(body, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates a feed document for the feed type that you specify. This operation returns a presigned URL for uploading
the feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call
to the createFeed operation.
99 100 101 102 103 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 99 def create_feed_document(body, rate_limit: 0.5) path = "/feeds/2021-06-30/documents" parser = -> { CreateFeedDocumentResponse } post(path, body:, rate_limit:, parser:) end |
#get_feed(feed_id, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns feed details (including the feedDocumentId, if available) for the feed that you specify.
85 86 87 88 89 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 85 def get_feed(feed_id, rate_limit: 2.0) path = "/feeds/2021-06-30/feeds/#{percent_encode(feed_id)}" parser = -> { Feed } get(path, rate_limit:, parser:) end |
#get_feed_document(feed_document_id, enable_content_encoding_url_header: nil, rate_limit: 0.0222) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the information required for retrieving a feed document's contents.
114 115 116 117 118 119 120 121 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 114 def get_feed_document(feed_document_id, enable_content_encoding_url_header: nil, rate_limit: 0.0222) path = "/feeds/2021-06-30/documents/#{percent_encode(feed_document_id)}" params = { "enableContentEncodingUrlHeader" => enable_content_encoding_url_header, }.compact parser = -> { FeedDocument } get(path, params:, rate_limit:, parser:) end |
#get_feeds(feed_types: nil, marketplace_ids: nil, page_size: 10, processing_statuses: nil, created_since: nil, created_until: nil, next_token: nil, rate_limit: 0.0222) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns feed details for the feeds that match the filters that you specify.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/peddler/apis/feeds_2021_06_30.rb', line 36 def get_feeds(feed_types: nil, marketplace_ids: nil, page_size: 10, processing_statuses: nil, created_since: nil, created_until: nil, next_token: nil, rate_limit: 0.0222) path = "/feeds/2021-06-30/feeds" params = { "feedTypes" => stringify_array(feed_types), "marketplaceIds" => stringify_array(marketplace_ids), "pageSize" => page_size, "processingStatuses" => stringify_array(processing_statuses), "createdSince" => created_since, "createdUntil" => created_until, "nextToken" => next_token, }.compact parser = -> { GetFeedsResponse } get(path, params:, rate_limit:, parser:) end |