UNPKG

digitalfemsa

Version:
589 lines (536 loc) 35.8 kB
/* 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. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import { CreateCustomerPaymentMethodsRequest } from '../model'; // @ts-ignore import { CreateCustomerPaymentMethodsResponse } from '../model'; // @ts-ignore import { GetPaymentMethodResponse } from '../model'; // @ts-ignore import { ModelError } from '../model'; // @ts-ignore import { UpdateCustomerPaymentMethodsResponse } from '../model'; // @ts-ignore import { UpdatePaymentMethods } from '../model'; /** * PaymentMethodsApi - axios parameter creator * @export */ export const PaymentMethodsApiAxiosParamCreator = function (configuration?: 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: async (id: string, createCustomerPaymentMethodsRequest: CreateCustomerPaymentMethodsRequest, acceptLanguage?: CreateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'id' is not null or undefined assertParamExists('createCustomerPaymentMethods', 'id', id) // verify required parameter 'createCustomerPaymentMethodsRequest' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await 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'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCustomerPaymentMethodsRequest, localVarRequestOptions, configuration) return { url: 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: async (id: string, paymentMethodId: string, acceptLanguage?: DeleteCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteCustomerPaymentMethods', 'id', id) // verify required parameter 'paymentMethodId' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (acceptLanguage != null) { localVarHeaderParameter['Accept-Language'] = String(acceptLanguage); } if (xChildCompanyId != null) { localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (id: string, acceptLanguage?: GetCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'id' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await 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); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (id: string, paymentMethodId: string, updatePaymentMethods: UpdatePaymentMethods, acceptLanguage?: UpdateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'id' is not null or undefined assertParamExists('updateCustomerPaymentMethods', 'id', id) // verify required parameter 'paymentMethodId' is not null or undefined assertParamExists('updateCustomerPaymentMethods', 'paymentMethodId', paymentMethodId) // verify required parameter 'updatePaymentMethods' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication bearerAuth required // http bearer authentication required await 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'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updatePaymentMethods, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * PaymentMethodsApi - functional programming interface * @export */ export const PaymentMethodsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = 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} */ async createCustomerPaymentMethods(id: string, createCustomerPaymentMethodsRequest: CreateCustomerPaymentMethodsRequest, acceptLanguage?: CreateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomerPaymentMethodsResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PaymentMethodsApi.createCustomerPaymentMethods']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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} */ async deleteCustomerPaymentMethods(id: string, paymentMethodId: string, acceptLanguage?: DeleteCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCustomerPaymentMethodsResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PaymentMethodsApi.deleteCustomerPaymentMethods']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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} */ async getCustomerPaymentMethods(id: string, acceptLanguage?: GetCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPaymentMethodResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PaymentMethodsApi.getCustomerPaymentMethods']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, 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} */ async updateCustomerPaymentMethods(id: string, paymentMethodId: string, updatePaymentMethods: UpdatePaymentMethods, acceptLanguage?: UpdateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCustomerPaymentMethodsResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options); const index = configuration?.serverIndex ?? 0; const operationBasePath = operationServerMap['PaymentMethodsApi.updateCustomerPaymentMethods']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, } }; /** * PaymentMethodsApi - factory interface * @export */ export const PaymentMethodsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = 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: string, createCustomerPaymentMethodsRequest: CreateCustomerPaymentMethodsRequest, acceptLanguage?: CreateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<CreateCustomerPaymentMethodsResponse> { 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: string, paymentMethodId: string, acceptLanguage?: DeleteCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<UpdateCustomerPaymentMethodsResponse> { 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: string, acceptLanguage?: GetCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: any): AxiosPromise<GetPaymentMethodResponse> { 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: string, paymentMethodId: string, updatePaymentMethods: UpdatePaymentMethods, acceptLanguage?: UpdateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<UpdateCustomerPaymentMethodsResponse> { return localVarFp.updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath)); }, }; }; /** * PaymentMethodsApi - interface * @export * @interface PaymentMethodsApi */ export interface PaymentMethodsApiInterface { /** * 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 PaymentMethodsApiInterface */ createCustomerPaymentMethods(id: string, createCustomerPaymentMethodsRequest: CreateCustomerPaymentMethodsRequest, acceptLanguage?: CreateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<CreateCustomerPaymentMethodsResponse>; /** * 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 PaymentMethodsApiInterface */ deleteCustomerPaymentMethods(id: string, paymentMethodId: string, acceptLanguage?: DeleteCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<UpdateCustomerPaymentMethodsResponse>; /** * 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 PaymentMethodsApiInterface */ getCustomerPaymentMethods(id: string, acceptLanguage?: GetCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetPaymentMethodResponse>; /** * 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 PaymentMethodsApiInterface */ updateCustomerPaymentMethods(id: string, paymentMethodId: string, updatePaymentMethods: UpdatePaymentMethods, acceptLanguage?: UpdateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<UpdateCustomerPaymentMethodsResponse>; } /** * PaymentMethodsApi - object-oriented interface * @export * @class PaymentMethodsApi * @extends {BaseAPI} */ export class PaymentMethodsApi extends BaseAPI implements PaymentMethodsApiInterface { /** * 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 */ public createCustomerPaymentMethods(id: string, createCustomerPaymentMethodsRequest: CreateCustomerPaymentMethodsRequest, acceptLanguage?: CreateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) { return 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 */ public deleteCustomerPaymentMethods(id: string, paymentMethodId: string, acceptLanguage?: DeleteCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) { return 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 */ public getCustomerPaymentMethods(id: string, acceptLanguage?: GetCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig) { return 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 */ public updateCustomerPaymentMethods(id: string, paymentMethodId: string, updatePaymentMethods: UpdatePaymentMethods, acceptLanguage?: UpdateCustomerPaymentMethodsAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) { return PaymentMethodsApiFp(this.configuration).updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath)); } } /** * @export */ export const CreateCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' } as const; export type CreateCustomerPaymentMethodsAcceptLanguageEnum = typeof CreateCustomerPaymentMethodsAcceptLanguageEnum[keyof typeof CreateCustomerPaymentMethodsAcceptLanguageEnum]; /** * @export */ export const DeleteCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' } as const; export type DeleteCustomerPaymentMethodsAcceptLanguageEnum = typeof DeleteCustomerPaymentMethodsAcceptLanguageEnum[keyof typeof DeleteCustomerPaymentMethodsAcceptLanguageEnum]; /** * @export */ export const GetCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' } as const; export type GetCustomerPaymentMethodsAcceptLanguageEnum = typeof GetCustomerPaymentMethodsAcceptLanguageEnum[keyof typeof GetCustomerPaymentMethodsAcceptLanguageEnum]; /** * @export */ export const UpdateCustomerPaymentMethodsAcceptLanguageEnum = { es: 'es', en: 'en' } as const; export type UpdateCustomerPaymentMethodsAcceptLanguageEnum = typeof UpdateCustomerPaymentMethodsAcceptLanguageEnum[keyof typeof UpdateCustomerPaymentMethodsAcceptLanguageEnum];