/* tslint:disable */ /* eslint-disable */ /** * deposits * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded, } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap, } from '../base'; // @ts-ignore import type { AccountAuthorizationHold } from '../models'; // @ts-ignore import type { AccountTax } from '../models'; // @ts-ignore import type { ApplyInterestInput } from '../models'; // @ts-ignore import type { BlockFund } from '../models'; // @ts-ignore import type { BulkDepositAccountUpdateRequest } from '../models'; // @ts-ignore import type { BulkDepositAccountUpdateResponse } from '../models'; // @ts-ignore import type { Card } from '../models'; // @ts-ignore import type { ChangeInterestRateAction } from '../models'; // @ts-ignore import type { ChangeWithholdingTaxAction } from '../models'; // @ts-ignore import type { DepositAccount } from '../models'; // @ts-ignore import type { DepositAccountAction } from '../models'; // @ts-ignore import type { DepositAccountSearchCriteria } from '../models'; // @ts-ignore import type { DepositAuthorizationHold } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { LoanAccount } from '../models'; // @ts-ignore import type { PatchOperation } from '../models'; // @ts-ignore import type { ReopenDepositAction } from '../models'; // @ts-ignore import type { StartMaturityAction } from '../models'; // @ts-ignore import type { TransferOwnershipAction } from '../models'; // @ts-ignore import type { UndoMaturityAction } from '../models'; /** * DepositAccountsApi - axios parameter creator */ export const DepositAccountsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Delete inactive deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: async ( depositAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('_delete', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents information to apply accrued interest. * @param {string} depositAccountId The ID or encoded key of the deposit to apply interest to. * @param {ApplyInterestInput} applyInterestInput Represents information to apply accrued interest. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyInterest: async ( depositAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('applyInterest', 'depositAccountId', depositAccountId); // verify required parameter 'applyInterestInput' is not null or undefined assertParamExists( 'applyInterest', 'applyInterestInput', applyInterestInput, ); const localVarPath = `/deposits/{depositAccountId}:applyInterest`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( applyInterestInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Bulk update deposit accounts * @param {BulkDepositAccountUpdateRequest} bulkDepositAccountUpdateRequest Represents the information to bulk update deposit accounts. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkUpdateAccounts: async ( bulkDepositAccountUpdateRequest: BulkDepositAccountUpdateRequest, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'bulkDepositAccountUpdateRequest' is not null or undefined assertParamExists( 'bulkUpdateAccounts', 'bulkDepositAccountUpdateRequest', bulkDepositAccountUpdateRequest, ); const localVarPath = `/deposits/bulkUpdates`; // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( bulkDepositAccountUpdateRequest, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change deposit account interest rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeInterestRateAction} changeInterestRateAction Represents the information needed to change the interest rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeInterestRate: async ( depositAccountId: string, changeInterestRateAction: ChangeInterestRateAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'changeInterestRate', 'depositAccountId', depositAccountId, ); // verify required parameter 'changeInterestRateAction' is not null or undefined assertParamExists( 'changeInterestRate', 'changeInterestRateAction', changeInterestRateAction, ); const localVarPath = `/deposits/{depositAccountId}:changeInterestRate`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeInterestRateAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccountAction} depositAccountAction Represents the action details for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeState: async ( depositAccountId: string, depositAccountAction: DepositAccountAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('changeState', 'depositAccountId', depositAccountId); // verify required parameter 'depositAccountAction' is not null or undefined assertParamExists( 'changeState', 'depositAccountAction', depositAccountAction, ); const localVarPath = `/deposits/{depositAccountId}:changeState`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( depositAccountAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change deposit account withholding tax rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeWithholdingTaxAction} changeWithholdingTaxAction Represents the information needed to change the withholding tax rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeWithholdingTax: async ( depositAccountId: string, changeWithholdingTaxAction: ChangeWithholdingTaxAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'changeWithholdingTax', 'depositAccountId', depositAccountId, ); // verify required parameter 'changeWithholdingTaxAction' is not null or undefined assertParamExists( 'changeWithholdingTax', 'changeWithholdingTaxAction', changeWithholdingTaxAction, ); const localVarPath = `/deposits/{depositAccountId}:changeWithholdingTax`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( changeWithholdingTaxAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create deposit account * @param {DepositAccount} depositAccount Represents the information to create a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create: async ( depositAccount: DepositAccount, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccount' is not null or undefined assertParamExists('create', 'depositAccount', depositAccount); const localVarPath = `/deposits`; // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( depositAccount, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create an authorization hold corresponding to a given account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {AccountAuthorizationHold} accountAuthorizationHold The authorization hold to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createAuthorizationHold: async ( depositAccountId: string, accountAuthorizationHold: AccountAuthorizationHold, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'createAuthorizationHold', 'depositAccountId', depositAccountId, ); // verify required parameter 'accountAuthorizationHold' is not null or undefined assertParamExists( 'createAuthorizationHold', 'accountAuthorizationHold', accountAuthorizationHold, ); const localVarPath = `/deposits/{depositAccountId}/authorizationholds`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( accountAuthorizationHold, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create a block fund for the account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {BlockFund} blockFund The block fund to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlockFund: async ( depositAccountId: string, blockFund: BlockFund, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'createBlockFund', 'depositAccountId', depositAccountId, ); // verify required parameter 'blockFund' is not null or undefined assertParamExists('createBlockFund', 'blockFund', blockFund); const localVarPath = `/deposits/{depositAccountId}/blocks`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( blockFund, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCard: async ( depositAccountId: string, card: Card, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('createCard', 'depositAccountId', depositAccountId); // verify required parameter 'card' is not null or undefined assertParamExists('createCard', 'card', card); const localVarPath = `/deposits/{depositAccountId}/cards`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( card, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCard: async ( depositAccountId: string, cardReferenceToken: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('deleteCard', 'depositAccountId', depositAccountId); // verify required parameter 'cardReferenceToken' is not null or undefined assertParamExists('deleteCard', 'cardReferenceToken', cardReferenceToken); const localVarPath = `/deposits/{depositAccountId}/cards/{cardReferenceToken}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'cardReferenceToken'}}`, encodeURIComponent(String(cardReferenceToken)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get deposit accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer assigned to the deposit accounts. * @param {string} [branchId] The ID or encoded key of the branch assigned to the deposit accounts. * @param {string} [centreId] The ID or encoded key of the centre assigned to the deposit accounts. * @param {GetAllAccountStateEnum} [accountState] The state to use to filter deposit accounts by. * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The account holder type. * @param {string} [accountHolderId] The ID of the account holder. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: async ( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/deposits`; // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } if (creditOfficerUsername !== undefined) { localVarQueryParameter['creditOfficerUsername'] = creditOfficerUsername; } if (branchId !== undefined) { localVarQueryParameter['branchId'] = branchId; } if (centreId !== undefined) { localVarQueryParameter['centreId'] = centreId; } if (accountState !== undefined) { localVarQueryParameter['accountState'] = accountState; } if (accountHolderType !== undefined) { localVarQueryParameter['accountHolderType'] = accountHolderType; } if (accountHolderId !== undefined) { localVarQueryParameter['accountHolderId'] = accountHolderId; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get authorization holds related to a deposit account, ordered from newest to oldest by creation date * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAuthorizationHolds: async ( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getAllAuthorizationHolds', 'depositAccountId', depositAccountId, ); const localVarPath = `/deposits/{depositAccountId}/authorizationholds`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (status !== undefined) { localVarQueryParameter['status'] = status; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get all block funds for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllBlocksPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllBlocksStateEnum} [state] The state of the block fund to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllBlocks: async ( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllBlocksPaginationDetailsEnum, state?: GetAllBlocksStateEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('getAllBlocks', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}/blocks`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (state !== undefined) { localVarQueryParameter['state'] = state; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get cards associated with an account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllCards: async ( depositAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('getAllCards', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}/cards`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAuthorizationHoldById: async ( depositAccountId: string, authorizationHoldExternalReferenceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getAuthorizationHoldById', 'depositAccountId', depositAccountId, ); // verify required parameter 'authorizationHoldExternalReferenceId' is not null or undefined assertParamExists( 'getAuthorizationHoldById', 'authorizationHoldExternalReferenceId', authorizationHoldExternalReferenceId, ); const localVarPath = `/deposits/{depositAccountId}/authorizationholds/{authorizationHoldExternalReferenceId}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'authorizationHoldExternalReferenceId'}}`, encodeURIComponent(String(authorizationHoldExternalReferenceId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById: async ( depositAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('getById', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get all loan accounts funded by the deposit account with the given ID or encoded key * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFundedLoans: async ( depositAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('getFundedLoans', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}/funding`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get deposit account withholding tax history * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [from] The start date to get withholding tax history. * @param {string} [to] The end date to to get withholding tax history. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWithholdingTaxHistory: async ( depositAccountId: string, from?: string, to?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getWithholdingTaxHistory', 'depositAccountId', depositAccountId, ); const localVarPath = `/deposits/{depositAccountId}/withholdingtaxes`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (from !== undefined) { localVarQueryParameter['from'] = (from as any) instanceof Date ? (from as any).toISOString().substring(0, 10) : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any) instanceof Date ? (to as any).toISOString().substring(0, 10) : to; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Partially update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: async ( depositAccountId: string, patchOperation: Array, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('patch', 'depositAccountId', depositAccountId); // verify required parameter 'patchOperation' is not null or undefined assertParamExists('patch', 'patchOperation', patchOperation); const localVarPath = `/deposits/{depositAccountId}`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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: 'PATCH', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( patchOperation, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Updates the amount of an existing blocked fund on a deposit account. If the new amount equals the seized amount the block fund will transition to a seized state. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId The external reference ID of the transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchBlockFund: async ( depositAccountId: string, externalReferenceId: string, patchOperation: Array, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('patchBlockFund', 'depositAccountId', depositAccountId); // verify required parameter 'externalReferenceId' is not null or undefined assertParamExists( 'patchBlockFund', 'externalReferenceId', externalReferenceId, ); // verify required parameter 'patchOperation' is not null or undefined assertParamExists('patchBlockFund', 'patchOperation', patchOperation); const localVarPath = `/deposits/{depositAccountId}/blocks/{externalReferenceId}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'externalReferenceId'}}`, encodeURIComponent(String(externalReferenceId)), ); // 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: 'PATCH', ...baseOptions, ...options, }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( patchOperation, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Reopen a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit to be reopened. * @param {ReopenDepositAction} reopenDepositAction Represents the information needed to reopen a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reopen: async ( depositAccountId: string, reopenDepositAction: ReopenDepositAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('reopen', 'depositAccountId', depositAccountId); // verify required parameter 'reopenDepositAction' is not null or undefined assertParamExists('reopen', 'reopenDepositAction', reopenDepositAction); const localVarPath = `/deposits/{depositAccountId}:reopen`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( reopenDepositAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Reverse account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reverseAuthorizationHold: async ( depositAccountId: string, authorizationHoldExternalReferenceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'reverseAuthorizationHold', 'depositAccountId', depositAccountId, ); // verify required parameter 'authorizationHoldExternalReferenceId' is not null or undefined assertParamExists( 'reverseAuthorizationHold', 'authorizationHoldExternalReferenceId', authorizationHoldExternalReferenceId, ); const localVarPath = `/deposits/{depositAccountId}/authorizationholds/{authorizationHoldExternalReferenceId}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'authorizationHoldExternalReferenceId'}}`, encodeURIComponent(String(authorizationHoldExternalReferenceId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Search deposit accounts * @param {DepositAccountSearchCriteria} depositAccountSearchCriteria The criteria to be used to search the deposit accounts. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {string} [cursor] Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ search: async ( depositAccountSearchCriteria: DepositAccountSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountSearchCriteria' is not null or undefined assertParamExists( 'search', 'depositAccountSearchCriteria', depositAccountSearchCriteria, ); const localVarPath = `/deposits:search`; // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (paginationDetails !== undefined) { localVarQueryParameter['paginationDetails'] = paginationDetails; } if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (detailsLevel !== undefined) { localVarQueryParameter['detailsLevel'] = detailsLevel; } localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( depositAccountSearchCriteria, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {StartMaturityAction} startMaturityAction Represents the action to start the maturity period for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ startMaturity: async ( depositAccountId: string, startMaturityAction: StartMaturityAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('startMaturity', 'depositAccountId', depositAccountId); // verify required parameter 'startMaturityAction' is not null or undefined assertParamExists( 'startMaturity', 'startMaturityAction', startMaturityAction, ); const localVarPath = `/deposits/{depositAccountId}:startMaturity`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( startMaturityAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Transfer the account ownership from current account holder to a new one (client/group). * @param {string} depositAccountId The ID or encoded key of the deposit account to have it\'s ownership transferred. * @param {TransferOwnershipAction} transferOwnershipAction The information needed to transfer the account ownership from current account holder to a new one. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ transferOwnership: async ( depositAccountId: string, transferOwnershipAction: TransferOwnershipAction, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'transferOwnership', 'depositAccountId', depositAccountId, ); // verify required parameter 'transferOwnershipAction' is not null or undefined assertParamExists( 'transferOwnership', 'transferOwnershipAction', transferOwnershipAction, ); const localVarPath = `/deposits/{depositAccountId}:transferOwnership`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( transferOwnershipAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Unblock a previously blocked fund for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId * @param {*} [options] Override http request option. * @throws {RequiredError} */ unblockFund: async ( depositAccountId: string, externalReferenceId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('unblockFund', 'depositAccountId', depositAccountId); // verify required parameter 'externalReferenceId' is not null or undefined assertParamExists( 'unblockFund', 'externalReferenceId', externalReferenceId, ); const localVarPath = `/deposits/{depositAccountId}/blocks/{externalReferenceId}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'externalReferenceId'}}`, encodeURIComponent(String(externalReferenceId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Represents the action to undo the maturity period for the specified deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {UndoMaturityAction} [undoMaturityAction] Represents the action to undo the maturity period for the specified deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoMaturity: async ( depositAccountId: string, idempotencyKey?: string, undoMaturityAction?: UndoMaturityAction, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('undoMaturity', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}:undoMaturity`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; if (idempotencyKey != null) { localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( undoMaturityAction, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccount} [depositAccount] * @param {*} [options] Override http request option. * @throws {RequiredError} */ update: async ( depositAccountId: string, depositAccount?: DepositAccount, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('update', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}`.replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ); // 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 basic required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration); localVarHeaderParameter['Content-Type'] = 'application/json'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( depositAccount, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * DepositAccountsApi - functional programming interface */ export const DepositAccountsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = DepositAccountsApiAxiosParamCreator(configuration); return { /** * * @summary Delete inactive deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async _delete( depositAccountId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator._delete( depositAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi._delete']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents information to apply accrued interest. * @param {string} depositAccountId The ID or encoded key of the deposit to apply interest to. * @param {ApplyInterestInput} applyInterestInput Represents information to apply accrued interest. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async applyInterest( depositAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.applyInterest( depositAccountId, applyInterestInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.applyInterest']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Bulk update deposit accounts * @param {BulkDepositAccountUpdateRequest} bulkDepositAccountUpdateRequest Represents the information to bulk update deposit accounts. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async bulkUpdateAccounts( bulkDepositAccountUpdateRequest: BulkDepositAccountUpdateRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.bulkUpdateAccounts( bulkDepositAccountUpdateRequest, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.bulkUpdateAccounts']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change deposit account interest rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeInterestRateAction} changeInterestRateAction Represents the information needed to change the interest rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeInterestRate( depositAccountId: string, changeInterestRateAction: ChangeInterestRateAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeInterestRate( depositAccountId, changeInterestRateAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.changeInterestRate']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccountAction} depositAccountAction Represents the action details for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeState( depositAccountId: string, depositAccountAction: DepositAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeState( depositAccountId, depositAccountAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.changeState']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change deposit account withholding tax rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeWithholdingTaxAction} changeWithholdingTaxAction Represents the information needed to change the withholding tax rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async changeWithholdingTax( depositAccountId: string, changeWithholdingTaxAction: ChangeWithholdingTaxAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.changeWithholdingTax( depositAccountId, changeWithholdingTaxAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.changeWithholdingTax']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create deposit account * @param {DepositAccount} depositAccount Represents the information to create a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async create( depositAccount: DepositAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.create( depositAccount, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.create']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create an authorization hold corresponding to a given account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {AccountAuthorizationHold} accountAuthorizationHold The authorization hold to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createAuthorizationHold( depositAccountId: string, accountAuthorizationHold: AccountAuthorizationHold, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createAuthorizationHold( depositAccountId, accountAuthorizationHold, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.createAuthorizationHold']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create a block fund for the account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {BlockFund} blockFund The block fund to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBlockFund( depositAccountId: string, blockFund: BlockFund, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createBlockFund( depositAccountId, blockFund, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.createBlockFund']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCard( depositAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createCard( depositAccountId, card, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.createCard']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteCard( depositAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCard( depositAccountId, cardReferenceToken, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.deleteCard']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get deposit accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer assigned to the deposit accounts. * @param {string} [branchId] The ID or encoded key of the branch assigned to the deposit accounts. * @param {string} [centreId] The ID or encoded key of the centre assigned to the deposit accounts. * @param {GetAllAccountStateEnum} [accountState] The state to use to filter deposit accounts by. * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The account holder type. * @param {string} [accountHolderId] The ID of the account holder. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getAll']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get authorization holds related to a deposit account, ordered from newest to oldest by creation date * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllAuthorizationHolds( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAuthorizationHolds( depositAccountId, offset, limit, paginationDetails, status, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getAllAuthorizationHolds']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get all block funds for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllBlocksPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllBlocksStateEnum} [state] The state of the block fund to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllBlocks( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllBlocksPaginationDetailsEnum, state?: GetAllBlocksStateEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllBlocks( depositAccountId, offset, limit, paginationDetails, state, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getAllBlocks']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get cards associated with an account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllCards( depositAccountId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllCards( depositAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getAllCards']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAuthorizationHoldById( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthorizationHoldById( depositAccountId, authorizationHoldExternalReferenceId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getAuthorizationHoldById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getById( depositAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getById( depositAccountId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get all loan accounts funded by the deposit account with the given ID or encoded key * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getFundedLoans( depositAccountId: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getFundedLoans( depositAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getFundedLoans']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get deposit account withholding tax history * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [from] The start date to get withholding tax history. * @param {string} [to] The end date to to get withholding tax history. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getWithholdingTaxHistory( depositAccountId: string, from?: string, to?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getWithholdingTaxHistory( depositAccountId, from, to, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.getWithholdingTaxHistory']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Partially update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patch( depositAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.patch( depositAccountId, patchOperation, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.patch']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Updates the amount of an existing blocked fund on a deposit account. If the new amount equals the seized amount the block fund will transition to a seized state. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId The external reference ID of the transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchBlockFund( depositAccountId: string, externalReferenceId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.patchBlockFund( depositAccountId, externalReferenceId, patchOperation, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.patchBlockFund']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Reopen a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit to be reopened. * @param {ReopenDepositAction} reopenDepositAction Represents the information needed to reopen a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async reopen( depositAccountId: string, reopenDepositAction: ReopenDepositAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.reopen( depositAccountId, reopenDepositAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.reopen']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Reverse account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async reverseAuthorizationHold( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.reverseAuthorizationHold( depositAccountId, authorizationHoldExternalReferenceId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.reverseAuthorizationHold']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Search deposit accounts * @param {DepositAccountSearchCriteria} depositAccountSearchCriteria The criteria to be used to search the deposit accounts. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {string} [cursor] Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async search( depositAccountSearchCriteria: DepositAccountSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.search( depositAccountSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.search']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {StartMaturityAction} startMaturityAction Represents the action to start the maturity period for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async startMaturity( depositAccountId: string, startMaturityAction: StartMaturityAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.startMaturity( depositAccountId, startMaturityAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.startMaturity']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Transfer the account ownership from current account holder to a new one (client/group). * @param {string} depositAccountId The ID or encoded key of the deposit account to have it\'s ownership transferred. * @param {TransferOwnershipAction} transferOwnershipAction The information needed to transfer the account ownership from current account holder to a new one. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async transferOwnership( depositAccountId: string, transferOwnershipAction: TransferOwnershipAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.transferOwnership( depositAccountId, transferOwnershipAction, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.transferOwnership']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Unblock a previously blocked fund for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async unblockFund( depositAccountId: string, externalReferenceId: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.unblockFund( depositAccountId, externalReferenceId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.unblockFund']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Represents the action to undo the maturity period for the specified deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {UndoMaturityAction} [undoMaturityAction] Represents the action to undo the maturity period for the specified deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async undoMaturity( depositAccountId: string, idempotencyKey?: string, undoMaturityAction?: UndoMaturityAction, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.undoMaturity( depositAccountId, idempotencyKey, undoMaturityAction, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.undoMaturity']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccount} [depositAccount] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update( depositAccountId: string, depositAccount?: DepositAccount, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.update( depositAccountId, depositAccount, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositAccountsApi.update']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * DepositAccountsApi - factory interface */ export const DepositAccountsApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = DepositAccountsApiFp(configuration); return { /** * * @summary Delete inactive deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete( depositAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp ._delete(depositAccountId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents information to apply accrued interest. * @param {string} depositAccountId The ID or encoded key of the deposit to apply interest to. * @param {ApplyInterestInput} applyInterestInput Represents information to apply accrued interest. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyInterest( depositAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .applyInterest( depositAccountId, applyInterestInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Bulk update deposit accounts * @param {BulkDepositAccountUpdateRequest} bulkDepositAccountUpdateRequest Represents the information to bulk update deposit accounts. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkUpdateAccounts( bulkDepositAccountUpdateRequest: BulkDepositAccountUpdateRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .bulkUpdateAccounts( bulkDepositAccountUpdateRequest, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change deposit account interest rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeInterestRateAction} changeInterestRateAction Represents the information needed to change the interest rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeInterestRate( depositAccountId: string, changeInterestRateAction: ChangeInterestRateAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeInterestRate( depositAccountId, changeInterestRateAction, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccountAction} depositAccountAction Represents the action details for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeState( depositAccountId: string, depositAccountAction: DepositAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeState( depositAccountId, depositAccountAction, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Change deposit account withholding tax rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeWithholdingTaxAction} changeWithholdingTaxAction Represents the information needed to change the withholding tax rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ changeWithholdingTax( depositAccountId: string, changeWithholdingTaxAction: ChangeWithholdingTaxAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .changeWithholdingTax( depositAccountId, changeWithholdingTaxAction, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Create deposit account * @param {DepositAccount} depositAccount Represents the information to create a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ create( depositAccount: DepositAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .create(depositAccount, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create an authorization hold corresponding to a given account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {AccountAuthorizationHold} accountAuthorizationHold The authorization hold to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createAuthorizationHold( depositAccountId: string, accountAuthorizationHold: AccountAuthorizationHold, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .createAuthorizationHold( depositAccountId, accountAuthorizationHold, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Create a block fund for the account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {BlockFund} blockFund The block fund to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBlockFund( depositAccountId: string, blockFund: BlockFund, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .createBlockFund(depositAccountId, blockFund, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCard( depositAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .createCard(depositAccountId, card, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCard( depositAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .deleteCard(depositAccountId, cardReferenceToken, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get deposit accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer assigned to the deposit accounts. * @param {string} [branchId] The ID or encoded key of the branch assigned to the deposit accounts. * @param {string} [centreId] The ID or encoded key of the centre assigned to the deposit accounts. * @param {GetAllAccountStateEnum} [accountState] The state to use to filter deposit accounts by. * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The account holder type. * @param {string} [accountHolderId] The ID of the account holder. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get authorization holds related to a deposit account, ordered from newest to oldest by creation date * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAuthorizationHolds( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAllAuthorizationHolds( depositAccountId, offset, limit, paginationDetails, status, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get all block funds for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllBlocksPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllBlocksStateEnum} [state] The state of the block fund to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllBlocks( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllBlocksPaginationDetailsEnum, state?: GetAllBlocksStateEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAllBlocks( depositAccountId, offset, limit, paginationDetails, state, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get cards associated with an account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllCards( depositAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAllCards(depositAccountId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAuthorizationHoldById( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getAuthorizationHoldById( depositAccountId, authorizationHoldExternalReferenceId, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getById( depositAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getById(depositAccountId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get all loan accounts funded by the deposit account with the given ID or encoded key * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFundedLoans( depositAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getFundedLoans(depositAccountId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get deposit account withholding tax history * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [from] The start date to get withholding tax history. * @param {string} [to] The end date to to get withholding tax history. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWithholdingTaxHistory( depositAccountId: string, from?: string, to?: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getWithholdingTaxHistory(depositAccountId, from, to, options) .then((request) => request(axios, basePath)); }, /** * * @summary Partially update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch( depositAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .patch(depositAccountId, patchOperation, options) .then((request) => request(axios, basePath)); }, /** * * @summary Updates the amount of an existing blocked fund on a deposit account. If the new amount equals the seized amount the block fund will transition to a seized state. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId The external reference ID of the transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchBlockFund( depositAccountId: string, externalReferenceId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .patchBlockFund( depositAccountId, externalReferenceId, patchOperation, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Reopen a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit to be reopened. * @param {ReopenDepositAction} reopenDepositAction Represents the information needed to reopen a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reopen( depositAccountId: string, reopenDepositAction: ReopenDepositAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .reopen(depositAccountId, reopenDepositAction, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Reverse account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reverseAuthorizationHold( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .reverseAuthorizationHold( depositAccountId, authorizationHoldExternalReferenceId, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Search deposit accounts * @param {DepositAccountSearchCriteria} depositAccountSearchCriteria The criteria to be used to search the deposit accounts. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {string} [cursor] Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ search( depositAccountSearchCriteria: DepositAccountSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .search( depositAccountSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {StartMaturityAction} startMaturityAction Represents the action to start the maturity period for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ startMaturity( depositAccountId: string, startMaturityAction: StartMaturityAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .startMaturity( depositAccountId, startMaturityAction, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Transfer the account ownership from current account holder to a new one (client/group). * @param {string} depositAccountId The ID or encoded key of the deposit account to have it\'s ownership transferred. * @param {TransferOwnershipAction} transferOwnershipAction The information needed to transfer the account ownership from current account holder to a new one. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ transferOwnership( depositAccountId: string, transferOwnershipAction: TransferOwnershipAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .transferOwnership( depositAccountId, transferOwnershipAction, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Unblock a previously blocked fund for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId * @param {*} [options] Override http request option. * @throws {RequiredError} */ unblockFund( depositAccountId: string, externalReferenceId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .unblockFund(depositAccountId, externalReferenceId, options) .then((request) => request(axios, basePath)); }, /** * * @summary Represents the action to undo the maturity period for the specified deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {UndoMaturityAction} [undoMaturityAction] Represents the action to undo the maturity period for the specified deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ undoMaturity( depositAccountId: string, idempotencyKey?: string, undoMaturityAction?: UndoMaturityAction, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .undoMaturity( depositAccountId, idempotencyKey, undoMaturityAction, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccount} [depositAccount] * @param {*} [options] Override http request option. * @throws {RequiredError} */ update( depositAccountId: string, depositAccount?: DepositAccount, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .update(depositAccountId, depositAccount, options) .then((request) => request(axios, basePath)); }, }; }; /** * DepositAccountsApi - object-oriented interface */ export class DepositAccountsApi extends BaseAPI { /** * * @summary Delete inactive deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public _delete(depositAccountId: string, options?: RawAxiosRequestConfig) { return DepositAccountsApiFp(this.configuration) ._delete(depositAccountId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents information to apply accrued interest. * @param {string} depositAccountId The ID or encoded key of the deposit to apply interest to. * @param {ApplyInterestInput} applyInterestInput Represents information to apply accrued interest. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public applyInterest( depositAccountId: string, applyInterestInput: ApplyInterestInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .applyInterest( depositAccountId, applyInterestInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Bulk update deposit accounts * @param {BulkDepositAccountUpdateRequest} bulkDepositAccountUpdateRequest Represents the information to bulk update deposit accounts. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public bulkUpdateAccounts( bulkDepositAccountUpdateRequest: BulkDepositAccountUpdateRequest, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .bulkUpdateAccounts( bulkDepositAccountUpdateRequest, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change deposit account interest rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeInterestRateAction} changeInterestRateAction Represents the information needed to change the interest rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeInterestRate( depositAccountId: string, changeInterestRateAction: ChangeInterestRateAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .changeInterestRate( depositAccountId, changeInterestRateAction, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccountAction} depositAccountAction Represents the action details for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeState( depositAccountId: string, depositAccountAction: DepositAccountAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .changeState( depositAccountId, depositAccountAction, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Change deposit account withholding tax rate * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {ChangeWithholdingTaxAction} changeWithholdingTaxAction Represents the information needed to change the withholding tax rate. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public changeWithholdingTax( depositAccountId: string, changeWithholdingTaxAction: ChangeWithholdingTaxAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .changeWithholdingTax( depositAccountId, changeWithholdingTaxAction, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create deposit account * @param {DepositAccount} depositAccount Represents the information to create a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public create( depositAccount: DepositAccount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .create(depositAccount, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create an authorization hold corresponding to a given account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {AccountAuthorizationHold} accountAuthorizationHold The authorization hold to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createAuthorizationHold( depositAccountId: string, accountAuthorizationHold: AccountAuthorizationHold, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .createAuthorizationHold( depositAccountId, accountAuthorizationHold, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create a block fund for the account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {BlockFund} blockFund The block fund to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createBlockFund( depositAccountId: string, blockFund: BlockFund, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .createBlockFund(depositAccountId, blockFund, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information needed to create and associate a new card to an account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Card} card The card to be created. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createCard( depositAccountId: string, card: Card, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .createCard(depositAccountId, card, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information needed to delete a card associated to an account using its reference token. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} cardReferenceToken The reference token of the card to be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public deleteCard( depositAccountId: string, cardReferenceToken: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .deleteCard(depositAccountId, cardReferenceToken, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get deposit accounts * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {string} [creditOfficerUsername] The username of the credit officer assigned to the deposit accounts. * @param {string} [branchId] The ID or encoded key of the branch assigned to the deposit accounts. * @param {string} [centreId] The ID or encoded key of the centre assigned to the deposit accounts. * @param {GetAllAccountStateEnum} [accountState] The state to use to filter deposit accounts by. * @param {GetAllAccountHolderTypeEnum} [accountHolderType] The account holder type. * @param {string} [accountHolderId] The ID of the account holder. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAll( offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, creditOfficerUsername?: string, branchId?: string, centreId?: string, accountState?: GetAllAccountStateEnum, accountHolderType?: GetAllAccountHolderTypeEnum, accountHolderId?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getAll( offset, limit, paginationDetails, detailsLevel, creditOfficerUsername, branchId, centreId, accountState, accountHolderType, accountHolderId, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get authorization holds related to a deposit account, ordered from newest to oldest by creation date * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllAuthorizationHoldsPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllAuthorizationHoldsStatusEnum} [status] The status of the authorization holds to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAllAuthorizationHolds( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllAuthorizationHoldsPaginationDetailsEnum, status?: GetAllAuthorizationHoldsStatusEnum, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getAllAuthorizationHolds( depositAccountId, offset, limit, paginationDetails, status, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get all block funds for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {GetAllBlocksPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {GetAllBlocksStateEnum} [state] The state of the block fund to filter on * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAllBlocks( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllBlocksPaginationDetailsEnum, state?: GetAllBlocksStateEnum, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getAllBlocks( depositAccountId, offset, limit, paginationDetails, state, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get cards associated with an account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAllCards( depositAccountId: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getAllCards(depositAccountId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getAuthorizationHoldById( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getAuthorizationHoldById( depositAccountId, authorizationHoldExternalReferenceId, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {GetByIdDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getById( depositAccountId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getById(depositAccountId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get all loan accounts funded by the deposit account with the given ID or encoded key * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getFundedLoans( depositAccountId: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getFundedLoans(depositAccountId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get deposit account withholding tax history * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [from] The start date to get withholding tax history. * @param {string} [to] The end date to to get withholding tax history. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getWithholdingTaxHistory( depositAccountId: string, from?: string, to?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .getWithholdingTaxHistory(depositAccountId, from, to, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Partially update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public patch( depositAccountId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .patch(depositAccountId, patchOperation, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Updates the amount of an existing blocked fund on a deposit account. If the new amount equals the seized amount the block fund will transition to a seized state. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId The external reference ID of the transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public patchBlockFund( depositAccountId: string, externalReferenceId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .patchBlockFund( depositAccountId, externalReferenceId, patchOperation, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Reopen a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit to be reopened. * @param {ReopenDepositAction} reopenDepositAction Represents the information needed to reopen a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public reopen( depositAccountId: string, reopenDepositAction: ReopenDepositAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .reopen(depositAccountId, reopenDepositAction, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Reverse account authorization hold * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} authorizationHoldExternalReferenceId The ID used to reference the authorization hold. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public reverseAuthorizationHold( depositAccountId: string, authorizationHoldExternalReferenceId: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .reverseAuthorizationHold( depositAccountId, authorizationHoldExternalReferenceId, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Search deposit accounts * @param {DepositAccountSearchCriteria} depositAccountSearchCriteria The criteria to be used to search the deposit accounts. * @param {number} [offset] Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results * @param {number} [limit] Pagination, the number of elements to retrieve, used in combination with offset to paginate results * @param {SearchPaginationDetailsEnum} [paginationDetails] Flag specifying whether the pagination details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs * @param {string} [cursor] Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results * @param {SearchDetailsLevelEnum} [detailsLevel] The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public search( depositAccountSearchCriteria: DepositAccountSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .search( depositAccountSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the information to post an action, such as approving a deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {StartMaturityAction} startMaturityAction Represents the action to start the maturity period for a deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public startMaturity( depositAccountId: string, startMaturityAction: StartMaturityAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .startMaturity( depositAccountId, startMaturityAction, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Transfer the account ownership from current account holder to a new one (client/group). * @param {string} depositAccountId The ID or encoded key of the deposit account to have it\'s ownership transferred. * @param {TransferOwnershipAction} transferOwnershipAction The information needed to transfer the account ownership from current account holder to a new one. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public transferOwnership( depositAccountId: string, transferOwnershipAction: TransferOwnershipAction, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .transferOwnership( depositAccountId, transferOwnershipAction, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Unblock a previously blocked fund for a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} externalReferenceId * @param {*} [options] Override http request option. * @throws {RequiredError} */ public unblockFund( depositAccountId: string, externalReferenceId: string, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .unblockFund(depositAccountId, externalReferenceId, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Represents the action to undo the maturity period for the specified deposit account. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} [idempotencyKey] Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. * @param {UndoMaturityAction} [undoMaturityAction] Represents the action to undo the maturity period for the specified deposit account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public undoMaturity( depositAccountId: string, idempotencyKey?: string, undoMaturityAction?: UndoMaturityAction, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .undoMaturity( depositAccountId, idempotencyKey, undoMaturityAction, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update deposit account * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {DepositAccount} [depositAccount] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public update( depositAccountId: string, depositAccount?: DepositAccount, options?: RawAxiosRequestConfig, ) { return DepositAccountsApiFp(this.configuration) .update(depositAccountId, depositAccount, options) .then((request) => request(this.axios, this.basePath)); } } export const GetAllPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllPaginationDetailsEnum = (typeof GetAllPaginationDetailsEnum)[keyof typeof GetAllPaginationDetailsEnum]; export const GetAllDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetAllDetailsLevelEnum = (typeof GetAllDetailsLevelEnum)[keyof typeof GetAllDetailsLevelEnum]; export const GetAllAccountStateEnum = { PendingApproval: 'PENDING_APPROVAL', Approved: 'APPROVED', Active: 'ACTIVE', ActiveInArrears: 'ACTIVE_IN_ARREARS', Matured: 'MATURED', Locked: 'LOCKED', Dormant: 'DORMANT', Closed: 'CLOSED', ClosedWrittenOff: 'CLOSED_WRITTEN_OFF', Withdrawn: 'WITHDRAWN', ClosedRejected: 'CLOSED_REJECTED', } as const; export type GetAllAccountStateEnum = (typeof GetAllAccountStateEnum)[keyof typeof GetAllAccountStateEnum]; export const GetAllAccountHolderTypeEnum = { Client: 'CLIENT', Group: 'GROUP', } as const; export type GetAllAccountHolderTypeEnum = (typeof GetAllAccountHolderTypeEnum)[keyof typeof GetAllAccountHolderTypeEnum]; export const GetAllAuthorizationHoldsPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllAuthorizationHoldsPaginationDetailsEnum = (typeof GetAllAuthorizationHoldsPaginationDetailsEnum)[keyof typeof GetAllAuthorizationHoldsPaginationDetailsEnum]; export const GetAllAuthorizationHoldsStatusEnum = { Pending: 'PENDING', Reversed: 'REVERSED', Settled: 'SETTLED', Expired: 'EXPIRED', } as const; export type GetAllAuthorizationHoldsStatusEnum = (typeof GetAllAuthorizationHoldsStatusEnum)[keyof typeof GetAllAuthorizationHoldsStatusEnum]; export const GetAllBlocksPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetAllBlocksPaginationDetailsEnum = (typeof GetAllBlocksPaginationDetailsEnum)[keyof typeof GetAllBlocksPaginationDetailsEnum]; export const GetAllBlocksStateEnum = { Pending: 'PENDING', Seized: 'SEIZED', Removed: 'REMOVED', PartiallySeized: 'PARTIALLY_SEIZED', } as const; export type GetAllBlocksStateEnum = (typeof GetAllBlocksStateEnum)[keyof typeof GetAllBlocksStateEnum]; export const GetByIdDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type GetByIdDetailsLevelEnum = (typeof GetByIdDetailsLevelEnum)[keyof typeof GetByIdDetailsLevelEnum]; export const SearchPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type SearchPaginationDetailsEnum = (typeof SearchPaginationDetailsEnum)[keyof typeof SearchPaginationDetailsEnum]; export const SearchDetailsLevelEnum = { Basic: 'BASIC', Full: 'FULL', } as const; export type SearchDetailsLevelEnum = (typeof SearchDetailsLevelEnum)[keyof typeof SearchDetailsLevelEnum];