Class: Peddler::APIs::AplusContent20201101
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::AplusContent20201101
- Defined in:
- lib/peddler/apis/aplus_content_2020_11_01.rb
Overview
Selling Partner API for A+ Content Management
Use the A+ Content API to build applications that help selling partners add rich marketing content to their Amazon product detail pages. Selling partners can use A+ content to share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners use content modules to add images and text.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response
Creates a new A+ Content document.
-
#get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) ⇒ Peddler::Response
Returns an A+ Content document, if available.
-
#list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil, asin_set: nil, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Returns a list of ASINs that are related to the specified A+ Content document, if available.
-
#post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response
Submits an A+ Content document for review, approval, and publishing.
-
#post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) ⇒ Peddler::Response
Replaces all ASINs related to the specified A+ Content document, if available.
-
#post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response
Submits a request to suspend visible A+ Content.
-
#search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner.
-
#search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Searches for A+ Content publishing records, if available.
-
#update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response
Updates an existing A+ Content document.
-
#validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) ⇒ Peddler::Response
Checks if the A+ Content document is valid for use on a set of ASINs.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #typed, #typed?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response
Creates a new A+ Content document.
49 50 51 52 53 54 55 56 57 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 49 def create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments" body = post_content_document_request params = { "marketplaceId" => marketplace_id, }.compact parser = Peddler::Types::AplusContent20201101::PostContentDocumentResponse if typed? meter(rate_limit).post(path, body:, params:, parser:) end |
#get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) ⇒ Peddler::Response
Returns an A+ Content document, if available.
70 71 72 73 74 75 76 77 78 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 70 def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}" params = { "marketplaceId" => marketplace_id, "includedDataSet" => stringify_array(included_data_set), }.compact parser = Peddler::Types::AplusContent20201101::GetContentDocumentResponse if typed? meter(rate_limit).get(path, params:, parser:) end |
#list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil, asin_set: nil, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Returns a list of ASINs that are related to the specified A+ Content document, if available. If you don't
include the asinSet parameter, this operation returns all ASINs related to the content document.
118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 118 def list_content_document_asin_relations(content_reference_key, marketplace_id, included_data_set: nil, asin_set: nil, page_token: nil, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/asins" params = { "marketplaceId" => marketplace_id, "includedDataSet" => stringify_array(included_data_set), "asinSet" => stringify_array(asin_set), "pageToken" => page_token, }.compact parser = Peddler::Types::AplusContent20201101::ListContentDocumentAsinRelationsResponse if typed? meter(rate_limit).get(path, params:, parser:) end |
#post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response
Submits an A+ Content document for review, approval, and publishing.
209 210 211 212 213 214 215 216 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 209 def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/approvalSubmissions" params = { "marketplaceId" => marketplace_id, }.compact parser = Peddler::Types::AplusContent20201101::PostContentDocumentApprovalSubmissionResponse if typed? meter(rate_limit).post(path, params:, parser:) end |
#post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) ⇒ Peddler::Response
Replaces all ASINs related to the specified A+ Content document, if available. This operation can add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN will suspend the content document from that ASIN.
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 145 def post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/asins" body = post_content_document_asin_relations_request params = { "marketplaceId" => marketplace_id, }.compact parser = Peddler::Types::AplusContent20201101::PostContentDocumentAsinRelationsResponse if typed? meter(rate_limit).post(path, body:, params:, parser:) end |
#post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Peddler::Response
Submits a request to suspend visible A+ Content. This doesn't delete the content document or the ASIN relations.
228 229 230 231 232 233 234 235 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 228 def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}/suspendSubmissions" params = { "marketplaceId" => marketplace_id, }.compact parser = Peddler::Types::AplusContent20201101::PostContentDocumentSuspendSubmissionResponse if typed? meter(rate_limit).post(path, params:, parser:) end |
#search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Returns a list of all A+ Content documents, including metadata, that are assigned to a selling partner. To get
the actual contents of the A+ Content documents, call the getContentDocument operation.
31 32 33 34 35 36 37 38 39 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 31 def search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments" params = { "marketplaceId" => marketplace_id, "pageToken" => page_token, }.compact parser = Peddler::Types::AplusContent20201101::SearchContentDocumentsResponse if typed? meter(rate_limit).get(path, params:, parser:) end |
#search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) ⇒ Peddler::Response
Searches for A+ Content publishing records, if available.
188 189 190 191 192 193 194 195 196 197 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 188 def search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) path = "/aplus/2020-11-01/contentPublishRecords" params = { "marketplaceId" => marketplace_id, "asin" => asin, "pageToken" => page_token, }.compact parser = Peddler::Types::AplusContent20201101::SearchContentPublishRecordsResponse if typed? meter(rate_limit).get(path, params:, parser:) end |
#update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Peddler::Response
Updates an existing A+ Content document.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 91 def update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) path = "/aplus/2020-11-01/contentDocuments/#{percent_encode(content_reference_key)}" body = post_content_document_request params = { "marketplaceId" => marketplace_id, }.compact parser = Peddler::Types::AplusContent20201101::PostContentDocumentResponse if typed? meter(rate_limit).post(path, body:, params:, parser:) end |
#validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) ⇒ Peddler::Response
Checks if the A+ Content document is valid for use on a set of ASINs.
165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 165 def validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) path = "/aplus/2020-11-01/contentAsinValidations" body = post_content_document_request params = { "marketplaceId" => marketplace_id, "asinSet" => stringify_array(asin_set), }.compact parser = Peddler::Types::AplusContent20201101::ValidateContentDocumentAsinRelationsResponse if typed? meter(rate_limit).post(path, body:, params:, parser:) end |