@whitebox-co/walmart-marketplace-api
Version:
A fully typed TypeScript, Javascript, and Node.js API library for the Walmart Marketplace API
452 lines • 38.8 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Returns Management
* Buyers can now Initiate Returns from Walmart.com for Marketplace seller items (Except for HAZMAT, OTHER or FREIGHT items). For item in the exception categories: HAZMAT or OTHER, sellers need to generate the return shipping label, and upload the label. For detailed instructions, and to download the Returns API JSON schema, see Returns guide.
*
* 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.ReturnsRefundsApi = exports.ReturnsRefundsApiFactory = exports.ReturnsRefundsApiFp = exports.ReturnsRefundsApiAxiosParamCreator = 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");
/**
* ReturnsRefundsApi - axios parameter creator
* @export
*/
const ReturnsRefundsApiAxiosParamCreator = function (configuration) {
return {
/**
* Sellers can specify global settings for returns in Seller Center, and they can override individual item level settings using this API. Empty values for the settings will remove the existing overriden values and revert them to global settings. For more details, see the announcement for [Bulk Return Rules](https://sellerhelp.walmart.com/s/guide?article=000008197).
* @summary Return Item Overrides
* @param {string} feedType 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}
*/
bulkItemOverrideFeed: async (feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'feedType' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', 'feedType', feedType);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', 'wMSVCNAME', wMSVCNAME);
// verify required parameter 'file' is not null or undefined
(0, common_1.assertParamExists)('bulkItemOverrideFeed', '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,
};
},
/**
* Retrieves the details of return orders for the specified filter criteria.
* @summary Returns
* @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 {string} [returnOrderId] Return order identifier of the return order object as part of array. This is the same as RMA number.
* @param {string} [customerOrderId] A unique ID associated with the sales order for specified customer
* @param {string} [status] Status may be specified to query the returns with specific status.Valid statuses are: INITIATED, DELIVERED, COMPLETED
* @param {string} [replacementInfo] Provides additional attributes - replacementCustomerOrderID, returnType, rechargeReason, returnCancellationReason - related to Replacement return order, in response, if available. Allowed values are true or false.
* @param {string} [returnType] Specifies if the return order is a replacement return or a regular (refund) return. Possible values are REPLACEMENT or REFUND.
* @param {string} [returnCreationStartDate] Start Date for querying all return orders that were created after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'
* @param {string} [returnCreationEndDate] Limits the query to the return orders that were created before this returnCreationEndDate. Use one of the following formats, based on ISO 8601, are allowed: UTC date or timestamp. Examples: \'2016-08-16T10:30:30.155Z\' or \'2016-08-16\'
* @param {string} [returnLastModifiedStartDate] Start Date for querying all return orders that were modified after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-17T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [returnLastModifiedEndDate] Limits the query to the return orders that were modified before this date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-18T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-18T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [limit] The number of orders to be returned. Cannot be larger than 200
* @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}
*/
getReturns: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, returnOrderId, customerOrderId, status, replacementInfo, returnType, returnCreationStartDate, returnCreationEndDate, returnLastModifiedStartDate, returnLastModifiedEndDate, limit, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('getReturns', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('getReturns', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('getReturns', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('getReturns', 'wMSVCNAME', wMSVCNAME);
const localVarPath = `/v3/returns`;
// 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 = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (returnOrderId !== undefined) {
localVarQueryParameter['returnOrderId'] = returnOrderId;
}
if (customerOrderId !== undefined) {
localVarQueryParameter['customerOrderId'] = customerOrderId;
}
if (status !== undefined) {
localVarQueryParameter['status'] = status;
}
if (replacementInfo !== undefined) {
localVarQueryParameter['replacementInfo'] = replacementInfo;
}
if (returnType !== undefined) {
localVarQueryParameter['returnType'] = returnType;
}
if (returnCreationStartDate !== undefined) {
localVarQueryParameter['returnCreationStartDate'] = (returnCreationStartDate instanceof Date) ?
returnCreationStartDate.toISOString() :
returnCreationStartDate;
}
if (returnCreationEndDate !== undefined) {
localVarQueryParameter['returnCreationEndDate'] = (returnCreationEndDate instanceof Date) ?
returnCreationEndDate.toISOString() :
returnCreationEndDate;
}
if (returnLastModifiedStartDate !== undefined) {
localVarQueryParameter['returnLastModifiedStartDate'] = (returnLastModifiedStartDate instanceof Date) ?
returnLastModifiedStartDate.toISOString() :
returnLastModifiedStartDate;
}
if (returnLastModifiedEndDate !== undefined) {
localVarQueryParameter['returnLastModifiedEndDate'] = (returnLastModifiedEndDate instanceof Date) ?
returnLastModifiedEndDate.toISOString() :
returnLastModifiedEndDate;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
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);
}
(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,
};
},
/**
* This API allows sellers to issue refund against a return order. Multiple return order lines can be refunded in one request. Note: Sellers can use the Refund Order Lines API for all non-exception category items, including adjustments that seller needs to determine a partial refund amount. Especially for exception category items: HAZMAT, OTHER and FREIGHT that are not eligible for the Marketplace Returns Program.
* @summary Issue refund
* @param {string} returnOrderId The return order ID
* @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}
*/
issueRefund: async (returnOrderId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'returnOrderId' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'returnOrderId', returnOrderId);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'wMSVCNAME', wMSVCNAME);
// verify required parameter 'inlineObject' is not null or undefined
(0, common_1.assertParamExists)('issueRefund', 'inlineObject', inlineObject);
const localVarPath = `/v3/returns/{returnOrderId}/refund`
.replace(`{${"returnOrderId"}}`, encodeURIComponent(String(returnOrderId)));
// 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)(inlineObject, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.ReturnsRefundsApiAxiosParamCreator = ReturnsRefundsApiAxiosParamCreator;
/**
* ReturnsRefundsApi - functional programming interface
* @export
*/
const ReturnsRefundsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.ReturnsRefundsApiAxiosParamCreator)(configuration);
return {
/**
* Sellers can specify global settings for returns in Seller Center, and they can override individual item level settings using this API. Empty values for the settings will remove the existing overriden values and revert them to global settings. For more details, see the announcement for [Bulk Return Rules](https://sellerhelp.walmart.com/s/guide?article=000008197).
* @summary Return Item Overrides
* @param {string} feedType 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 bulkItemOverrideFeed(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.bulkItemOverrideFeed(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* Retrieves the details of return orders for the specified filter criteria.
* @summary Returns
* @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 {string} [returnOrderId] Return order identifier of the return order object as part of array. This is the same as RMA number.
* @param {string} [customerOrderId] A unique ID associated with the sales order for specified customer
* @param {string} [status] Status may be specified to query the returns with specific status.Valid statuses are: INITIATED, DELIVERED, COMPLETED
* @param {string} [replacementInfo] Provides additional attributes - replacementCustomerOrderID, returnType, rechargeReason, returnCancellationReason - related to Replacement return order, in response, if available. Allowed values are true or false.
* @param {string} [returnType] Specifies if the return order is a replacement return or a regular (refund) return. Possible values are REPLACEMENT or REFUND.
* @param {string} [returnCreationStartDate] Start Date for querying all return orders that were created after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'
* @param {string} [returnCreationEndDate] Limits the query to the return orders that were created before this returnCreationEndDate. Use one of the following formats, based on ISO 8601, are allowed: UTC date or timestamp. Examples: \'2016-08-16T10:30:30.155Z\' or \'2016-08-16\'
* @param {string} [returnLastModifiedStartDate] Start Date for querying all return orders that were modified after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-17T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [returnLastModifiedEndDate] Limits the query to the return orders that were modified before this date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-18T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-18T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [limit] The number of orders to be returned. Cannot be larger than 200
* @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 getReturns(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, returnOrderId, customerOrderId, status, replacementInfo, returnType, returnCreationStartDate, returnCreationEndDate, returnLastModifiedStartDate, returnLastModifiedEndDate, limit, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getReturns(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, returnOrderId, customerOrderId, status, replacementInfo, returnType, returnCreationStartDate, returnCreationEndDate, returnLastModifiedStartDate, returnLastModifiedEndDate, limit, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* This API allows sellers to issue refund against a return order. Multiple return order lines can be refunded in one request. Note: Sellers can use the Refund Order Lines API for all non-exception category items, including adjustments that seller needs to determine a partial refund amount. Especially for exception category items: HAZMAT, OTHER and FREIGHT that are not eligible for the Marketplace Returns Program.
* @summary Issue refund
* @param {string} returnOrderId The return order ID
* @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 issueRefund(returnOrderId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.issueRefund(returnOrderId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
};
};
exports.ReturnsRefundsApiFp = ReturnsRefundsApiFp;
/**
* ReturnsRefundsApi - factory interface
* @export
*/
const ReturnsRefundsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.ReturnsRefundsApiFp)(configuration);
return {
/**
* Sellers can specify global settings for returns in Seller Center, and they can override individual item level settings using this API. Empty values for the settings will remove the existing overriden values and revert them to global settings. For more details, see the announcement for [Bulk Return Rules](https://sellerhelp.walmart.com/s/guide?article=000008197).
* @summary Return Item Overrides
* @param {string} feedType 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}
*/
bulkItemOverrideFeed(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options) {
return localVarFp.bulkItemOverrideFeed(feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath));
},
/**
* Retrieves the details of return orders for the specified filter criteria.
* @summary Returns
* @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 {string} [returnOrderId] Return order identifier of the return order object as part of array. This is the same as RMA number.
* @param {string} [customerOrderId] A unique ID associated with the sales order for specified customer
* @param {string} [status] Status may be specified to query the returns with specific status.Valid statuses are: INITIATED, DELIVERED, COMPLETED
* @param {string} [replacementInfo] Provides additional attributes - replacementCustomerOrderID, returnType, rechargeReason, returnCancellationReason - related to Replacement return order, in response, if available. Allowed values are true or false.
* @param {string} [returnType] Specifies if the return order is a replacement return or a regular (refund) return. Possible values are REPLACEMENT or REFUND.
* @param {string} [returnCreationStartDate] Start Date for querying all return orders that were created after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'
* @param {string} [returnCreationEndDate] Limits the query to the return orders that were created before this returnCreationEndDate. Use one of the following formats, based on ISO 8601, are allowed: UTC date or timestamp. Examples: \'2016-08-16T10:30:30.155Z\' or \'2016-08-16\'
* @param {string} [returnLastModifiedStartDate] Start Date for querying all return orders that were modified after that date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-16T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-17T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [returnLastModifiedEndDate] Limits the query to the return orders that were modified before this date. Use one of the following formats, based on UTC, ISO 8601. Date example: \'2013-08-16\' Timestamp example: \'2013-08-18T10:30:15Z\'.In case of dates with timezone, use format \'2020-04-18T10:42:41.000+0000\' and follow encode \'+\' with %20
* @param {string} [limit] The number of orders to be returned. Cannot be larger than 200
* @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}
*/
getReturns(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, returnOrderId, customerOrderId, status, replacementInfo, returnType, returnCreationStartDate, returnCreationEndDate, returnLastModifiedStartDate, returnLastModifiedEndDate, limit, wMCONSUMERCHANNELTYPE, options) {
return localVarFp.getReturns(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, returnOrderId, customerOrderId, status, replacementInfo, returnType, returnCreationStartDate, returnCreationEndDate, returnLastModifiedStartDate, returnLastModifiedEndDate, limit, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath));
},
/**
* This API allows sellers to issue refund against a return order. Multiple return order lines can be refunded in one request. Note: Sellers can use the Refund Order Lines API for all non-exception category items, including adjustments that seller needs to determine a partial refund amount. Especially for exception category items: HAZMAT, OTHER and FREIGHT that are not eligible for the Marketplace Returns Program.
* @summary Issue refund
* @param {string} returnOrderId The return order ID
* @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}
*/
issueRefund(returnOrderId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options) {
return localVarFp.issueRefund(returnOrderId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, wMCONSUMERCHANNELTYPE, options).then((request) => request(axios, basePath));
},
};
};
exports.ReturnsRefundsApiFactory = ReturnsRefundsApiFactory;
/**
* ReturnsRefundsApi - object-oriented interface
* @export
* @class ReturnsRefundsApi
* @extends {BaseAPI}
*/
class ReturnsRefundsApi extends base_1.BaseAPI {
/**
* Sellers can specify global settings for returns in Seller Center, and they can override individual item level settings using this API. Empty values for the settings will remove the existing overriden values and revert them to global settings. For more details, see the announcement for [Bulk Return Rules](https://sellerhelp.walmart.com/s/guide?article=000008197).
* @summary Return Item Overrides
* @param {ReturnsRefundsApiBulkItemOverrideFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReturnsRefundsApi
*/
bulkItemOverrideFeed(requestParameters, options) {
return (0, exports.ReturnsRefundsApiFp)(this.configuration).bulkItemOverrideFeed(requestParameters.feedType, requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.file, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves the details of return orders for the specified filter criteria.
* @summary Returns
* @param {ReturnsRefundsApiGetReturnsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReturnsRefundsApi
*/
getReturns(requestParameters, options) {
return (0, exports.ReturnsRefundsApiFp)(this.configuration).getReturns(requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.returnOrderId, requestParameters.customerOrderId, requestParameters.status, requestParameters.replacementInfo, requestParameters.returnType, requestParameters.returnCreationStartDate, requestParameters.returnCreationEndDate, requestParameters.returnLastModifiedStartDate, requestParameters.returnLastModifiedEndDate, requestParameters.limit, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath));
}
/**
* This API allows sellers to issue refund against a return order. Multiple return order lines can be refunded in one request. Note: Sellers can use the Refund Order Lines API for all non-exception category items, including adjustments that seller needs to determine a partial refund amount. Especially for exception category items: HAZMAT, OTHER and FREIGHT that are not eligible for the Marketplace Returns Program.
* @summary Issue refund
* @param {ReturnsRefundsApiIssueRefundRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReturnsRefundsApi
*/
issueRefund(requestParameters, options) {
return (0, exports.ReturnsRefundsApiFp)(this.configuration).issueRefund(requestParameters.returnOrderId, requestParameters.authorization, requestParameters.wMSECACCESSTOKEN, requestParameters.wMQOSCORRELATIONID, requestParameters.wMSVCNAME, requestParameters.inlineObject, requestParameters.wMCONSUMERCHANNELTYPE, options).then((request) => request(this.axios, this.basePath));
}
}
exports.ReturnsRefundsApi = ReturnsRefundsApi;
//# sourceMappingURL=returns.js.map