/* tslint:disable */ /* eslint-disable */ /** * BNPL standard API specification * API documentations for BNPL integration. * * The version of the OpenAPI document: 1.0.0-oas3 * Contact: dev@credify.one * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; // 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 } from '../base'; // @ts-ignore import { AccountInquiryResponse } from '../model'; // @ts-ignore import { BalanceCheckRequest } from '../model'; // @ts-ignore import { BalanceCheckResponse } from '../model'; // @ts-ignore import { CommonResponse } from '../model'; // @ts-ignore import { CompleteEsignRequest } from '../model'; // @ts-ignore import { ContractGenerationRequest } from '../model'; // @ts-ignore import { ContractGenerationResponse } from '../model'; // @ts-ignore import { DisburseRequest } from '../model'; // @ts-ignore import { DisburseResponse } from '../model'; // @ts-ignore import { EsigningRequest } from '../model'; // @ts-ignore import { EsigningResponse } from '../model'; // @ts-ignore import { LoanApplicationRequest } from '../model'; // @ts-ignore import { LoanApplicationResponse } from '../model'; // @ts-ignore import { RepaymentHistoryResponse } from '../model'; // @ts-ignore import { RepaymentScheduleResponse } from '../model'; // @ts-ignore import { ResendOTPRequest } from '../model'; // @ts-ignore import { SignedContractResponse } from '../model'; // @ts-ignore import { SimulationRequest } from '../model'; // @ts-ignore import { SimulationResponse } from '../model'; // @ts-ignore import { StatusCheckingRequest } from '../model'; // @ts-ignore import { StatusCheckingResponse } from '../model'; /** * LoanProductsApi - axios parameter creator * @export */ export const LoanProductsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This operations processes the loan application. * @summary Loan application * @param {LoanApplicationRequest} loanApplicationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingApplyPost: async (loanApplicationRequest: LoanApplicationRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'loanApplicationRequest' is not null or undefined assertParamExists('lendingApplyPost', 'loanApplicationRequest', loanApplicationRequest) const localVarPath = `/lending/apply`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = loanApplicationRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns a PDF of a loan contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsPost: async (contractGenerationRequest: ContractGenerationRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contractGenerationRequest' is not null or undefined assertParamExists('lendingContractsPost', 'contractGenerationRequest', contractGenerationRequest) const localVarPath = `/lending/contracts`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = contractGenerationRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This resends OTP for e-signing. * @summary Resend OTP for e-sign * @param {ResendOTPRequest} resendOTPRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsResendCodePost: async (resendOTPRequest: ResendOTPRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'resendOTPRequest' is not null or undefined assertParamExists('lendingContractsResendCodePost', 'resendOTPRequest', resendOTPRequest) const localVarPath = `/lending/contracts/resend-code`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = resendOTPRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This completes e-signing. This request may take time, so the client can check the status by calling Status checking API. * @summary Complete e-sign * @param {CompleteEsignRequest} completeEsignRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsSignPost: async (completeEsignRequest: CompleteEsignRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'completeEsignRequest' is not null or undefined assertParamExists('lendingContractsSignPost', 'completeEsignRequest', completeEsignRequest) const localVarPath = `/lending/contracts/sign`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = completeEsignRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This starts e-signing of a loan contract. This sends OTP via SMS. * @summary Loan contract signing kick-off * @param {EsigningRequest} esigningRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsStartPost: async (esigningRequest: EsigningRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'esigningRequest' is not null or undefined assertParamExists('lendingContractsStartPost', 'esigningRequest', esigningRequest) const localVarPath = `/lending/contracts/start`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = esigningRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns whether a specified customer has enough credit line. * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdBalancePost: async (id: string, balanceCheckRequest?: BalanceCheckRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdBalancePost', 'id', id) const localVarPath = `/lending/customers/{id}/balance` .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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = balanceCheckRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This requests disbursement. This requires some information that states the transaction has been completed successfully. `evidence` will have - Proof of successful transaction, if any - Proof of successful delivery, if any - Proof of down payment, if any This request may take time, so the client can check the status by calling Status checking API. * @summary Loan disbursement * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {DisburseRequest} [disburseRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdDisbursePost: async (id: string, loanId: string, disburseRequest?: DisburseRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdDisbursePost', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdDisbursePost', 'loanId', loanId) const localVarPath = `/lending/customers/{id}/loans/{loan-id}/disburse` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"loan-id"}}`, encodeURIComponent(String(loanId))); // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = disburseRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns a specified loan information. * @summary Loan information * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdGet: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdGet', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdGet', 'loanId', loanId) const localVarPath = `/lending/customers/{id}/loans/{loan-id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"loan-id"}}`, encodeURIComponent(String(loanId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns repayment history of a specified loan transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdRepaymentHistoryGet: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdRepaymentHistoryGet', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdRepaymentHistoryGet', 'loanId', loanId) const localVarPath = `/lending/customers/{id}/loans/{loan-id}/repayment-history` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"loan-id"}}`, encodeURIComponent(String(loanId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns repayment schedule of a specified loan. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdRepaymentScheduleGet: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdRepaymentScheduleGet', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('lendingCustomersIdLoansLoanIdRepaymentScheduleGet', 'loanId', loanId) const localVarPath = `/lending/customers/{id}/loans/{loan-id}/repayment-schedule` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"loan-id"}}`, encodeURIComponent(String(loanId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This retrieves a signed loan contract. * @summary Signed loan contract * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdSignedContractsLoanIdPost: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('lendingCustomersIdSignedContractsLoanIdPost', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('lendingCustomersIdSignedContractsLoanIdPost', 'loanId', loanId) const localVarPath = `/lending/customers/{id}/signed-contracts/{loan-id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))) .replace(`{${"loan-id"}}`, encodeURIComponent(String(loanId))); // 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; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This operations simulates loan results. * @summary Loan simulation * @param {SimulationRequest} simulationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingSimulatePost: async (simulationRequest: SimulationRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'simulationRequest' is not null or undefined assertParamExists('lendingSimulatePost', 'simulationRequest', simulationRequest) const localVarPath = `/lending/simulate`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = simulationRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingStatusPost: async (statusCheckingRequest: StatusCheckingRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'statusCheckingRequest' is not null or undefined assertParamExists('lendingStatusPost', 'statusCheckingRequest', statusCheckingRequest) const localVarPath = `/lending/status`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = statusCheckingRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * LoanProductsApi - functional programming interface * @export */ export const LoanProductsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = LoanProductsApiAxiosParamCreator(configuration) return { /** * This operations processes the loan application. * @summary Loan application * @param {LoanApplicationRequest} loanApplicationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingApplyPost(loanApplicationRequest: LoanApplicationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingApplyPost(loanApplicationRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns a PDF of a loan contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingContractsPost(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingContractsPost(contractGenerationRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This resends OTP for e-signing. * @summary Resend OTP for e-sign * @param {ResendOTPRequest} resendOTPRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingContractsResendCodePost(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingContractsResendCodePost(resendOTPRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This completes e-signing. This request may take time, so the client can check the status by calling Status checking API. * @summary Complete e-sign * @param {CompleteEsignRequest} completeEsignRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingContractsSignPost(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingContractsSignPost(completeEsignRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This starts e-signing of a loan contract. This sends OTP via SMS. * @summary Loan contract signing kick-off * @param {EsigningRequest} esigningRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingContractsStartPost(esigningRequest: EsigningRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingContractsStartPost(esigningRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns whether a specified customer has enough credit line. * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdBalancePost(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdBalancePost(id, balanceCheckRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This requests disbursement. This requires some information that states the transaction has been completed successfully. `evidence` will have - Proof of successful transaction, if any - Proof of successful delivery, if any - Proof of down payment, if any This request may take time, so the client can check the status by calling Status checking API. * @summary Loan disbursement * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {DisburseRequest} [disburseRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns a specified loan information. * @summary Loan information * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdLoansLoanIdGet(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdLoansLoanIdGet(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns repayment history of a specified loan transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns repayment schedule of a specified loan. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This retrieves a signed loan contract. * @summary Signed loan contract * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingCustomersIdSignedContractsLoanIdPost(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This operations simulates loan results. * @summary Loan simulation * @param {SimulationRequest} simulationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingSimulatePost(simulationRequest: SimulationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingSimulatePost(simulationRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async lendingStatusPost(statusCheckingRequest: StatusCheckingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.lendingStatusPost(statusCheckingRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * LoanProductsApi - factory interface * @export */ export const LoanProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = LoanProductsApiFp(configuration) return { /** * This operations processes the loan application. * @summary Loan application * @param {LoanApplicationRequest} loanApplicationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingApplyPost(loanApplicationRequest: LoanApplicationRequest, options?: any): AxiosPromise { return localVarFp.lendingApplyPost(loanApplicationRequest, options).then((request) => request(axios, basePath)); }, /** * This returns a PDF of a loan contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsPost(contractGenerationRequest: ContractGenerationRequest, options?: any): AxiosPromise { return localVarFp.lendingContractsPost(contractGenerationRequest, options).then((request) => request(axios, basePath)); }, /** * This resends OTP for e-signing. * @summary Resend OTP for e-sign * @param {ResendOTPRequest} resendOTPRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsResendCodePost(resendOTPRequest: ResendOTPRequest, options?: any): AxiosPromise { return localVarFp.lendingContractsResendCodePost(resendOTPRequest, options).then((request) => request(axios, basePath)); }, /** * This completes e-signing. This request may take time, so the client can check the status by calling Status checking API. * @summary Complete e-sign * @param {CompleteEsignRequest} completeEsignRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsSignPost(completeEsignRequest: CompleteEsignRequest, options?: any): AxiosPromise { return localVarFp.lendingContractsSignPost(completeEsignRequest, options).then((request) => request(axios, basePath)); }, /** * This starts e-signing of a loan contract. This sends OTP via SMS. * @summary Loan contract signing kick-off * @param {EsigningRequest} esigningRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingContractsStartPost(esigningRequest: EsigningRequest, options?: any): AxiosPromise { return localVarFp.lendingContractsStartPost(esigningRequest, options).then((request) => request(axios, basePath)); }, /** * This returns whether a specified customer has enough credit line. * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdBalancePost(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdBalancePost(id, balanceCheckRequest, options).then((request) => request(axios, basePath)); }, /** * This requests disbursement. This requires some information that states the transaction has been completed successfully. `evidence` will have - Proof of successful transaction, if any - Proof of successful delivery, if any - Proof of down payment, if any This request may take time, so the client can check the status by calling Status checking API. * @summary Loan disbursement * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {DisburseRequest} [disburseRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options).then((request) => request(axios, basePath)); }, /** * This returns a specified loan information. * @summary Loan information * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdGet(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdLoansLoanIdGet(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This returns repayment history of a specified loan transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This returns repayment schedule of a specified loan. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This retrieves a signed loan contract. * @summary Signed loan contract * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.lendingCustomersIdSignedContractsLoanIdPost(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This operations simulates loan results. * @summary Loan simulation * @param {SimulationRequest} simulationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingSimulatePost(simulationRequest: SimulationRequest, options?: any): AxiosPromise { return localVarFp.lendingSimulatePost(simulationRequest, options).then((request) => request(axios, basePath)); }, /** * This checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ lendingStatusPost(statusCheckingRequest: StatusCheckingRequest, options?: any): AxiosPromise { return localVarFp.lendingStatusPost(statusCheckingRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * LoanProductsApi - interface * @export * @interface LoanProductsApi */ export interface LoanProductsApiInterface { /** * This operations processes the loan application. * @summary Loan application * @param {LoanApplicationRequest} loanApplicationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingApplyPost(loanApplicationRequest: LoanApplicationRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns a PDF of a loan contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingContractsPost(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This resends OTP for e-signing. * @summary Resend OTP for e-sign * @param {ResendOTPRequest} resendOTPRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingContractsResendCodePost(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This completes e-signing. This request may take time, so the client can check the status by calling Status checking API. * @summary Complete e-sign * @param {CompleteEsignRequest} completeEsignRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingContractsSignPost(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This starts e-signing of a loan contract. This sends OTP via SMS. * @summary Loan contract signing kick-off * @param {EsigningRequest} esigningRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingContractsStartPost(esigningRequest: EsigningRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns whether a specified customer has enough credit line. * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdBalancePost(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This requests disbursement. This requires some information that states the transaction has been completed successfully. `evidence` will have - Proof of successful transaction, if any - Proof of successful delivery, if any - Proof of down payment, if any This request may take time, so the client can check the status by calling Status checking API. * @summary Loan disbursement * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {DisburseRequest} [disburseRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns a specified loan information. * @summary Loan information * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdLoansLoanIdGet(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This returns repayment history of a specified loan transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This returns repayment schedule of a specified loan. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This retrieves a signed loan contract. * @summary Signed loan contract * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This operations simulates loan results. * @summary Loan simulation * @param {SimulationRequest} simulationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingSimulatePost(simulationRequest: SimulationRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApiInterface */ lendingStatusPost(statusCheckingRequest: StatusCheckingRequest, options?: AxiosRequestConfig): AxiosPromise; } /** * LoanProductsApi - object-oriented interface * @export * @class LoanProductsApi * @extends {BaseAPI} */ export class LoanProductsApi extends BaseAPI implements LoanProductsApiInterface { /** * This operations processes the loan application. * @summary Loan application * @param {LoanApplicationRequest} loanApplicationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingApplyPost(loanApplicationRequest: LoanApplicationRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingApplyPost(loanApplicationRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns a PDF of a loan contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingContractsPost(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingContractsPost(contractGenerationRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This resends OTP for e-signing. * @summary Resend OTP for e-sign * @param {ResendOTPRequest} resendOTPRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingContractsResendCodePost(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingContractsResendCodePost(resendOTPRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This completes e-signing. This request may take time, so the client can check the status by calling Status checking API. * @summary Complete e-sign * @param {CompleteEsignRequest} completeEsignRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingContractsSignPost(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingContractsSignPost(completeEsignRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This starts e-signing of a loan contract. This sends OTP via SMS. * @summary Loan contract signing kick-off * @param {EsigningRequest} esigningRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingContractsStartPost(esigningRequest: EsigningRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingContractsStartPost(esigningRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns whether a specified customer has enough credit line. * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdBalancePost(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdBalancePost(id, balanceCheckRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This requests disbursement. This requires some information that states the transaction has been completed successfully. `evidence` will have - Proof of successful transaction, if any - Proof of successful delivery, if any - Proof of down payment, if any This request may take time, so the client can check the status by calling Status checking API. * @summary Loan disbursement * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {DisburseRequest} [disburseRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns a specified loan information. * @summary Loan information * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdLoansLoanIdGet(id: string, loanId: string, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdLoansLoanIdGet(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This returns repayment history of a specified loan transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id: string, loanId: string, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdLoansLoanIdRepaymentHistoryGet(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This returns repayment schedule of a specified loan. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id: string, loanId: string, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdLoansLoanIdRepaymentScheduleGet(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This retrieves a signed loan contract. * @summary Signed loan contract * @param {string} id Customer code * @param {string} loanId Signed loan contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingCustomersIdSignedContractsLoanIdPost(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This operations simulates loan results. * @summary Loan simulation * @param {SimulationRequest} simulationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingSimulatePost(simulationRequest: SimulationRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingSimulatePost(simulationRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public lendingStatusPost(statusCheckingRequest: StatusCheckingRequest, options?: AxiosRequestConfig) { return LoanProductsApiFp(this.configuration).lendingStatusPost(statusCheckingRequest, options).then((request) => request(this.axios, this.basePath)); } }