/* tslint:disable */ /* eslint-disable */ /** * loans * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded, } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap, } from '../base'; // @ts-ignore import type { ApplyInterestInput } from '../models'; // @ts-ignore import type { Card } from '../models'; // @ts-ignore import type { ChangeArrearsSettingsInput } from '../models'; // @ts-ignore import type { ChangeDueDatesSettingsInput } from '../models'; // @ts-ignore import type { ChangeFeeRateLoanAccountInput } from '../models'; // @ts-ignore import type { ChangeInterestRateLoanAccountInput } from '../models'; // @ts-ignore import type { ChangeLoanTermLoanAccountInput } from '../models'; // @ts-ignore import type { ChangePeriodicPaymentLoanAccountInput } from '../models'; // @ts-ignore import type { ChangeRepaymentValueLoanAccountInput } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { GetAuthorizationHold } from '../models'; // @ts-ignore import type { LoanAccount } from '../models'; // @ts-ignore import type { LoanAccountAction } from '../models'; // @ts-ignore import type { LoanAccountExternalMigration } from '../models'; // @ts-ignore import type { LoanAccountPayOffInput } from '../models'; // @ts-ignore import type { LoanAccountSchedule } from '../models'; // @ts-ignore import type { LoanActionDetails } from '../models'; // @ts-ignore import type { PatchOperation } from '../models'; // @ts-ignore import type { PreviewPayOffDueAmountsInAFutureDateInput } from '../models'; // @ts-ignore import type { PreviewPayOffDueAmountsInAFutureDateWrapper } from '../models'; // @ts-ignore import type { RefinanceLoanAccountAction } from '../models'; // @ts-ignore import type { RescheduleLoanAccountAction } from '../models'; // @ts-ignore import type { TerminateLoanAccountInput } from '../models'; /** * LoanAccountsApi - axios parameter creator */ export const LoanAccountsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Delete loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: async ( loanAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('_delete', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Apply accrued interest * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {ApplyInterestInput} applyInterestInput Represents the information for apply accrued interest action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyInterest: async ( loanAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('applyInterest', 'loanAccountId', loanAccountId); // verify required parameter 'applyInterestInput' is not null or undefined assertParamExists( 'applyInterest', 'applyInterestInput', applyInterestInput, ); const localVarPath = `/loans/{loanAccountId}:applyInterest`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( applyInterestInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change arrears settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeArrearsSettingsInput} [changeArrearsSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeArrearsSettings: async ( loanAccountId: string, idempotencyKey?: string, changeArrearsSettingsInput?: ChangeArrearsSettingsInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists( 'changeArrearsSettings', 'loanAccountId', loanAccountId, ); const localVarPath = `/loans/{loanAccountId}:changeArrearsSettings`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeArrearsSettingsInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change due dates settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeDueDatesSettingsInput} [changeDueDatesSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeDueDatesSettings: async ( loanAccountId: string, idempotencyKey?: string, changeDueDatesSettingsInput?: ChangeDueDatesSettingsInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists( 'changeDueDatesSettings', 'loanAccountId', loanAccountId, ); const localVarPath = `/loans/{loanAccountId}:changeDueDatesSettings`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeDueDatesSettingsInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change loan account fee rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeFeeRateLoanAccountInput} [changeFeeRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeFeeRate: async ( loanAccountId: string, idempotencyKey?: string, changeFeeRateLoanAccountInput?: ChangeFeeRateLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('changeFeeRate', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:changeFeeRate`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeFeeRateLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change loan account interest rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeInterestRateLoanAccountInput} [changeInterestRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeInterestRate: async ( loanAccountId: string, idempotencyKey?: string, changeInterestRateLoanAccountInput?: ChangeInterestRateLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('changeInterestRate', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:changeInterestRate`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeInterestRateLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change loan account term * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeLoanTermLoanAccountInput} [changeLoanTermLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeLoanTerm: async ( loanAccountId: string, idempotencyKey?: string, changeLoanTermLoanAccountInput?: ChangeLoanTermLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('changeLoanTerm', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:changeLoanTerm`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeLoanTermLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change the periodic payment amount for an active loan, so that it is still possible to have principal and interest installments, but with a smaller or greater total due amount than the initial one. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangePeriodicPaymentLoanAccountInput} [changePeriodicPaymentLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changePeriodicPayment: async ( loanAccountId: string, idempotencyKey?: string, changePeriodicPaymentLoanAccountInput?: ChangePeriodicPaymentLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists( 'changePeriodicPayment', 'loanAccountId', loanAccountId, ); const localVarPath = `/loans/{loanAccountId}:changePeriodicPayment`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changePeriodicPaymentLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change repayment value for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeRepaymentValueLoanAccountInput} [changeRepaymentValueLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeRepaymentValue: async ( loanAccountId: string, idempotencyKey?: string, changeRepaymentValueLoanAccountInput?: ChangeRepaymentValueLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('changeRepaymentValue', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:changeRepaymentValue`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeRepaymentValueLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change loan account state * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountAction} loanAccountAction Represents information for an action to perform on a loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeState: async ( loanAccountId: string, loanAccountAction: LoanAccountAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('changeState', 'loanAccountId', loanAccountId); // verify required parameter 'loanAccountAction' is not null or undefined assertParamExists('changeState', 'loanAccountAction', loanAccountAction); const localVarPath = `/loans/{loanAccountId}:changeState`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanAccountAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create loan account * @param {LoanAccount} loanAccount Loan account to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create: async ( loanAccount: LoanAccount, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccount' is not null or undefined assertParamExists('create', 'loanAccount', loanAccount); const localVarPath = `/loans`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanAccount, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCard: async ( loanAccountId: string, card: Card, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('createCard', 'loanAccountId', loanAccountId); // verify required parameter 'card' is not null or undefined assertParamExists('createCard', 'card', card); const localVarPath = `/loans/{loanAccountId}/cards`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( card, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCard: async ( loanAccountId: string, cardReferenceToken: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('deleteCard', 'loanAccountId', loanAccountId); // verify required parameter 'cardReferenceToken' is not null or undefined assertParamExists('deleteCard', 'cardReferenceToken', cardReferenceToken); const localVarPath = `/loans/{loanAccountId}/cards/{cardReferenceToken}` .replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ) .replace( `{${'cardReferenceToken'}}`, encodeURIComponent(String(cardReferenceToken)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get loan accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {GetAllAccountStateEnum} [accountState] The state of the loan account to search for * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The type of the account holder: CLIENT/GROUP * @param {string} [accountHolderId] The id of the account holder * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: id, loanName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: async ( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, sortBy?: string, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/loans`; // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } if (creditOfficerUsername !== undefined) { localVarQueryParameter['creditOfficerUsername'] = creditOfficerUsername; } if (branchId !== undefined) { localVarQueryParameter['branchId'] = branchId; } if (centreId !== undefined) { localVarQueryParameter['centreId'] = centreId; } if (accountState !== undefined) { localVarQueryParameter['accountState'] = accountState; } if (accountHolderType !== undefined) { localVarQueryParameter['accountHolderType'] = accountHolderType; } if (accountHolderId !== undefined) { localVarQueryParameter['accountHolderId'] = accountHolderId; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get authorization holds related to a loan account, ordered from newest to oldest by creation date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAuthorizationHolds: async ( loanAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists( 'getAllAuthorizationHolds', 'loanAccountId', loanAccountId, ); const localVarPath = `/loans/{loanAccountId}/authorizationholds`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (status !== undefined) { localVarQueryParameter['status'] = status; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get cards associated with an account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllCards: async ( loanAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('getAllCards', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}/cards`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById: async ( loanAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('getById', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get all versions of loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetVersionsByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersionsById: async ( loanAccountId: string, detailsLevel?: GetVersionsByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('getVersionsById', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:versions`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create loan account via external migration * @param {LoanAccountExternalMigration} loanAccountExternalMigration Creates a loan account and schedules migration of external balances and state. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ migrateExternal: async ( loanAccountExternalMigration: LoanAccountExternalMigration, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountExternalMigration' is not null or undefined assertParamExists( 'migrateExternal', 'loanAccountExternalMigration', loanAccountExternalMigration, ); const localVarPath = `/loans/migrate`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanAccountExternalMigration, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Partially update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: async ( loanAccountId: string, patchOperation: Array, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('patch', 'loanAccountId', loanAccountId); // verify required parameter 'patchOperation' is not null or undefined assertParamExists('patch', 'patchOperation', patchOperation); const localVarPath = `/loans/{loanAccountId}`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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: 'PATCH', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( patchOperation, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Pay off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountPayOffInput} loanAccountPayOffInput Represents the information for loan account pay off action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ payOff: async ( loanAccountId: string, loanAccountPayOffInput: LoanAccountPayOffInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('payOff', 'loanAccountId', loanAccountId); // verify required parameter 'loanAccountPayOffInput' is not null or undefined assertParamExists( 'payOff', 'loanAccountPayOffInput', loanAccountPayOffInput, ); const localVarPath = `/loans/{loanAccountId}:payOff`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanAccountPayOffInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Preview pay off due amounts in a future date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {PreviewPayOffDueAmountsInAFutureDateInput} [previewPayOffDueAmountsInAFutureDateInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ previewPayOffAmounts: async ( loanAccountId: string, idempotencyKey?: string, previewPayOffDueAmountsInAFutureDateInput?: PreviewPayOffDueAmountsInAFutureDateInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('previewPayOffAmounts', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:previewPayOffAmounts`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( previewPayOffDueAmountsInAFutureDateInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Refinance loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RefinanceLoanAccountAction} [refinanceLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ refinance: async ( loanAccountId: string, idempotencyKey?: string, refinanceLoanAccountAction?: RefinanceLoanAccountAction, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('refinance', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:refinance`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( refinanceLoanAccountAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Reschedule loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RescheduleLoanAccountAction} [rescheduleLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reschedule: async ( loanAccountId: string, idempotencyKey?: string, rescheduleLoanAccountAction?: RescheduleLoanAccountAction, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('reschedule', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:reschedule`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( rescheduleLoanAccountAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Terminate loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {TerminateLoanAccountInput} [terminateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ terminateLoanAccount: async ( loanAccountId: string, idempotencyKey?: string, terminateLoanAccountInput?: TerminateLoanAccountInput, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('terminateLoanAccount', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:terminate`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( terminateLoanAccountInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Undo loan account refinance action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoRefinance: async ( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('undoRefinance', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:undoRefinance`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanActionDetails, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Undo loan account reschedule action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoReschedule: async ( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('undoReschedule', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:undoReschedule`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanActionDetails, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Undo write off for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanActionDetails} loanActionDetails Represents input details for a loan account write off. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoWriteOff: async ( loanAccountId: string, loanActionDetails: LoanActionDetails, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('undoWriteOff', 'loanAccountId', loanAccountId); // verify required parameter 'loanActionDetails' is not null or undefined assertParamExists('undoWriteOff', 'loanActionDetails', loanActionDetails); const localVarPath = `/loans/{loanAccountId}:undoWriteOff`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanActionDetails, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccount} loanAccount Loan account to be updated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update: async ( loanAccountId: string, loanAccount: LoanAccount, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('update', 'loanAccountId', loanAccountId); // verify required parameter 'loanAccount' is not null or undefined assertParamExists('update', 'loanAccount', loanAccount); const localVarPath = `/loans/{loanAccountId}`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanAccount, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Write off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ writeOff: async ( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'loanAccountId' is not null or undefined assertParamExists('writeOff', 'loanAccountId', loanAccountId); const localVarPath = `/loans/{loanAccountId}:writeOff`.replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( loanActionDetails, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * LoanAccountsApi - functional programming interface */ export const LoanAccountsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = LoanAccountsApiAxiosParamCreator(configuration); return { /** * * @summary Delete loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async _delete( loanAccountId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator._delete( loanAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi._delete']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Apply accrued interest * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {ApplyInterestInput} applyInterestInput Represents the information for apply accrued interest action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async applyInterest( loanAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.applyInterest( loanAccountId, applyInterestInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.applyInterest']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change arrears settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeArrearsSettingsInput} [changeArrearsSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeArrearsSettings( loanAccountId: string, idempotencyKey?: string, changeArrearsSettingsInput?: ChangeArrearsSettingsInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeArrearsSettings( loanAccountId, idempotencyKey, changeArrearsSettingsInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeArrearsSettings']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change due dates settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeDueDatesSettingsInput} [changeDueDatesSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeDueDatesSettings( loanAccountId: string, idempotencyKey?: string, changeDueDatesSettingsInput?: ChangeDueDatesSettingsInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeDueDatesSettings( loanAccountId, idempotencyKey, changeDueDatesSettingsInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeDueDatesSettings']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change loan account fee rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeFeeRateLoanAccountInput} [changeFeeRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeFeeRate( loanAccountId: string, idempotencyKey?: string, changeFeeRateLoanAccountInput?: ChangeFeeRateLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeFeeRate( loanAccountId, idempotencyKey, changeFeeRateLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeFeeRate']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change loan account interest rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeInterestRateLoanAccountInput} [changeInterestRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeInterestRate( loanAccountId: string, idempotencyKey?: string, changeInterestRateLoanAccountInput?: ChangeInterestRateLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeInterestRate( loanAccountId, idempotencyKey, changeInterestRateLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeInterestRate']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change loan account term * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeLoanTermLoanAccountInput} [changeLoanTermLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeLoanTerm( loanAccountId: string, idempotencyKey?: string, changeLoanTermLoanAccountInput?: ChangeLoanTermLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeLoanTerm( loanAccountId, idempotencyKey, changeLoanTermLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeLoanTerm']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change the periodic payment amount for an active loan, so that it is still possible to have principal and interest installments, but with a smaller or greater total due amount than the initial one. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangePeriodicPaymentLoanAccountInput} [changePeriodicPaymentLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changePeriodicPayment( loanAccountId: string, idempotencyKey?: string, changePeriodicPaymentLoanAccountInput?: ChangePeriodicPaymentLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changePeriodicPayment( loanAccountId, idempotencyKey, changePeriodicPaymentLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changePeriodicPayment']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change repayment value for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeRepaymentValueLoanAccountInput} [changeRepaymentValueLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeRepaymentValue( loanAccountId: string, idempotencyKey?: string, changeRepaymentValueLoanAccountInput?: ChangeRepaymentValueLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeRepaymentValue( loanAccountId, idempotencyKey, changeRepaymentValueLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeRepaymentValue']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change loan account state * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountAction} loanAccountAction Represents information for an action to perform on a loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeState( loanAccountId: string, loanAccountAction: LoanAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeState( loanAccountId, loanAccountAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.changeState']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create loan account * @param {LoanAccount} loanAccount Loan account to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async create( loanAccount: LoanAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.create( loanAccount, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.create']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCard( loanAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createCard( loanAccountId, card, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.createCard']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteCard( loanAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCard( loanAccountId, cardReferenceToken, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.deleteCard']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get loan accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {GetAllAccountStateEnum} [accountState] The state of the loan account to search for * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The type of the account holder: CLIENT/GROUP * @param {string} [accountHolderId] The id of the account holder * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: id, loanName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, sortBy?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, sortBy, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.getAll']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get authorization holds related to a loan account, ordered from newest to oldest by creation date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllAuthorizationHolds( loanAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAuthorizationHolds( loanAccountId, offset, limit, paginationDetails, status, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.getAllAuthorizationHolds']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get cards associated with an account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllCards( loanAccountId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllCards( loanAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.getAllCards']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getById( loanAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getById( loanAccountId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.getById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get all versions of loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetVersionsByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getVersionsById( loanAccountId: string, detailsLevel?: GetVersionsByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getVersionsById( loanAccountId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.getVersionsById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create loan account via external migration * @param {LoanAccountExternalMigration} loanAccountExternalMigration Creates a loan account and schedules migration of external balances and state. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async migrateExternal( loanAccountExternalMigration: LoanAccountExternalMigration, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.migrateExternal( loanAccountExternalMigration, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.migrateExternal']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Partially update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patch( loanAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.patch( loanAccountId, patchOperation, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.patch']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Pay off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountPayOffInput} loanAccountPayOffInput Represents the information for loan account pay off action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async payOff( loanAccountId: string, loanAccountPayOffInput: LoanAccountPayOffInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.payOff( loanAccountId, loanAccountPayOffInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.payOff']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Preview pay off due amounts in a future date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {PreviewPayOffDueAmountsInAFutureDateInput} [previewPayOffDueAmountsInAFutureDateInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async previewPayOffAmounts( loanAccountId: string, idempotencyKey?: string, previewPayOffDueAmountsInAFutureDateInput?: PreviewPayOffDueAmountsInAFutureDateInput, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.previewPayOffAmounts( loanAccountId, idempotencyKey, previewPayOffDueAmountsInAFutureDateInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.previewPayOffAmounts']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Refinance loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RefinanceLoanAccountAction} [refinanceLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async refinance( loanAccountId: string, idempotencyKey?: string, refinanceLoanAccountAction?: RefinanceLoanAccountAction, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.refinance( loanAccountId, idempotencyKey, refinanceLoanAccountAction, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.refinance']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Reschedule loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RescheduleLoanAccountAction} [rescheduleLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async reschedule( loanAccountId: string, idempotencyKey?: string, rescheduleLoanAccountAction?: RescheduleLoanAccountAction, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.reschedule( loanAccountId, idempotencyKey, rescheduleLoanAccountAction, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.reschedule']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Terminate loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {TerminateLoanAccountInput} [terminateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async terminateLoanAccount( loanAccountId: string, idempotencyKey?: string, terminateLoanAccountInput?: TerminateLoanAccountInput, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.terminateLoanAccount( loanAccountId, idempotencyKey, terminateLoanAccountInput, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.terminateLoanAccount']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Undo loan account refinance action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undoRefinance( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.undoRefinance( loanAccountId, idempotencyKey, loanActionDetails, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.undoRefinance']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Undo loan account reschedule action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undoReschedule( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.undoReschedule( loanAccountId, idempotencyKey, loanActionDetails, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.undoReschedule']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Undo write off for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanActionDetails} loanActionDetails Represents input details for a loan account write off. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undoWriteOff( loanAccountId: string, loanActionDetails: LoanActionDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.undoWriteOff( loanAccountId, loanActionDetails, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.undoWriteOff']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccount} loanAccount Loan account to be updated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update( loanAccountId: string, loanAccount: LoanAccount, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.update( loanAccountId, loanAccount, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.update']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Write off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async writeOff( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.writeOff( loanAccountId, idempotencyKey, loanActionDetails, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['LoanAccountsApi.writeOff']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * LoanAccountsApi - factory interface */ export const LoanAccountsApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = LoanAccountsApiFp(configuration); return { /** * * @summary Delete loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete( loanAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp ._delete(loanAccountId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Apply accrued interest * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {ApplyInterestInput} applyInterestInput Represents the information for apply accrued interest action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyInterest( loanAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .applyInterest( loanAccountId, applyInterestInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change arrears settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeArrearsSettingsInput} [changeArrearsSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeArrearsSettings( loanAccountId: string, idempotencyKey?: string, changeArrearsSettingsInput?: ChangeArrearsSettingsInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeArrearsSettings( loanAccountId, idempotencyKey, changeArrearsSettingsInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change due dates settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeDueDatesSettingsInput} [changeDueDatesSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeDueDatesSettings( loanAccountId: string, idempotencyKey?: string, changeDueDatesSettingsInput?: ChangeDueDatesSettingsInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeDueDatesSettings( loanAccountId, idempotencyKey, changeDueDatesSettingsInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change loan account fee rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeFeeRateLoanAccountInput} [changeFeeRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeFeeRate( loanAccountId: string, idempotencyKey?: string, changeFeeRateLoanAccountInput?: ChangeFeeRateLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeFeeRate( loanAccountId, idempotencyKey, changeFeeRateLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change loan account interest rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeInterestRateLoanAccountInput} [changeInterestRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeInterestRate( loanAccountId: string, idempotencyKey?: string, changeInterestRateLoanAccountInput?: ChangeInterestRateLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeInterestRate( loanAccountId, idempotencyKey, changeInterestRateLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change loan account term * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeLoanTermLoanAccountInput} [changeLoanTermLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeLoanTerm( loanAccountId: string, idempotencyKey?: string, changeLoanTermLoanAccountInput?: ChangeLoanTermLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeLoanTerm( loanAccountId, idempotencyKey, changeLoanTermLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change the periodic payment amount for an active loan, so that it is still possible to have principal and interest installments, but with a smaller or greater total due amount than the initial one. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangePeriodicPaymentLoanAccountInput} [changePeriodicPaymentLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changePeriodicPayment( loanAccountId: string, idempotencyKey?: string, changePeriodicPaymentLoanAccountInput?: ChangePeriodicPaymentLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changePeriodicPayment( loanAccountId, idempotencyKey, changePeriodicPaymentLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change repayment value for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeRepaymentValueLoanAccountInput} [changeRepaymentValueLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeRepaymentValue( loanAccountId: string, idempotencyKey?: string, changeRepaymentValueLoanAccountInput?: ChangeRepaymentValueLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeRepaymentValue( loanAccountId, idempotencyKey, changeRepaymentValueLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change loan account state * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountAction} loanAccountAction Represents information for an action to perform on a loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeState( loanAccountId: string, loanAccountAction: LoanAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeState(loanAccountId, loanAccountAction, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create loan account * @param {LoanAccount} loanAccount Loan account to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create( loanAccount: LoanAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .create(loanAccount, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCard( loanAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .createCard(loanAccountId, card, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCard( loanAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .deleteCard(loanAccountId, cardReferenceToken, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get loan accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {GetAllAccountStateEnum} [accountState] The state of the loan account to search for * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The type of the account holder: CLIENT/GROUP * @param {string} [accountHolderId] The id of the account holder * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: id, loanName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, sortBy?: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, sortBy, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get authorization holds related to a loan account, ordered from newest to oldest by creation date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAuthorizationHolds( loanAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAllAuthorizationHolds( loanAccountId, offset, limit, paginationDetails, status, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get cards associated with an account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllCards( loanAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAllCards(loanAccountId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById( loanAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getById(loanAccountId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get all versions of loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetVersionsByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersionsById( loanAccountId: string, detailsLevel?: GetVersionsByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getVersionsById(loanAccountId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create loan account via external migration * @param {LoanAccountExternalMigration} loanAccountExternalMigration Creates a loan account and schedules migration of external balances and state. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ migrateExternal( loanAccountExternalMigration: LoanAccountExternalMigration, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .migrateExternal(loanAccountExternalMigration, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Partially update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch( loanAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .patch(loanAccountId, patchOperation, options) .then((request) => request(axios, basePath)); }, /** * * @summary Pay off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountPayOffInput} loanAccountPayOffInput Represents the information for loan account pay off action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ payOff( loanAccountId: string, loanAccountPayOffInput: LoanAccountPayOffInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .payOff(loanAccountId, loanAccountPayOffInput, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Preview pay off due amounts in a future date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {PreviewPayOffDueAmountsInAFutureDateInput} [previewPayOffDueAmountsInAFutureDateInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ previewPayOffAmounts( loanAccountId: string, idempotencyKey?: string, previewPayOffDueAmountsInAFutureDateInput?: PreviewPayOffDueAmountsInAFutureDateInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .previewPayOffAmounts( loanAccountId, idempotencyKey, previewPayOffDueAmountsInAFutureDateInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Refinance loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RefinanceLoanAccountAction} [refinanceLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ refinance( loanAccountId: string, idempotencyKey?: string, refinanceLoanAccountAction?: RefinanceLoanAccountAction, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .refinance( loanAccountId, idempotencyKey, refinanceLoanAccountAction, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Reschedule loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RescheduleLoanAccountAction} [rescheduleLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reschedule( loanAccountId: string, idempotencyKey?: string, rescheduleLoanAccountAction?: RescheduleLoanAccountAction, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .reschedule( loanAccountId, idempotencyKey, rescheduleLoanAccountAction, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Terminate loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {TerminateLoanAccountInput} [terminateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ terminateLoanAccount( loanAccountId: string, idempotencyKey?: string, terminateLoanAccountInput?: TerminateLoanAccountInput, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .terminateLoanAccount( loanAccountId, idempotencyKey, terminateLoanAccountInput, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Undo loan account refinance action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoRefinance( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .undoRefinance( loanAccountId, idempotencyKey, loanActionDetails, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Undo loan account reschedule action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoReschedule( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .undoReschedule( loanAccountId, idempotencyKey, loanActionDetails, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Undo write off for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanActionDetails} loanActionDetails Represents input details for a loan account write off. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoWriteOff( loanAccountId: string, loanActionDetails: LoanActionDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .undoWriteOff(loanAccountId, loanActionDetails, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccount} loanAccount Loan account to be updated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ update( loanAccountId: string, loanAccount: LoanAccount, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .update(loanAccountId, loanAccount, options) .then((request) => request(axios, basePath)); }, /** * * @summary Write off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ writeOff( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .writeOff(loanAccountId, idempotencyKey, loanActionDetails, options) .then((request) => request(axios, basePath)); }, }; }; /** * LoanAccountsApi - object-oriented interface */ export class LoanAccountsApi extends BaseAPI { /** * * @summary Delete loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public _delete(loanAccountId: string, options?: RawAxiosRequestConfig) { return LoanAccountsApiFp(this.configuration) ._delete(loanAccountId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Apply accrued interest * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {ApplyInterestInput} applyInterestInput Represents the information for apply accrued interest action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public applyInterest( loanAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .applyInterest(loanAccountId, applyInterestInput, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change arrears settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeArrearsSettingsInput} [changeArrearsSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeArrearsSettings( loanAccountId: string, idempotencyKey?: string, changeArrearsSettingsInput?: ChangeArrearsSettingsInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeArrearsSettings( loanAccountId, idempotencyKey, changeArrearsSettingsInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change due dates settings for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeDueDatesSettingsInput} [changeDueDatesSettingsInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeDueDatesSettings( loanAccountId: string, idempotencyKey?: string, changeDueDatesSettingsInput?: ChangeDueDatesSettingsInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeDueDatesSettings( loanAccountId, idempotencyKey, changeDueDatesSettingsInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change loan account fee rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeFeeRateLoanAccountInput} [changeFeeRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeFeeRate( loanAccountId: string, idempotencyKey?: string, changeFeeRateLoanAccountInput?: ChangeFeeRateLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeFeeRate( loanAccountId, idempotencyKey, changeFeeRateLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change loan account interest rate * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeInterestRateLoanAccountInput} [changeInterestRateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeInterestRate( loanAccountId: string, idempotencyKey?: string, changeInterestRateLoanAccountInput?: ChangeInterestRateLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeInterestRate( loanAccountId, idempotencyKey, changeInterestRateLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change loan account term * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeLoanTermLoanAccountInput} [changeLoanTermLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeLoanTerm( loanAccountId: string, idempotencyKey?: string, changeLoanTermLoanAccountInput?: ChangeLoanTermLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeLoanTerm( loanAccountId, idempotencyKey, changeLoanTermLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change the periodic payment amount for an active loan, so that it is still possible to have principal and interest installments, but with a smaller or greater total due amount than the initial one. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangePeriodicPaymentLoanAccountInput} [changePeriodicPaymentLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changePeriodicPayment( loanAccountId: string, idempotencyKey?: string, changePeriodicPaymentLoanAccountInput?: ChangePeriodicPaymentLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changePeriodicPayment( loanAccountId, idempotencyKey, changePeriodicPaymentLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change repayment value for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {ChangeRepaymentValueLoanAccountInput} [changeRepaymentValueLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeRepaymentValue( loanAccountId: string, idempotencyKey?: string, changeRepaymentValueLoanAccountInput?: ChangeRepaymentValueLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeRepaymentValue( loanAccountId, idempotencyKey, changeRepaymentValueLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change loan account state * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountAction} loanAccountAction Represents information for an action to perform on a loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeState( loanAccountId: string, loanAccountAction: LoanAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .changeState(loanAccountId, loanAccountAction, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create loan account * @param {LoanAccount} loanAccount Loan account to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public create( loanAccount: LoanAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .create(loanAccount, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createCard( loanAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .createCard(loanAccountId, card, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public deleteCard( loanAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .deleteCard(loanAccountId, cardReferenceToken, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get loan accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer to whom the entities are assigned to * @param {string} [branchId] The id/encodedKey of the branch to which the entities are assigned to * @param {string} [centreId] The id/encodedKey of the centre to which the entities are assigned to * @param {GetAllAccountStateEnum} [accountState] The state of the loan account to search for * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The type of the account holder: CLIENT/GROUP * @param {string} [accountHolderId] The id of the account holder * @param {string} [sortBy] The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: id, loanName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, sortBy?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, sortBy, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get authorization holds related to a loan account, ordered from newest to oldest by creation date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAllAuthorizationHolds( loanAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .getAllAuthorizationHolds( loanAccountId, offset, limit, paginationDetails, status, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get cards associated with an account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAllCards(loanAccountId: string, options?: RawAxiosRequestConfig) { return LoanAccountsApiFp(this.configuration) .getAllCards(loanAccountId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getById( loanAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .getById(loanAccountId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get all versions of loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {GetVersionsByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getVersionsById( loanAccountId: string, detailsLevel?: GetVersionsByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .getVersionsById(loanAccountId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create loan account via external migration * @param {LoanAccountExternalMigration} loanAccountExternalMigration Creates a loan account and schedules migration of external balances and state. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public migrateExternal( loanAccountExternalMigration: LoanAccountExternalMigration, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .migrateExternal(loanAccountExternalMigration, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Partially update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public patch( loanAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .patch(loanAccountId, patchOperation, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Pay off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccountPayOffInput} loanAccountPayOffInput Represents the information for loan account pay off action. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public payOff( loanAccountId: string, loanAccountPayOffInput: LoanAccountPayOffInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .payOff(loanAccountId, loanAccountPayOffInput, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Preview pay off due amounts in a future date * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {PreviewPayOffDueAmountsInAFutureDateInput} [previewPayOffDueAmountsInAFutureDateInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public previewPayOffAmounts( loanAccountId: string, idempotencyKey?: string, previewPayOffDueAmountsInAFutureDateInput?: PreviewPayOffDueAmountsInAFutureDateInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .previewPayOffAmounts( loanAccountId, idempotencyKey, previewPayOffDueAmountsInAFutureDateInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Refinance loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RefinanceLoanAccountAction} [refinanceLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public refinance( loanAccountId: string, idempotencyKey?: string, refinanceLoanAccountAction?: RefinanceLoanAccountAction, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .refinance( loanAccountId, idempotencyKey, refinanceLoanAccountAction, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Reschedule loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {RescheduleLoanAccountAction} [rescheduleLoanAccountAction] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public reschedule( loanAccountId: string, idempotencyKey?: string, rescheduleLoanAccountAction?: RescheduleLoanAccountAction, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .reschedule( loanAccountId, idempotencyKey, rescheduleLoanAccountAction, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Terminate loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {TerminateLoanAccountInput} [terminateLoanAccountInput] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public terminateLoanAccount( loanAccountId: string, idempotencyKey?: string, terminateLoanAccountInput?: TerminateLoanAccountInput, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .terminateLoanAccount( loanAccountId, idempotencyKey, terminateLoanAccountInput, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Undo loan account refinance action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undoRefinance( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .undoRefinance(loanAccountId, idempotencyKey, loanActionDetails, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Undo loan account reschedule action * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undoReschedule( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .undoReschedule(loanAccountId, idempotencyKey, loanActionDetails, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Undo write off for loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanActionDetails} loanActionDetails Represents input details for a loan account write off. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undoWriteOff( loanAccountId: string, loanActionDetails: LoanActionDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .undoWriteOff(loanAccountId, loanActionDetails, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {LoanAccount} loanAccount Loan account to be updated. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public update( loanAccountId: string, loanAccount: LoanAccount, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .update(loanAccountId, loanAccount, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Write off loan account * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {LoanActionDetails} [loanActionDetails] Represents information for an action to perform on a loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public writeOff( loanAccountId: string, idempotencyKey?: string, loanActionDetails?: LoanActionDetails, options?: RawAxiosRequestConfig, ) { return LoanAccountsApiFp(this.configuration) .writeOff(loanAccountId, idempotencyKey, loanActionDetails, options) .then((request) => request(this.axios, this.basePath)); } } export const GetAllPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllPaginationDetailsEnum = (typeof GetAllPaginationDetailsEnum)[keyof typeof GetAllPaginationDetailsEnum]; export const GetAllDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetAllDetailsLevelEnum = (typeof GetAllDetailsLevelEnum)[keyof typeof GetAllDetailsLevelEnum]; export const GetAllAccountStateEnum = { PartialApplication: 'PARTIAL_APPLICATION', PendingApproval: 'PENDING_APPROVAL', Approved: 'APPROVED', Active: 'ACTIVE', ActiveInArrears: 'ACTIVE_IN_ARREARS', Closed: 'CLOSED', ClosedWrittenOff: 'CLOSED_WRITTEN_OFF', ClosedRejected: 'CLOSED_REJECTED', } as const; export type GetAllAccountStateEnum = (typeof GetAllAccountStateEnum)[keyof typeof GetAllAccountStateEnum]; export const GetAllAccountHolderTypeEnum = { Client: 'CLIENT', Group: 'GROUP', } as const; export type GetAllAccountHolderTypeEnum = (typeof GetAllAccountHolderTypeEnum)[keyof typeof GetAllAccountHolderTypeEnum]; export const GetAllAuthorizationHoldsPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllAuthorizationHoldsPaginationDetailsEnum = (typeof GetAllAuthorizationHoldsPaginationDetailsEnum)[keyof typeof GetAllAuthorizationHoldsPaginationDetailsEnum]; export const GetAllAuthorizationHoldsStatusEnum = { Pending: 'PENDING', Reversed: 'REVERSED', Settled: 'SETTLED', Expired: 'EXPIRED', } as const; export type GetAllAuthorizationHoldsStatusEnum = (typeof GetAllAuthorizationHoldsStatusEnum)[keyof typeof GetAllAuthorizationHoldsStatusEnum]; export const GetByIdDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetByIdDetailsLevelEnum = (typeof GetByIdDetailsLevelEnum)[keyof typeof GetByIdDetailsLevelEnum]; export const GetVersionsByIdDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetVersionsByIdDetailsLevelEnum = (typeof GetVersionsByIdDetailsLevelEnum)[keyof typeof GetVersionsByIdDetailsLevelEnum];