UNPKG

fineract_sdk

Version:

Wrapper around fineract api.

860 lines (743 loc) 69.8 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 { DeleteFixedDepositAccountsAccountIdResponse } from '../models'; // @ts-ignore import { FormDataContentDisposition } from '../models'; // @ts-ignore import { GetFixedDepositAccountsAccountIdResponse } from '../models'; // @ts-ignore import { GetFixedDepositAccountsResponse } from '../models'; // @ts-ignore import { GetFixedDepositAccountsTemplateResponse } from '../models'; // @ts-ignore import { PostFixedDepositAccountsAccountIdResponse } from '../models'; // @ts-ignore import { PostFixedDepositAccountsRequest } from '../models'; // @ts-ignore import { PostFixedDepositAccountsResponse } from '../models'; // @ts-ignore import { PutFixedDepositAccountsAccountIdRequest } from '../models'; // @ts-ignore import { PutFixedDepositAccountsAccountIdResponse } from '../models'; /** * FixedDepositAccountApi - axios parameter creator * @export */ export const FixedDepositAccountApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {number} accountId accountId * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ accountClosureTemplate: async (accountId: number, command?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'accountId' is not null or undefined assertParamExists('accountClosureTemplate', 'accountId', accountId) const localVarPath = `/fixeddepositaccounts/{accountId}/template` .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); // 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 (command !== undefined) { localVarQueryParameter['command'] = command; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * At present we support hard delete of fixed deposit application so long as its in \'Submitted and pending approval\' state. One the application is moves past this state, it is not possible to do a \'hard\' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account. * @summary Delete a fixed deposit application * @param {number} accountId accountId * @param {*} [options] Override http request option. * @throws {RequiredError} */ delete14: async (accountId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'accountId' is not null or undefined assertParamExists('delete14', 'accountId', accountId) const localVarPath = `/fixeddepositaccounts/{accountId}` .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); // 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 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} [officeId] * @param {number} [staffId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFixedDepositTemplate: async (officeId?: number, staffId?: number, dateFormat?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts/downloadtemplate`; // 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 (officeId !== undefined) { localVarQueryParameter['officeId'] = officeId; } if (staffId !== undefined) { localVarQueryParameter['staffId'] = staffId; } if (dateFormat !== undefined) { localVarQueryParameter['dateFormat'] = dateFormat; } 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} [officeId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFixedDepositTransactionTemplate: async (officeId?: number, dateFormat?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts/transaction/downloadtemplate`; // 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 (officeId !== undefined) { localVarQueryParameter['officeId'] = officeId; } if (dateFormat !== undefined) { localVarQueryParameter['dateFormat'] = dateFormat; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Approve fixed deposit application: Approves fixed deposit application so long as its in \'Submitted and pending approval\' state. Undo approval fixed deposit application: Will move \'approved\' fixed deposit application back to \'Submitted and pending approval\' state. Reject fixed deposit application: Rejects fixed deposit application so long as its in \'Submitted and pending approval\' state. Withdraw fixed deposit application: Used when an applicant withdraws from the fixed deposit application. It must be in \'Submitted and pending approval\' state. Close a fixed deposit account: Results in a Matured fixed deposit account being converted into a \'closed\' fixed deposit account. Premature Close a fixed deposit account: Results in an Active fixed deposit account being converted into a \'Premature Closed\' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.) Calculate Premature amount on Fixed deposit account: Calculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable. Calculate Interest on Fixed Deposit Account: Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process. Post Interest on Fixed Deposit Account: Calculates and Posts interest earned on a fixed deposit account based on today\'s date and whether an interest posting or crediting event is due. Showing request/response for Calculate Interest on Fixed Deposit Account * @summary Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account * @param {number} accountId accountId * @param {object} body * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ handleCommands4: async (accountId: number, body: object, command?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'accountId' is not null or undefined assertParamExists('handleCommands4', 'accountId', accountId) // verify required parameter 'body' is not null or undefined assertParamExists('handleCommands4', 'body', body) const localVarPath = `/fixeddepositaccounts/{accountId}` .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); // 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(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {FormDataContentDisposition} [file] * @param {string} [locale] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postFixedDepositTemplate: async (file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts/uploadtemplate`; // 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; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (file !== undefined) { localVarFormParams.append('file', new Blob([JSON.stringify(file)], { type: "application/json", })); } if (locale !== undefined) { localVarFormParams.append('locale', locale as any); } if (dateFormat !== undefined) { localVarFormParams.append('dateFormat', dateFormat as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {FormDataContentDisposition} [file] * @param {string} [locale] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postFixedDepositTransactionTemplate: async (file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts/transaction/uploadtemplate`; // 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; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (file !== undefined) { localVarFormParams.append('file', new Blob([JSON.stringify(file)], { type: "application/json", })); } if (locale !== undefined) { localVarFormParams.append('locale', locale as any); } if (dateFormat !== undefined) { localVarFormParams.append('dateFormat', dateFormat as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Lists Fixed Deposit Accounts Example Requests: fixeddepositaccounts fixeddepositaccounts?fields=name * @summary List Fixed deposit applications/accounts * @param {boolean} [paged] paged * @param {number} [offset] offset * @param {number} [limit] limit * @param {string} [orderBy] orderBy * @param {string} [sortOrder] sortOrder * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAll29: async (paged?: boolean, offset?: number, limit?: number, orderBy?: string, sortOrder?: string, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts`; // 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 (paged !== undefined) { localVarQueryParameter['paged'] = paged; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (orderBy !== undefined) { localVarQueryParameter['orderBy'] = orderBy; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } 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 fixed deposit application/account Example Requests : fixeddepositaccounts/1 fixeddepositaccounts/1?associations=all * @summary Retrieve a fixed deposit application/account * @param {number} accountId accountId * @param {boolean} [staffInSelectedOfficeOnly] staffInSelectedOfficeOnly * @param {string} [chargeStatus] chargeStatus * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveOne18: async (accountId: number, staffInSelectedOfficeOnly?: boolean, chargeStatus?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'accountId' is not null or undefined assertParamExists('retrieveOne18', 'accountId', accountId) const localVarPath = `/fixeddepositaccounts/{accountId}` .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); // 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 (staffInSelectedOfficeOnly !== undefined) { localVarQueryParameter['staffInSelectedOfficeOnly'] = staffInSelectedOfficeOnly; } if (chargeStatus !== undefined) { localVarQueryParameter['chargeStatus'] = chargeStatus; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Submits a new fixed deposit applicationMandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account ) * @summary Submit new fixed deposit application * @param {PostFixedDepositAccountsRequest} postFixedDepositAccountsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ submitApplication: async (postFixedDepositAccountsRequest: PostFixedDepositAccountsRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'postFixedDepositAccountsRequest' is not null or undefined assertParamExists('submitApplication', 'postFixedDepositAccountsRequest', postFixedDepositAccountsRequest) const localVarPath = `/fixeddepositaccounts`; // 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(postFixedDepositAccountsRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of: Field Defaults Allowed Value ListsExample Requests: fixeddepositaccounts/template?clientId=1 * @summary Retrieve Fixed Deposit Account Template * @param {number} [clientId] clientId * @param {number} [groupId] groupId * @param {number} [productId] productId * @param {boolean} [staffInSelectedOfficeOnly] staffInSelectedOfficeOnly * @param {*} [options] Override http request option. * @throws {RequiredError} */ template12: async (clientId?: number, groupId?: number, productId?: number, staffInSelectedOfficeOnly?: boolean, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/fixeddepositaccounts/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 (groupId !== undefined) { localVarQueryParameter['groupId'] = groupId; } if (productId !== undefined) { localVarQueryParameter['productId'] = productId; } if (staffInSelectedOfficeOnly !== undefined) { localVarQueryParameter['staffInSelectedOfficeOnly'] = staffInSelectedOfficeOnly; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Fixed deposit 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. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc * @summary Modify a fixed deposit application * @param {number} accountId accountId * @param {PutFixedDepositAccountsAccountIdRequest} putFixedDepositAccountsAccountIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ update15: async (accountId: number, putFixedDepositAccountsAccountIdRequest: PutFixedDepositAccountsAccountIdRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'accountId' is not null or undefined assertParamExists('update15', 'accountId', accountId) // verify required parameter 'putFixedDepositAccountsAccountIdRequest' is not null or undefined assertParamExists('update15', 'putFixedDepositAccountsAccountIdRequest', putFixedDepositAccountsAccountIdRequest) const localVarPath = `/fixeddepositaccounts/{accountId}` .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId))); // 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(putFixedDepositAccountsAccountIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * FixedDepositAccountApi - functional programming interface * @export */ export const FixedDepositAccountApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = FixedDepositAccountApiAxiosParamCreator(configuration) return { /** * * @param {number} accountId accountId * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ async accountClosureTemplate(accountId: number, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { const localVarAxiosArgs = await localVarAxiosParamCreator.accountClosureTemplate(accountId, command, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * At present we support hard delete of fixed deposit application so long as its in \'Submitted and pending approval\' state. One the application is moves past this state, it is not possible to do a \'hard\' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account. * @summary Delete a fixed deposit application * @param {number} accountId accountId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async delete14(accountId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteFixedDepositAccountsAccountIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.delete14(accountId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {number} [officeId] * @param {number} [staffId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getFixedDepositTemplate(officeId?: number, staffId?: number, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getFixedDepositTemplate(officeId, staffId, dateFormat, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {number} [officeId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getFixedDepositTransactionTemplate(officeId?: number, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { const localVarAxiosArgs = await localVarAxiosParamCreator.getFixedDepositTransactionTemplate(officeId, dateFormat, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Approve fixed deposit application: Approves fixed deposit application so long as its in \'Submitted and pending approval\' state. Undo approval fixed deposit application: Will move \'approved\' fixed deposit application back to \'Submitted and pending approval\' state. Reject fixed deposit application: Rejects fixed deposit application so long as its in \'Submitted and pending approval\' state. Withdraw fixed deposit application: Used when an applicant withdraws from the fixed deposit application. It must be in \'Submitted and pending approval\' state. Close a fixed deposit account: Results in a Matured fixed deposit account being converted into a \'closed\' fixed deposit account. Premature Close a fixed deposit account: Results in an Active fixed deposit account being converted into a \'Premature Closed\' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.) Calculate Premature amount on Fixed deposit account: Calculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable. Calculate Interest on Fixed Deposit Account: Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process. Post Interest on Fixed Deposit Account: Calculates and Posts interest earned on a fixed deposit account based on today\'s date and whether an interest posting or crediting event is due. Showing request/response for Calculate Interest on Fixed Deposit Account * @summary Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account * @param {number} accountId accountId * @param {object} body * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ async handleCommands4(accountId: number, body: object, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFixedDepositAccountsAccountIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.handleCommands4(accountId, body, command, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {FormDataContentDisposition} [file] * @param {string} [locale] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async postFixedDepositTemplate(file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { const localVarAxiosArgs = await localVarAxiosParamCreator.postFixedDepositTemplate(file, locale, dateFormat, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {FormDataContentDisposition} [file] * @param {string} [locale] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async postFixedDepositTransactionTemplate(file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { const localVarAxiosArgs = await localVarAxiosParamCreator.postFixedDepositTransactionTemplate(file, locale, dateFormat, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Lists Fixed Deposit Accounts Example Requests: fixeddepositaccounts fixeddepositaccounts?fields=name * @summary List Fixed deposit applications/accounts * @param {boolean} [paged] paged * @param {number} [offset] offset * @param {number} [limit] limit * @param {string} [orderBy] orderBy * @param {string} [sortOrder] sortOrder * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveAll29(paged?: boolean, offset?: number, limit?: number, orderBy?: string, sortOrder?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<GetFixedDepositAccountsResponse>>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAll29(paged, offset, limit, orderBy, sortOrder, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Retrieves a fixed deposit application/account Example Requests : fixeddepositaccounts/1 fixeddepositaccounts/1?associations=all * @summary Retrieve a fixed deposit application/account * @param {number} accountId accountId * @param {boolean} [staffInSelectedOfficeOnly] staffInSelectedOfficeOnly * @param {string} [chargeStatus] chargeStatus * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveOne18(accountId: number, staffInSelectedOfficeOnly?: boolean, chargeStatus?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetFixedDepositAccountsAccountIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveOne18(accountId, staffInSelectedOfficeOnly, chargeStatus, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Submits a new fixed deposit applicationMandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account ) * @summary Submit new fixed deposit application * @param {PostFixedDepositAccountsRequest} postFixedDepositAccountsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async submitApplication(postFixedDepositAccountsRequest: PostFixedDepositAccountsRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostFixedDepositAccountsResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.submitApplication(postFixedDepositAccountsRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of: Field Defaults Allowed Value ListsExample Requests: fixeddepositaccounts/template?clientId=1 * @summary Retrieve Fixed Deposit Account Template * @param {number} [clientId] clientId * @param {number} [groupId] groupId * @param {number} [productId] productId * @param {boolean} [staffInSelectedOfficeOnly] staffInSelectedOfficeOnly * @param {*} [options] Override http request option. * @throws {RequiredError} */ async template12(clientId?: number, groupId?: number, productId?: number, staffInSelectedOfficeOnly?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetFixedDepositAccountsTemplateResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.template12(clientId, groupId, productId, staffInSelectedOfficeOnly, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Fixed deposit 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. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc * @summary Modify a fixed deposit application * @param {number} accountId accountId * @param {PutFixedDepositAccountsAccountIdRequest} putFixedDepositAccountsAccountIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update15(accountId: number, putFixedDepositAccountsAccountIdRequest: PutFixedDepositAccountsAccountIdRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PutFixedDepositAccountsAccountIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.update15(accountId, putFixedDepositAccountsAccountIdRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * FixedDepositAccountApi - factory interface * @export */ export const FixedDepositAccountApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = FixedDepositAccountApiFp(configuration) return { /** * * @param {number} accountId accountId * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ accountClosureTemplate(accountId: number, command?: string, options?: any): AxiosPromise<string> { return localVarFp.accountClosureTemplate(accountId, command, options).then((request) => request(axios, basePath)); }, /** * At present we support hard delete of fixed deposit application so long as its in \'Submitted and pending approval\' state. One the application is moves past this state, it is not possible to do a \'hard\' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account. * @summary Delete a fixed deposit application * @param {number} accountId accountId * @param {*} [options] Override http request option. * @throws {RequiredError} */ delete14(accountId: number, options?: any): AxiosPromise<DeleteFixedDepositAccountsAccountIdResponse> { return localVarFp.delete14(accountId, options).then((request) => request(axios, basePath)); }, /** * * @param {number} [officeId] * @param {number} [staffId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFixedDepositTemplate(officeId?: number, staffId?: number, dateFormat?: string, options?: any): AxiosPromise<void> { return localVarFp.getFixedDepositTemplate(officeId, staffId, dateFormat, options).then((request) => request(axios, basePath)); }, /** * * @param {number} [officeId] * @param {string} [dateFormat] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFixedDepositTransactionTemplate(officeId?: number, dateFormat?: string, options?: any): AxiosPromise<void> { return localVarFp.getFixedDepositTransactionTemplate(officeId, dateFormat, options).then((re