@sp-api-sdk/product-pricing-api-v0 1.13.8 → 1.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -370,72 +370,57 @@ const ProductPricingApiFactory = function (configuration, basePath, axios) {
370
370
  return {
371
371
  /**
372
372
  * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
373
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
374
- * @param {'Asin' | 'Sku'} itemType 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.
375
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
376
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
377
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
373
+ * @param {ProductPricingApiGetCompetitivePricingRequest} requestParameters Request parameters.
378
374
  * @param {*} [options] Override http request option.
379
375
  * @throws {RequiredError}
380
376
  */
381
- getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) {
382
- return localVarFp.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options).then((request) => request(axios, basePath));
377
+ getCompetitivePricing(requestParameters, options) {
378
+ return localVarFp.getCompetitivePricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.customerType, options).then((request) => request(axios, basePath));
383
379
  },
384
380
  /**
385
381
  * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
386
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
387
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
388
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
389
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
382
+ * @param {ProductPricingApiGetItemOffersRequest} requestParameters Request parameters.
390
383
  * @param {*} [options] Override http request option.
391
384
  * @throws {RequiredError}
392
385
  */
393
- getItemOffers(marketplaceId, itemCondition, asin, customerType, options) {
394
- return localVarFp.getItemOffers(marketplaceId, itemCondition, asin, customerType, options).then((request) => request(axios, basePath));
386
+ getItemOffers(requestParameters, options) {
387
+ return localVarFp.getItemOffers(requestParameters.marketplaceId, requestParameters.itemCondition, requestParameters.asin, requestParameters.customerType, options).then((request) => request(axios, basePath));
395
388
  },
396
389
  /**
397
390
  * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
398
- * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody
391
+ * @param {ProductPricingApiGetItemOffersBatchRequest} requestParameters Request parameters.
399
392
  * @param {*} [options] Override http request option.
400
393
  * @throws {RequiredError}
401
394
  */
402
- getItemOffersBatch(getItemOffersBatchRequestBody, options) {
403
- return localVarFp.getItemOffersBatch(getItemOffersBatchRequestBody, options).then((request) => request(axios, basePath));
395
+ getItemOffersBatch(requestParameters, options) {
396
+ return localVarFp.getItemOffersBatch(requestParameters.getItemOffersBatchRequestBody, options).then((request) => request(axios, basePath));
404
397
  },
405
398
  /**
406
399
  * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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).
407
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
408
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
409
- * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
410
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
400
+ * @param {ProductPricingApiGetListingOffersRequest} requestParameters Request parameters.
411
401
  * @param {*} [options] Override http request option.
412
402
  * @throws {RequiredError}
413
403
  */
414
- getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) {
415
- return localVarFp.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options).then((request) => request(axios, basePath));
404
+ getListingOffers(requestParameters, options) {
405
+ return localVarFp.getListingOffers(requestParameters.marketplaceId, requestParameters.itemCondition, requestParameters.sellerSKU, requestParameters.customerType, options).then((request) => request(axios, basePath));
416
406
  },
417
407
  /**
418
408
  * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
419
- * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody
409
+ * @param {ProductPricingApiGetListingOffersBatchRequest} requestParameters Request parameters.
420
410
  * @param {*} [options] Override http request option.
421
411
  * @throws {RequiredError}
422
412
  */
423
- getListingOffersBatch(getListingOffersBatchRequestBody, options) {
424
- return localVarFp.getListingOffersBatch(getListingOffersBatchRequestBody, options).then((request) => request(axios, basePath));
413
+ getListingOffersBatch(requestParameters, options) {
414
+ return localVarFp.getListingOffersBatch(requestParameters.getListingOffersBatchRequestBody, options).then((request) => request(axios, basePath));
425
415
  },
426
416
  /**
427
417
  * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
428
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
429
- * @param {'Asin' | 'Sku'} itemType 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.
430
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
431
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
432
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
433
- * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C.
418
+ * @param {ProductPricingApiGetPricingRequest} requestParameters Request parameters.
434
419
  * @param {*} [options] Override http request option.
435
420
  * @throws {RequiredError}
436
421
  */
437
- getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) {
438
- return localVarFp.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options).then((request) => request(axios, basePath));
422
+ getPricing(requestParameters, options) {
423
+ return localVarFp.getPricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.itemCondition, requestParameters.offerType, options).then((request) => request(axios, basePath));
439
424
  },
440
425
  };
441
426
  };
