/* 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 { BulkInterestAccountSettingsAvailabilityInput } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { InterestAccountSettingsAvailability } from '../models'; // @ts-ignore import type { InterestAccountSettingsAvailabilityResponse } from '../models'; // @ts-ignore import type { InterestAccountSettingsAvailabilityUpdate } from '../models'; /** * DepositAccountInterestAvailabilityApi - axios parameter creator */ export const DepositAccountInterestAvailabilityApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Create Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {InterestAccountSettingsAvailability} interestAccountSettingsAvailability The Interest Availability 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} */ createInterestAvailability: async ( depositAccountId: string, interestAccountSettingsAvailability: InterestAccountSettingsAvailability, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'createInterestAvailability', 'depositAccountId', depositAccountId, ); // verify required parameter 'interestAccountSettingsAvailability' is not null or undefined assertParamExists( 'createInterestAvailability', 'interestAccountSettingsAvailability', interestAccountSettingsAvailability, ); const localVarPath = `/deposits/{depositAccountId}/interest-availabilities`.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( interestAccountSettingsAvailability, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Delete Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteInterestAvailability: async ( depositAccountId: string, interestAvailabilityKey: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'deleteInterestAvailability', 'depositAccountId', depositAccountId, ); // verify required parameter 'interestAvailabilityKey' is not null or undefined assertParamExists( 'deleteInterestAvailability', 'interestAvailabilityKey', interestAvailabilityKey, ); const localVarPath = `/deposits/{depositAccountId}/interest-availabilities/{interestAvailabilityKey}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'interestAvailabilityKey'}}`, encodeURIComponent(String(interestAvailabilityKey)), ); // 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 Interest Availabilities * @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 {GetInterestAvailabilitiesListPaginationDetailsEnum} [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 {GetInterestAvailabilitiesListTypeEnum} [type] The type of Interest Availabilities. * @param {string} [from] The start date to get Interest Availabilities. * @param {string} [to] The end date to to get Interest Availabilities. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInterestAvailabilitiesList: async ( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetInterestAvailabilitiesListPaginationDetailsEnum, type?: GetInterestAvailabilitiesListTypeEnum, from?: string, to?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getInterestAvailabilitiesList', 'depositAccountId', depositAccountId, ); const localVarPath = `/deposits/{depositAccountId}/interest-availabilities`.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 (type !== undefined) { localVarQueryParameter['type'] = type; } 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 Get Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInterestAvailabilityById: async ( depositAccountId: string, interestAvailabilityKey: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getInterestAvailabilityById', 'depositAccountId', depositAccountId, ); // verify required parameter 'interestAvailabilityKey' is not null or undefined assertParamExists( 'getInterestAvailabilityById', 'interestAvailabilityKey', interestAvailabilityKey, ); const localVarPath = `/deposits/{depositAccountId}/interest-availabilities/{interestAvailabilityKey}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'interestAvailabilityKey'}}`, encodeURIComponent(String(interestAvailabilityKey)), ); // 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 Create Interest Availabilities for a group of accounts * @param {BulkInterestAccountSettingsAvailabilityInput} bulkInterestAccountSettingsAvailabilityInput The information for creating bulk Interest Availabilities. * @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} */ makeBulkInterestAccountSettingsAvailabilities: async ( bulkInterestAccountSettingsAvailabilityInput: BulkInterestAccountSettingsAvailabilityInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'bulkInterestAccountSettingsAvailabilityInput' is not null or undefined assertParamExists( 'makeBulkInterestAccountSettingsAvailabilities', 'bulkInterestAccountSettingsAvailabilityInput', bulkInterestAccountSettingsAvailabilityInput, ); const localVarPath = `/deposits/interest-availabilities:bulk`; // 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( bulkInterestAccountSettingsAvailabilityInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {InterestAccountSettingsAvailabilityUpdate} interestAccountSettingsAvailabilityUpdate The Interest Availability to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateInterestAvailability: async ( depositAccountId: string, interestAvailabilityKey: string, interestAccountSettingsAvailabilityUpdate: InterestAccountSettingsAvailabilityUpdate, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'updateInterestAvailability', 'depositAccountId', depositAccountId, ); // verify required parameter 'interestAvailabilityKey' is not null or undefined assertParamExists( 'updateInterestAvailability', 'interestAvailabilityKey', interestAvailabilityKey, ); // verify required parameter 'interestAccountSettingsAvailabilityUpdate' is not null or undefined assertParamExists( 'updateInterestAvailability', 'interestAccountSettingsAvailabilityUpdate', interestAccountSettingsAvailabilityUpdate, ); const localVarPath = `/deposits/{depositAccountId}/interest-availabilities/{interestAvailabilityKey}` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'interestAvailabilityKey'}}`, encodeURIComponent(String(interestAvailabilityKey)), ); // 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( interestAccountSettingsAvailabilityUpdate, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * DepositAccountInterestAvailabilityApi - functional programming interface */ export const DepositAccountInterestAvailabilityApiFp = function ( configuration?: Configuration, ) { const localVarAxiosParamCreator = DepositAccountInterestAvailabilityApiAxiosParamCreator(configuration); return { /** * * @summary Create Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {InterestAccountSettingsAvailability} interestAccountSettingsAvailability The Interest Availability 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 createInterestAvailability( depositAccountId: string, interestAccountSettingsAvailability: InterestAccountSettingsAvailability, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.createInterestAvailability( depositAccountId, interestAccountSettingsAvailability, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.createInterestAvailability' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Delete Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInterestAvailability( depositAccountId, interestAvailabilityKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.deleteInterestAvailability' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get Interest Availabilities * @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 {GetInterestAvailabilitiesListPaginationDetailsEnum} [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 {GetInterestAvailabilitiesListTypeEnum} [type] The type of Interest Availabilities. * @param {string} [from] The start date to get Interest Availabilities. * @param {string} [to] The end date to to get Interest Availabilities. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getInterestAvailabilitiesList( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetInterestAvailabilitiesListPaginationDetailsEnum, type?: GetInterestAvailabilitiesListTypeEnum, from?: string, to?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getInterestAvailabilitiesList( depositAccountId, offset, limit, paginationDetails, type, from, to, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.getInterestAvailabilitiesList' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getInterestAvailabilityById( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getInterestAvailabilityById( depositAccountId, interestAvailabilityKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.getInterestAvailabilityById' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create Interest Availabilities for a group of accounts * @param {BulkInterestAccountSettingsAvailabilityInput} bulkInterestAccountSettingsAvailabilityInput The information for creating bulk Interest Availabilities. * @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 makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput: BulkInterestAccountSettingsAvailabilityInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.makeBulkInterestAccountSettingsAvailabilities' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {InterestAccountSettingsAvailabilityUpdate} interestAccountSettingsAvailabilityUpdate The Interest Availability to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, interestAccountSettingsAvailabilityUpdate: InterestAccountSettingsAvailabilityUpdate, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.updateInterestAvailability( depositAccountId, interestAvailabilityKey, interestAccountSettingsAvailabilityUpdate, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'DepositAccountInterestAvailabilityApi.updateInterestAvailability' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * DepositAccountInterestAvailabilityApi - factory interface */ export const DepositAccountInterestAvailabilityApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = DepositAccountInterestAvailabilityApiFp(configuration); return { /** * * @summary Create Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {InterestAccountSettingsAvailability} interestAccountSettingsAvailability The Interest Availability 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} */ createInterestAvailability( depositAccountId: string, interestAccountSettingsAvailability: InterestAccountSettingsAvailability, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .createInterestAvailability( depositAccountId, interestAccountSettingsAvailability, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Delete Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .deleteInterestAvailability( depositAccountId, interestAvailabilityKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get Interest Availabilities * @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 {GetInterestAvailabilitiesListPaginationDetailsEnum} [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 {GetInterestAvailabilitiesListTypeEnum} [type] The type of Interest Availabilities. * @param {string} [from] The start date to get Interest Availabilities. * @param {string} [to] The end date to to get Interest Availabilities. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInterestAvailabilitiesList( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetInterestAvailabilitiesListPaginationDetailsEnum, type?: GetInterestAvailabilitiesListTypeEnum, from?: string, to?: string, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getInterestAvailabilitiesList( depositAccountId, offset, limit, paginationDetails, type, from, to, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInterestAvailabilityById( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getInterestAvailabilityById( depositAccountId, interestAvailabilityKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Create Interest Availabilities for a group of accounts * @param {BulkInterestAccountSettingsAvailabilityInput} bulkInterestAccountSettingsAvailabilityInput The information for creating bulk Interest Availabilities. * @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} */ makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput: BulkInterestAccountSettingsAvailabilityInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Update Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {InterestAccountSettingsAvailabilityUpdate} interestAccountSettingsAvailabilityUpdate The Interest Availability to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, interestAccountSettingsAvailabilityUpdate: InterestAccountSettingsAvailabilityUpdate, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .updateInterestAvailability( depositAccountId, interestAvailabilityKey, interestAccountSettingsAvailabilityUpdate, options, ) .then((request) => request(axios, basePath)); }, }; }; /** * DepositAccountInterestAvailabilityApi - object-oriented interface */ export class DepositAccountInterestAvailabilityApi extends BaseAPI { /** * * @summary Create Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {InterestAccountSettingsAvailability} interestAccountSettingsAvailability The Interest Availability 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 createInterestAvailability( depositAccountId: string, interestAccountSettingsAvailability: InterestAccountSettingsAvailability, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .createInterestAvailability( depositAccountId, interestAccountSettingsAvailability, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Delete Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public deleteInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .deleteInterestAvailability( depositAccountId, interestAvailabilityKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get Interest Availabilities * @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 {GetInterestAvailabilitiesListPaginationDetailsEnum} [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 {GetInterestAvailabilitiesListTypeEnum} [type] The type of Interest Availabilities. * @param {string} [from] The start date to get Interest Availabilities. * @param {string} [to] The end date to to get Interest Availabilities. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getInterestAvailabilitiesList( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetInterestAvailabilitiesListPaginationDetailsEnum, type?: GetInterestAvailabilitiesListTypeEnum, from?: string, to?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .getInterestAvailabilitiesList( depositAccountId, offset, limit, paginationDetails, type, from, to, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getInterestAvailabilityById( depositAccountId: string, interestAvailabilityKey: string, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .getInterestAvailabilityById( depositAccountId, interestAvailabilityKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create Interest Availabilities for a group of accounts * @param {BulkInterestAccountSettingsAvailabilityInput} bulkInterestAccountSettingsAvailabilityInput The information for creating bulk Interest Availabilities. * @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 makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput: BulkInterestAccountSettingsAvailabilityInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .makeBulkInterestAccountSettingsAvailabilities( bulkInterestAccountSettingsAvailabilityInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update Interest Availability * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} interestAvailabilityKey The encoded key of the Interest Availability. * @param {InterestAccountSettingsAvailabilityUpdate} interestAccountSettingsAvailabilityUpdate The Interest Availability to be created. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public updateInterestAvailability( depositAccountId: string, interestAvailabilityKey: string, interestAccountSettingsAvailabilityUpdate: InterestAccountSettingsAvailabilityUpdate, options?: RawAxiosRequestConfig, ) { return DepositAccountInterestAvailabilityApiFp(this.configuration) .updateInterestAvailability( depositAccountId, interestAvailabilityKey, interestAccountSettingsAvailabilityUpdate, options, ) .then((request) => request(this.axios, this.basePath)); } } export const GetInterestAvailabilitiesListPaginationDetailsEnum = { On: 'ON', Off: 'OFF', } as const; export type GetInterestAvailabilitiesListPaginationDetailsEnum = (typeof GetInterestAvailabilitiesListPaginationDetailsEnum)[keyof typeof GetInterestAvailabilitiesListPaginationDetailsEnum]; export const GetInterestAvailabilitiesListTypeEnum = { Interest: 'INTEREST', Overdraft: 'OVERDRAFT', TechnicalOverdraft: 'TECHNICAL_OVERDRAFT', } as const; export type GetInterestAvailabilitiesListTypeEnum = (typeof GetInterestAvailabilitiesListTypeEnum)[keyof typeof GetInterestAvailabilitiesListTypeEnum];