Class: AmznSpApi::AplusContentApiModel::AplusContentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/aplus_content_api_model/api/aplus_content_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AplusContentApi

Returns a new instance of AplusContentApi.



14
15
16
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 14

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



12
13
14
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 12

def api_client
  @api_client
end

Instance Method Details

#create_content_document(body, marketplace_id, opts = {}) ⇒ PostContentDocumentResponse

Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



23
24
25
26
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 23

def create_content_document(body, marketplace_id, opts = {})
  data, _status_code, _headers = create_content_document_with_http_info(body, marketplace_id, opts)
  data
end

#create_content_document_with_http_info(body, marketplace_id, opts = {}) ⇒ Array<(PostContentDocumentResponse, Integer, Hash)>

Creates a new A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PostContentDocumentResponse, Integer, Hash)>)

    PostContentDocumentResponse data, response status code and response headers

Raises:

  • (ArgumentError)


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 33

def create_content_document_with_http_info(body, marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.create_content_document ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling AplusContentApi.create_content_document" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.create_content_document" if @api_client.config.client_side_validation && marketplace_id.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body)

  return_type = opts[:return_type] || 'PostContentDocumentResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#create_content_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#get_content_document(content_reference_key, marketplace_id, included_data_set, opts = {}) ⇒ GetContentDocumentResponse

Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • included_data_set

    The set of A+ Content data types to include in the response.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



81
82
83
84
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 81

def get_content_document(content_reference_key, marketplace_id, included_data_set, opts = {})
  data, _status_code, _headers = get_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, opts)
  data
end

#get_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, opts = {}) ⇒ Array<(GetContentDocumentResponse, Integer, Hash)>

Returns an A+ Content document, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • included_data_set

    The set of A+ Content data types to include in the response.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetContentDocumentResponse, Integer, Hash)>)

    GetContentDocumentResponse data, response status code and response headers

Raises:

  • (ArgumentError)


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 92

