UNPKG

@whitebox-co/walmart-marketplace-api

Version:

A fully typed TypeScript, Javascript, and Node.js API library for the Walmart Marketplace API

573 lines 41.3 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Price Management * The price is a fundamental building block for your listing on Walmart.com. You can use the price management APIs to set up and manage the price for a given item * * The version of the OpenAPI document: 1.0.0 * * * 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.PricesApi = exports.PricesApiFactory = exports.PricesApiFp = exports.PricesApiAxiosParamCreator = exports.V3PricePricingPriceDisplayCodesEnum = exports.V3PricePricingComparisonPriceTypeEnum = exports.V3PricePricingCurrentPriceTypeEnum = exports.V3PricePricingProcessModeEnum = exports.V3PriceCurrentPriceCurrencyEnum = exports.V3PriceComparisonPriceCurrencyEnum = exports.PricingPriceDisplayCodesEnum = exports.PricingComparisonPriceTypeEnum = exports.PricingCurrentPriceTypeEnum = exports.PricingProcessModeEnum = exports.PriceReplaceAllEnum = exports.InlineResponse200ErrorsGatewayErrorCategoryEnum = exports.InlineResponse200ErrorsCategoryEnum = exports.InlineResponse200ErrorsSeverityEnum = exports.InlineObjectReplaceAllEnum = exports.GatewayErrorGatewayErrorCategoryEnum = exports.GatewayErrorCategoryEnum = exports.GatewayErrorSeverityEnum = exports.CurrentPriceCurrencyEnum = exports.ComparisonPriceCurrencyEnum = 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 ComparisonPriceCurrencyEnum; (function (ComparisonPriceCurrencyEnum) { ComparisonPriceCurrencyEnum["Usd"] = "USD"; ComparisonPriceCurrencyEnum["Cad"] = "CAD"; })(ComparisonPriceCurrencyEnum = exports.ComparisonPriceCurrencyEnum || (exports.ComparisonPriceCurrencyEnum = {})); /** * @export * @enum {string} */ var CurrentPriceCurrencyEnum; (function (CurrentPriceCurrencyEnum) { CurrentPriceCurrencyEnum["Usd"] = "USD"; CurrentPriceCurrencyEnum["Cad"] = "CAD"; })(CurrentPriceCurrencyEnum = exports.CurrentPriceCurrencyEnum || (exports.CurrentPriceCurrencyEnum = {})); /** * @export * @enum {string} */ var GatewayErrorSeverityEnum; (function (GatewayErrorSeverityEnum) { GatewayErrorSeverityEnum["Info"] = "INFO"; GatewayErrorSeverityEnum["Warn"] = "WARN"; GatewayErrorSeverityEnum["Error"] = "ERROR"; })(GatewayErrorSeverityEnum = exports.GatewayErrorSeverityEnum || (exports.GatewayErrorSeverityEnum = {})); /** * @export * @enum {string} */ var GatewayErrorCategoryEnum; (function (GatewayErrorCategoryEnum) { GatewayErrorCategoryEnum["Application"] = "APPLICATION"; GatewayErrorCategoryEnum["System"] = "SYSTEM"; GatewayErrorCategoryEnum["Request"] = "REQUEST"; GatewayErrorCategoryEnum["Data"] = "DATA"; })(GatewayErrorCategoryEnum = exports.GatewayErrorCategoryEnum || (exports.GatewayErrorCategoryEnum = {})); /** * @export * @enum {string} */ var GatewayErrorGatewayErrorCategoryEnum; (function (GatewayErrorGatewayErrorCategoryEnum) { GatewayErrorGatewayErrorCategoryEnum["InternalDataError"] = "INTERNAL_DATA_ERROR"; GatewayErrorGatewayErrorCategoryEnum["ExternalDataError"] = "EXTERNAL_DATA_ERROR"; GatewayErrorGatewayErrorCategoryEnum["SystemError"] = "SYSTEM_ERROR"; })(GatewayErrorGatewayErrorCategoryEnum = exports.GatewayErrorGatewayErrorCategoryEnum || (exports.GatewayErrorGatewayErrorCategoryEnum = {})); /** * @export * @enum {string} */ var InlineObjectReplaceAllEnum; (function (InlineObjectReplaceAllEnum) { InlineObjectReplaceAllEnum["True"] = "true"; InlineObjectReplaceAllEnum["False"] = "false"; })(InlineObjectReplaceAllEnum = exports.InlineObjectReplaceAllEnum || (exports.InlineObjectReplaceAllEnum = {})); /** * @export * @enum {string} */ var InlineResponse200ErrorsSeverityEnum; (function (InlineResponse200ErrorsSeverityEnum) { InlineResponse200ErrorsSeverityEnum["Info"] = "INFO"; InlineResponse200ErrorsSeverityEnum["Warn"] = "WARN"; InlineResponse200ErrorsSeverityEnum["Error"] = "ERROR"; })(InlineResponse200ErrorsSeverityEnum = exports.InlineResponse200ErrorsSeverityEnum || (exports.InlineResponse200ErrorsSeverityEnum = {})); /** * @export * @enum {string} */ var InlineResponse200ErrorsCategoryEnum; (function (InlineResponse200ErrorsCategoryEnum) { InlineResponse200ErrorsCategoryEnum["Application"] = "APPLICATION"; InlineResponse200ErrorsCategoryEnum["System"] = "SYSTEM"; InlineResponse200ErrorsCategoryEnum["Request"] = "REQUEST"; InlineResponse200ErrorsCategoryEnum["Data"] = "DATA"; })(InlineResponse200ErrorsCategoryEnum = exports.InlineResponse200ErrorsCategoryEnum || (exports.InlineResponse200ErrorsCategoryEnum = {})); /** * @export * @enum {string} */ var InlineResponse200ErrorsGatewayErrorCategoryEnum; (function (InlineResponse200ErrorsGatewayErrorCategoryEnum) { InlineResponse200ErrorsGatewayErrorCategoryEnum["InternalDataError"] = "INTERNAL_DATA_ERROR"; InlineResponse200ErrorsGatewayErrorCategoryEnum["ExternalDataError"] = "EXTERNAL_DATA_ERROR"; InlineResponse200ErrorsGatewayErrorCategoryEnum["SystemError"] = "SYSTEM_ERROR"; })(InlineResponse200ErrorsGatewayErrorCategoryEnum = exports.InlineResponse200ErrorsGatewayErrorCategoryEnum || (exports.InlineResponse200ErrorsGatewayErrorCategoryEnum = {})); /** * @export * @enum {string} */ var PriceReplaceAllEnum; (function (PriceReplaceAllEnum) { PriceReplaceAllEnum["True"] = "true"; PriceReplaceAllEnum["False"] = "false"; })(PriceReplaceAllEnum = exports.PriceReplaceAllEnum || (exports.PriceReplaceAllEnum = {})); /** * @export * @enum {string} */ var PricingProcessModeEnum; (function (PricingProcessModeEnum) { PricingProcessModeEnum["Upsert"] = "UPSERT"; PricingProcessModeEnum["Delete"] = "DELETE"; })(PricingProcessModeEnum = exports.PricingProcessModeEnum || (exports.PricingProcessModeEnum = {})); /** * @export * @enum {string} */ var PricingCurrentPriceTypeEnum; (function (PricingCurrentPriceTypeEnum) { PricingCurrentPriceTypeEnum["Base"] = "BASE"; PricingCurrentPriceTypeEnum["Reduced"] = "REDUCED"; PricingCurrentPriceTypeEnum["Clearance"] = "CLEARANCE"; })(PricingCurrentPriceTypeEnum = exports.PricingCurrentPriceTypeEnum || (exports.PricingCurrentPriceTypeEnum = {})); /** * @export * @enum {string} */ var PricingComparisonPriceTypeEnum; (function (PricingComparisonPriceTypeEnum) { PricingComparisonPriceTypeEnum["Base"] = "BASE"; })(PricingComparisonPriceTypeEnum = exports.PricingComparisonPriceTypeEnum || (exports.PricingComparisonPriceTypeEnum = {})); /** * @export * @enum {string} */ var PricingPriceDisplayCodesEnum; (function (PricingPriceDisplayCodesEnum) { PricingPriceDisplayCodesEnum["Cart"] = "CART"; PricingPriceDisplayCodesEnum["Checkout"] = "CHECKOUT"; })(PricingPriceDisplayCodesEnum = exports.PricingPriceDisplayCodesEnum || (exports.PricingPriceDisplayCodesEnum = {})); /** * @export * @enum {string} */ var V3PriceComparisonPriceCurrencyEnum; (function (V3PriceComparisonPriceCurrencyEnum) { V3PriceComparisonPriceCurrencyEnum["Usd"] = "USD"; V3PriceComparisonPriceCurrencyEnum["Cad"] = "CAD"; })(V3PriceComparisonPriceCurrencyEnum = exports.V3PriceComparisonPriceCurrencyEnum || (exports.V3PriceComparisonPriceCurrencyEnum = {})); /** * @export * @enum {string} */ var V3PriceCurrentPriceCurrencyEnum; (function (V3PriceCurrentPriceCurrencyEnum) { V3PriceCurrentPriceCurrencyEnum["Usd"] = "USD"; V3PriceCurrentPriceCurrencyEnum["Cad"] = "CAD"; })(V3PriceCurrentPriceCurrencyEnum = exports.V3PriceCurrentPriceCurrencyEnum || (exports.V3PriceCurrentPriceCurrencyEnum = {})); /** * @export * @enum {string} */ var V3PricePricingProcessModeEnum; (function (V3PricePricingProcessModeEnum) { V3PricePricingProcessModeEnum["Upsert"] = "UPSERT"; V3PricePricingProcessModeEnum["Delete"] = "DELETE"; })(V3PricePricingProcessModeEnum = exports.V3PricePricingProcessModeEnum || (exports.V3PricePricingProcessModeEnum = {})); /** * @export * @enum {string} */ var V3PricePricingCurrentPriceTypeEnum; (function (V3PricePricingCurrentPriceTypeEnum) { V3PricePricingCurrentPriceTypeEnum["Base"] = "BASE"; V3PricePricingCurrentPriceTypeEnum["Reduced"] = "REDUCED"; V3PricePricingCurrentPriceTypeEnum["Clearance"] = "CLEARANCE"; })(V3PricePricingCurrentPriceTypeEnum = exports.V3PricePricingCurrentPriceTypeEnum || (exports.V3PricePricingCurrentPriceTypeEnum = {})); /** * @export * @enum {string} */ var V3PricePricingComparisonPriceTypeEnum; (function (V3PricePricingComparisonPriceTypeEnum) { V3PricePricingComparisonPriceTypeEnum["Base"] = "BASE"; })(V3PricePricingComparisonPriceTypeEnum = exports.V3PricePricingComparisonPriceTypeEnum || (exports.V3PricePricingComparisonPriceTypeEnum = {})); /** * @export * @enum {string} */ var V3PricePricingPriceDisplayCodesEnum; (function (V3PricePricingPriceDisplayCodesEnum) { V3PricePricingPriceDisplayCodesEnum["Cart"] = "CART"; V3PricePricingPriceDisplayCodesEnum["Checkout"] = "CHECKOUT"; })(V3PricePricingPriceDisplayCodesEnum = exports.V3PricePricingPriceDisplayCodesEnum || (exports.V3PricePricingPriceDisplayCodesEnum = {})); /** * PricesApi - axios parameter creator * @export */ const PricesApiAxiosParamCreator = function (configuration) { return { /** * This API helps Sellers to completely opt-in or opt-out from CAP program. If the subsidyEnrolled value = \"true\", the Seller enrolls in the CAP program. All eligible SKUs (current and future) are by default opt-in. Seller should use the SKU opt-in/opt-out API to opt-out individual items. If the subsidyEnrolled value = \"false\", the Seller stops participating in the CAP program and all eligible SKUs (current and future) are opt-out of the CAP program. * @summary Set up CAP SKU All * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject2} inlineObject2 * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ optCapProgramInPrice: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('optCapProgramInPrice', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('optCapProgramInPrice', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('optCapProgramInPrice', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('optCapProgramInPrice', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject2' is not null or undefined (0, common_1.assertParamExists)('optCapProgramInPrice', 'inlineObject2', inlineObject2); const localVarPath = `/v3/cppreference`; // 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 = {}; // authentication basicScheme required // http basic authentication required (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration); if (authorization !== undefined && authorization !== null) { localVarHeaderParameter['Authorization'] = String(authorization); } if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) { localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN); } if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) { localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE); } if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) { localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID); } if (wMSVCNAME !== undefined && wMSVCNAME !== null) { localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME); } 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)(inlineObject2, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates prices in bulk. In one Feed you can update up to 10,000 items in bulk. To ensure optimal Feed processing time, we recommend sending no more than 1000 items in one Feed and keeping the Feed sizes below 10 MB. The price sequence guarantee is observed by the bulk price update functionality, subject to the following rules: The timestamp used to determine precedence is passed in the request headers. All price updates in the feed are considered to have the same timestamp. The timestamp in the XML file is used only for auditing. You can send a single SKU multiple times in one Feed. If a SKU is repeated in a Feed, the price will be set for that SKU on Walmart.com, but there is no guarantee as to which SKU\'s price within that feed will be used. This API should be used in preference to the update a price. It should be called no sooner than 24 hours after a new item is set up and a wpid (Walmart Part ID) is available. Thereafter, the bulk price update has an service level agreement (SLA) of 15 minutes. After the update is submitted, wait for at least five minutes before verifying whether the bulk price update was successful. Individual SKU price update success or failure is only available after the entire feed is processed. If a SKU\'s price update fails (for example, multiple price updates were sent for the same SKU in a single feed), an error will be returned. * @summary Update bulk prices (Multiple) * @param {'price' | 'CPT_SELLER_ELIGIBILITY'} feedType The feed Type * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {any} file Feed file to upload * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ priceBulkUploads: async (feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'feedType' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'feedType', feedType); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'file' is not null or undefined (0, common_1.assertParamExists)('priceBulkUploads', 'file', file); const localVarPath = `/v3/feeds`; // 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 = {}; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication basicScheme required // http basic authentication required (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration); if (feedType !== undefined) { localVarQueryParameter['feedType'] = feedType; } if (authorization !== undefined && authorization !== null) { localVarHeaderParameter['Authorization'] = String(authorization); } if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) { localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN); } if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) { localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE); } if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) { localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID); } if (wMSVCNAME !== undefined && wMSVCNAME !== null) { localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME); } if (file !== undefined) { localVarFormParams.append('file', file); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = localVarFormParams; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates the regular price for a given item. * @summary Update a price * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject} inlineObject * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ updatePrice: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('updatePrice', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('updatePrice', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('updatePrice', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('updatePrice', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject' is not null or undefined (0, common_1.assertParamExists)('updatePrice', 'inlineObject', inlineObject); const localVarPath = `/v3/price`; // 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 = {}; // authentication basicScheme required // http basic authentication required (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration); if (authorization !== undefined && authorization !== null) { localVarHeaderParameter['Authorization'] = String(authorization); } if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) { localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN); } if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) { localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE); } if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) { localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID); } if (wMSVCNAME !== undefined && wMSVCNAME !== null) { localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME); } 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)(inlineObject, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.PricesApiAxiosParamCreator = PricesApiAxiosParamCreator; /** * PricesApi - functional programming interface * @export */ const PricesApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.PricesApiAxiosParamCreator)(configuration); return { /** * This API helps Sellers to completely opt-in or opt-out from CAP program. If the subsidyEnrolled value = \"true\", the Seller enrolls in the CAP program. All eligible SKUs (current and future) are by default opt-in. Seller should use the SKU opt-in/opt-out API to opt-out individual items. If the subsidyEnrolled value = \"false\", the Seller stops participating in the CAP program and all eligible SKUs (current and future) are opt-out of the CAP program. * @summary Set up CAP SKU All * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject2} inlineObject2 * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ async optCapProgramInPrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.optCapProgramInPrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Updates prices in bulk. In one Feed you can update up to 10,000 items in bulk. To ensure optimal Feed processing time, we recommend sending no more than 1000 items in one Feed and keeping the Feed sizes below 10 MB. The price sequence guarantee is observed by the bulk price update functionality, subject to the following rules: The timestamp used to determine precedence is passed in the request headers. All price updates in the feed are considered to have the same timestamp. The timestamp in the XML file is used only for auditing. You can send a single SKU multiple times in one Feed. If a SKU is repeated in a Feed, the price will be set for that SKU on Walmart.com, but there is no guarantee as to which SKU\'s price within that feed will be used. This API should be used in preference to the update a price. It should be called no sooner than 24 hours after a new item is set up and a wpid (Walmart Part ID) is available. Thereafter, the bulk price update has an service level agreement (SLA) of 15 minutes. After the update is submitted, wait for at least five minutes before verifying whether the bulk price update was successful. Individual SKU price update success or failure is only available after the entire feed is processed. If a SKU\'s price update fails (for example, multiple price updates were sent for the same SKU in a single feed), an error will be returned. * @summary Update bulk prices (Multiple) * @param {'price' | 'CPT_SELLER_ELIGIBILITY'} feedType The feed Type * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {any} file Feed file to upload * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ async priceBulkUploads(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.priceBulkUploads(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Updates the regular price for a given item. * @summary Update a price * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject} inlineObject * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updatePrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.updatePrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, }; }; exports.PricesApiFp = PricesApiFp; /** * PricesApi - factory interface * @export */ const PricesApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.PricesApiFp)(configuration); return { /** * This API helps Sellers to completely opt-in or opt-out from CAP program. If the subsidyEnrolled value = \"true\", the Seller enrolls in the CAP program. All eligible SKUs (current and future) are by default opt-in. Seller should use the SKU opt-in/opt-out API to opt-out individual items. If the subsidyEnrolled value = \"false\", the Seller stops participating in the CAP program and all eligible SKUs (current and future) are opt-out of the CAP program. * @summary Set up CAP SKU All * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject2} inlineObject2 * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ optCapProgramInPrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options) { return localVarFp.optCapProgramInPrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath)); }, /** * Updates prices in bulk. In one Feed you can update up to 10,000 items in bulk. To ensure optimal Feed processing time, we recommend sending no more than 1000 items in one Feed and keeping the Feed sizes below 10 MB. The price sequence guarantee is observed by the bulk price update functionality, subject to the following rules: The timestamp used to determine precedence is passed in the request headers. All price updates in the feed are considered to have the same timestamp. The timestamp in the XML file is used only for auditing. You can send a single SKU multiple times in one Feed. If a SKU is repeated in a Feed, the price will be set for that SKU on Walmart.com, but there is no guarantee as to which SKU\'s price within that feed will be used. This API should be used in preference to the update a price. It should be called no sooner than 24 hours after a new item is set up and a wpid (Walmart Part ID) is available. Thereafter, the bulk price update has an service level agreement (SLA) of 15 minutes. After the update is submitted, wait for at least five minutes before verifying whether the bulk price update was successful. Individual SKU price update success or failure is only available after the entire feed is processed. If a SKU\'s price update fails (for example, multiple price updates were sent for the same SKU in a single feed), an error will be returned. * @summary Update bulk prices (Multiple) * @param {'price' | 'CPT_SELLER_ELIGIBILITY'} feedType The feed Type * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {any} file Feed file to upload * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ priceBulkUploads(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options) { return localVarFp.priceBulkUploads(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath)); }, /** * Updates the regular price for a given item. * @summary Update a price * @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps. * @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call * @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID * @param {string} wMSVCNAME Walmart Service Name * @param {InlineObject} inlineObject * @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding * @param {*} [options] Override http request option. * @throws {RequiredError} */ updatePrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options) { return localVarFp.updatePrice(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath)); }, }; }; exports.PricesApiFactory = PricesApiFactory; /** * PricesApi - object-oriented interface * @export * @class PricesApi * @extends {BaseAPI} */ class PricesApi extends base_1.BaseAPI { /** * This API helps Sellers to completely opt-in or opt-out from CAP program. If the subsidyEnrolled value = \"true\", the Seller enrolls in the CAP program. All eligible SKUs (current and future) are by default opt-in. Seller should use the SKU opt-in/opt-out API to opt-out individual items. If the subsidyEnrolled value = \"false\", the Seller stops participating in the CAP program and all eligible SKUs (current and future) are opt-out of the CAP program. * @summary Set up CAP SKU All * @param {PricesApiOptCapProgramInPriceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PricesApi */ optCapProgramInPrice(requestParameters, options) { return (0, exports.PricesApiFp)(this.configuration).optCapProgramInPrice(requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.inlineObject2, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath)); } /** * Updates prices in bulk. In one Feed you can update up to 10,000 items in bulk. To ensure optimal Feed processing time, we recommend sending no more than 1000 items in one Feed and keeping the Feed sizes below 10 MB. The price sequence guarantee is observed by the bulk price update functionality, subject to the following rules: The timestamp used to determine precedence is passed in the request headers. All price updates in the feed are considered to have the same timestamp. The timestamp in the XML file is used only for auditing. You can send a single SKU multiple times in one Feed. If a SKU is repeated in a Feed, the price will be set for that SKU on Walmart.com, but there is no guarantee as to which SKU\'s price within that feed will be used. This API should be used in preference to the update a price. It should be called no sooner than 24 hours after a new item is set up and a wpid (Walmart Part ID) is available. Thereafter, the bulk price update has an service level agreement (SLA) of 15 minutes. After the update is submitted, wait for at least five minutes before verifying whether the bulk price update was successful. Individual SKU price update success or failure is only available after the entire feed is processed. If a SKU\'s price update fails (for example, multiple price updates were sent for the same SKU in a single feed), an error will be returned. * @summary Update bulk prices (Multiple) * @param {PricesApiPriceBulkUploadsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PricesApi */ priceBulkUploads(requestParameters, options) { return (0, exports.PricesApiFp)(this.configuration).priceBulkUploads(requestParameters.feedType, requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.file, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the regular price for a given item. * @summary Update a price * @param {PricesApiUpdatePriceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PricesApi */ updatePrice(requestParameters, options) { return (0, exports.PricesApiFp)(this.configuration).updatePrice(requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.inlineObject, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath)); } } exports.PricesApi = PricesApi; //# sourceMappingURL=price.js.map