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.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 53 def create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) cannot_sandbox! 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.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 76 def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) cannot_sandbox! 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.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 128 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) cannot_sandbox! 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.
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 227 def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) cannot_sandbox! 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.
157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 157 def post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) cannot_sandbox! 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.
248 249 250 251 252 253 254 255 256 257 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 248 def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) cannot_sandbox! 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.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 33 def search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) cannot_sandbox! 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.
204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 204 def search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) cannot_sandbox! 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.
99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 99 def update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) cannot_sandbox! 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.
179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/peddler/apis/aplus_content_2020_11_01.rb', line 179 def validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) cannot_sandbox! 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 |