Class: Peddler::APIs::SellersV1
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::SellersV1
- Defined in:
- lib/peddler/apis/sellers_v1.rb,
lib/peddler/apis/sellers_v1/error.rb,
lib/peddler/apis/sellers_v1/account.rb,
lib/peddler/apis/sellers_v1/address.rb,
lib/peddler/apis/sellers_v1/business.rb,
lib/peddler/apis/sellers_v1/error_list.rb,
lib/peddler/apis/sellers_v1/marketplace.rb,
lib/peddler/apis/sellers_v1/participation.rb,
lib/peddler/apis/sellers_v1/primary_contact.rb,
lib/peddler/apis/sellers_v1/get_account_response.rb,
lib/peddler/apis/sellers_v1/marketplace_participation.rb,
lib/peddler/apis/sellers_v1/marketplace_participation_list.rb,
lib/peddler/apis/sellers_v1/get_marketplace_participations_response.rb
Overview
The Selling Partner API for Sellers
The Selling Partner API for Sellers (Sellers API) provides essential information about seller accounts, such as:
- The marketplaces a seller can list in
- The default language and currency of a marketplace
- Whether the seller has suspended listings
Refer to the Sellers API reference for details about this API's operations, data types, and schemas.
Defined Under Namespace
Classes: ErrorList, MarketplaceParticipationList
Constant Summary collapse
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition in a human-readable form. attribute(:message, String) # @return [String] Additional details that can help you understand or fix the issue. attribute?(:details, String) end
- Account =
The response schema for the
getAccount
operation. Structure.new do # @return [String] The type of business registered for the seller account. attribute(:business_type, String, from: "businessType") # @return [Array<MarketplaceParticipation>] attribute(:marketplace_participation_list, [MarketplaceParticipation], from: "marketplaceParticipationList") # @return [String] The selling plan details. attribute(:selling_plan, String, from: "sellingPlan") # @return [Business] attribute?(:business, Business) # @return [PrimaryContact] attribute?(:primary_contact, PrimaryContact, from: "primaryContact") end
- Address =
Represents an address
Structure.new do # @return [String] Street address information. attribute(:address_line1, String, from: "addressLine1") # @return [String] The country code in two-character ISO 3166-1 alpha-2 format. attribute(:country_code, String, from: "countryCode") # @return [String] Additional street address information. attribute?(:address_line2, String, from: "addressLine2") # @return [String] The city. attribute?(:city, String) # @return [String] The postal code. attribute?(:postal_code, String, from: "postalCode") # @return [String] The state or province code. attribute?(:state_or_province_code, String, from: "stateOrProvinceCode") end
- Business =
Information about the seller's business. Certain fields may be omitted depending on the seller's
businessType
. Structure.new do # @return [String] The registered business name. attribute(:name, String) # @return [Address] The registered business address. attribute(:registered_business_address, Address, from: "registeredBusinessAddress") # @return [String] The seller's company registration number, if applicable. This field will be absent for # individual sellers and sole proprietorships. attribute?(:company_registration_number, String, from: "companyRegistrationNumber") # @return [String] The seller's company tax identification number, if applicable. This field will be present for # certain business types only, such as sole proprietorships. attribute?(:company_tax_identification_number, String, from: "companyTaxIdentificationNumber") # @return [String] The non-Latin script version of the registered business name, if applicable. attribute?(:non_latin_name, String, from: "nonLatinName") end
- Marketplace =
Information about an Amazon marketplace where a seller can list items and customers can view and purchase items.
Structure.new do # @return [String] The ISO 3166-1 alpha-2 format country code of the marketplace. attribute(:country_code, String, from: "countryCode") # @return [String] The ISO 4217 format currency code of the marketplace. attribute(:default_currency_code, String, from: "defaultCurrencyCode") # @return [String] The ISO 639-1 format language code of the marketplace. attribute(:default_language_code, String, from: "defaultLanguageCode") # @return [String] The domain name of the marketplace. attribute(:domain_name, String, from: "domainName") # @return [String] The encrypted marketplace value. attribute(:id, String) # @return [String] The marketplace name. attribute(:name, String) end
- Participation =
Information that is specific to a seller in a marketplace.
Structure.new do # @return [:boolean] Specifies if the seller has suspended listings. `true` if the seller Listing Status is set # to Inactive, otherwise `false`. attribute(:has_suspended_listings, :boolean, from: "hasSuspendedListings") # @return [:boolean] If `true`, the seller participates in the marketplace. Otherwise `false`. attribute(:participating, :boolean, from: "isParticipating") end
- PrimaryContact =
Information about the seller's primary contact.
Structure.new do # @return [Address] The primary contact's residential address. attribute(:address, Address) # @return [String] The full name of the seller's primary contact. attribute(:name, String) # @return [String] The non-Latin script version of the primary contact's name, if applicable. attribute?(:non_latin_name, String, from: "nonLatinName") end
- GetAccountResponse =
The response schema for the
getAccount
operation. Structure.new do # @return [Array<Error>] The errors encountered by the `getAccount` operation. attribute?(:errors, [Error]) # @return [Account] attribute?(:payload, Account) end
- MarketplaceParticipation =
Structure.new do # @return [Marketplace] attribute(:marketplace, Marketplace) # @return [Participation] attribute(:participation, Participation) # @return [String] The name of the seller's store as displayed in the marketplace. attribute(:store_name, String, from: "storeName") end
- GetMarketplaceParticipationsResponse =
The response schema for the
getMarketplaceParticipations
operation. Structure.new do # @return [Array<Error>] The errors encountered by the `getMarketplaceParticipations` operation. attribute?(:errors, [Error]) # @return [Array<MarketplaceParticipation>] The payload for the `getMarketplaceParticipations` operation. attribute?(:payload, [MarketplaceParticipation]) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#get_account(rate_limit: 0.016) ⇒ Peddler::Response
Returns information about a seller account and its marketplaces.
-
#get_marketplace_participations(rate_limit: 0.016) ⇒ Peddler::Response
Returns a list of marketplaces where the seller can list items and information about the seller's participation in those marketplaces.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#get_account(rate_limit: 0.016) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns information about a seller account and its marketplaces.
38 39 40 41 42 |
# File 'lib/peddler/apis/sellers_v1.rb', line 38 def get_account(rate_limit: 0.016) path = "/sellers/v1/account" parser = -> { GetAccountResponse } meter(rate_limit).get(path, parser:) end |
#get_marketplace_participations(rate_limit: 0.016) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns a list of marketplaces where the seller can list items and information about the seller's participation in those marketplaces.
27 28 29 30 31 |
# File 'lib/peddler/apis/sellers_v1.rb', line 27 def get_marketplace_participations(rate_limit: 0.016) path = "/sellers/v1/marketplaceParticipations" parser = -> { GetMarketplaceParticipationsResponse } meter(rate_limit).get(path, parser:) end |