UNPKG

fineract_sdk

Version:

Wrapper around fineract api.

1,004 lines (846 loc) 88.4 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 { DeleteTellersTellerIdCashiersCashierIdResponse } from '../models'; // @ts-ignore import { GetTellersResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersCashierIdResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersCashiersIdTransactionsResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersResponse } from '../models'; // @ts-ignore import { GetTellersTellerIdCashiersTemplateResponse } from '../models'; // @ts-ignore import { PostTellersRequest } from '../models'; // @ts-ignore import { PostTellersResponse } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersCashierIdAllocateRequest } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersCashierIdAllocateResponse } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersCashierIdSettleRequest } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersCashierIdSettleResponse } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersRequest } from '../models'; // @ts-ignore import { PostTellersTellerIdCashiersResponse } from '../models'; // @ts-ignore import { PutTellersRequest } from '../models'; // @ts-ignore import { PutTellersResponse } from '../models'; // @ts-ignore import { PutTellersTellerIdCashiersCashierIdRequest } from '../models'; // @ts-ignore import { PutTellersTellerIdCashiersCashierIdResponse } from '../models'; /** * TellerCashManagementApi - axios parameter creator * @export */ export const TellerCashManagementApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Mandatory Fields: Date, Amount, Currency, Notes/Comments * @summary Allocate Cash To Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {PostTellersTellerIdCashiersCashierIdAllocateRequest} postTellersTellerIdCashiersCashierIdAllocateRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ allocateCashToCashier: async (tellerId: number, cashierId: number, postTellersTellerIdCashiersCashierIdAllocateRequest: PostTellersTellerIdCashiersCashierIdAllocateRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('allocateCashToCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('allocateCashToCashier', 'cashierId', cashierId) // verify required parameter 'postTellersTellerIdCashiersCashierIdAllocateRequest' is not null or undefined assertParamExists('allocateCashToCashier', 'postTellersTellerIdCashiersCashierIdAllocateRequest', postTellersTellerIdCashiersCashierIdAllocateRequest) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}/allocate` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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'] = 'text/html'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postTellersTellerIdCashiersCashierIdAllocateRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Mandatory Fields: Cashier/staff, Fromm Date, To Date, Full Day or From time and To time Optional Fields: Description/Notes * @summary Create Cashiers * @param {number} tellerId tellerId * @param {PostTellersTellerIdCashiersRequest} postTellersTellerIdCashiersRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCashier: async (tellerId: number, postTellersTellerIdCashiersRequest: PostTellersTellerIdCashiersRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('createCashier', 'tellerId', tellerId) // verify required parameter 'postTellersTellerIdCashiersRequest' is not null or undefined assertParamExists('createCashier', 'postTellersTellerIdCashiersRequest', postTellersTellerIdCashiersRequest) const localVarPath = `/tellers/{tellerId}/cashiers` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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(postTellersTellerIdCashiersRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Mandatory Fields Teller name, OfficeId, Description, Start Date, Status Optional Fields End Date * @summary Create teller * @param {PostTellersRequest} postTellersRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTeller: async (postTellersRequest: PostTellersRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'postTellersRequest' is not null or undefined assertParamExists('createTeller', 'postTellersRequest', postTellersRequest) const localVarPath = `/tellers`; // 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(postTellersRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Delete Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCashier: async (tellerId: number, cashierId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('deleteCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('deleteCashier', 'cashierId', cashierId) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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} tellerId tellerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTeller: async (tellerId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('deleteTeller', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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, }; }, /** * * @summary Retrieve a cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {*} [options] Override http request option. * @throws {RequiredError} */ findCashierData: async (tellerId: number, cashierId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('findCashierData', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('findCashierData', 'cashierId', cashierId) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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, }; }, /** * * @summary Retrieve tellers * @param {number} tellerId tellerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ findTeller: async (tellerId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('findTeller', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {number} tellerId tellerId * @param {number} transactionId transactionId * @param {*} [options] Override http request option. * @throws {RequiredError} */ findTransactionData: async (tellerId: number, transactionId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('findTransactionData', 'tellerId', tellerId) // verify required parameter 'transactionId' is not null or undefined assertParamExists('findTransactionData', 'transactionId', transactionId) const localVarPath = `/tellers/{tellerId}/transactions/{transactionId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"transactionId"}}`, encodeURIComponent(String(transactionId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List Cashiers * @param {number} tellerId tellerId * @param {string} [fromdate] fromdate * @param {string} [todate] todate * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCashierData1: async (tellerId: number, fromdate?: string, todate?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getCashierData1', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}/cashiers` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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 (fromdate !== undefined) { localVarQueryParameter['fromdate'] = fromdate; } if (todate !== undefined) { localVarQueryParameter['todate'] = todate; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Find Cashiers * @param {number} tellerId tellerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCashierTemplate: async (tellerId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getCashierTemplate', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}/cashiers/template` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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, }; }, /** * * @summary Retrieve Cashier Transaction Template * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCashierTxnTemplate: async (tellerId: number, cashierId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getCashierTxnTemplate', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('getCashierTxnTemplate', 'cashierId', cashierId) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}/transactions/template` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @param {number} tellerId tellerId * @param {number} [cashierId] cashierId * @param {string} [dateRange] dateRange * @param {*} [options] Override http request option. * @throws {RequiredError} */ getJournalData: async (tellerId: number, cashierId?: number, dateRange?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getJournalData', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}/journals` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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 (cashierId !== undefined) { localVarQueryParameter['cashierId'] = cashierId; } if (dateRange !== undefined) { localVarQueryParameter['dateRange'] = dateRange; } 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 list tellers * @summary List all tellers * @param {number} [officeId] officeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTellerData: async (officeId?: number, options: any = {}): Promise<RequestArgs> => { const localVarPath = `/tellers`; // 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; } 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} tellerId tellerId * @param {string} [dateRange] dateRange * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTransactionData: async (tellerId: number, dateRange?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getTransactionData', 'tellerId', tellerId) const localVarPath = `/tellers/{tellerId}/transactions` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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 (dateRange !== undefined) { localVarQueryParameter['dateRange'] = dateRange; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Retrieve Cashier Transaction * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {string} [currencyCode] currencyCode * @param {number} [offset] offset * @param {number} [limit] limit * @param {string} [orderBy] orderBy * @param {string} [sortOrder] sortOrder * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTransactionsForCashier: async (tellerId: number, cashierId: number, currencyCode?: string, offset?: number, limit?: number, orderBy?: string, sortOrder?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getTransactionsForCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('getTransactionsForCashier', 'cashierId', cashierId) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}/transactions` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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 (currencyCode !== undefined) { localVarQueryParameter['currencyCode'] = currencyCode; } 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, }; }, /** * * @summary Transactions Wtih Summary For Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {string} [currencyCode] currencyCode * @param {number} [offset] offset * @param {number} [limit] limit * @param {string} [orderBy] orderBy * @param {string} [sortOrder] sortOrder * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTransactionsWtihSummaryForCashier: async (tellerId: number, cashierId: number, currencyCode?: string, offset?: number, limit?: number, orderBy?: string, sortOrder?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('getTransactionsWtihSummaryForCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('getTransactionsWtihSummaryForCashier', 'cashierId', cashierId) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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 (currencyCode !== undefined) { localVarQueryParameter['currencyCode'] = currencyCode; } 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, }; }, /** * Mandatory Fields Date, Amount, Currency, Notes/Comments * @summary Settle Cash From Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {PostTellersTellerIdCashiersCashierIdSettleRequest} postTellersTellerIdCashiersCashierIdSettleRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ settleCashFromCashier: async (tellerId: number, cashierId: number, postTellersTellerIdCashiersCashierIdSettleRequest: PostTellersTellerIdCashiersCashierIdSettleRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('settleCashFromCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('settleCashFromCashier', 'cashierId', cashierId) // verify required parameter 'postTellersTellerIdCashiersCashierIdSettleRequest' is not null or undefined assertParamExists('settleCashFromCashier', 'postTellersTellerIdCashiersCashierIdSettleRequest', postTellersTellerIdCashiersCashierIdSettleRequest) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}/settle` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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'] = 'text/html'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postTellersTellerIdCashiersCashierIdSettleRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {PutTellersTellerIdCashiersCashierIdRequest} putTellersTellerIdCashiersCashierIdRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateCashier: async (tellerId: number, cashierId: number, putTellersTellerIdCashiersCashierIdRequest: PutTellersTellerIdCashiersCashierIdRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('updateCashier', 'tellerId', tellerId) // verify required parameter 'cashierId' is not null or undefined assertParamExists('updateCashier', 'cashierId', cashierId) // verify required parameter 'putTellersTellerIdCashiersCashierIdRequest' is not null or undefined assertParamExists('updateCashier', 'putTellersTellerIdCashiersCashierIdRequest', putTellersTellerIdCashiersCashierIdRequest) const localVarPath = `/tellers/{tellerId}/cashiers/{cashierId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))) .replace(`{${"cashierId"}}`, encodeURIComponent(String(cashierId))); // 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(putTellersTellerIdCashiersCashierIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update teller * @param {number} tellerId tellerId * @param {PutTellersRequest} putTellersRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTeller: async (tellerId: number, putTellersRequest: PutTellersRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'tellerId' is not null or undefined assertParamExists('updateTeller', 'tellerId', tellerId) // verify required parameter 'putTellersRequest' is not null or undefined assertParamExists('updateTeller', 'putTellersRequest', putTellersRequest) const localVarPath = `/tellers/{tellerId}` .replace(`{${"tellerId"}}`, encodeURIComponent(String(tellerId))); // 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(putTellersRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TellerCashManagementApi - functional programming interface * @export */ export const TellerCashManagementApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TellerCashManagementApiAxiosParamCreator(configuration) return { /** * Mandatory Fields: Date, Amount, Currency, Notes/Comments * @summary Allocate Cash To Cashier * @param {number} tellerId tellerId * @param {number} cashierId cashierId * @param {PostTellersTellerIdCashiersCashierIdAllocateRequest} postTellersTellerIdCashiersCashierIdAllocateRequest * @param {*} [options] Override http request o