@scaleleap/selling-partner-api-sdk
Version:
📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API
348 lines • 34.1 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Selling Partner API for Listings Items
* The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listing Items API Use Case Guide](doc:listings-items-api-v2020-09-01-use-case-guide).
*
* The version of the OpenAPI document: 2020-09-01
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListingsApi = exports.ListingsApiFactory = exports.ListingsApiFp = exports.ListingsApiAxiosParamCreator = exports.PatchOperationOpEnum = exports.ListingsItemSubmissionResponseStatusEnum = exports.ListingsItemPutRequestRequirementsEnum = exports.IssueSeverityEnum = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("./common");
// @ts-ignore
const base_1 = require("./base");
/**
* @export
* @enum {string}
*/
var IssueSeverityEnum;
(function (IssueSeverityEnum) {
IssueSeverityEnum["Error"] = "ERROR";
IssueSeverityEnum["Warning"] = "WARNING";
IssueSeverityEnum["Info"] = "INFO";
})(IssueSeverityEnum || (exports.IssueSeverityEnum = IssueSeverityEnum = {}));
/**
* @export
* @enum {string}
*/
var ListingsItemPutRequestRequirementsEnum;
(function (ListingsItemPutRequestRequirementsEnum) {
ListingsItemPutRequestRequirementsEnum["Listing"] = "LISTING";
ListingsItemPutRequestRequirementsEnum["ListingProductOnly"] = "LISTING_PRODUCT_ONLY";
ListingsItemPutRequestRequirementsEnum["ListingOfferOnly"] = "LISTING_OFFER_ONLY";
})(ListingsItemPutRequestRequirementsEnum || (exports.ListingsItemPutRequestRequirementsEnum = ListingsItemPutRequestRequirementsEnum = {}));
/**
* @export
* @enum {string}
*/
var ListingsItemSubmissionResponseStatusEnum;
(function (ListingsItemSubmissionResponseStatusEnum) {
ListingsItemSubmissionResponseStatusEnum["Accepted"] = "ACCEPTED";
ListingsItemSubmissionResponseStatusEnum["Invalid"] = "INVALID";
})(ListingsItemSubmissionResponseStatusEnum || (exports.ListingsItemSubmissionResponseStatusEnum = ListingsItemSubmissionResponseStatusEnum = {}));
/**
* @export
* @enum {string}
*/
var PatchOperationOpEnum;
(function (PatchOperationOpEnum) {
PatchOperationOpEnum["Add"] = "add";
PatchOperationOpEnum["Replace"] = "replace";
PatchOperationOpEnum["Delete"] = "delete";
})(PatchOperationOpEnum || (exports.PatchOperationOpEnum = PatchOperationOpEnum = {}));
/**
* ListingsApi - axios parameter creator
* @export
*/
const ListingsApiAxiosParamCreator = function (configuration) {
return {
/**
* Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteListingsItem: async (sellerId, sku, marketplaceIds, issueLocale, options = {}) => {
// verify required parameter 'sellerId' is not null or undefined
(0, common_1.assertParamExists)('deleteListingsItem', 'sellerId', sellerId);
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('deleteListingsItem', 'sku', sku);
// verify required parameter 'marketplaceIds' is not null or undefined
(0, common_1.assertParamExists)('deleteListingsItem', 'marketplaceIds', marketplaceIds);
const localVarPath = `/listings/2020-09-01/items/{sellerId}/{sku}`
.replace(`{${"sellerId"}}`, encodeURIComponent(String(sellerId)))
.replace(`{${"sku"}}`, encodeURIComponent(String(sku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceIds) {
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
}
if (issueLocale !== undefined) {
localVarQueryParameter['issueLocale'] = issueLocale;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* 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. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPatchRequest} body The request body schema for the patchListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchListingsItem: async (sellerId, sku, marketplaceIds, body, issueLocale, options = {}) => {
// verify required parameter 'sellerId' is not null or undefined
(0, common_1.assertParamExists)('patchListingsItem', 'sellerId', sellerId);
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('patchListingsItem', 'sku', sku);
// verify required parameter 'marketplaceIds' is not null or undefined
(0, common_1.assertParamExists)('patchListingsItem', 'marketplaceIds', marketplaceIds);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('patchListingsItem', 'body', body);
const localVarPath = `/listings/2020-09-01/items/{sellerId}/{sku}`
.replace(`{${"sellerId"}}`, encodeURIComponent(String(sellerId)))
.replace(`{${"sku"}}`, encodeURIComponent(String(sku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceIds) {
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
}
if (issueLocale !== undefined) {
localVarQueryParameter['issueLocale'] = issueLocale;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Creates a new or fully-updates an existing listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPutRequest} body The request body schema for the putListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
putListingsItem: async (sellerId, sku, marketplaceIds, body, issueLocale, options = {}) => {
// verify required parameter 'sellerId' is not null or undefined
(0, common_1.assertParamExists)('putListingsItem', 'sellerId', sellerId);
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('putListingsItem', 'sku', sku);
// verify required parameter 'marketplaceIds' is not null or undefined
(0, common_1.assertParamExists)('putListingsItem', 'marketplaceIds', marketplaceIds);
// verify required parameter 'body' is not null or undefined
(0, common_1.assertParamExists)('putListingsItem', 'body', body);
const localVarPath = `/listings/2020-09-01/items/{sellerId}/{sku}`
.replace(`{${"sellerId"}}`, encodeURIComponent(String(sellerId)))
.replace(`{${"sku"}}`, encodeURIComponent(String(sku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
if (marketplaceIds) {
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
}
if (issueLocale !== undefined) {
localVarQueryParameter['issueLocale'] = issueLocale;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.ListingsApiAxiosParamCreator = ListingsApiAxiosParamCreator;
/**
* ListingsApi - functional programming interface
* @export
*/
const ListingsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.ListingsApiAxiosParamCreator)(configuration);
return {
/**
* Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteListingsItem(sellerId, sku, marketplaceIds, issueLocale, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteListingsItem(sellerId, sku, marketplaceIds, issueLocale, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* 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. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPatchRequest} body The request body schema for the patchListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async patchListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.patchListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Creates a new or fully-updates an existing listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPutRequest} body The request body schema for the putListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async putListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.putListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
};
};
exports.ListingsApiFp = ListingsApiFp;
/**
* ListingsApi - factory interface
* @export
*/
const ListingsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.ListingsApiFp)(configuration);
return {
/**
* Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteListingsItem(sellerId, sku, marketplaceIds, issueLocale, options) {
return localVarFp.deleteListingsItem(sellerId, sku, marketplaceIds, issueLocale, options).then((request) => request(axios, basePath));
},
/**
* 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. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPatchRequest} body The request body schema for the patchListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options) {
return localVarFp.patchListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options).then((request) => request(axios, basePath));
},
/**
* Creates a new or fully-updates an existing listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {string} sellerId A selling partner identifier, such as a merchant account or vendor code.
* @param {string} sku A selling partner provided identifier for an Amazon listing.
* @param {Array<string>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
* @param {ListingsItemPutRequest} body The request body schema for the putListingsItem operation.
* @param {string} [issueLocale] A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". Localized messages default to \"en_US\" when a localization is not available in the specified locale.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
putListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options) {
return localVarFp.putListingsItem(sellerId, sku, marketplaceIds, body, issueLocale, options).then((request) => request(axios, basePath));
},
};
};
exports.ListingsApiFactory = ListingsApiFactory;
/**
* ListingsApi - object-oriented interface
* @export
* @class ListingsApi
* @extends {BaseAPI}
*/
class ListingsApi extends base_1.BaseAPI {
/**
* Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {ListingsApiDeleteListingsItemRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListingsApi
*/
deleteListingsItem(requestParameters, options) {
return (0, exports.ListingsApiFp)(this.configuration).deleteListingsItem(requestParameters.sellerId, requestParameters.sku, requestParameters.marketplaceIds, requestParameters.issueLocale, options).then((request) => request(this.axios, this.basePath));
}
/**
* 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. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {ListingsApiPatchListingsItemRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListingsApi
*/
patchListingsItem(requestParameters, options) {
return (0, exports.ListingsApiFp)(this.configuration).patchListingsItem(requestParameters.sellerId, requestParameters.sku, requestParameters.marketplaceIds, requestParameters.body, requestParameters.issueLocale, options).then((request) => request(this.axios, this.basePath));
}
/**
* Creates a new or fully-updates an existing listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
* @param {ListingsApiPutListingsItemRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListingsApi
*/
putListingsItem(requestParameters, options) {
return (0, exports.ListingsApiFp)(this.configuration).putListingsItem(requestParameters.sellerId, requestParameters.sku, requestParameters.marketplaceIds, requestParameters.body, requestParameters.issueLocale, options).then((request) => request(this.axios, this.basePath));
}
}
exports.ListingsApi = ListingsApi;
//# sourceMappingURL=api.js.map