fineract_sdk
Version:
Wrapper around fineract api.
778 lines (696 loc) • 51.1 kB
text/typescript
/* 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 { FormDataContentDisposition } from '../models';
// @ts-ignore
import { GetAccountsTypeAccountIdResponse } from '../models';
// @ts-ignore
import { GetAccountsTypeResponse } from '../models';
// @ts-ignore
import { GetAccountsTypeTemplateResponse } from '../models';
// @ts-ignore
import { PostAccountsTypeAccountIdRequest } from '../models';
// @ts-ignore
import { PostAccountsTypeAccountIdResponse } from '../models';
// @ts-ignore
import { PostAccountsTypeRequest } from '../models';
// @ts-ignore
import { PostAccountsTypeResponse } from '../models';
// @ts-ignore
import { PutAccountsTypeAccountIdRequest } from '../models';
// @ts-ignore
import { PutAccountsTypeAccountIdResponse } from '../models';
/**
* ShareAccountApi - axios parameter creator
* @export
*/
export const ShareAccountApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Submits new share application Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate Optional Fields: accountNo, externalId Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
* @summary Submit new share application
* @param {string} type type
* @param {PostAccountsTypeRequest} postAccountsTypeRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAccount: async (type: string, postAccountsTypeRequest: PostAccountsTypeRequest, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('createAccount', 'type', type)
// verify required parameter 'postAccountsTypeRequest' is not null or undefined
assertParamExists('createAccount', 'postAccountsTypeRequest', postAccountsTypeRequest)
const localVarPath = `/accounts/{type}`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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(postAccountsTypeRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} type type
* @param {number} [officeId]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSharedAccountsTemplate: async (type: string, officeId?: number, dateFormat?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('getSharedAccountsTemplate', 'type', type)
const localVarPath = `/accounts/{type}/downloadtemplate`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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 share application: Approves share application so long as its in \'Submitted and pending approval\' state. Undo approval share application: Will move \'approved\' share application back to \'Submitted and pending approval\' state. Reject share application: Rejects share application so long as its in \'Submitted and pending approval\' state. Activate a share account: Results in an approved share application being converted into an \'active\' share account. Close a share account: Results in an Activated share application being converted into an \'closed\' share account. closedDate is closure date of share account Mandatory Fields: dateFormat,locale,closedDate Apply additional shares on a share account: requestedDate is requsted date of share purchase requestedShares is number of shares to be purchase Mandatory Fields: dateFormat,locale,requestedDate, requestedShares Approve additional shares request on a share account requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Reject additional shares request on a share account: requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Redeem shares on a share account: Results redeem some/all shares from share account. requestedDate is requsted date of shares redeem requestedShares is number of shares to be redeemed Mandatory Fields: dateFormat,locale,requestedDate,requestedShares Showing request/response for \'Reject additional shares request on a share account\' For more info visit this link - https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#shareaccounts
* @summary Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account
* @param {string} type type
* @param {number} accountId accountId
* @param {PostAccountsTypeAccountIdRequest} postAccountsTypeAccountIdRequest
* @param {string} [command] command
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
handleCommands2: async (type: string, accountId: number, postAccountsTypeAccountIdRequest: PostAccountsTypeAccountIdRequest, command?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('handleCommands2', 'type', type)
// verify required parameter 'accountId' is not null or undefined
assertParamExists('handleCommands2', 'accountId', accountId)
// verify required parameter 'postAccountsTypeAccountIdRequest' is not null or undefined
assertParamExists('handleCommands2', 'postAccountsTypeAccountIdRequest', postAccountsTypeAccountIdRequest)
const localVarPath = `/accounts/{type}/{accountId}`
.replace(`{${"type"}}`, encodeURIComponent(String(type)))
.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(postAccountsTypeAccountIdRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} type type
* @param {FormDataContentDisposition} [file]
* @param {string} [locale]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postSharedAccountsTemplate: async (type: string, file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('postSharedAccountsTemplate', 'type', type)
const localVarPath = `/accounts/{type}/uploadtemplate`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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,
};
},
/**
* Retrieves a share application/account Example Requests : shareaccount/1
* @summary Retrieve a share application/account
* @param {number} accountId accountId
* @param {string} type type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveAccount: async (accountId: number, type: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'accountId' is not null or undefined
assertParamExists('retrieveAccount', 'accountId', accountId)
// verify required parameter 'type' is not null or undefined
assertParamExists('retrieveAccount', 'type', type)
const localVarPath = `/accounts/{type}/{accountId}`
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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,
};
},
/**
* Lists share applications/accounts Example Requests: shareaccount
* @summary List share applications/accounts
* @param {string} type type
* @param {number} [offset] offset
* @param {number} [limit] limit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveAllAccounts1: async (type: string, offset?: number, limit?: number, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('retrieveAllAccounts1', 'type', type)
const localVarPath = `/accounts/{type}`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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 (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
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 Value Lists Example Requests: accounts/share/template?clientId=1 accounts/share/template?clientId=1&productId=1
* @summary Retrieve Share Account Template
* @param {string} type type
* @param {number} [clientId] clientId
* @param {number} [productId] productId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
template7: async (type: string, clientId?: number, productId?: number, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('template7', 'type', type)
const localVarPath = `/accounts/{type}/template`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// 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;
}
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Share 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 share application
* @param {string} type type
* @param {number} accountId accountId
* @param {PutAccountsTypeAccountIdRequest} putAccountsTypeAccountIdRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAccount: async (type: string, accountId: number, putAccountsTypeAccountIdRequest: PutAccountsTypeAccountIdRequest, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'type' is not null or undefined
assertParamExists('updateAccount', 'type', type)
// verify required parameter 'accountId' is not null or undefined
assertParamExists('updateAccount', 'accountId', accountId)
// verify required parameter 'putAccountsTypeAccountIdRequest' is not null or undefined
assertParamExists('updateAccount', 'putAccountsTypeAccountIdRequest', putAccountsTypeAccountIdRequest)
const localVarPath = `/accounts/{type}/{accountId}`
.replace(`{${"type"}}`, encodeURIComponent(String(type)))
.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(putAccountsTypeAccountIdRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* ShareAccountApi - functional programming interface
* @export
*/
export const ShareAccountApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ShareAccountApiAxiosParamCreator(configuration)
return {
/**
* Submits new share application Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate Optional Fields: accountNo, externalId Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
* @summary Submit new share application
* @param {string} type type
* @param {PostAccountsTypeRequest} postAccountsTypeRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createAccount(type: string, postAccountsTypeRequest: PostAccountsTypeRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAccountsTypeResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createAccount(type, postAccountsTypeRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} type type
* @param {number} [officeId]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getSharedAccountsTemplate(type: string, officeId?: number, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getSharedAccountsTemplate(type, officeId, dateFormat, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Approve share application: Approves share application so long as its in \'Submitted and pending approval\' state. Undo approval share application: Will move \'approved\' share application back to \'Submitted and pending approval\' state. Reject share application: Rejects share application so long as its in \'Submitted and pending approval\' state. Activate a share account: Results in an approved share application being converted into an \'active\' share account. Close a share account: Results in an Activated share application being converted into an \'closed\' share account. closedDate is closure date of share account Mandatory Fields: dateFormat,locale,closedDate Apply additional shares on a share account: requestedDate is requsted date of share purchase requestedShares is number of shares to be purchase Mandatory Fields: dateFormat,locale,requestedDate, requestedShares Approve additional shares request on a share account requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Reject additional shares request on a share account: requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Redeem shares on a share account: Results redeem some/all shares from share account. requestedDate is requsted date of shares redeem requestedShares is number of shares to be redeemed Mandatory Fields: dateFormat,locale,requestedDate,requestedShares Showing request/response for \'Reject additional shares request on a share account\' For more info visit this link - https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#shareaccounts
* @summary Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account
* @param {string} type type
* @param {number} accountId accountId
* @param {PostAccountsTypeAccountIdRequest} postAccountsTypeAccountIdRequest
* @param {string} [command] command
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async handleCommands2(type: string, accountId: number, postAccountsTypeAccountIdRequest: PostAccountsTypeAccountIdRequest, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAccountsTypeAccountIdResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.handleCommands2(type, accountId, postAccountsTypeAccountIdRequest, command, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} type type
* @param {FormDataContentDisposition} [file]
* @param {string} [locale]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async postSharedAccountsTemplate(type: string, file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.postSharedAccountsTemplate(type, file, locale, dateFormat, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Retrieves a share application/account Example Requests : shareaccount/1
* @summary Retrieve a share application/account
* @param {number} accountId accountId
* @param {string} type type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async retrieveAccount(accountId: number, type: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountsTypeAccountIdResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAccount(accountId, type, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Lists share applications/accounts Example Requests: shareaccount
* @summary List share applications/accounts
* @param {string} type type
* @param {number} [offset] offset
* @param {number} [limit] limit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async retrieveAllAccounts1(type: string, offset?: number, limit?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountsTypeResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAllAccounts1(type, offset, limit, 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 Value Lists Example Requests: accounts/share/template?clientId=1 accounts/share/template?clientId=1&productId=1
* @summary Retrieve Share Account Template
* @param {string} type type
* @param {number} [clientId] clientId
* @param {number} [productId] productId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async template7(type: string, clientId?: number, productId?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountsTypeTemplateResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.template7(type, clientId, productId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Share 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 share application
* @param {string} type type
* @param {number} accountId accountId
* @param {PutAccountsTypeAccountIdRequest} putAccountsTypeAccountIdRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateAccount(type: string, accountId: number, putAccountsTypeAccountIdRequest: PutAccountsTypeAccountIdRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PutAccountsTypeAccountIdResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccount(type, accountId, putAccountsTypeAccountIdRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* ShareAccountApi - factory interface
* @export
*/
export const ShareAccountApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = ShareAccountApiFp(configuration)
return {
/**
* Submits new share application Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate Optional Fields: accountNo, externalId Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
* @summary Submit new share application
* @param {string} type type
* @param {PostAccountsTypeRequest} postAccountsTypeRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createAccount(type: string, postAccountsTypeRequest: PostAccountsTypeRequest, options?: any): AxiosPromise<PostAccountsTypeResponse> {
return localVarFp.createAccount(type, postAccountsTypeRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} type type
* @param {number} [officeId]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSharedAccountsTemplate(type: string, officeId?: number, dateFormat?: string, options?: any): AxiosPromise<void> {
return localVarFp.getSharedAccountsTemplate(type, officeId, dateFormat, options).then((request) => request(axios, basePath));
},
/**
* Approve share application: Approves share application so long as its in \'Submitted and pending approval\' state. Undo approval share application: Will move \'approved\' share application back to \'Submitted and pending approval\' state. Reject share application: Rejects share application so long as its in \'Submitted and pending approval\' state. Activate a share account: Results in an approved share application being converted into an \'active\' share account. Close a share account: Results in an Activated share application being converted into an \'closed\' share account. closedDate is closure date of share account Mandatory Fields: dateFormat,locale,closedDate Apply additional shares on a share account: requestedDate is requsted date of share purchase requestedShares is number of shares to be purchase Mandatory Fields: dateFormat,locale,requestedDate, requestedShares Approve additional shares request on a share account requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Reject additional shares request on a share account: requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Redeem shares on a share account: Results redeem some/all shares from share account. requestedDate is requsted date of shares redeem requestedShares is number of shares to be redeemed Mandatory Fields: dateFormat,locale,requestedDate,requestedShares Showing request/response for \'Reject additional shares request on a share account\' For more info visit this link - https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#shareaccounts
* @summary Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account
* @param {string} type type
* @param {number} accountId accountId
* @param {PostAccountsTypeAccountIdRequest} postAccountsTypeAccountIdRequest
* @param {string} [command] command
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
handleCommands2(type: string, accountId: number, postAccountsTypeAccountIdRequest: PostAccountsTypeAccountIdRequest, command?: string, options?: any): AxiosPromise<PostAccountsTypeAccountIdResponse> {
return localVarFp.handleCommands2(type, accountId, postAccountsTypeAccountIdRequest, command, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} type type
* @param {FormDataContentDisposition} [file]
* @param {string} [locale]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postSharedAccountsTemplate(type: string, file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options?: any): AxiosPromise<string> {
return localVarFp.postSharedAccountsTemplate(type, file, locale, dateFormat, options).then((request) => request(axios, basePath));
},
/**
* Retrieves a share application/account Example Requests : shareaccount/1
* @summary Retrieve a share application/account
* @param {number} accountId accountId
* @param {string} type type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveAccount(accountId: number, type: string, options?: any): AxiosPromise<GetAccountsTypeAccountIdResponse> {
return localVarFp.retrieveAccount(accountId, type, options).then((request) => request(axios, basePath));
},
/**
* Lists share applications/accounts Example Requests: shareaccount
* @summary List share applications/accounts
* @param {string} type type
* @param {number} [offset] offset
* @param {number} [limit] limit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveAllAccounts1(type: string, offset?: number, limit?: number, options?: any): AxiosPromise<GetAccountsTypeResponse> {
return localVarFp.retrieveAllAccounts1(type, offset, limit, 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 Value Lists Example Requests: accounts/share/template?clientId=1 accounts/share/template?clientId=1&productId=1
* @summary Retrieve Share Account Template
* @param {string} type type
* @param {number} [clientId] clientId
* @param {number} [productId] productId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
template7(type: string, clientId?: number, productId?: number, options?: any): AxiosPromise<GetAccountsTypeTemplateResponse> {
return localVarFp.template7(type, clientId, productId, options).then((request) => request(axios, basePath));
},
/**
* Share 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 share application
* @param {string} type type
* @param {number} accountId accountId
* @param {PutAccountsTypeAccountIdRequest} putAccountsTypeAccountIdRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAccount(type: string, accountId: number, putAccountsTypeAccountIdRequest: PutAccountsTypeAccountIdRequest, options?: any): AxiosPromise<PutAccountsTypeAccountIdResponse> {
return localVarFp.updateAccount(type, accountId, putAccountsTypeAccountIdRequest, options).then((request) => request(axios, basePath));
},
};
};
/**
* ShareAccountApi - object-oriented interface
* @export
* @class ShareAccountApi
* @extends {BaseAPI}
*/
export class ShareAccountApi extends BaseAPI {
/**
* Submits new share application Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate Optional Fields: accountNo, externalId Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
* @summary Submit new share application
* @param {string} type type
* @param {PostAccountsTypeRequest} postAccountsTypeRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public createAccount(type: string, postAccountsTypeRequest: PostAccountsTypeRequest, options?: any) {
return ShareAccountApiFp(this.configuration).createAccount(type, postAccountsTypeRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} type type
* @param {number} [officeId]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public getSharedAccountsTemplate(type: string, officeId?: number, dateFormat?: string, options?: any) {
return ShareAccountApiFp(this.configuration).getSharedAccountsTemplate(type, officeId, dateFormat, options).then((request) => request(this.axios, this.basePath));
}
/**
* Approve share application: Approves share application so long as its in \'Submitted and pending approval\' state. Undo approval share application: Will move \'approved\' share application back to \'Submitted and pending approval\' state. Reject share application: Rejects share application so long as its in \'Submitted and pending approval\' state. Activate a share account: Results in an approved share application being converted into an \'active\' share account. Close a share account: Results in an Activated share application being converted into an \'closed\' share account. closedDate is closure date of share account Mandatory Fields: dateFormat,locale,closedDate Apply additional shares on a share account: requestedDate is requsted date of share purchase requestedShares is number of shares to be purchase Mandatory Fields: dateFormat,locale,requestedDate, requestedShares Approve additional shares request on a share account requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Reject additional shares request on a share account: requestedShares is Share purchase transaction ids Mandatory Fields: requestedShares Redeem shares on a share account: Results redeem some/all shares from share account. requestedDate is requsted date of shares redeem requestedShares is number of shares to be redeemed Mandatory Fields: dateFormat,locale,requestedDate,requestedShares Showing request/response for \'Reject additional shares request on a share account\' For more info visit this link - https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#shareaccounts
* @summary Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account
* @param {string} type type
* @param {number} accountId accountId
* @param {PostAccountsTypeAccountIdRequest} postAccountsTypeAccountIdRequest
* @param {string} [command] command
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public handleCommands2(type: string, accountId: number, postAccountsTypeAccountIdRequest: PostAccountsTypeAccountIdRequest, command?: string, options?: any) {
return ShareAccountApiFp(this.configuration).handleCommands2(type, accountId, postAccountsTypeAccountIdRequest, command, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} type type
* @param {FormDataContentDisposition} [file]
* @param {string} [locale]
* @param {string} [dateFormat]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public postSharedAccountsTemplate(type: string, file?: FormDataContentDisposition, locale?: string, dateFormat?: string, options?: any) {
return ShareAccountApiFp(this.configuration).postSharedAccountsTemplate(type, file, locale, dateFormat, options).then((request) => request(this.axios, this.basePath));
}
/**
* Retrieves a share application/account Example Requests : shareaccount/1
* @summary Retrieve a share application/account
* @param {number} accountId accountId
* @param {string} type type
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public retrieveAccount(accountId: number, type: string, options?: any) {
return ShareAccountApiFp(this.configuration).retrieveAccount(accountId, type, options).then((request) => request(this.axios, this.basePath));
}
/**
* Lists share applications/accounts Example Requests: shareaccount
* @summary List share applications/accounts
* @param {string} type type
* @param {number} [offset] offset
* @param {number} [limit] limit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public retrieveAllAccounts1(type: string, offset?: number, limit?: number, options?: any) {
return ShareAccountApiFp(this.configuration).retrieveAllAccounts1(type, offset, limit, 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 Value Lists Example Requests: accounts/share/template?clientId=1 accounts/share/template?clientId=1&productId=1
* @summary Retrieve Share Account Template
* @param {string} type type
* @param {number} [clientId] clientId
* @param {number} [productId] productId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ShareAccountApi
*/
public template7(type: string, clientId?: number, productId?: number, options?: any) {