Class: AmzSpApi::ListingsItemsApiModel::ListingsApi
- Inherits:
-
Object
- Object
- AmzSpApi::ListingsItemsApiModel::ListingsApi
- Defined in:
- lib/listings-items-api-model/api/listings_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_listings_item(seller_id, sku, marketplace_ids, opts = {}) ⇒ ListingsItemSubmissionResponse
Delete a listings item for a selling partner.
-
#delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Delete a listings item for a selling partner.
-
#get_listings_item(seller_id, sku, marketplace_ids, opts = {}) ⇒ Item
Returns details about a listings item for a selling partner.
-
#get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) ⇒ Array<(Item, Integer, Hash)>
Returns details about a listings item for a selling partner.
-
#initialize(api_client = ApiClient.default) ⇒ ListingsApi
constructor
A new instance of ListingsApi.
-
#patch_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ ListingsItemSubmissionResponse
Partially update (patch) a listings item for a selling partner.
-
#patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Partially update (patch) a listings item for a selling partner.
-
#put_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ ListingsItemSubmissionResponse
Creates a new or fully-updates an existing listings item for a selling partner.
-
#put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Creates a new or fully-updates an existing listings item for a selling partner.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ListingsApi
Returns a new instance of ListingsApi.
16 17 18 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#delete_listings_item(seller_id, sku, marketplace_ids, opts = {}) ⇒ ListingsItemSubmissionResponse
Delete a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
26 27 28 29 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 26 def delete_listings_item(seller_id, sku, marketplace_ids, opts = {}) data, _status_code, _headers = delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts) data end |
#delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Delete a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 38 def delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.delete_listings_item ...' end # verify the required parameter 'seller_id' is set if @api_client.config.client_side_validation && seller_id.nil? fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.delete_listings_item" end # verify the required parameter 'sku' is set if @api_client.config.client_side_validation && sku.nil? fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.delete_listings_item" end # verify the required parameter 'marketplace_ids' is set if @api_client.config.client_side_validation && marketplace_ids.nil? fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.delete_listings_item" end # resource path local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv) query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].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] || 'ListingsItemSubmissionResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#delete_listings_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_listings_item(seller_id, sku, marketplace_ids, opts = {}) ⇒ Item
Returns details about a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
97 98 99 100 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 97 def get_listings_item(seller_id, sku, marketplace_ids, opts = {}) data, _status_code, _headers = get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts) data end |
#get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) ⇒ Array<(Item, Integer, Hash)>
Returns details about a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 110 def get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.get_listings_item ...' end # verify the required parameter 'seller_id' is set if @api_client.config.client_side_validation && seller_id.nil? fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.get_listings_item" end # verify the required parameter 'sku' is set if @api_client.config.client_side_validation && sku.nil? fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.get_listings_item" end # verify the required parameter 'marketplace_ids' is set if @api_client.config.client_side_validation && marketplace_ids.nil? fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.get_listings_item" end if @api_client.config.client_side_validation && opts[:'included_data'] && !opts[:'included_data'].all? { |item| ['summaries', 'attributes', 'issues', 'offers', 'fulfillmentAvailability', 'procurement'].include?(item) } fail ArgumentError, 'invalid value for "included_data", must include one of summaries, attributes, issues, offers, fulfillmentAvailability, procurement' end # resource path local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv) query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil? query_params[:'includedData'] = @api_client.build_collection_param(opts[:'included_data'], :csv) if !opts[:'included_data'].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] || 'Item' 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#get_listings_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ ListingsItemSubmissionResponse
Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
173 174 175 176 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 173 def patch_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) data, _status_code, _headers = patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts) data end |
#patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 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 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 186 def patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.patch_listings_item ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ListingsApi.patch_listings_item" end # verify the required parameter 'marketplace_ids' is set if @api_client.config.client_side_validation && marketplace_ids.nil? fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.patch_listings_item" end # verify the required parameter 'seller_id' is set if @api_client.config.client_side_validation && seller_id.nil? fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.patch_listings_item" end # verify the required parameter 'sku' is set if @api_client.config.client_side_validation && sku.nil? fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.patch_listings_item" end # resource path local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv) query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].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] || 'ListingsItemSubmissionResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:PATCH, 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#patch_listings_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ ListingsItemSubmissionResponse
Creates a new or fully-updates an existing listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
251 252 253 254 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 251 def put_listings_item(body, marketplace_ids, seller_id, sku, opts = {}) data, _status_code, _headers = put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts) data end |
#put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) ⇒ Array<(ListingsItemSubmissionResponse, Integer, Hash)>
Creates a new or fully-updates an existing listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).
264 265 266 267 268 269 270 271 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 315 316 317 318 319 320 |
# File 'lib/listings-items-api-model/api/listings_api.rb', line 264 def put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.put_listings_item ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ListingsApi.put_listings_item" end # verify the required parameter 'marketplace_ids' is set if @api_client.config.client_side_validation && marketplace_ids.nil? fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.put_listings_item" end # verify the required parameter 'seller_id' is set if @api_client.config.client_side_validation && seller_id.nil? fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.put_listings_item" end # verify the required parameter 'sku' is set if @api_client.config.client_side_validation && sku.nil? fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.put_listings_item" end # resource path local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv) query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].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] || 'ListingsItemSubmissionResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:PUT, 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#put_listings_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |