UNPKG

fineract_sdk

Version:

Wrapper around fineract api.

801 lines (717 loc) 50.3 kB
/* tslint:disable */ /* eslint-disable */ /** * Apache Fineract * Apache Fineract is a secure, multi-tenanted microfinance platform The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform<br>The [reference app](https://cui.fineract.dev) (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation - The API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) - Find out more about Apache Fineract [here](/fineract-provider/api-docs/apiLive.htm#top) - You can [Try The API From Your Browser](/fineract-provider/api-docs/apiLive.htm#interact) - The Generic Options are available [here](/fineract-provider/api-docs/apiLive.htm#genopts) - Find out more about [Updating Dates and Numbers](/fineract-provider/api-docs/apiLive.htm#dates_and_numbers) - For the Authentication and the Basic of HTTP and HTTPS refer [here](/fineract-provider/api-docs/apiLive.htm#authentication_overview) - Check about ERROR codes [here](/fineract-provider/api-docs/apiLive.htm#errors) Please refer to the [old documentation](/fineract-provider/api-docs/apiLive.htm) for any documentation queries * * The version of the OpenAPI document: 1.5.0-66-gffae7d4-dirty * Contact: dev@fineract.apache.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { GetSelfLoansLoanIdChargesResponse } from '../models'; // @ts-ignore import { GetSelfLoansLoanIdResponse } from '../models'; // @ts-ignore import { GetSelfLoansLoanIdTransactionsTransactionIdResponse } from '../models'; // @ts-ignore import { GetSelfLoansTemplateResponse } from '../models'; // @ts-ignore import { PostSelfLoansLoanIdRequest } from '../models'; // @ts-ignore import { PostSelfLoansLoanIdResponse } from '../models'; // @ts-ignore import { PostSelfLoansRequest } from '../models'; // @ts-ignore import { PostSelfLoansResponse } from '../models'; // @ts-ignore import { PutSelfLoansLoanIdRequest } from '../models'; // @ts-ignore import { PutSelfLoansLoanIdResponse } from '../models'; /** * SelfLoansApi - axios parameter creator * @export */ export const SelfLoansApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Calculate Loan Repayment Schedule: Calculates Loan Repayment Schedule Mandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId Submit a new Loan Application: Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) Showing request/response for \'Submit a new Loan Application\' * @summary Calculate Loan Repayment Schedule | Submit a new Loan Application * @param {PostSelfLoansRequest} postSelfLoansRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ calculateLoanScheduleOrSubmitLoanApplication1: async (postSelfLoansRequest: PostSelfLoansRequest, command?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'postSelfLoansRequest' is not null or undefined assertParamExists('calculateLoanScheduleOrSubmitLoanApplication1', 'postSelfLoansRequest', postSelfLoansRequest) const localVarPath = `/self/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 basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (command !== undefined) { localVarQueryParameter['command'] = command; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postSelfLoansRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Loan application can only be modified when in \'Submitted and pending approval\' state. Once the application is approved, the details cannot be changed using this method. * @summary Update a Loan Application * @param {number} loanId loanId * @param {PutSelfLoansLoanIdRequest} putSelfLoansLoanIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ modifyLoanApplication1: async (loanId: number, putSelfLoansLoanIdRequest: PutSelfLoansLoanIdRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('modifyLoanApplication1', 'loanId', loanId) // verify required parameter 'putSelfLoansLoanIdRequest' is not null or undefined assertParamExists('modifyLoanApplication1', 'putSelfLoansLoanIdRequest', putSelfLoansLoanIdRequest) const localVarPath = `/self/loans/{loanId}` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(putSelfLoansLoanIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists loan Charges Example Requests: self/loans/1/charges self/loans/1/charges?fields=name,amountOrPercentage * @summary List Loan Charges * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllLoanCharges1: async (loanId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('retrieveAllLoanCharges1', 'loanId', loanId) const localVarPath = `/self/loans/{loanId}/charges` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {number} loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveGuarantorDetails2: async (loanId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('retrieveGuarantorDetails2', 'loanId', loanId) const localVarPath = `/self/loans/{loanId}/guarantors` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a Loan Example Requests: self/loans/1 self/loans/1?fields=id,principal,annualInterestRate self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions * @summary Retrieve a Loan * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoan1: async (loanId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('retrieveLoan1', 'loanId', loanId) const localVarPath = `/self/loans/{loanId}` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a Loan Charge Example Requests: self/loans/1/charges/1 self/loans/1/charges/1?fields=name,amountOrPercentage * @summary Retrieve a Loan Charge * @param {number} loanId loanId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoanCharge1: async (loanId: number, chargeId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('retrieveLoanCharge1', 'loanId', loanId) // verify required parameter 'chargeId' is not null or undefined assertParamExists('retrieveLoanCharge1', 'chargeId', chargeId) const localVarPath = `/self/loans/{loanId}/charges/{chargeId}` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))) .replace(`{${"chargeId"}}`, encodeURIComponent(String(chargeId))); // 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 basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves a Loan Transaction DetailsExample Request: self/loans/5/transactions/3 * @summary Retrieve a Loan Transaction Details * @param {number} loanId loanId * @param {number} transactionId transactionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTransaction1: async (loanId: number, transactionId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('retrieveTransaction1', 'loanId', loanId) // verify required parameter 'transactionId' is not null or undefined assertParamExists('retrieveTransaction1', 'transactionId', transactionId) const localVarPath = `/self/loans/{loanId}/transactions/{transactionId}` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))) .replace(`{${"transactionId"}}`, encodeURIComponent(String(transactionId))); // 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 basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Applicant Withdraws from Loan Application Mandatory Fields: withdrawnOnDate * @summary Applicant Withdraws from Loan Application * @param {number} loanId loanId * @param {PostSelfLoansLoanIdRequest} postSelfLoansLoanIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ stateTransitions1: async (loanId: number, postSelfLoansLoanIdRequest: PostSelfLoansLoanIdRequest, command?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'loanId' is not null or undefined assertParamExists('stateTransitions1', 'loanId', loanId) // verify required parameter 'postSelfLoansLoanIdRequest' is not null or undefined assertParamExists('stateTransitions1', 'postSelfLoansLoanIdRequest', postSelfLoansLoanIdRequest) const localVarPath = `/self/loans/{loanId}` .replace(`{${"loanId"}}`, encodeURIComponent(String(loanId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (command !== undefined) { localVarQueryParameter['command'] = command; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postSelfLoansLoanIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves Loan Details Template This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed description Lists Example Requests: self/loans/template?templateType=individual&clientId=1 self/loans/template?templateType=individual&clientId=1&productId=1 * @summary Retrieve Loan Details Template * @param {number} [clientId] clientId * @param {number} [productId] productId * @param {string} [templateType] templateType * @param {*} [options] Override http request option. * @throws {RequiredError} */ template17: async (clientId?: number, productId?: number, templateType?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/self/loans/template`; // 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 basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (clientId !== undefined) { localVarQueryParameter['clientId'] = clientId; } if (productId !== undefined) { localVarQueryParameter['productId'] = productId; } if (templateType !== undefined) { localVarQueryParameter['templateType'] = templateType; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SelfLoansApi - functional programming interface * @export */ export const SelfLoansApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SelfLoansApiAxiosParamCreator(configuration) return { /** * Calculate Loan Repayment Schedule: Calculates Loan Repayment Schedule Mandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId Submit a new Loan Application: Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) Showing request/response for \'Submit a new Loan Application\' * @summary Calculate Loan Repayment Schedule | Submit a new Loan Application * @param {PostSelfLoansRequest} postSelfLoansRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ async calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest: PostSelfLoansRequest, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostSelfLoansResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest, command, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Loan application can only be modified when in \'Submitted and pending approval\' state. Once the application is approved, the details cannot be changed using this method. * @summary Update a Loan Application * @param {number} loanId loanId * @param {PutSelfLoansLoanIdRequest} putSelfLoansLoanIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async modifyLoanApplication1(loanId: number, putSelfLoansLoanIdRequest: PutSelfLoansLoanIdRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PutSelfLoansLoanIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.modifyLoanApplication1(loanId, putSelfLoansLoanIdRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Lists loan Charges Example Requests: self/loans/1/charges self/loans/1/charges?fields=name,amountOrPercentage * @summary List Loan Charges * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveAllLoanCharges1(loanId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GetSelfLoansLoanIdChargesResponse>>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAllLoanCharges1(loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {number} loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveGuarantorDetails2(loanId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveGuarantorDetails2(loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a Loan Example Requests: self/loans/1 self/loans/1?fields=id,principal,annualInterestRate self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions * @summary Retrieve a Loan * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveLoan1(loanId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSelfLoansLoanIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveLoan1(loanId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a Loan Charge Example Requests: self/loans/1/charges/1 self/loans/1/charges/1?fields=name,amountOrPercentage * @summary Retrieve a Loan Charge * @param {number} loanId loanId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveLoanCharge1(loanId: number, chargeId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSelfLoansLoanIdChargesResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveLoanCharge1(loanId, chargeId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a Loan Transaction DetailsExample Request: self/loans/5/transactions/3 * @summary Retrieve a Loan Transaction Details * @param {number} loanId loanId * @param {number} transactionId transactionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveTransaction1(loanId: number, transactionId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSelfLoansLoanIdTransactionsTransactionIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveTransaction1(loanId, transactionId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Applicant Withdraws from Loan Application Mandatory Fields: withdrawnOnDate * @summary Applicant Withdraws from Loan Application * @param {number} loanId loanId * @param {PostSelfLoansLoanIdRequest} postSelfLoansLoanIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ async stateTransitions1(loanId: number, postSelfLoansLoanIdRequest: PostSelfLoansLoanIdRequest, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostSelfLoansLoanIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.stateTransitions1(loanId, postSelfLoansLoanIdRequest, command, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves Loan Details Template This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed description Lists Example Requests: self/loans/template?templateType=individual&clientId=1 self/loans/template?templateType=individual&clientId=1&productId=1 * @summary Retrieve Loan Details Template * @param {number} [clientId] clientId * @param {number} [productId] productId * @param {string} [templateType] templateType * @param {*} [options] Override http request option. * @throws {RequiredError} */ async template17(clientId?: number, productId?: number, templateType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSelfLoansTemplateResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.template17(clientId, productId, templateType, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * SelfLoansApi - factory interface * @export */ export const SelfLoansApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SelfLoansApiFp(configuration) return { /** * Calculate Loan Repayment Schedule: Calculates Loan Repayment Schedule Mandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId Submit a new Loan Application: Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) Showing request/response for \'Submit a new Loan Application\' * @summary Calculate Loan Repayment Schedule | Submit a new Loan Application * @param {PostSelfLoansRequest} postSelfLoansRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest: PostSelfLoansRequest, command?: string, options?: any): AxiosPromise<PostSelfLoansResponse> { return localVarFp.calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest, command, options).then((request) => request(axios, basePath)); }, /** * Loan application can only be modified when in \'Submitted and pending approval\' state. Once the application is approved, the details cannot be changed using this method. * @summary Update a Loan Application * @param {number} loanId loanId * @param {PutSelfLoansLoanIdRequest} putSelfLoansLoanIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ modifyLoanApplication1(loanId: number, putSelfLoansLoanIdRequest: PutSelfLoansLoanIdRequest, options?: any): AxiosPromise<PutSelfLoansLoanIdResponse> { return localVarFp.modifyLoanApplication1(loanId, putSelfLoansLoanIdRequest, options).then((request) => request(axios, basePath)); }, /** * Lists loan Charges Example Requests: self/loans/1/charges self/loans/1/charges?fields=name,amountOrPercentage * @summary List Loan Charges * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllLoanCharges1(loanId: number, options?: any): AxiosPromise<Array<GetSelfLoansLoanIdChargesResponse>> { return localVarFp.retrieveAllLoanCharges1(loanId, options).then((request) => request(axios, basePath)); }, /** * * @param {number} loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveGuarantorDetails2(loanId: number, options?: any): AxiosPromise<string> { return localVarFp.retrieveGuarantorDetails2(loanId, options).then((request) => request(axios, basePath)); }, /** * Retrieves a Loan Example Requests: self/loans/1 self/loans/1?fields=id,principal,annualInterestRate self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions * @summary Retrieve a Loan * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoan1(loanId: number, options?: any): AxiosPromise<GetSelfLoansLoanIdResponse> { return localVarFp.retrieveLoan1(loanId, options).then((request) => request(axios, basePath)); }, /** * Retrieves a Loan Charge Example Requests: self/loans/1/charges/1 self/loans/1/charges/1?fields=name,amountOrPercentage * @summary Retrieve a Loan Charge * @param {number} loanId loanId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoanCharge1(loanId: number, chargeId: number, options?: any): AxiosPromise<GetSelfLoansLoanIdChargesResponse> { return localVarFp.retrieveLoanCharge1(loanId, chargeId, options).then((request) => request(axios, basePath)); }, /** * Retrieves a Loan Transaction DetailsExample Request: self/loans/5/transactions/3 * @summary Retrieve a Loan Transaction Details * @param {number} loanId loanId * @param {number} transactionId transactionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTransaction1(loanId: number, transactionId: number, options?: any): AxiosPromise<GetSelfLoansLoanIdTransactionsTransactionIdResponse> { return localVarFp.retrieveTransaction1(loanId, transactionId, options).then((request) => request(axios, basePath)); }, /** * Applicant Withdraws from Loan Application Mandatory Fields: withdrawnOnDate * @summary Applicant Withdraws from Loan Application * @param {number} loanId loanId * @param {PostSelfLoansLoanIdRequest} postSelfLoansLoanIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ stateTransitions1(loanId: number, postSelfLoansLoanIdRequest: PostSelfLoansLoanIdRequest, command?: string, options?: any): AxiosPromise<PostSelfLoansLoanIdResponse> { return localVarFp.stateTransitions1(loanId, postSelfLoansLoanIdRequest, command, options).then((request) => request(axios, basePath)); }, /** * Retrieves Loan Details Template This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed description Lists Example Requests: self/loans/template?templateType=individual&clientId=1 self/loans/template?templateType=individual&clientId=1&productId=1 * @summary Retrieve Loan Details Template * @param {number} [clientId] clientId * @param {number} [productId] productId * @param {string} [templateType] templateType * @param {*} [options] Override http request option. * @throws {RequiredError} */ template17(clientId?: number, productId?: number, templateType?: string, options?: any): AxiosPromise<GetSelfLoansTemplateResponse> { return localVarFp.template17(clientId, productId, templateType, options).then((request) => request(axios, basePath)); }, }; }; /** * SelfLoansApi - object-oriented interface * @export * @class SelfLoansApi * @extends {BaseAPI} */ export class SelfLoansApi extends BaseAPI { /** * Calculate Loan Repayment Schedule: Calculates Loan Repayment Schedule Mandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId Submit a new Loan Application: Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) Showing request/response for \'Submit a new Loan Application\' * @summary Calculate Loan Repayment Schedule | Submit a new Loan Application * @param {PostSelfLoansRequest} postSelfLoansRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest: PostSelfLoansRequest, command?: string, options?: any) { return SelfLoansApiFp(this.configuration).calculateLoanScheduleOrSubmitLoanApplication1(postSelfLoansRequest, command, options).then((request) => request(this.axios, this.basePath)); } /** * Loan application can only be modified when in \'Submitted and pending approval\' state. Once the application is approved, the details cannot be changed using this method. * @summary Update a Loan Application * @param {number} loanId loanId * @param {PutSelfLoansLoanIdRequest} putSelfLoansLoanIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public modifyLoanApplication1(loanId: number, putSelfLoansLoanIdRequest: PutSelfLoansLoanIdRequest, options?: any) { return SelfLoansApiFp(this.configuration).modifyLoanApplication1(loanId, putSelfLoansLoanIdRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Lists loan Charges Example Requests: self/loans/1/charges self/loans/1/charges?fields=name,amountOrPercentage * @summary List Loan Charges * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public retrieveAllLoanCharges1(loanId: number, options?: any) { return SelfLoansApiFp(this.configuration).retrieveAllLoanCharges1(loanId, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {number} loanId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public retrieveGuarantorDetails2(loanId: number, options?: any) { return SelfLoansApiFp(this.configuration).retrieveGuarantorDetails2(loanId, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a Loan Example Requests: self/loans/1 self/loans/1?fields=id,principal,annualInterestRate self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions * @summary Retrieve a Loan * @param {number} loanId loanId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public retrieveLoan1(loanId: number, options?: any) { return SelfLoansApiFp(this.configuration).retrieveLoan1(loanId, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a Loan Charge Example Requests: self/loans/1/charges/1 self/loans/1/charges/1?fields=name,amountOrPercentage * @summary Retrieve a Loan Charge * @param {number} loanId loanId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public retrieveLoanCharge1(loanId: number, chargeId: number, options?: any) { return SelfLoansApiFp(this.configuration).retrieveLoanCharge1(loanId, chargeId, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a Loan Transaction DetailsExample Request: self/loans/5/transactions/3 * @summary Retrieve a Loan Transaction Details * @param {number} loanId loanId * @param {number} transactionId transactionId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public retrieveTransaction1(loanId: number, transactionId: number, options?: any) { return SelfLoansApiFp(this.configuration).retrieveTransaction1(loanId, transactionId, options).then((request) => request(this.axios, this.basePath)); } /** * Applicant Withdraws from Loan Application Mandatory Fields: withdrawnOnDate * @summary Applicant Withdraws from Loan Application * @param {number} loanId loanId * @param {PostSelfLoansLoanIdRequest} postSelfLoansLoanIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SelfLoansApi */ public stateTransitions1(loanId: number, postSelfLoansLoanIdRequest: PostSelfLoansLoanIdRequest, command?: string, options?: any) { return SelfLoansApiFp(this.configuration).stateTransitions1(loanId, postSelfLoansLoanIdRequest, command, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves Loan Details Template This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed description Lists Example Requests: self/loans/template?templateType=individual&clientId=1 self/loans/template?templateType=individual&clientId=1&productId=1 * @summary Retrieve Loan Details Template * @param {number} [clientId] clientId * @param {number} [productId] productId * @param {string} [templateType] templateType * @param {*} [options] Override http request option. * @throws {Requ