UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

628 lines • 92.8 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Direct Fulfillment Shipping * Use the Selling Partner API for Direct Fulfillment Shipping to access a direct fulfillment vendor\'s shipping data. * * The version of the OpenAPI document: 2021-12-28 * * * 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.VendorShippingLabelsApi = exports.VendorShippingLabelsApiFactory = exports.VendorShippingLabelsApiFp = exports.VendorShippingLabelsApiAxiosParamCreator = exports.VendorShippingApi = exports.VendorShippingApiFactory = exports.VendorShippingApiFp = exports.VendorShippingApiAxiosParamCreator = exports.CustomerInvoicesApi = exports.CustomerInvoicesApiFactory = exports.CustomerInvoicesApiFp = exports.CustomerInvoicesApiAxiosParamCreator = exports.CreateContainerLabelApi = exports.CreateContainerLabelApiFactory = exports.CreateContainerLabelApiFp = exports.CreateContainerLabelApiAxiosParamCreator = exports.WeightUnitOfMeasureEnum = exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = exports.ShippingLabelLabelFormatEnum = exports.ShipmentDetailsShipmentStatusEnum = exports.PackingSlipContentTypeEnum = exports.DimensionsUnitOfMeasureEnum = exports.ContainerLabelFormat = exports.ContainerContainerTypeEnum = exports.CarrierId = 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"); /** * The unique carrier code for the carrier for whom container labels are requested. * @export * @enum {string} */ var CarrierId; (function (CarrierId) { CarrierId["Swa"] = "SWA"; })(CarrierId || (exports.CarrierId = CarrierId = {})); /** * @export * @enum {string} */ var ContainerContainerTypeEnum; (function (ContainerContainerTypeEnum) { ContainerContainerTypeEnum["Carton"] = "Carton"; ContainerContainerTypeEnum["Pallet"] = "Pallet"; })(ContainerContainerTypeEnum || (exports.ContainerContainerTypeEnum = ContainerContainerTypeEnum = {})); /** * The format of the container label. * @export * @enum {string} */ var ContainerLabelFormat; (function (ContainerLabelFormat) { ContainerLabelFormat["Png"] = "PNG"; ContainerLabelFormat["Zpl"] = "ZPL"; })(ContainerLabelFormat || (exports.ContainerLabelFormat = ContainerLabelFormat = {})); /** * @export * @enum {string} */ var DimensionsUnitOfMeasureEnum; (function (DimensionsUnitOfMeasureEnum) { DimensionsUnitOfMeasureEnum["In"] = "IN"; DimensionsUnitOfMeasureEnum["Cm"] = "CM"; })(DimensionsUnitOfMeasureEnum || (exports.DimensionsUnitOfMeasureEnum = DimensionsUnitOfMeasureEnum = {})); /** * @export * @enum {string} */ var PackingSlipContentTypeEnum; (function (PackingSlipContentTypeEnum) { PackingSlipContentTypeEnum["ApplicationPdf"] = "application/pdf"; })(PackingSlipContentTypeEnum || (exports.PackingSlipContentTypeEnum = PackingSlipContentTypeEnum = {})); /** * @export * @enum {string} */ var ShipmentDetailsShipmentStatusEnum; (function (ShipmentDetailsShipmentStatusEnum) { ShipmentDetailsShipmentStatusEnum["Shipped"] = "SHIPPED"; ShipmentDetailsShipmentStatusEnum["FloorDenial"] = "FLOOR_DENIAL"; })(ShipmentDetailsShipmentStatusEnum || (exports.ShipmentDetailsShipmentStatusEnum = ShipmentDetailsShipmentStatusEnum = {})); /** * @export * @enum {string} */ var ShippingLabelLabelFormatEnum; (function (ShippingLabelLabelFormatEnum) { ShippingLabelLabelFormatEnum["Png"] = "PNG"; ShippingLabelLabelFormatEnum["Zpl"] = "ZPL"; })(ShippingLabelLabelFormatEnum || (exports.ShippingLabelLabelFormatEnum = ShippingLabelLabelFormatEnum = {})); /** * @export * @enum {string} */ var TaxRegistrationDetailsTaxRegistrationTypeEnum; (function (TaxRegistrationDetailsTaxRegistrationTypeEnum) { TaxRegistrationDetailsTaxRegistrationTypeEnum["Vat"] = "VAT"; TaxRegistrationDetailsTaxRegistrationTypeEnum["Gst"] = "GST"; })(TaxRegistrationDetailsTaxRegistrationTypeEnum || (exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = TaxRegistrationDetailsTaxRegistrationTypeEnum = {})); /** * @export * @enum {string} */ var WeightUnitOfMeasureEnum; (function (WeightUnitOfMeasureEnum) { WeightUnitOfMeasureEnum["Kg"] = "KG"; WeightUnitOfMeasureEnum["Lb"] = "LB"; })(WeightUnitOfMeasureEnum || (exports.WeightUnitOfMeasureEnum = WeightUnitOfMeasureEnum = {})); /** * CreateContainerLabelApi - axios parameter creator * @export */ const CreateContainerLabelApiAxiosParamCreator = function (configuration) { return { /** * Creates a container (pallet) label for the associated shipment package. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). * @summary createContainerLabel * @param {CreateContainerLabelRequest} body Request body containing the container label data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createContainerLabel: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createContainerLabel', 'body', body); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/containerLabel`; // 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: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; 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.CreateContainerLabelApiAxiosParamCreator = CreateContainerLabelApiAxiosParamCreator; /** * CreateContainerLabelApi - functional programming interface * @export */ const CreateContainerLabelApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.CreateContainerLabelApiAxiosParamCreator)(configuration); return { /** * Creates a container (pallet) label for the associated shipment package. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). * @summary createContainerLabel * @param {CreateContainerLabelRequest} body Request body containing the container label data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createContainerLabel(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.createContainerLabel(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.CreateContainerLabelApiFp = CreateContainerLabelApiFp; /** * CreateContainerLabelApi - factory interface * @export */ const CreateContainerLabelApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.CreateContainerLabelApiFp)(configuration); return { /** * Creates a container (pallet) label for the associated shipment package. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). * @summary createContainerLabel * @param {CreateContainerLabelRequest} body Request body containing the container label data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createContainerLabel(body, options) { return localVarFp.createContainerLabel(body, options).then((request) => request(axios, basePath)); }, }; }; exports.CreateContainerLabelApiFactory = CreateContainerLabelApiFactory; /** * CreateContainerLabelApi - object-oriented interface * @export * @class CreateContainerLabelApi * @extends {BaseAPI} */ class CreateContainerLabelApi extends base_1.BaseAPI { /** * Creates a container (pallet) label for the associated shipment package. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [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). * @summary createContainerLabel * @param {CreateContainerLabelApiCreateContainerLabelRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CreateContainerLabelApi */ createContainerLabel(requestParameters, options) { return (0, exports.CreateContainerLabelApiFp)(this.configuration).createContainerLabel(requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } } exports.CreateContainerLabelApi = CreateContainerLabelApi; /** * CustomerInvoicesApi - axios parameter creator * @export */ const CustomerInvoicesApiAxiosParamCreator = function (configuration) { return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoice * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoice: async (purchaseOrderNumber, options = {}) => { // verify required parameter 'purchaseOrderNumber' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoice', 'purchaseOrderNumber', purchaseOrderNumber); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/customerInvoices/{purchaseOrderNumber}` .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber))); // 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: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (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, }; }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoices * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoices: async (createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options = {}) => { // verify required parameter 'createdAfter' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoices', 'createdAfter', createdAfter); // verify required parameter 'createdBefore' is not null or undefined (0, common_1.assertParamExists)('getCustomerInvoices', 'createdBefore', createdBefore); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/customerInvoices`; // 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: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (shipFromPartyId !== undefined) { localVarQueryParameter['shipFromPartyId'] = shipFromPartyId; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ? createdAfter.toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ? createdBefore.toISOString() : createdBefore; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } (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, }; }, }; }; exports.CustomerInvoicesApiAxiosParamCreator = CustomerInvoicesApiAxiosParamCreator; /** * CustomerInvoicesApi - functional programming interface * @export */ const CustomerInvoicesApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.CustomerInvoicesApiAxiosParamCreator)(configuration); return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoice * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCustomerInvoice(purchaseOrderNumber, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoice(purchaseOrderNumber, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoices * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.CustomerInvoicesApiFp = CustomerInvoicesApiFp; /** * CustomerInvoicesApi - factory interface * @export */ const CustomerInvoicesApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.CustomerInvoicesApiFp)(configuration); return { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoice * @param {string} purchaseOrderNumber Purchase order number of the shipment for which to return the invoice. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoice(purchaseOrderNumber, options) { return localVarFp.getCustomerInvoice(purchaseOrderNumber, options).then((request) => request(axios, basePath)); }, /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoices * @param {string} createdAfter Orders that became available after this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} createdBefore Orders that became available before this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses. * @param {number} [limit] The limit to the number of records returned * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date. * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { return localVarFp.getCustomerInvoices(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options).then((request) => request(axios, basePath)); }, }; }; exports.CustomerInvoicesApiFactory = CustomerInvoicesApiFactory; /** * CustomerInvoicesApi - object-oriented interface * @export * @class CustomerInvoicesApi * @extends {BaseAPI} */ class CustomerInvoicesApi extends base_1.BaseAPI { /** * Returns a customer invoice based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoice * @param {CustomerInvoicesApiGetCustomerInvoiceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerInvoicesApi */ getCustomerInvoice(requestParameters, options) { return (0, exports.CustomerInvoicesApiFp)(this.configuration).getCustomerInvoice(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of customer invoices created during a time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must be no more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getCustomerInvoices * @param {CustomerInvoicesApiGetCustomerInvoicesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CustomerInvoicesApi */ getCustomerInvoices(requestParameters, options) { return (0, exports.CustomerInvoicesApiFp)(this.configuration).getCustomerInvoices(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath)); } } exports.CustomerInvoicesApi = CustomerInvoicesApi; /** * VendorShippingApi - axios parameter creator * @export */ const VendorShippingApiAxiosParamCreator = function (configuration) { return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getPackingSlip * @param {string} purchaseOrderNumber The `purchaseOrderNumber` for the packing slip that you want. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlip: async (purchaseOrderNumber, options = {}) => { // verify required parameter 'purchaseOrderNumber' is not null or undefined (0, common_1.assertParamExists)('getPackingSlip', 'purchaseOrderNumber', purchaseOrderNumber); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/packingSlips/{purchaseOrderNumber}` .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber))); // 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: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (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, }; }, /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getPackingSlips * @param {string} createdAfter Packing slips that become available after this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} [shipFromPartyId] The vendor `warehouseId` for order fulfillment. If not specified, the result contains orders for all warehouses. * @param {number} [limit] The maximum number of records to return. * @param {'ASC' | 'DESC'} [sortOrder] The packing slip creation dates, which are sorted by ascending or descending order. * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPackingSlips: async (createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options = {}) => { // verify required parameter 'createdAfter' is not null or undefined (0, common_1.assertParamExists)('getPackingSlips', 'createdAfter', createdAfter); // verify required parameter 'createdBefore' is not null or undefined (0, common_1.assertParamExists)('getPackingSlips', 'createdBefore', createdBefore); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/packingSlips`; // 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: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (shipFromPartyId !== undefined) { localVarQueryParameter['shipFromPartyId'] = shipFromPartyId; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ? createdAfter.toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ? createdBefore.toISOString() : createdBefore; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (nextToken !== undefined) { localVarQueryParameter['nextToken'] = nextToken; } (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, }; }, /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary submitShipmentConfirmations * @param {SubmitShipmentConfirmationsRequest} body Request body containing the shipment confirmations data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentConfirmations: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('submitShipmentConfirmations', 'body', body); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/shipmentConfirmations`; // 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: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; 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, }; }, /** * This operation is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API submits a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary submitShipmentStatusUpdates * @param {SubmitShipmentStatusUpdatesRequest} body Request body containing the shipment status update data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitShipmentStatusUpdates: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('submitShipmentStatusUpdates', 'body', body); const localVarPath = `/vendor/directFulfillment/shipping/2021-12-28/shipmentStatusUpdates`; // 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: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; 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.VendorShippingApiAxiosParamCreator = VendorShippingApiAxiosParamCreator; /** * VendorShippingApi - functional programming interface * @export */ const VendorShippingApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.VendorShippingApiAxiosParamCreator)(configuration); return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getPackingSlip * @param {string} purchaseOrderNumber The `purchaseOrderNumber` for the packing slip that you want. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPackingSlip(purchaseOrderNumber, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlip(purchaseOrderNumber, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search must not be more than 7 days. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary getPackingSlips * @param {string} createdAfter Packing slips that become available after this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} createdBefore Packing slips that became available before this date and time will be included in the result. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. * @param {string} [shipFromPartyId] The vendor `warehouseId` for order fulfillment. If not specified, the result contains orders for all warehouses. * @param {number} [limit] The maximum number of records to return. * @param {'ASC' | 'DESC'} [sortOrder] The packing slip creation dates, which are sorted by ascending or descending order. * @param {string} [nextToken] Used for pagination when there are more packing slips than the specified result size limit. The token value is returned in the previous API call. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getPackingSlips(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Submits one or more shipment confirmations for vendor orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary submitShipmentConfirmations * @param {SubmitShipmentConfirmationsRequest} body Request body containing the shipment confirmations data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitShipmentConfirmations(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentConfirmations(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * This operation is only to be used by Vendor-Own-Carrier (VOC) vendors. Calling this API submits a shipment status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their order, when the package is outside of Amazon Network visibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). * @summary submitShipmentStatusUpdates * @param {SubmitShipmentStatusUpdatesRequest} body Request body containing the shipment status update data. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitShipmentStatusUpdates(body, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentStatusUpdates(body, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.VendorShippingApiFp = VendorShippingApiFp; /** * VendorShippingApi - factory interface * @export */ const VendorShippingApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.VendorShippingApiFp)(configuration); return { /** * Returns a packing slip based on the purchaseOrderNumber that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits). *