UNPKG

fineract_sdk

Version:

Wrapper around fineract api.

448 lines (400 loc) 36.7 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 { GetLoanProductsProductIdResponse } from '../models'; // @ts-ignore import { GetLoanProductsResponse } from '../models'; // @ts-ignore import { GetLoanProductsTemplateResponse } from '../models'; // @ts-ignore import { PostLoanProductsRequest } from '../models'; // @ts-ignore import { PostLoanProductsResponse } from '../models'; // @ts-ignore import { PutLoanProductsProductIdRequest } from '../models'; // @ts-ignore import { PutLoanProductsProductIdResponse } from '../models'; /** * LoanProductsApi - axios parameter creator * @export */ export const LoanProductsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in. Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType Additional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate Additional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee Additional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor * @summary Create a Loan Product * @param {PostLoanProductsRequest} postLoanProductsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createLoanProduct: async (postLoanProductsRequest: PostLoanProductsRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'postLoanProductsRequest' is not null or undefined assertParamExists('createLoanProduct', 'postLoanProductsRequest', postLoanProductsRequest) const localVarPath = `/loanproducts`; // 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) 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(postLoanProductsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists Loan Products Example Requests: loanproducts loanproducts?fields=name,description,interestRateFrequencyType,amortizationType * @summary List Loan Products * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllLoanProducts: async (options: any = {}): Promise<RequestArgs> => { const localVarPath = `/loanproducts`; // 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 Product Example Requests: loanproducts/1 loanproducts/1?template=true loanproducts/1?fields=name,description,numberOfRepayments * @summary Retrieve a Loan Product * @param {number} productId productId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoanProductDetails: async (productId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'productId' is not null or undefined assertParamExists('retrieveLoanProductDetails', 'productId', productId) const localVarPath = `/loanproducts/{productId}` .replace(`{${"productId"}}`, encodeURIComponent(String(productId))); // 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, }; }, /** * 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 Request: loanproducts/template * @summary Retrieve Loan Product Details Template * @param {boolean} [isProductMixTemplate] isProductMixTemplate * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTemplate10: async (isProductMixTemplate?: boolean, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/loanproducts/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 (isProductMixTemplate !== undefined) { localVarQueryParameter['isProductMixTemplate'] = isProductMixTemplate; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Updates a Loan Product * @summary Update a Loan Product * @param {number} productId productId * @param {PutLoanProductsProductIdRequest} putLoanProductsProductIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateLoanProduct: async (productId: number, putLoanProductsProductIdRequest: PutLoanProductsProductIdRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'productId' is not null or undefined assertParamExists('updateLoanProduct', 'productId', productId) // verify required parameter 'putLoanProductsProductIdRequest' is not null or undefined assertParamExists('updateLoanProduct', 'putLoanProductsProductIdRequest', putLoanProductsProductIdRequest) const localVarPath = `/loanproducts/{productId}` .replace(`{${"productId"}}`, encodeURIComponent(String(productId))); // 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(putLoanProductsProductIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * LoanProductsApi - functional programming interface * @export */ export const LoanProductsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = LoanProductsApiAxiosParamCreator(configuration) return { /** * Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in. Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType Additional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate Additional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee Additional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor * @summary Create a Loan Product * @param {PostLoanProductsRequest} postLoanProductsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createLoanProduct(postLoanProductsRequest: PostLoanProductsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostLoanProductsResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.createLoanProduct(postLoanProductsRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Lists Loan Products Example Requests: loanproducts loanproducts?fields=name,description,interestRateFrequencyType,amortizationType * @summary List Loan Products * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveAllLoanProducts(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GetLoanProductsResponse>>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAllLoanProducts(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a Loan Product Example Requests: loanproducts/1 loanproducts/1?template=true loanproducts/1?fields=name,description,numberOfRepayments * @summary Retrieve a Loan Product * @param {number} productId productId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveLoanProductDetails(productId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLoanProductsProductIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveLoanProductDetails(productId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 Request: loanproducts/template * @summary Retrieve Loan Product Details Template * @param {boolean} [isProductMixTemplate] isProductMixTemplate * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveTemplate10(isProductMixTemplate?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLoanProductsTemplateResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveTemplate10(isProductMixTemplate, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Updates a Loan Product * @summary Update a Loan Product * @param {number} productId productId * @param {PutLoanProductsProductIdRequest} putLoanProductsProductIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateLoanProduct(productId: number, putLoanProductsProductIdRequest: PutLoanProductsProductIdRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PutLoanProductsProductIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateLoanProduct(productId, putLoanProductsProductIdRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * LoanProductsApi - factory interface * @export */ export const LoanProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = LoanProductsApiFp(configuration) return { /** * Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in. Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType Additional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate Additional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee Additional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor * @summary Create a Loan Product * @param {PostLoanProductsRequest} postLoanProductsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createLoanProduct(postLoanProductsRequest: PostLoanProductsRequest, options?: any): AxiosPromise<PostLoanProductsResponse> { return localVarFp.createLoanProduct(postLoanProductsRequest, options).then((request) => request(axios, basePath)); }, /** * Lists Loan Products Example Requests: loanproducts loanproducts?fields=name,description,interestRateFrequencyType,amortizationType * @summary List Loan Products * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllLoanProducts(options?: any): AxiosPromise<Array<GetLoanProductsResponse>> { return localVarFp.retrieveAllLoanProducts(options).then((request) => request(axios, basePath)); }, /** * Retrieves a Loan Product Example Requests: loanproducts/1 loanproducts/1?template=true loanproducts/1?fields=name,description,numberOfRepayments * @summary Retrieve a Loan Product * @param {number} productId productId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveLoanProductDetails(productId: number, options?: any): AxiosPromise<GetLoanProductsProductIdResponse> { return localVarFp.retrieveLoanProductDetails(productId, options).then((request) => request(axios, basePath)); }, /** * 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 Request: loanproducts/template * @summary Retrieve Loan Product Details Template * @param {boolean} [isProductMixTemplate] isProductMixTemplate * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTemplate10(isProductMixTemplate?: boolean, options?: any): AxiosPromise<GetLoanProductsTemplateResponse> { return localVarFp.retrieveTemplate10(isProductMixTemplate, options).then((request) => request(axios, basePath)); }, /** * Updates a Loan Product * @summary Update a Loan Product * @param {number} productId productId * @param {PutLoanProductsProductIdRequest} putLoanProductsProductIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateLoanProduct(productId: number, putLoanProductsProductIdRequest: PutLoanProductsProductIdRequest, options?: any): AxiosPromise<PutLoanProductsProductIdResponse> { return localVarFp.updateLoanProduct(productId, putLoanProductsProductIdRequest, options).then((request) => request(axios, basePath)); }, }; }; /** * LoanProductsApi - object-oriented interface * @export * @class LoanProductsApi * @extends {BaseAPI} */ export class LoanProductsApi extends BaseAPI { /** * Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in. Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType Additional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate Additional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee Additional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor * @summary Create a Loan Product * @param {PostLoanProductsRequest} postLoanProductsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public createLoanProduct(postLoanProductsRequest: PostLoanProductsRequest, options?: any) { return LoanProductsApiFp(this.configuration).createLoanProduct(postLoanProductsRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Lists Loan Products Example Requests: loanproducts loanproducts?fields=name,description,interestRateFrequencyType,amortizationType * @summary List Loan Products * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public retrieveAllLoanProducts(options?: any) { return LoanProductsApiFp(this.configuration).retrieveAllLoanProducts(options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a Loan Product Example Requests: loanproducts/1 loanproducts/1?template=true loanproducts/1?fields=name,description,numberOfRepayments * @summary Retrieve a Loan Product * @param {number} productId productId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public retrieveLoanProductDetails(productId: number, options?: any) { return LoanProductsApiFp(this.configuration).retrieveLoanProductDetails(productId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 Request: loanproducts/template * @summary Retrieve Loan Product Details Template * @param {boolean} [isProductMixTemplate] isProductMixTemplate * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public retrieveTemplate10(isProductMixTemplate?: boolean, options?: any) { return LoanProductsApiFp(this.configuration).retrieveTemplate10(isProductMixTemplate, options).then((request) => request(this.axios, this.basePath)); } /** * Updates a Loan Product * @summary Update a Loan Product * @param {number} productId productId * @param {PutLoanProductsProductIdRequest} putLoanProductsProductIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof LoanProductsApi */ public updateLoanProduct(productId: number, putLoanProductsProductIdRequest: PutLoanProductsProductIdRequest, options?: any) { return LoanProductsApiFp(this.configuration).updateLoanProduct(productId, putLoanProductsProductIdRequest, options).then((request) => request(this.axios, this.basePath)); } }