<?php
|
/**
|
* This class is autogenerated by the Spapi class generator
|
* Date of generation: 2022-05-26
|
* Specification: https://github.com/amzn/selling-partner-api-models/blob/main/models/product-pricing-api-model/productPricingV0.json
|
* Source MD5 signature: c03fed5dfd9cd9e5100d03ccc682be59
|
*
|
*
|
* Selling Partner API for Pricing
|
* The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
|
*/
|
namespace DoubleBreak\Spapi\Api;
|
use DoubleBreak\Spapi\Client;
|
|
class ProductPricing extends Client {
|
|
/**
|
* Operation getPricing
|
*
|
* @param array $queryParams
|
* - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
|
* - *asins* array - A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
* - *skus* array - A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
* - *itemType* string - Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.
|
* - *itemCondition* string - Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
* - *offerType* string - Indicates whether to request pricing information for the seller's B2C or B2B offers. Default is B2C.
|
*
|
*/
|
public function getPricing($queryParams = [])
|
{
|
return $this->send("/products/pricing/v0/price", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getPricingAsync($queryParams = [])
|
{
|
return $this->sendAsync("/products/pricing/v0/price", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation getCompetitivePricing
|
*
|
* @param array $queryParams
|
* - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
|
* - *asins* array - A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
|
* - *skus* array - A list of up to twenty seller SKU values used to identify items in the given marketplace.
|
* - *itemType* string - Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.
|
* - *customerType* string - Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
|
*
|
*/
|
public function getCompetitivePricing($queryParams = [])
|
{
|
return $this->send("/products/pricing/v0/competitivePrice", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getCompetitivePricingAsync($queryParams = [])
|
{
|
return $this->sendAsync("/products/pricing/v0/competitivePrice", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation getListingOffers
|
*
|
* @param string $sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.
|
*
|
* @param array $queryParams
|
* - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
|
* - *itemCondition* string - Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
* - *customerType* string - Indicates whether to request Consumer or Business offers. Default is Consumer.
|
*
|
*/
|
public function getListingOffers($sellerSKU, $queryParams = [])
|
{
|
return $this->send("/products/pricing/v0/listings/{$sellerSKU}/offers", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getListingOffersAsync($sellerSKU, $queryParams = [])
|
{
|
return $this->sendAsync("/products/pricing/v0/listings/{$sellerSKU}/offers", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation getItemOffers
|
*
|
* @param string $asin The Amazon Standard Identification Number (ASIN) of the item.
|
*
|
* @param array $queryParams
|
* - *marketplaceId* string - A marketplace identifier. Specifies the marketplace for which prices are returned.
|
* - *itemCondition* string - Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
|
* - *customerType* string - Indicates whether to request Consumer or Business offers. Default is Consumer.
|
*
|
*/
|
public function getItemOffers($asin, $queryParams = [])
|
{
|
return $this->send("/products/pricing/v0/items/{$asin}/offers", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
public function getItemOffersAsync($asin, $queryParams = [])
|
{
|
return $this->sendAsync("/products/pricing/v0/items/{$asin}/offers", [
|
'method' => 'GET',
|
'query' => $queryParams,
|
]);
|
}
|
|
/**
|
* Operation getItemOffersBatch
|
*
|
*/
|
public function getItemOffersBatch($body = [])
|
{
|
return $this->send("/batches/products/pricing/v0/itemOffers", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
public function getItemOffersBatchAsync($body = [])
|
{
|
return $this->sendAsync("/batches/products/pricing/v0/itemOffers", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
/**
|
* Operation getListingOffersBatch
|
*
|
*/
|
public function getListingOffersBatch($body = [])
|
{
|
return $this->send("/batches/products/pricing/v0/listingOffers", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
|
public function getListingOffersBatchAsync($body = [])
|
{
|
return $this->sendAsync("/batches/products/pricing/v0/listingOffers", [
|
'method' => 'POST',
|
'json' => $body
|
]);
|
}
|
}
|