UNPKG

digitalfemsa

Version:
488 lines (487 loc) 31.6 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Femsa API * Femsa sdk * * The version of the OpenAPI document: 2.1.0 * Contact: engineering@femsa.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateCustomerPaymentMethodsAcceptLanguageEnum = exports.GetCustomerPaymentMethodsAcceptLanguageEnum = exports.DeleteCustomerPaymentMethodsAcceptLanguageEnum = exports.CreateCustomerPaymentMethodsAcceptLanguageEnum = exports.PaymentMethodsApi = exports.PaymentMethodsApiFactory = exports.PaymentMethodsApiFp = exports.PaymentMethodsApiAxiosParamCreator = void 0; const axios_1 = require("axios"); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("../common"); // @ts-ignore const base_1 = require("../base"); /** * PaymentMethodsApi - axios parameter creator * @export */ const PaymentMethodsApiAxiosParamCreator = function (configuration) { return { /** * Create a payment method for a customer. * @summary Create Payment Method * @param {string} id Identifier of the resource * @param {CreateCustomerPaymentMethodsRequest} createCustomerPaymentMethodsRequest requested field for customer payment methods * @param {CreateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCustomerPaymentMethods: (id_1, createCustomerPaymentMethodsRequest_1, acceptLanguage_1, xChildCompanyId_1, ...args_1) => __awaiter(this, [id_1, createCustomerPaymentMethodsRequest_1, acceptLanguage_1, xChildCompanyId_1, ...args_1], void 0, function* (id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('createCustomerPaymentMethods', 'id', id); // verify required parameter 'createCustomerPaymentMethodsRequest' is not null or undefined (0, common_1.assertParamExists)('createCustomerPaymentMethods', 'createCustomerPaymentMethodsRequest', createCustomerPaymentMethodsRequest); const localVarPath = `/customers/{id}/payment_sources` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication bearerAuth required // http bearer authentication required yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); if (acceptLanguage != null) { localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); } if (xChildCompanyId != null) { localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId); } localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCustomerPaymentMethodsRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Delete an existing payment method * @summary Delete Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {DeleteCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCustomerPaymentMethods: (id_2, paymentMethodId_1, acceptLanguage_2, xChildCompanyId_2, ...args_2) => __awaiter(this, [id_2, paymentMethodId_1, acceptLanguage_2, xChildCompanyId_2, ...args_2], void 0, function* (id, paymentMethodId, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('deleteCustomerPaymentMethods', 'id', id); // verify required parameter 'paymentMethodId' is not null or undefined (0, common_1.assertParamExists)('deleteCustomerPaymentMethods', 'paymentMethodId', paymentMethodId); const localVarPath = `/customers/{id}/payment_sources/{payment_method_id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"payment_method_id"}}`, encodeURIComponent(String(paymentMethodId))); // 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 = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication bearerAuth required // http bearer authentication required yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); if (acceptLanguage != null) { localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); } if (xChildCompanyId != null) { localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId); } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Get a list of Payment Methods * @summary Get Payment Methods * @param {string} id Identifier of the resource * @param {GetCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {number} [limit] The numbers of items to return, the maximum value is 250 * @param {string} [next] next page * @param {string} [previous] previous page * @param {string} [search] General order search, e.g. by mail, reference etc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerPaymentMethods: (id_3, acceptLanguage_3, xChildCompanyId_3, limit_1, next_1, previous_1, search_1, ...args_3) => __awaiter(this, [id_3, acceptLanguage_3, xChildCompanyId_3, limit_1, next_1, previous_1, search_1, ...args_3], void 0, function* (id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('getCustomerPaymentMethods', 'id', id); const localVarPath = `/customers/{id}/payment_sources` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // 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 = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication bearerAuth required // http bearer authentication required yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (next !== undefined) { localVarQueryParameter['next'] = next; } if (previous !== undefined) { localVarQueryParameter['previous'] = previous; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (acceptLanguage != null) { localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); } if (xChildCompanyId != null) { localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId); } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Gets a payment Method that corresponds to a customer ID. * @summary Update Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {UpdatePaymentMethods} updatePaymentMethods requested field for customer payment methods * @param {UpdateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCustomerPaymentMethods: (id_4, paymentMethodId_2, updatePaymentMethods_1, acceptLanguage_4, xChildCompanyId_4, ...args_4) => __awaiter(this, [id_4, paymentMethodId_2, updatePaymentMethods_1, acceptLanguage_4, xChildCompanyId_4, ...args_4], void 0, function* (id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('updateCustomerPaymentMethods', 'id', id); // verify required parameter 'paymentMethodId' is not null or undefined (0, common_1.assertParamExists)('updateCustomerPaymentMethods', 'paymentMethodId', paymentMethodId); // verify required parameter 'updatePaymentMethods' is not null or undefined (0, common_1.assertParamExists)('updateCustomerPaymentMethods', 'updatePaymentMethods', updatePaymentMethods); const localVarPath = `/customers/{id}/payment_sources/{payment_method_id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"payment_method_id"}}`, encodeURIComponent(String(paymentMethodId))); // 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 = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication bearerAuth required // http bearer authentication required yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); if (acceptLanguage != null) { localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); } if (xChildCompanyId != null) { localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId); } localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePaymentMethods, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), }; }; exports.PaymentMethodsApiAxiosParamCreator = PaymentMethodsApiAxiosParamCreator; /** * PaymentMethodsApi - functional programming interface * @export */ const PaymentMethodsApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.PaymentMethodsApiAxiosParamCreator)(configuration); return { /** * Create a payment method for a customer. * @summary Create Payment Method * @param {string} id Identifier of the resource * @param {CreateCustomerPaymentMethodsRequest} createCustomerPaymentMethodsRequest requested field for customer payment methods * @param {CreateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options); const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const operationBasePath = (_c = (_b = base_1.operationServerMap['PaymentMethodsApi.createCustomerPaymentMethods']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }); }, /** * Delete an existing payment method * @summary Delete Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {DeleteCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options); const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const operationBasePath = (_c = (_b = base_1.operationServerMap['PaymentMethodsApi.deleteCustomerPaymentMethods']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }); }, /** * Get a list of Payment Methods * @summary Get Payment Methods * @param {string} id Identifier of the resource * @param {GetCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {number} [limit] The numbers of items to return, the maximum value is 250 * @param {string} [next] next page * @param {string} [previous] previous page * @param {string} [search] General order search, e.g. by mail, reference etc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options); const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const operationBasePath = (_c = (_b = base_1.operationServerMap['PaymentMethodsApi.getCustomerPaymentMethods']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }); }, /** * Gets a payment Method that corresponds to a customer ID. * @summary Update Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {UpdatePaymentMethods} updatePaymentMethods requested field for customer payment methods * @param {UpdateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options); const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; const operationBasePath = (_c = (_b = base_1.operationServerMap['PaymentMethodsApi.updateCustomerPaymentMethods']) === null || _b === void 0 ? void 0 : _b[index]) === null || _c === void 0 ? void 0 : _c.url; return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath); }); }, }; }; exports.PaymentMethodsApiFp = PaymentMethodsApiFp; /** * PaymentMethodsApi - factory interface * @export */ const PaymentMethodsApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.PaymentMethodsApiFp)(configuration); return { /** * Create a payment method for a customer. * @summary Create Payment Method * @param {string} id Identifier of the resource * @param {CreateCustomerPaymentMethodsRequest} createCustomerPaymentMethodsRequest requested field for customer payment methods * @param {CreateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options) { return localVarFp.createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * Delete an existing payment method * @summary Delete Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {DeleteCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options) { return localVarFp.deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * Get a list of Payment Methods * @summary Get Payment Methods * @param {string} id Identifier of the resource * @param {GetCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {number} [limit] The numbers of items to return, the maximum value is 250 * @param {string} [next] next page * @param {string} [previous] previous page * @param {string} [search] General order search, e.g. by mail, reference etc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options) { return localVarFp.getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options).then((request) => request(axios, basePath)); }, /** * Gets a payment Method that corresponds to a customer ID. * @summary Update Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {UpdatePaymentMethods} updatePaymentMethods requested field for customer payment methods * @param {UpdateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options) { return localVarFp.updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, }; }; exports.PaymentMethodsApiFactory = PaymentMethodsApiFactory; /** * PaymentMethodsApi - object-oriented interface * @export * @class PaymentMethodsApi * @extends {BaseAPI} */ class PaymentMethodsApi extends base_1.BaseAPI { /** * Create a payment method for a customer. * @summary Create Payment Method * @param {string} id Identifier of the resource * @param {CreateCustomerPaymentMethodsRequest} createCustomerPaymentMethodsRequest requested field for customer payment methods * @param {CreateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PaymentMethodsApi */ createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentMethodsApiFp)(this.configuration).createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * Delete an existing payment method * @summary Delete Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {DeleteCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PaymentMethodsApi */ deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentMethodsApiFp)(this.configuration).deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * Get a list of Payment Methods * @summary Get Payment Methods * @param {string} id Identifier of the resource * @param {GetCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {number} [limit] The numbers of items to return, the maximum value is 250 * @param {string} [next] next page * @param {string} [previous] previous page * @param {string} [search] General order search, e.g. by mail, reference etc. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PaymentMethodsApi */ getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options) { return (0, exports.PaymentMethodsApiFp)(this.configuration).getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options).then((request) => request(this.axios, this.basePath)); } /** * Gets a payment Method that corresponds to a customer ID. * @summary Update Payment Method * @param {string} id Identifier of the resource * @param {string} paymentMethodId Identifier of the payment method * @param {UpdatePaymentMethods} updatePaymentMethods requested field for customer payment methods * @param {UpdateCustomerPaymentMethodsAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PaymentMethodsApi */ updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentMethodsApiFp)(this.configuration).updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } } exports.PaymentMethodsApi = PaymentMethodsApi; /** * @export */ exports.CreateCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.DeleteCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.GetCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.UpdateCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' };