Class: Peddler::APIs::CatalogItemsV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/catalog_items_v0.rb,
lib/peddler/apis/catalog_items_v0/error.rb,
lib/peddler/apis/catalog_items_v0/categories.rb,
lib/peddler/apis/catalog_items_v0/error_list.rb,
lib/peddler/apis/catalog_items_v0/list_of_categories.rb,
lib/peddler/apis/catalog_items_v0/list_catalog_categories_response.rb,
sig/peddler/apis/catalog_items_v0.rbs

Overview

Selling Partner API for Catalog Items

The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.

Defined Under Namespace

Classes: Categories, Error, ErrorList, ListCatalogCategoriesResponse, ListOfCategories

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU.

Parameters:

  • marketplace_id (String)

    A marketplace identifier. Specifies the marketplace for the item.

  • asin (String) (defaults to: nil)

    The Amazon Standard Identification Number (ASIN) of the item.

  • seller_sku (String) (defaults to: nil)

    Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (String)
  • asin: (String, nil) (defaults to: nil)
  • seller_sku: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



23
24
25
26
27
28
29
30
31
32
# File 'lib/peddler/apis/catalog_items_v0.rb', line 23

def list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0)
  path = "/catalog/v0/categories"
  params = {
    "MarketplaceId" => marketplace_id,
    "ASIN" => asin,
    "SellerSKU" => seller_sku,
  }.compact
  parser = -> { ListCatalogCategoriesResponse }
  get(path, params:, rate_limit:, parser:)
end