UNPKG

digitalfemsa

Version:
648 lines (647 loc) 38.7 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.SmsCheckoutAcceptLanguageEnum = exports.GetCheckoutsAcceptLanguageEnum = exports.GetCheckoutAcceptLanguageEnum = exports.EmailCheckoutAcceptLanguageEnum = exports.CreateCheckoutAcceptLanguageEnum = exports.CancelCheckoutAcceptLanguageEnum = exports.PaymentLinkApi = exports.PaymentLinkApiFactory = exports.PaymentLinkApiFp = exports.PaymentLinkApiAxiosParamCreator = 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"); /** * PaymentLinkApi - axios parameter creator * @export */ const PaymentLinkApiAxiosParamCreator = function (configuration) { return { /** * * @summary Cancel Payment Link * @param {string} id Identifier of the resource * @param {CancelCheckoutAcceptLanguageEnum} [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} */ cancelCheckout: (id_1, acceptLanguage_1, xChildCompanyId_1, ...args_1) => __awaiter(this, [id_1, acceptLanguage_1, xChildCompanyId_1, ...args_1], void 0, function* (id, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('cancelCheckout', 'id', id); const localVarPath = `/checkouts/{id}/cancel` .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: '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); } (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, }; }), /** * * @summary Create Unique Payment Link * @param {Checkout} checkout requested field for checkout * @param {CreateCheckoutAcceptLanguageEnum} [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} */ createCheckout: (checkout_1, acceptLanguage_2, xChildCompanyId_2, ...args_2) => __awaiter(this, [checkout_1, acceptLanguage_2, xChildCompanyId_2, ...args_2], void 0, function* (checkout, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'checkout' is not null or undefined (0, common_1.assertParamExists)('createCheckout', 'checkout', checkout); const localVarPath = `/checkouts`; // 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)(checkout, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * * @summary Send an email * @param {string} id Identifier of the resource * @param {EmailCheckoutRequest} emailCheckoutRequest requested field for sms checkout * @param {EmailCheckoutAcceptLanguageEnum} [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} */ emailCheckout: (id_2, emailCheckoutRequest_1, acceptLanguage_3, xChildCompanyId_3, ...args_3) => __awaiter(this, [id_2, emailCheckoutRequest_1, acceptLanguage_3, xChildCompanyId_3, ...args_3], void 0, function* (id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('emailCheckout', 'id', id); // verify required parameter 'emailCheckoutRequest' is not null or undefined (0, common_1.assertParamExists)('emailCheckout', 'emailCheckoutRequest', emailCheckoutRequest); const localVarPath = `/checkouts/{id}/email` .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)(emailCheckoutRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), /** * * @summary Get a payment link by ID * @param {string} id Identifier of the resource * @param {GetCheckoutAcceptLanguageEnum} [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} */ getCheckout: (id_3, acceptLanguage_4, xChildCompanyId_4, ...args_4) => __awaiter(this, [id_3, acceptLanguage_4, xChildCompanyId_4, ...args_4], void 0, function* (id, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('getCheckout', 'id', id); const localVarPath = `/checkouts/{id}` .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 (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, }; }), /** * Returns a list of links generated by the merchant * @summary Get a list of payment links * @param {GetCheckoutsAcceptLanguageEnum} [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} [search] General order search, e.g. by mail, reference etc. * @param {string} [next] next page * @param {string} [previous] previous page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCheckouts: (acceptLanguage_5, xChildCompanyId_5, limit_1, search_1, next_1, previous_1, ...args_5) => __awaiter(this, [acceptLanguage_5, xChildCompanyId_5, limit_1, search_1, next_1, previous_1, ...args_5], void 0, function* (acceptLanguage, xChildCompanyId, limit, search, next, previous, options = {}) { const localVarPath = `/checkouts`; // 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 (search !== undefined) { localVarQueryParameter['search'] = search; } if (next !== undefined) { localVarQueryParameter['next'] = next; } if (previous !== undefined) { localVarQueryParameter['previous'] = previous; } 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, }; }), /** * * @summary Send an sms * @param {string} id Identifier of the resource * @param {SmsCheckoutRequest} smsCheckoutRequest requested field for sms checkout * @param {SmsCheckoutAcceptLanguageEnum} [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} */ smsCheckout: (id_4, smsCheckoutRequest_1, acceptLanguage_6, xChildCompanyId_6, ...args_6) => __awaiter(this, [id_4, smsCheckoutRequest_1, acceptLanguage_6, xChildCompanyId_6, ...args_6], void 0, function* (id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options = {}) { // verify required parameter 'id' is not null or undefined (0, common_1.assertParamExists)('smsCheckout', 'id', id); // verify required parameter 'smsCheckoutRequest' is not null or undefined (0, common_1.assertParamExists)('smsCheckout', 'smsCheckoutRequest', smsCheckoutRequest); const localVarPath = `/checkouts/{id}/sms` .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)(smsCheckoutRequest, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }), }; }; exports.PaymentLinkApiAxiosParamCreator = PaymentLinkApiAxiosParamCreator; /** * PaymentLinkApi - functional programming interface * @export */ const PaymentLinkApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.PaymentLinkApiAxiosParamCreator)(configuration); return { /** * * @summary Cancel Payment Link * @param {string} id Identifier of the resource * @param {CancelCheckoutAcceptLanguageEnum} [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} */ cancelCheckout(id, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelCheckout(id, 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['PaymentLinkApi.cancelCheckout']) === 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); }); }, /** * * @summary Create Unique Payment Link * @param {Checkout} checkout requested field for checkout * @param {CreateCheckoutAcceptLanguageEnum} [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} */ createCheckout(checkout, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.createCheckout(checkout, 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['PaymentLinkApi.createCheckout']) === 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); }); }, /** * * @summary Send an email * @param {string} id Identifier of the resource * @param {EmailCheckoutRequest} emailCheckoutRequest requested field for sms checkout * @param {EmailCheckoutAcceptLanguageEnum} [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} */ emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.emailCheckout(id, emailCheckoutRequest, 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['PaymentLinkApi.emailCheckout']) === 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); }); }, /** * * @summary Get a payment link by ID * @param {string} id Identifier of the resource * @param {GetCheckoutAcceptLanguageEnum} [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} */ getCheckout(id, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.getCheckout(id, 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['PaymentLinkApi.getCheckout']) === 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); }); }, /** * Returns a list of links generated by the merchant * @summary Get a list of payment links * @param {GetCheckoutsAcceptLanguageEnum} [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} [search] General order search, e.g. by mail, reference etc. * @param {string} [next] next page * @param {string} [previous] previous page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, 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['PaymentLinkApi.getCheckouts']) === 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); }); }, /** * * @summary Send an sms * @param {string} id Identifier of the resource * @param {SmsCheckoutRequest} smsCheckoutRequest requested field for sms checkout * @param {SmsCheckoutAcceptLanguageEnum} [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} */ smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b, _c; const localVarAxiosArgs = yield localVarAxiosParamCreator.smsCheckout(id, smsCheckoutRequest, 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['PaymentLinkApi.smsCheckout']) === 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.PaymentLinkApiFp = PaymentLinkApiFp; /** * PaymentLinkApi - factory interface * @export */ const PaymentLinkApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.PaymentLinkApiFp)(configuration); return { /** * * @summary Cancel Payment Link * @param {string} id Identifier of the resource * @param {CancelCheckoutAcceptLanguageEnum} [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} */ cancelCheckout(id, acceptLanguage, xChildCompanyId, options) { return localVarFp.cancelCheckout(id, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * * @summary Create Unique Payment Link * @param {Checkout} checkout requested field for checkout * @param {CreateCheckoutAcceptLanguageEnum} [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} */ createCheckout(checkout, acceptLanguage, xChildCompanyId, options) { return localVarFp.createCheckout(checkout, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * * @summary Send an email * @param {string} id Identifier of the resource * @param {EmailCheckoutRequest} emailCheckoutRequest requested field for sms checkout * @param {EmailCheckoutAcceptLanguageEnum} [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} */ emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return localVarFp.emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get a payment link by ID * @param {string} id Identifier of the resource * @param {GetCheckoutAcceptLanguageEnum} [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} */ getCheckout(id, acceptLanguage, xChildCompanyId, options) { return localVarFp.getCheckout(id, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, /** * Returns a list of links generated by the merchant * @summary Get a list of payment links * @param {GetCheckoutsAcceptLanguageEnum} [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} [search] General order search, e.g. by mail, reference etc. * @param {string} [next] next page * @param {string} [previous] previous page * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, options) { return localVarFp.getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, options).then((request) => request(axios, basePath)); }, /** * * @summary Send an sms * @param {string} id Identifier of the resource * @param {SmsCheckoutRequest} smsCheckoutRequest requested field for sms checkout * @param {SmsCheckoutAcceptLanguageEnum} [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} */ smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return localVarFp.smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, }; }; exports.PaymentLinkApiFactory = PaymentLinkApiFactory; /** * PaymentLinkApi - object-oriented interface * @export * @class PaymentLinkApi * @extends {BaseAPI} */ class PaymentLinkApi extends base_1.BaseAPI { /** * * @summary Cancel Payment Link * @param {string} id Identifier of the resource * @param {CancelCheckoutAcceptLanguageEnum} [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 PaymentLinkApi */ cancelCheckout(id, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).cancelCheckout(id, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Create Unique Payment Link * @param {Checkout} checkout requested field for checkout * @param {CreateCheckoutAcceptLanguageEnum} [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 PaymentLinkApi */ createCheckout(checkout, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).createCheckout(checkout, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Send an email * @param {string} id Identifier of the resource * @param {EmailCheckoutRequest} emailCheckoutRequest requested field for sms checkout * @param {EmailCheckoutAcceptLanguageEnum} [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 PaymentLinkApi */ emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get a payment link by ID * @param {string} id Identifier of the resource * @param {GetCheckoutAcceptLanguageEnum} [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 PaymentLinkApi */ getCheckout(id, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).getCheckout(id, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of links generated by the merchant * @summary Get a list of payment links * @param {GetCheckoutsAcceptLanguageEnum} [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} [search] General order search, e.g. by mail, reference etc. * @param {string} [next] next page * @param {string} [previous] previous page * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PaymentLinkApi */ getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Send an sms * @param {string} id Identifier of the resource * @param {SmsCheckoutRequest} smsCheckoutRequest requested field for sms checkout * @param {SmsCheckoutAcceptLanguageEnum} [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 PaymentLinkApi */ smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options) { return (0, exports.PaymentLinkApiFp)(this.configuration).smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } } exports.PaymentLinkApi = PaymentLinkApi; /** * @export */ exports.CancelCheckoutAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.CreateCheckoutAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.EmailCheckoutAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.GetCheckoutAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.GetCheckoutsAcceptLanguageEnum = { es: 'es', en: 'en' }; /** * @export */ exports.SmsCheckoutAcceptLanguageEnum = { es: 'es', en: 'en' };