def get_content_document_with_http_info(content_reference_key, marketplace_id, included_data_set, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.get_content_document ...' if @api_client.config.debugging
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.get_content_document" if @api_client.config.client_side_validation && content_reference_key.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.get_content_document" if @api_client.config.client_side_validation && marketplace_id.nil?
  # verify the required parameter 'included_data_set' is set
  raise ArgumentError, "Missing the required parameter 'included_data_set' when calling AplusContentApi.get_content_document" if @api_client.config.client_side_validation && included_data_set.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id
  query_params[:includedDataSet] = @api_client.build_collection_param(included_data_set, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'GetContentDocumentResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#get_content_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#list_content_document_asin_relations(content_reference_key, marketplace_id, opts = {}) ⇒ ListContentDocumentAsinRelationsResponse

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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :included_data_set (Array<String>)

    The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.

  • :asin_set (Array<String>)

    The set of ASINs.

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:



143
144
145
146
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 143

def list_content_document_asin_relations(content_reference_key, marketplace_id, opts = {})
  data, _status_code, _headers = list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, opts)
  data
end

#list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, opts = {}) ⇒ Array<(ListContentDocumentAsinRelationsResponse, Integer, 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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :included_data_set (Array<String>)

    The set of A+ Content data types to include in the response. If you do not include this parameter, the operation returns the related ASINs without metadata.

  • :asin_set (Array<String>)

    The set of ASINs.

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:

Raises:

  • (ArgumentError)


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 156

def list_content_document_asin_relations_with_http_info(content_reference_key, marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.list_content_document_asin_relations ...' if @api_client.config.debugging
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.list_content_document_asin_relations" if @api_client.config.client_side_validation && content_reference_key.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.list_content_document_asin_relations" if @api_client.config.client_side_validation && marketplace_id.nil?
  raise ArgumentError, 'invalid value for "included_data_set", must include one of METADATA' if @api_client.config.client_side_validation && opts[:included_data_set] && !opts[:included_data_set].all? { |item| ['METADATA'].include?(item) }

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id
  query_params[:includedDataSet] = @api_client.build_collection_param(opts[:included_data_set], :csv) unless opts[:included_data_set].nil?
  query_params[:asinSet] = @api_client.build_collection_param(opts[:asin_set], :csv) unless opts[:asin_set].nil?
  query_params[:pageToken] = opts[:page_token] unless opts[:page_token].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'ListContentDocumentAsinRelationsResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#list_content_document_asin_relations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#post_content_document_approval_submission(content_reference_key, marketplace_id, opts = {}) ⇒ PostContentDocumentApprovalSubmissionResponse

Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



205
206
207
208
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 205

def post_content_document_approval_submission(content_reference_key, marketplace_id, opts = {})
  data, _status_code, _headers = post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, opts)
  data
end

#post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, opts = {}) ⇒ Array<(PostContentDocumentApprovalSubmissionResponse, Integer, Hash)>

Submits an A+ Content document for review, approval, and publishing. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 215

def post_content_document_approval_submission_with_http_info(content_reference_key, marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.post_content_document_approval_submission ...' if @api_client.config.debugging
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.post_content_document_approval_submission" if @api_client.config.client_side_validation && content_reference_key.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.post_content_document_approval_submission" if @api_client.config.client_side_validation && marketplace_id.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/approvalSubmissions'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'PostContentDocumentApprovalSubmissionResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#post_content_document_approval_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#post_content_document_asin_relations(body, marketplace_id, content_reference_key, opts = {}) ⇒ PostContentDocumentAsinRelationsResponse

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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • body

    The content document ASIN relations request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



261
262
263
264
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 261

def post_content_document_asin_relations(body, marketplace_id, content_reference_key, opts = {})
  data, _status_code, _headers = post_content_document_asin_relations_with_http_info(body, marketplace_id, content_reference_key, opts)
  data
end

#post_content_document_asin_relations_with_http_info(body, marketplace_id, content_reference_key, opts = {}) ⇒ Array<(PostContentDocumentAsinRelationsResponse, Integer, 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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • body

    The content document ASIN relations request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 272

def post_content_document_asin_relations_with_http_info(body, marketplace_id, content_reference_key, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.post_content_document_asin_relations ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling AplusContentApi.post_content_document_asin_relations" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.post_content_document_asin_relations" if @api_client.config.client_side_validation && marketplace_id.nil?
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.post_content_document_asin_relations" if @api_client.config.client_side_validation && content_reference_key.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/asins'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body)

  return_type = opts[:return_type] || 'PostContentDocumentAsinRelationsResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#post_content_document_asin_relations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#post_content_document_suspend_submission(content_reference_key, marketplace_id, opts = {}) ⇒ PostContentDocumentSuspendSubmissionResponse

Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



321
322
323
324
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 321

def post_content_document_suspend_submission(content_reference_key, marketplace_id, opts = {})
  data, _status_code, _headers = post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, opts)
  data
end

#post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, opts = {}) ⇒ Array<(PostContentDocumentSuspendSubmissionResponse, Integer, Hash)>

Submits a request to suspend visible A+ Content. This neither deletes the content document nor the ASIN relations. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ content identifier.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 331

def post_content_document_suspend_submission_with_http_info(content_reference_key, marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.post_content_document_suspend_submission ...' if @api_client.config.debugging
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.post_content_document_suspend_submission" if @api_client.config.client_side_validation && content_reference_key.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.post_content_document_suspend_submission" if @api_client.config.client_side_validation && marketplace_id.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}/suspendSubmissions'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'PostContentDocumentSuspendSubmissionResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#post_content_document_suspend_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#search_content_documents(marketplace_id, opts = {}) ⇒ SearchContentDocumentsResponse

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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:



376
377
378
379
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 376

def search_content_documents(marketplace_id, opts = {})
  data, _status_code, _headers = search_content_documents_with_http_info(marketplace_id, opts)
  data
end

#search_content_documents_with_http_info(marketplace_id, opts = {}) ⇒ Array<(SearchContentDocumentsResponse, Integer, 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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:

Raises:

  • (ArgumentError)


386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 386

def search_content_documents_with_http_info(marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.search_content_documents ...' if @api_client.config.debugging
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.search_content_documents" if @api_client.config.client_side_validation && marketplace_id.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id
  query_params[:pageToken] = opts[:page_token] unless opts[:page_token].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'SearchContentDocumentsResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#search_content_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#search_content_publish_records(marketplace_id, asin, opts = {}) ⇒ SearchContentPublishRecordsResponse

Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • asin

    The Amazon Standard Identification Number (ASIN).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:



431
432
433
434
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 431

def search_content_publish_records(marketplace_id, asin, opts = {})
  data, _status_code, _headers = search_content_publish_records_with_http_info(marketplace_id, asin, opts)
  data
end

#search_content_publish_records_with_http_info(marketplace_id, asin, opts = {}) ⇒ Array<(SearchContentPublishRecordsResponse, Integer, Hash)>

Searches for A+ Content publishing records, if available. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • asin

    The Amazon Standard Identification Number (ASIN).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_token (String)

    A page token from the nextPageToken response element returned by your previous call to this operation. nextPageToken is returned when the results of a call exceed the page size. To get the next page of results, call the operation and include pageToken as the only parameter. Specifying pageToken with any other parameter will cause the request to fail. When no nextPageToken value is returned there are no more pages to return. A pageToken value is not usable across different operations.

Returns:

Raises:

  • (ArgumentError)


442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 442

def search_content_publish_records_with_http_info(marketplace_id, asin, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.search_content_publish_records ...' if @api_client.config.debugging
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.search_content_publish_records" if @api_client.config.client_side_validation && marketplace_id.nil?
  # verify the required parameter 'asin' is set
  raise ArgumentError, "Missing the required parameter 'asin' when calling AplusContentApi.search_content_publish_records" if @api_client.config.client_side_validation && asin.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentPublishRecords'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id
  query_params[:asin] = asin
  query_params[:pageToken] = opts[:page_token] unless opts[:page_token].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body]

  return_type = opts[:return_type] || 'SearchContentPublishRecordsResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#search_content_publish_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#update_content_document(body, marketplace_id, content_reference_key, opts = {}) ⇒ PostContentDocumentResponse

Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



490
491
492
493
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 490

def update_content_document(body, marketplace_id, content_reference_key, opts = {})
  data, _status_code, _headers = update_content_document_with_http_info(body, marketplace_id, content_reference_key, opts)
  data
end

#update_content_document_with_http_info(body, marketplace_id, content_reference_key, opts = {}) ⇒ Array<(PostContentDocumentResponse, Integer, Hash)>

Updates an existing A+ Content document. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • content_reference_key

    The unique reference key for the A+ Content document. A content reference key cannot form a permalink and may change in the future. A content reference key is not guaranteed to match any A+ Content identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PostContentDocumentResponse, Integer, Hash)>)

    PostContentDocumentResponse data, response status code and response headers

Raises:

  • (ArgumentError)


501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 501

def update_content_document_with_http_info(body, marketplace_id, content_reference_key, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.update_content_document ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling AplusContentApi.update_content_document" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.update_content_document" if @api_client.config.client_side_validation && marketplace_id.nil?
  # verify the required parameter 'content_reference_key' is set
  raise ArgumentError, "Missing the required parameter 'content_reference_key' when calling AplusContentApi.update_content_document" if @api_client.config.client_side_validation && content_reference_key.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentDocuments/{contentReferenceKey}'.sub('{' + 'contentReferenceKey' + '}', content_reference_key.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body)

  return_type = opts[:return_type] || 'PostContentDocumentResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#update_content_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#validate_content_document_asin_relations(body, marketplace_id, opts = {}) ⇒ ValidateContentDocumentAsinRelationsResponse

Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asin_set (Array<String>)

    The set of ASINs.

Returns:



551
552
553
554
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 551

def validate_content_document_asin_relations(body, marketplace_id, opts = {})
  data, _status_code, _headers = validate_content_document_asin_relations_with_http_info(body, marketplace_id, opts)
  data
end

#validate_content_document_asin_relations_with_http_info(body, marketplace_id, opts = {}) ⇒ Array<(ValidateContentDocumentAsinRelationsResponse, Integer, Hash)>

Checks if the A+ Content document is valid for use on a set of ASINs. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • body

    The content document request details.

  • marketplace_id

    The identifier for the marketplace where the A+ Content is published.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :asin_set (Array<String>)

    The set of ASINs.

Returns:

Raises:

  • (ArgumentError)


562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# File 'lib/aplus_content_api_model/api/aplus_content_api.rb', line 562

def validate_content_document_asin_relations_with_http_info(body, marketplace_id, opts = {})
  @api_client.config.logger.debug 'Calling API: AplusContentApi.validate_content_document_asin_relations ...' if @api_client.config.debugging
  # verify the required parameter 'body' is set
  raise ArgumentError, "Missing the required parameter 'body' when calling AplusContentApi.validate_content_document_asin_relations" if @api_client.config.client_side_validation && body.nil?
  # verify the required parameter 'marketplace_id' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_id' when calling AplusContentApi.validate_content_document_asin_relations" if @api_client.config.client_side_validation && marketplace_id.nil?

  # resource path
  local_var_path = '/aplus/2020-11-01/contentAsinValidations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:marketplaceId] = marketplace_id
  query_params[:asinSet] = @api_client.build_collection_param(opts[:asin_set], :csv) unless opts[:asin_set].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body)

  return_type = opts[:return_type] || 'ValidateContentDocumentAsinRelationsResponse'

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
                                                    header_params: header_params,
                                                    query_params: query_params,
                                                    form_params: form_params,
                                                    body: post_body,
                                                    auth_names: auth_names,
                                                    return_type: return_type)

  @api_client.config.logger.debug "API called: AplusContentApi#validate_content_document_asin_relations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end