@@ -15,8 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
17
  const tslib_1 = require("tslib");
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
18
  const axios_1 = tslib_1.__importDefault(require("axios"));
21
19
  exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
20
  /**
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
57
55
  */
58
56
  class RequiredError extends Error {
59
57
  field;
60
- name = "RequiredError";
61
58
  constructor(field, msg) {
62
59
  super(msg);
63
60
  this.field = field;
61
+ this.name = "RequiredError";
64
62
  }
65
63
  }
66
64
  exports.RequiredError = RequiredError;
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
81
81
  };
82
82
  exports.setOAuthToObject = setOAuthToObject;
83
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (parameter == null)
85
+ return;
84
86
  if (typeof parameter === "object") {
85
87
  if (Array.isArray(parameter)) {
86
88
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -364,72 +364,57 @@ export const ProductPricingApiFactory = function (configuration, basePath, axios
364
364
  return {
365
365
  /**
366
366
  * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
367
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
368
- * @param {'Asin' | 'Sku'} itemType 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.
369
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
370
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
371
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
367
+ * @param {ProductPricingApiGetCompetitivePricingRequest} requestParameters Request parameters.
372
368
  * @param {*} [options] Override http request option.
373
369
  * @throws {RequiredError}
374
370
  */
375
- getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options) {
376
- return localVarFp.getCompetitivePricing(marketplaceId, itemType, asins, skus, customerType, options).then((request) => request(axios, basePath));
371
+ getCompetitivePricing(requestParameters, options) {
372
+ return localVarFp.getCompetitivePricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.customerType, options).then((request) => request(axios, basePath));
377
373
  },
378
374
  /**
379
375
  * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
380
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
381
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
382
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
383
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
376
+ * @param {ProductPricingApiGetItemOffersRequest} requestParameters Request parameters.
384
377
  * @param {*} [options] Override http request option.
385
378
  * @throws {RequiredError}
386
379
  */
387
- getItemOffers(marketplaceId, itemCondition, asin, customerType, options) {
388
- return localVarFp.getItemOffers(marketplaceId, itemCondition, asin, customerType, options).then((request) => request(axios, basePath));
380
+ getItemOffers(requestParameters, options) {
381
+ return localVarFp.getItemOffers(requestParameters.marketplaceId, requestParameters.itemCondition, requestParameters.asin, requestParameters.customerType, options).then((request) => request(axios, basePath));
389
382
  },
390
383
  /**
391
384
  * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
392
- * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody
385
+ * @param {ProductPricingApiGetItemOffersBatchRequest} requestParameters Request parameters.
393
386
  * @param {*} [options] Override http request option.
394
387
  * @throws {RequiredError}
395
388
  */
396
- getItemOffersBatch(getItemOffersBatchRequestBody, options) {
397
- return localVarFp.getItemOffersBatch(getItemOffersBatchRequestBody, options).then((request) => request(axios, basePath));
389
+ getItemOffersBatch(requestParameters, options) {
390
+ return localVarFp.getItemOffersBatch(requestParameters.getItemOffersBatchRequestBody, options).then((request) => request(axios, basePath));
398
391
  },
399
392
  /**
400
393
  * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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).
401
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
402
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
403
- * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
404
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
394
+ * @param {ProductPricingApiGetListingOffersRequest} requestParameters Request parameters.
405
395
  * @param {*} [options] Override http request option.
406
396
  * @throws {RequiredError}
407
397
  */
408
- getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options) {
409
- return localVarFp.getListingOffers(marketplaceId, itemCondition, sellerSKU, customerType, options).then((request) => request(axios, basePath));
398
+ getListingOffers(requestParameters, options) {
399
+ return localVarFp.getListingOffers(requestParameters.marketplaceId, requestParameters.itemCondition, requestParameters.sellerSKU, requestParameters.customerType, options).then((request) => request(axios, basePath));
410
400
  },
411
401
  /**
412
402
  * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
413
- * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody
403
+ * @param {ProductPricingApiGetListingOffersBatchRequest} requestParameters Request parameters.
414
404
  * @param {*} [options] Override http request option.
415
405
  * @throws {RequiredError}
416
406
  */
417
- getListingOffersBatch(getListingOffersBatchRequestBody, options) {
418
- return localVarFp.getListingOffersBatch(getListingOffersBatchRequestBody, options).then((request) => request(axios, basePath));
407
+ getListingOffersBatch(requestParameters, options) {
408
+ return localVarFp.getListingOffersBatch(requestParameters.getListingOffersBatchRequestBody, options).then((request) => request(axios, basePath));
419
409
  },
420
410
  /**
421
411
  * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
422
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
423
- * @param {'Asin' | 'Sku'} itemType 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.
424
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
425
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
426
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
427
- * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C.
412
+ * @param {ProductPricingApiGetPricingRequest} requestParameters Request parameters.
428
413
  * @param {*} [options] Override http request option.
429
414
  * @throws {RequiredError}
430
415
  */
431
- getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options) {
432
- return localVarFp.getPricing(marketplaceId, itemType, asins, skus, itemCondition, offerType, options).then((request) => request(axios, basePath));
416
+ getPricing(requestParameters, options) {
417
+ return localVarFp.getPricing(requestParameters.marketplaceId, requestParameters.itemType, requestParameters.asins, requestParameters.skus, requestParameters.itemCondition, requestParameters.offerType, options).then((request) => request(axios, basePath));
433
418
  },
434
419
  };
435
420
  };
@@ -11,8 +11,6 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- // Some imports not used depending on template conditions
15
- // @ts-ignore
16
14
  import globalAxios from 'axios';
17
15
  export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
18
16
  /**
@@ -52,9 +50,9 @@ export class BaseAPI {
52
50
  */
53
51
  export class RequiredError extends Error {
54
52
  field;
55
- name = "RequiredError";
56
53
  constructor(field, msg) {
57
54
  super(msg);
58
55
  this.field = field;
56
+ this.name = "RequiredError";
59
57
  }
60
58
  }
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
73
73
  }
74
74
  };
75
75
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
+ if (parameter == null)
77
+ return;
76
78
  if (typeof parameter === "object") {
77
79
  if (Array.isArray(parameter)) {
78
80
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { GetItemOffersBatchRequest } from '../models';
16
16
  import { GetItemOffersBatchResponse } from '../models';
@@ -151,61 +151,46 @@ export declare const ProductPricingApiFp: (configuration?: Configuration) => {
151
151
  export declare const ProductPricingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
152
152
  /**
153
153
  * Returns competitive pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
154
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
155
- * @param {'Asin' | 'Sku'} itemType 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.
156
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
157
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
158
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request pricing information from the point of view of Consumer or Business buyers. Default is Consumer.
154
+ * @param {ProductPricingApiGetCompetitivePricingRequest} requestParameters Request parameters.
159
155
  * @param {*} [options] Override http request option.
160
156
  * @throws {RequiredError}
161
157
  */
162
- getCompetitivePricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array<string>, skus?: Array<string>, customerType?: 'Consumer' | 'Business', options?: any): AxiosPromise<GetPricingResponse>;
158
+ getCompetitivePricing(requestParameters: ProductPricingApiGetCompetitivePricingRequest, options?: AxiosRequestConfig): AxiosPromise<GetPricingResponse>;
163
159
  /**
164
160
  * Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
165
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
166
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
167
- * @param {string} asin The Amazon Standard Identification Number (ASIN) of the item.
168
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
161
+ * @param {ProductPricingApiGetItemOffersRequest} requestParameters Request parameters.
169
162
  * @param {*} [options] Override http request option.
170
163
  * @throws {RequiredError}
171
164
  */
172
- getItemOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', asin: string, customerType?: 'Consumer' | 'Business', options?: any): AxiosPromise<GetOffersResponse>;
165
+ getItemOffers(requestParameters: ProductPricingApiGetItemOffersRequest, options?: AxiosRequestConfig): AxiosPromise<GetOffersResponse>;
173
166
  /**
174
167
  * Returns the lowest priced offers for a batch of items based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
175
- * @param {GetItemOffersBatchRequest} getItemOffersBatchRequestBody
168
+ * @param {ProductPricingApiGetItemOffersBatchRequest} requestParameters Request parameters.
176
169
  * @param {*} [options] Override http request option.
177
170
  * @throws {RequiredError}
178
171
  */
179
- getItemOffersBatch(getItemOffersBatchRequestBody: GetItemOffersBatchRequest, options?: any): AxiosPromise<GetItemOffersBatchResponse>;
172
+ getItemOffersBatch(requestParameters: ProductPricingApiGetItemOffersBatchRequest, options?: AxiosRequestConfig): AxiosPromise<GetItemOffersBatchResponse>;
180
173
  /**
181
174
  * Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | 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).
182
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
183
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} itemCondition Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
184
- * @param {string} sellerSKU Identifies an item in the given marketplace. SellerSKU is qualified by the seller\&#39;s SellerId, which is included with every operation that you submit.
185
- * @param {'Consumer' | 'Business'} [customerType] Indicates whether to request Consumer or Business offers. Default is Consumer.
175
+ * @param {ProductPricingApiGetListingOffersRequest} requestParameters Request parameters.
186
176
  * @param {*} [options] Override http request option.
187
177
  * @throws {RequiredError}
188
178
  */
189
- getListingOffers(marketplaceId: string, itemCondition: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', sellerSKU: string, customerType?: 'Consumer' | 'Business', options?: any): AxiosPromise<GetOffersResponse>;
179
+ getListingOffers(requestParameters: ProductPricingApiGetListingOffersRequest, options?: AxiosRequestConfig): AxiosPromise<GetOffersResponse>;
190
180
  /**
191
181
  * Returns the lowest priced offers for a batch of listings by SKU. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
192
- * @param {GetListingOffersBatchRequest} getListingOffersBatchRequestBody
182
+ * @param {ProductPricingApiGetListingOffersBatchRequest} requestParameters Request parameters.
193
183
  * @param {*} [options] Override http request option.
194
184
  * @throws {RequiredError}
195
185
  */
196
- getListingOffersBatch(getListingOffersBatchRequestBody: GetListingOffersBatchRequest, options?: any): AxiosPromise<GetListingOffersBatchResponse>;
186
+ getListingOffersBatch(requestParameters: ProductPricingApiGetListingOffersBatchRequest, options?: AxiosRequestConfig): AxiosPromise<GetListingOffersBatchResponse>;
197
187
  /**
198
188
  * Returns pricing information for a seller\'s offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 1 | 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).
199
- * @param {string} marketplaceId A marketplace identifier. Specifies the marketplace for which prices are returned.
200
- * @param {'Asin' | 'Sku'} itemType 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.
201
- * @param {Array<string>} [asins] A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace.
202
- * @param {Array<string>} [skus] A list of up to twenty seller SKU values used to identify items in the given marketplace.
203
- * @param {'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club'} [itemCondition] Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.
204
- * @param {'B2C' | 'B2B'} [offerType] Indicates whether to request pricing information for the seller\&#39;s B2C or B2B offers. Default is B2C.
189
+ * @param {ProductPricingApiGetPricingRequest} requestParameters Request parameters.
205
190
  * @param {*} [options] Override http request option.
206
191
  * @throws {RequiredError}
207
192
  */
208
- getPricing(marketplaceId: string, itemType: 'Asin' | 'Sku', asins?: Array<string>, skus?: Array<string>, itemCondition?: 'New' | 'Used' | 'Collectible' | 'Refurbished' | 'Club', offerType?: 'B2C' | 'B2B', options?: any): AxiosPromise<GetPricingResponse>;
193
+ getPricing(requestParameters: ProductPricingApiGetPricingRequest, options?: AxiosRequestConfig): AxiosPromise<GetPricingResponse>;
209
194
  };
210
195
  /**
211
196
  * Request parameters for getCompetitivePricing operation in ProductPricingApi.
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from "./configuration";
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -50,6 +50,5 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: "RequiredError";
54
53
  constructor(field: string, msg?: string);
55
54
  }
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /// <reference types="node" />
13
- import { Configuration } from "./configuration";
14
- import { RequestArgs } from "./base";
15
- import { AxiosInstance, AxiosResponse } from 'axios';
13
+ import type { Configuration } from "./configuration";
14
+ import type { RequestArgs } from "./base";
15
+ import type { AxiosInstance, AxiosResponse } from 'axios';
16
16
  /**
17
17
  *
18
18
  * @export
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/product-pricing-api-v0",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.",
5
- "version": "1.13.8",
5
+ "version": "1.13.10",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "test": "jest"
27
27
  },
28
28
  "dependencies": {
29
- "@sp-api-sdk/common": "^1.9.20",
29
+ "@sp-api-sdk/common": "^1.9.22",
30
30
  "axios": "^0.27.2"
31
31
  },
32
32
  "repository": {
@@ -51,5 +51,5 @@
51
51
  "typedoc": {
52
52
  "entryPoint": "./index.ts"
53
53
  },
54
- "gitHead": "e8ea8ef5b7745f2c4413bd7dd8eefa1b31cee128"
54
+ "gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
55
55
  }