/* 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 { CreditAssessmentRequest } from '../model'; // @ts-ignore import { CreditAssessmentResponse } 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 { GetTermsRequest } from '../model'; // @ts-ignore import { GetTermsResponse } from '../model'; // @ts-ignore import { Product } from '../model'; // @ts-ignore import { ProductsResponse } from '../model'; // @ts-ignore import { RepaymentHistoryResponse } from '../model'; // @ts-ignore import { RepaymentScheduleResponse } from '../model'; // @ts-ignore import { ResendOTPRequest } from '../model'; // @ts-ignore import { RevertRequest } from '../model'; // @ts-ignore import { RevertResponse } from '../model'; // @ts-ignore import { SignedContractResponse } from '../model'; // @ts-ignore import { StatusCheckingRequest } from '../model'; // @ts-ignore import { StatusCheckingResponse } from '../model'; /** * BNPLApi - axios parameter creator * @export */ export const BNPLApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * 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} */ bnplCustomersIdLoansLoanIdDisbursePost: async (id: string, loanId: string, disburseRequest?: DisburseRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('bnplCustomersIdLoansLoanIdDisbursePost', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('bnplCustomersIdLoansLoanIdDisbursePost', 'loanId', loanId) const localVarPath = `/bnpl/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 tries to cancel the specified loan. * @summary Cancellation * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {RevertRequest} [revertRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bnplCustomersIdLoansLoanIdRevertPost: async (id: string, loanId: string, revertRequest?: RevertRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('bnplCustomersIdLoansLoanIdRevertPost', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('bnplCustomersIdLoansLoanIdRevertPost', 'loanId', loanId) const localVarPath = `/bnpl/customers/{id}/loans/{loan-id}/revert` .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 = revertRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This retrieves a signed contract. * @summary Signed contract * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ bnplCustomersIdSignedContractsLoanIdPost: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('bnplCustomersIdSignedContractsLoanIdPost', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('bnplCustomersIdSignedContractsLoanIdPost', 'loanId', loanId) const localVarPath = `/bnpl/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 returns whether a specified customer has enough balance * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkBnplBalance: async (id: string, balanceCheckRequest?: BalanceCheckRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('checkBnplBalance', 'id', id) const localVarPath = `/bnpl/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 checks the status of the specified request. * @summary Status checking * @param {StatusCheckingRequest} statusCheckingRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkBnplRequestStatus: async (statusCheckingRequest: StatusCheckingRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'statusCheckingRequest' is not null or undefined assertParamExists('checkBnplRequestStatus', 'statusCheckingRequest', statusCheckingRequest) const localVarPath = `/bnpl/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, }; }, /** * 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} */ completeBnplEsign: async (completeEsignRequest: CompleteEsignRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'completeEsignRequest' is not null or undefined assertParamExists('completeBnplEsign', 'completeEsignRequest', completeEsignRequest) const localVarPath = `/bnpl/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 returns a PDF of a BNPL contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateBnplContract: async (contractGenerationRequest: ContractGenerationRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'contractGenerationRequest' is not null or undefined assertParamExists('generateBnplContract', 'contractGenerationRequest', contractGenerationRequest) const localVarPath = `/bnpl/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 returns available payment terms for a specified customer. If the credit assessment is not completed yet, this request may fail. * @summary Payment terms * @param {GetTermsRequest} getTermsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplPaymentTerms: async (getTermsRequest: GetTermsRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'getTermsRequest' is not null or undefined assertParamExists('getBnplPaymentTerms', 'getTermsRequest', getTermsRequest) const localVarPath = `/bnpl/terms`; // 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; localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = getTermsRequest return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This returns product detail. * @summary Get specified product detail (Optional) * @param {string} id Product code * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplProductDetail: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getBnplProductDetail', 'id', id) const localVarPath = `/bnpl/products/{id}` .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) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This retrieves products list provided by the BNPL provider * @summary Products list (Optional) * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplProductList: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/bnpl/products`; // 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 BNPL transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplRepaymentHistory: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getBnplRepaymentHistory', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('getBnplRepaymentHistory', 'loanId', loanId) const localVarPath = `/bnpl/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 BNPL transaction. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplRepaymentSchedule: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getBnplRepaymentSchedule', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('getBnplRepaymentSchedule', 'loanId', loanId) const localVarPath = `/bnpl/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 returns a specified BNPL transaction information. * @summary BNPL transaction inquiry * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplTransactionInfo: async (id: string, loanId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getBnplTransactionInfo', 'id', id) // verify required parameter 'loanId' is not null or undefined assertParamExists('getBnplTransactionInfo', 'loanId', loanId) const localVarPath = `/bnpl/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 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} */ initBnplEsignProcess: async (esigningRequest: EsigningRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'esigningRequest' is not null or undefined assertParamExists('initBnplEsignProcess', 'esigningRequest', esigningRequest) const localVarPath = `/bnpl/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 conducts credit assessment. This request may take time, so the client can check the status by calling Status checking API. * @summary Credit assessment * @param {CreditAssessmentRequest} creditAssessmentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ requestBnplCreditAssessment: async (creditAssessmentRequest: CreditAssessmentRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'creditAssessmentRequest' is not null or undefined assertParamExists('requestBnplCreditAssessment', 'creditAssessmentRequest', creditAssessmentRequest) const localVarPath = `/bnpl/credit-assessment`; // 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 = creditAssessmentRequest 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} */ resendBnplOtpForEsign: async (resendOTPRequest: ResendOTPRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'resendOTPRequest' is not null or undefined assertParamExists('resendBnplOtpForEsign', 'resendOTPRequest', resendOTPRequest) const localVarPath = `/bnpl/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, }; }, } }; /** * BNPLApi - functional programming interface * @export */ export const BNPLApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BNPLApiAxiosParamCreator(configuration) return { /** * 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 bnplCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bnplCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This tries to cancel the specified loan. * @summary Cancellation * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {RevertRequest} [revertRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async bnplCustomersIdLoansLoanIdRevertPost(id: string, loanId: string, revertRequest?: RevertRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bnplCustomersIdLoansLoanIdRevertPost(id, loanId, revertRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This retrieves a signed contract. * @summary Signed contract * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async bnplCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.bnplCustomersIdSignedContractsLoanIdPost(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns whether a specified customer has enough balance * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async checkBnplBalance(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.checkBnplBalance(id, balanceCheckRequest, 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 checkBnplRequestStatus(statusCheckingRequest: StatusCheckingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.checkBnplRequestStatus(statusCheckingRequest, 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 completeBnplEsign(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.completeBnplEsign(completeEsignRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns a PDF of a BNPL contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async generateBnplContract(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.generateBnplContract(contractGenerationRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns available payment terms for a specified customer. If the credit assessment is not completed yet, this request may fail. * @summary Payment terms * @param {GetTermsRequest} getTermsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplPaymentTerms(getTermsRequest: GetTermsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplPaymentTerms(getTermsRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns product detail. * @summary Get specified product detail (Optional) * @param {string} id Product code * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplProductDetail(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplProductDetail(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This retrieves products list provided by the BNPL provider * @summary Products list (Optional) * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplProductList(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplProductList(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns repayment history of a specified BNPL transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplRepaymentHistory(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplRepaymentHistory(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns repayment schedule of a specified BNPL transaction. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplRepaymentSchedule(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplRepaymentSchedule(id, loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This returns a specified BNPL transaction information. * @summary BNPL transaction inquiry * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBnplTransactionInfo(id: string, loanId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBnplTransactionInfo(id, loanId, 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 initBnplEsignProcess(esigningRequest: EsigningRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.initBnplEsignProcess(esigningRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This conducts credit assessment. This request may take time, so the client can check the status by calling Status checking API. * @summary Credit assessment * @param {CreditAssessmentRequest} creditAssessmentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async requestBnplCreditAssessment(creditAssessmentRequest: CreditAssessmentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.requestBnplCreditAssessment(creditAssessmentRequest, 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 resendBnplOtpForEsign(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.resendBnplOtpForEsign(resendOTPRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * BNPLApi - factory interface * @export */ export const BNPLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BNPLApiFp(configuration) return { /** * 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} */ bnplCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: any): AxiosPromise { return localVarFp.bnplCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options).then((request) => request(axios, basePath)); }, /** * This tries to cancel the specified loan. * @summary Cancellation * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {RevertRequest} [revertRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ bnplCustomersIdLoansLoanIdRevertPost(id: string, loanId: string, revertRequest?: RevertRequest, options?: any): AxiosPromise { return localVarFp.bnplCustomersIdLoansLoanIdRevertPost(id, loanId, revertRequest, options).then((request) => request(axios, basePath)); }, /** * This retrieves a signed contract. * @summary Signed contract * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ bnplCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.bnplCustomersIdSignedContractsLoanIdPost(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This returns whether a specified customer has enough balance * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkBnplBalance(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: any): AxiosPromise { return localVarFp.checkBnplBalance(id, balanceCheckRequest, 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} */ checkBnplRequestStatus(statusCheckingRequest: StatusCheckingRequest, options?: any): AxiosPromise { return localVarFp.checkBnplRequestStatus(statusCheckingRequest, 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} */ completeBnplEsign(completeEsignRequest: CompleteEsignRequest, options?: any): AxiosPromise { return localVarFp.completeBnplEsign(completeEsignRequest, options).then((request) => request(axios, basePath)); }, /** * This returns a PDF of a BNPL contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateBnplContract(contractGenerationRequest: ContractGenerationRequest, options?: any): AxiosPromise { return localVarFp.generateBnplContract(contractGenerationRequest, options).then((request) => request(axios, basePath)); }, /** * This returns available payment terms for a specified customer. If the credit assessment is not completed yet, this request may fail. * @summary Payment terms * @param {GetTermsRequest} getTermsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplPaymentTerms(getTermsRequest: GetTermsRequest, options?: any): AxiosPromise { return localVarFp.getBnplPaymentTerms(getTermsRequest, options).then((request) => request(axios, basePath)); }, /** * This returns product detail. * @summary Get specified product detail (Optional) * @param {string} id Product code * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplProductDetail(id: string, options?: any): AxiosPromise { return localVarFp.getBnplProductDetail(id, options).then((request) => request(axios, basePath)); }, /** * This retrieves products list provided by the BNPL provider * @summary Products list (Optional) * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplProductList(options?: any): AxiosPromise { return localVarFp.getBnplProductList(options).then((request) => request(axios, basePath)); }, /** * This returns repayment history of a specified BNPL transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplRepaymentHistory(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.getBnplRepaymentHistory(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This returns repayment schedule of a specified BNPL transaction. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplRepaymentSchedule(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.getBnplRepaymentSchedule(id, loanId, options).then((request) => request(axios, basePath)); }, /** * This returns a specified BNPL transaction information. * @summary BNPL transaction inquiry * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBnplTransactionInfo(id: string, loanId: string, options?: any): AxiosPromise { return localVarFp.getBnplTransactionInfo(id, loanId, 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} */ initBnplEsignProcess(esigningRequest: EsigningRequest, options?: any): AxiosPromise { return localVarFp.initBnplEsignProcess(esigningRequest, options).then((request) => request(axios, basePath)); }, /** * This conducts credit assessment. This request may take time, so the client can check the status by calling Status checking API. * @summary Credit assessment * @param {CreditAssessmentRequest} creditAssessmentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ requestBnplCreditAssessment(creditAssessmentRequest: CreditAssessmentRequest, options?: any): AxiosPromise { return localVarFp.requestBnplCreditAssessment(creditAssessmentRequest, 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} */ resendBnplOtpForEsign(resendOTPRequest: ResendOTPRequest, options?: any): AxiosPromise { return localVarFp.resendBnplOtpForEsign(resendOTPRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * BNPLApi - interface * @export * @interface BNPLApi */ export interface BNPLApiInterface { /** * 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 BNPLApiInterface */ bnplCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This tries to cancel the specified loan. * @summary Cancellation * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {RevertRequest} [revertRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ bnplCustomersIdLoansLoanIdRevertPost(id: string, loanId: string, revertRequest?: RevertRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This retrieves a signed contract. * @summary Signed contract * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ bnplCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This returns whether a specified customer has enough balance * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ checkBnplBalance(id: string, balanceCheckRequest?: BalanceCheckRequest, 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 BNPLApiInterface */ checkBnplRequestStatus(statusCheckingRequest: StatusCheckingRequest, 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 BNPLApiInterface */ completeBnplEsign(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns a PDF of a BNPL contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ generateBnplContract(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns available payment terms for a specified customer. If the credit assessment is not completed yet, this request may fail. * @summary Payment terms * @param {GetTermsRequest} getTermsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplPaymentTerms(getTermsRequest: GetTermsRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This returns product detail. * @summary Get specified product detail (Optional) * @param {string} id Product code * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplProductDetail(id: string, options?: AxiosRequestConfig): AxiosPromise; /** * This retrieves products list provided by the BNPL provider * @summary Products list (Optional) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplProductList(options?: AxiosRequestConfig): AxiosPromise; /** * This returns repayment history of a specified BNPL transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplRepaymentHistory(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This returns repayment schedule of a specified BNPL transaction. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplRepaymentSchedule(id: string, loanId: string, options?: AxiosRequestConfig): AxiosPromise; /** * This returns a specified BNPL transaction information. * @summary BNPL transaction inquiry * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ getBnplTransactionInfo(id: string, loanId: string, 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 BNPLApiInterface */ initBnplEsignProcess(esigningRequest: EsigningRequest, options?: AxiosRequestConfig): AxiosPromise; /** * This conducts credit assessment. This request may take time, so the client can check the status by calling Status checking API. * @summary Credit assessment * @param {CreditAssessmentRequest} creditAssessmentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApiInterface */ requestBnplCreditAssessment(creditAssessmentRequest: CreditAssessmentRequest, 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 BNPLApiInterface */ resendBnplOtpForEsign(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig): AxiosPromise; } /** * BNPLApi - object-oriented interface * @export * @class BNPLApi * @extends {BaseAPI} */ export class BNPLApi extends BaseAPI implements BNPLApiInterface { /** * 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 BNPLApi */ public bnplCustomersIdLoansLoanIdDisbursePost(id: string, loanId: string, disburseRequest?: DisburseRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).bnplCustomersIdLoansLoanIdDisbursePost(id, loanId, disburseRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This tries to cancel the specified loan. * @summary Cancellation * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {RevertRequest} [revertRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public bnplCustomersIdLoansLoanIdRevertPost(id: string, loanId: string, revertRequest?: RevertRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).bnplCustomersIdLoansLoanIdRevertPost(id, loanId, revertRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This retrieves a signed contract. * @summary Signed contract * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public bnplCustomersIdSignedContractsLoanIdPost(id: string, loanId: string, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).bnplCustomersIdSignedContractsLoanIdPost(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This returns whether a specified customer has enough balance * @summary Balance check * @param {string} id Customer code * @param {BalanceCheckRequest} [balanceCheckRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public checkBnplBalance(id: string, balanceCheckRequest?: BalanceCheckRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).checkBnplBalance(id, balanceCheckRequest, 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 BNPLApi */ public checkBnplRequestStatus(statusCheckingRequest: StatusCheckingRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).checkBnplRequestStatus(statusCheckingRequest, 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 BNPLApi */ public completeBnplEsign(completeEsignRequest: CompleteEsignRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).completeBnplEsign(completeEsignRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns a PDF of a BNPL contract for a customer. * @summary Contract generation * @param {ContractGenerationRequest} contractGenerationRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public generateBnplContract(contractGenerationRequest: ContractGenerationRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).generateBnplContract(contractGenerationRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns available payment terms for a specified customer. If the credit assessment is not completed yet, this request may fail. * @summary Payment terms * @param {GetTermsRequest} getTermsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplPaymentTerms(getTermsRequest: GetTermsRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplPaymentTerms(getTermsRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This returns product detail. * @summary Get specified product detail (Optional) * @param {string} id Product code * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplProductDetail(id: string, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplProductDetail(id, options).then((request) => request(this.axios, this.basePath)); } /** * This retrieves products list provided by the BNPL provider * @summary Products list (Optional) * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplProductList(options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplProductList(options).then((request) => request(this.axios, this.basePath)); } /** * This returns repayment history of a specified BNPL transaction. * @summary Repayment history * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplRepaymentHistory(id: string, loanId: string, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplRepaymentHistory(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This returns repayment schedule of a specified BNPL transaction. * @summary Repayment schedule * @param {string} id Customer code * @param {string} loanId Signed BNPL contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplRepaymentSchedule(id: string, loanId: string, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplRepaymentSchedule(id, loanId, options).then((request) => request(this.axios, this.basePath)); } /** * This returns a specified BNPL transaction information. * @summary BNPL transaction inquiry * @param {string} id Customer code * @param {string} loanId BNPL signed contract number * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public getBnplTransactionInfo(id: string, loanId: string, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).getBnplTransactionInfo(id, loanId, 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 BNPLApi */ public initBnplEsignProcess(esigningRequest: EsigningRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).initBnplEsignProcess(esigningRequest, options).then((request) => request(this.axios, this.basePath)); } /** * This conducts credit assessment. This request may take time, so the client can check the status by calling Status checking API. * @summary Credit assessment * @param {CreditAssessmentRequest} creditAssessmentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BNPLApi */ public requestBnplCreditAssessment(creditAssessmentRequest: CreditAssessmentRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).requestBnplCreditAssessment(creditAssessmentRequest, 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 BNPLApi */ public resendBnplOtpForEsign(resendOTPRequest: ResendOTPRequest, options?: AxiosRequestConfig) { return BNPLApiFp(this.configuration).resendBnplOtpForEsign(resendOTPRequest, options).then((request) => request(this.axios, this.basePath)); } }