Class: Peddler::API::AplusContent20201101
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::API::AplusContent20201101
- Defined in:
- lib/peddler/api/aplus_content_2020_11_01.rb
Overview
Selling Partner API for A+ Content Management
With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text.
Instance Attribute Summary
Attributes inherited from Peddler::API
Instance Method Summary collapse
-
#create_content_document(marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Hash
Creates a new A+ Content document.
-
#get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) ⇒ Hash
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) ⇒ Hash
Returns a list of ASINs related to the specified A+ Content document, if available.
-
#post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Hash
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) ⇒ Hash
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) ⇒ Hash
Submits a request to suspend visible A+ Content.
-
#search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) ⇒ Hash
Returns a list of all A+ Content documents assigned to a selling partner.
-
#search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) ⇒ Hash
Searches for A+ Content publishing records, if available.
-
#update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Hash
Updates an existing A+ Content document.
-
#validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) ⇒ Hash
Checks if the A+ Content document is valid for use on a set of ASINs.
Methods inherited from Peddler::API
#cannot_sandbox!, #endpoint_uri, #http, #initialize, #meter, #must_sandbox!, #retriable, #sandbox, #sandbox?, #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) ⇒ Hash
Creates a new A+ Content document.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 50 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 meter(rate_limit).post(path, body:, params:) end |
#get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) ⇒ Hash
Returns an A+ Content document, if available.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 71 def get_content_document(content_reference_key, marketplace_id, included_data_set, rate_limit: 10.0) cannot_sandbox! path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}" params = { "marketplaceId" => marketplace_id, "includedDataSet" => included_data_set, }.compact meter(rate_limit).get(path, params:) 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) ⇒ Hash
Returns a list of ASINs related to the specified A+ Content document, if available. If you do not include the asinSet parameter, the operation returns all ASINs related to the content document.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 122 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/#{content_reference_key}/asins" params = { "marketplaceId" => marketplace_id, "includedDataSet" => included_data_set, "asinSet" => asin_set, "pageToken" => page_token, }.compact meter(rate_limit).get(path, params:) end |
#post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Hash
Submits an A+ Content document for review, approval, and publishing.
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 214 def post_content_document_approval_submission(content_reference_key, marketplace_id, rate_limit: 10.0) cannot_sandbox! path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/approvalSubmissions" params = { "marketplaceId" => marketplace_id, }.compact meter(rate_limit).post(path, params:) end |
#post_content_document_asin_relations(content_reference_key, marketplace_id, post_content_document_asin_relations_request, rate_limit: 10.0) ⇒ Hash
Replaces all ASINs related to the specified A+ Content document, if available. This may add or remove ASINs, depending on the current set of related ASINs. Removing an ASIN has the side effect of suspending the content document from that ASIN.
148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 148 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/#{content_reference_key}/asins" body = post_content_document_asin_relations_request params = { "marketplaceId" => marketplace_id, }.compact meter(rate_limit).post(path, body:, params:) end |
#post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) ⇒ Hash
Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations.
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 234 def post_content_document_suspend_submission(content_reference_key, marketplace_id, rate_limit: 10.0) cannot_sandbox! path = "/aplus/2020-11-01/contentDocuments/#{content_reference_key}/suspendSubmissions" params = { "marketplaceId" => marketplace_id, }.compact meter(rate_limit).post(path, params:) end |
#search_content_documents(marketplace_id, page_token: nil, rate_limit: 10.0) ⇒ Hash
Returns a list of all A+ Content documents assigned to a selling partner. This operation returns only the metadata of the A+ Content documents. Call the getContentDocument operation to get the actual contents of the A+ Content documents.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 32 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 meter(rate_limit).get(path, params:) end |
#search_content_publish_records(marketplace_id, asin, page_token: nil, rate_limit: 10.0) ⇒ Hash
Searches for A+ Content publishing records, if available.
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 193 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 meter(rate_limit).get(path, params:) end |
#update_content_document(content_reference_key, marketplace_id, post_content_document_request, rate_limit: 10.0) ⇒ Hash
Updates an existing A+ Content document.
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 92 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/#{content_reference_key}" body = post_content_document_request params = { "marketplaceId" => marketplace_id, }.compact meter(rate_limit).post(path, body:, params:) end |
#validate_content_document_asin_relations(marketplace_id, post_content_document_request, asin_set: nil, rate_limit: 10.0) ⇒ Hash
Checks if the A+ Content document is valid for use on a set of ASINs.
168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/peddler/api/aplus_content_2020_11_01.rb', line 168 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" => asin_set, }.compact meter(rate_limit).post(path, body:, params:) end |