Class: Peddler::API::ProductTypeDefinitions20200901
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::API::ProductTypeDefinitions20200901
- Defined in:
- lib/peddler/api/product_type_definitions_2020_09_01.rb
Overview
Selling Partner API for Product Type Definitions
The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds). For more information, see the Product Type Definitions API Use Case Guide.
Instance Attribute Summary
Attributes inherited from Peddler::API
Instance Method Summary collapse
-
#get_definitions_product_type(product_type, marketplace_ids, seller_id: nil, product_type_version: "LATEST", requirements: "LISTING", requirements_enforced: "ENFORCED", locale: "DEFAULT", rate_limit: 5.0) ⇒ Hash
Retrieve an Amazon product type definition.
-
#search_definitions_product_types(marketplace_ids, keywords: nil, item_name: nil, locale: nil, search_locale: nil, rate_limit: 5.0) ⇒ Hash
Search for and return a list of Amazon product types that have definitions available.
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
#get_definitions_product_type(product_type, marketplace_ids, seller_id: nil, product_type_version: "LATEST", requirements: "LISTING", requirements_enforced: "ENFORCED", locale: "DEFAULT", rate_limit: 5.0) ⇒ Hash
This operation can make a static sandbox call.
Retrieve an Amazon product type definition.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/peddler/api/product_type_definitions_2020_09_01.rb', line 70 def get_definitions_product_type(product_type, marketplace_ids, seller_id: nil, product_type_version: "LATEST", requirements: "LISTING", requirements_enforced: "ENFORCED", locale: "DEFAULT", rate_limit: 5.0) path = "/definitions/2020-09-01/productTypes/#{product_type}" params = { "sellerId" => seller_id, "marketplaceIds" => marketplace_ids, "productTypeVersion" => product_type_version, "requirements" => requirements, "requirementsEnforced" => requirements_enforced, "locale" => locale, }.compact meter(rate_limit).get(path, params:) end |
#search_definitions_product_types(marketplace_ids, keywords: nil, item_name: nil, locale: nil, search_locale: nil, rate_limit: 5.0) ⇒ Hash
This operation can make a static sandbox call.
Search for and return a list of Amazon product types that have definitions available.
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/peddler/api/product_type_definitions_2020_09_01.rb', line 36 def search_definitions_product_types(marketplace_ids, keywords: nil, item_name: nil, locale: nil, search_locale: nil, rate_limit: 5.0) path = "/definitions/2020-09-01/productTypes" params = { "keywords" => keywords, "marketplaceIds" => marketplace_ids, "itemName" => item_name, "locale" => locale, "searchLocale" => search_locale, }.compact meter(rate_limit).get(path, params:) end |