/* tslint:disable */ /* eslint-disable */ /** * deposits/transactions * 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 { BulkDepositTransactionsInput } from '../models'; // @ts-ignore import type { DepositTransaction } from '../models'; // @ts-ignore import type { DepositTransactionAdjustmentDetails } from '../models'; // @ts-ignore import type { DepositTransactionInput } from '../models'; // @ts-ignore import type { DepositTransactionSearchCriteria } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { FeeAppliedDepositTransactionInput } from '../models'; // @ts-ignore import type { PatchOperation } from '../models'; // @ts-ignore import type { SeizeBlockAmount } from '../models'; // @ts-ignore import type { TransferDepositTransactionInput } from '../models'; // @ts-ignore import type { WithdrawalDepositTransactionInput } from '../models'; /** * DepositTransactionsApi - axios parameter creator */ export const DepositTransactionsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Adjust a deposit transaction, which may bulk adjust multiple transactions * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {DepositTransactionAdjustmentDetails} depositTransactionAdjustmentDetails Represents information about the adjustment action. * @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} */ adjust: async ( depositTransactionId: string, depositTransactionAdjustmentDetails: DepositTransactionAdjustmentDetails, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositTransactionId' is not null or undefined assertParamExists('adjust', 'depositTransactionId', depositTransactionId); // verify required parameter 'depositTransactionAdjustmentDetails' is not null or undefined assertParamExists( 'adjust', 'depositTransactionAdjustmentDetails', depositTransactionAdjustmentDetails, ); const localVarPath = `/deposits/transactions/{depositTransactionId}:adjust`.replace( `{${'depositTransactionId'}}`, encodeURIComponent(String(depositTransactionId)), ); // 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( depositTransactionAdjustmentDetails, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Apply a fee on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {FeeAppliedDepositTransactionInput} feeAppliedDepositTransactionInput Represents the information for creating a `FEE_APPLIED` type transaction on a deposit. * @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} */ applyFee: async ( depositAccountId: string, feeAppliedDepositTransactionInput: FeeAppliedDepositTransactionInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('applyFee', 'depositAccountId', depositAccountId); // verify required parameter 'feeAppliedDepositTransactionInput' is not null or undefined assertParamExists( 'applyFee', 'feeAppliedDepositTransactionInput', feeAppliedDepositTransactionInput, ); const localVarPath = `/deposits/{depositAccountId}/fee-transactions`.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( feeAppliedDepositTransactionInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Edit custom information or notes for deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ editTransactionDetails: async ( depositTransactionId: string, patchOperation: Array, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositTransactionId' is not null or undefined assertParamExists( 'editTransactionDetails', 'depositTransactionId', depositTransactionId, ); // verify required parameter 'patchOperation' is not null or undefined assertParamExists( 'editTransactionDetails', 'patchOperation', patchOperation, ); const localVarPath = `/deposits/transactions/{depositTransactionId}`.replace( `{${'depositTransactionId'}}`, encodeURIComponent(String(depositTransactionId)), ); // 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 Get deposit transactions * @param {string} depositAccountId The ID or encoded key of the deposit account used to get all of its transactions. * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getAll: async ( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('getAll', 'depositAccountId', depositAccountId); const localVarPath = `/deposits/{depositAccountId}/transactions`.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 (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 deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @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 ( depositTransactionId: string, detailsLevel?: GetByIdDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositTransactionId' is not null or undefined assertParamExists( 'getById', 'depositTransactionId', depositTransactionId, ); const localVarPath = `/deposits/transactions/{depositTransactionId}`.replace( `{${'depositTransactionId'}}`, encodeURIComponent(String(depositTransactionId)), ); // 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 Create bulk deposit transactions. * @param {BulkDepositTransactionsInput} bulkDepositTransactionsInput Represents the information for making bulk deposit transactions. * @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} */ makeBulkDeposits: async ( bulkDepositTransactionsInput: BulkDepositTransactionsInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'bulkDepositTransactionsInput' is not null or undefined assertParamExists( 'makeBulkDeposits', 'bulkDepositTransactionsInput', bulkDepositTransactionsInput, ); const localVarPath = `/deposits/deposit-transactions: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( bulkDepositTransactionsInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create deposit transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {DepositTransactionInput} depositTransactionInput Represents the information needed to create a deposit transaction. * @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} */ makeDeposit: async ( depositAccountId: string, depositTransactionInput: DepositTransactionInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('makeDeposit', 'depositAccountId', depositAccountId); // verify required parameter 'depositTransactionInput' is not null or undefined assertParamExists( 'makeDeposit', 'depositTransactionInput', depositTransactionInput, ); const localVarPath = `/deposits/{depositAccountId}/deposit-transactions`.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( depositTransactionInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Seize a block amount on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {SeizeBlockAmount} seizeBlockAmount Represents the information for seizing a block amount on 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} */ makeSeizure: async ( depositAccountId: string, seizeBlockAmount: SeizeBlockAmount, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('makeSeizure', 'depositAccountId', depositAccountId); // verify required parameter 'seizeBlockAmount' is not null or undefined assertParamExists('makeSeizure', 'seizeBlockAmount', seizeBlockAmount); const localVarPath = `/deposits/{depositAccountId}/seizure-transactions`.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( seizeBlockAmount, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create transfer transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {TransferDepositTransactionInput} transferDepositTransactionInput Represents the information needed for a transfer transaction. * @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} */ makeTransfer: async ( depositAccountId: string, transferDepositTransactionInput: TransferDepositTransactionInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('makeTransfer', 'depositAccountId', depositAccountId); // verify required parameter 'transferDepositTransactionInput' is not null or undefined assertParamExists( 'makeTransfer', 'transferDepositTransactionInput', transferDepositTransactionInput, ); const localVarPath = `/deposits/{depositAccountId}/transfer-transactions`.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( transferDepositTransactionInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Create withdrawal transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {WithdrawalDepositTransactionInput} withdrawalDepositTransactionInput Represents the information for a withdrawal transaction. * @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} */ makeWithdrawal: async ( depositAccountId: string, withdrawalDepositTransactionInput: WithdrawalDepositTransactionInput, idempotencyKey?: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists('makeWithdrawal', 'depositAccountId', depositAccountId); // verify required parameter 'withdrawalDepositTransactionInput' is not null or undefined assertParamExists( 'makeWithdrawal', 'withdrawalDepositTransactionInput', withdrawalDepositTransactionInput, ); const localVarPath = `/deposits/{depositAccountId}/withdrawal-transactions`.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( withdrawalDepositTransactionInput, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Search deposit transactions for deposit accounts by various criteria * @param {DepositTransactionSearchCriteria} depositTransactionSearchCriteria The criteria to use to search deposit transactions. * @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 ( depositTransactionSearchCriteria: DepositTransactionSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositTransactionSearchCriteria' is not null or undefined assertParamExists( 'search', 'depositTransactionSearchCriteria', depositTransactionSearchCriteria, ); const localVarPath = `/deposits/transactions: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( depositTransactionSearchCriteria, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * DepositTransactionsApi - functional programming interface */ export const DepositTransactionsApiFp = function ( configuration?: Configuration, ) { const localVarAxiosParamCreator = DepositTransactionsApiAxiosParamCreator(configuration); return { /** * * @summary Adjust a deposit transaction, which may bulk adjust multiple transactions * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {DepositTransactionAdjustmentDetails} depositTransactionAdjustmentDetails Represents information about the adjustment action. * @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 adjust( depositTransactionId: string, depositTransactionAdjustmentDetails: DepositTransactionAdjustmentDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.adjust( depositTransactionId, depositTransactionAdjustmentDetails, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.adjust']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Apply a fee on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {FeeAppliedDepositTransactionInput} feeAppliedDepositTransactionInput Represents the information for creating a `FEE_APPLIED` type transaction on a deposit. * @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 applyFee( depositAccountId: string, feeAppliedDepositTransactionInput: FeeAppliedDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.applyFee( depositAccountId, feeAppliedDepositTransactionInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.applyFee']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Edit custom information or notes for deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async editTransactionDetails( depositTransactionId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.editTransactionDetails( depositTransactionId, patchOperation, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.editTransactionDetails']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get deposit transactions * @param {string} depositAccountId The ID or encoded key of the deposit account used to get all of its transactions. * @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 {*} [options] Override http request option. * @throws {RequiredError} */ async getAll( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.getAll( depositAccountId, offset, limit, paginationDetails, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.getAll']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Get deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @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( depositTransactionId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getById( depositTransactionId, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.getById']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create bulk deposit transactions. * @param {BulkDepositTransactionsInput} bulkDepositTransactionsInput Represents the information for making bulk deposit transactions. * @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 makeBulkDeposits( bulkDepositTransactionsInput: BulkDepositTransactionsInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeBulkDeposits( bulkDepositTransactionsInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.makeBulkDeposits']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create deposit transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {DepositTransactionInput} depositTransactionInput Represents the information needed to create a deposit transaction. * @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 makeDeposit( depositAccountId: string, depositTransactionInput: DepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeDeposit( depositAccountId, depositTransactionInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.makeDeposit']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Seize a block amount on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {SeizeBlockAmount} seizeBlockAmount Represents the information for seizing a block amount on 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 makeSeizure( depositAccountId: string, seizeBlockAmount: SeizeBlockAmount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeSeizure( depositAccountId, seizeBlockAmount, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.makeSeizure']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create transfer transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {TransferDepositTransactionInput} transferDepositTransactionInput Represents the information needed for a transfer transaction. * @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 makeTransfer( depositAccountId: string, transferDepositTransactionInput: TransferDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeTransfer( depositAccountId, transferDepositTransactionInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.makeTransfer']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Create withdrawal transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {WithdrawalDepositTransactionInput} withdrawalDepositTransactionInput Represents the information for a withdrawal transaction. * @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 makeWithdrawal( depositAccountId: string, withdrawalDepositTransactionInput: WithdrawalDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.makeWithdrawal( depositAccountId, withdrawalDepositTransactionInput, idempotencyKey, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.makeWithdrawal']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Search deposit transactions for deposit accounts by various criteria * @param {DepositTransactionSearchCriteria} depositTransactionSearchCriteria The criteria to use to search deposit transactions. * @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( depositTransactionSearchCriteria: DepositTransactionSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise> > { const localVarAxiosArgs = await localVarAxiosParamCreator.search( depositTransactionSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositTransactionsApi.search']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * DepositTransactionsApi - factory interface */ export const DepositTransactionsApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = DepositTransactionsApiFp(configuration); return { /** * * @summary Adjust a deposit transaction, which may bulk adjust multiple transactions * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {DepositTransactionAdjustmentDetails} depositTransactionAdjustmentDetails Represents information about the adjustment action. * @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} */ adjust( depositTransactionId: string, depositTransactionAdjustmentDetails: DepositTransactionAdjustmentDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .adjust( depositTransactionId, depositTransactionAdjustmentDetails, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Apply a fee on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {FeeAppliedDepositTransactionInput} feeAppliedDepositTransactionInput Represents the information for creating a `FEE_APPLIED` type transaction on a deposit. * @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} */ applyFee( depositAccountId: string, feeAppliedDepositTransactionInput: FeeAppliedDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .applyFee( depositAccountId, feeAppliedDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Edit custom information or notes for deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ editTransactionDetails( depositTransactionId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .editTransactionDetails(depositTransactionId, patchOperation, options) .then((request) => request(axios, basePath)); }, /** * * @summary Get deposit transactions * @param {string} depositAccountId The ID or encoded key of the deposit account used to get all of its transactions. * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getAll( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .getAll( depositAccountId, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Get deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @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( depositTransactionId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getById(depositTransactionId, detailsLevel, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create bulk deposit transactions. * @param {BulkDepositTransactionsInput} bulkDepositTransactionsInput Represents the information for making bulk deposit transactions. * @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} */ makeBulkDeposits( bulkDepositTransactionsInput: BulkDepositTransactionsInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeBulkDeposits(bulkDepositTransactionsInput, idempotencyKey, options) .then((request) => request(axios, basePath)); }, /** * * @summary Create deposit transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {DepositTransactionInput} depositTransactionInput Represents the information needed to create a deposit transaction. * @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} */ makeDeposit( depositAccountId: string, depositTransactionInput: DepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeDeposit( depositAccountId, depositTransactionInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Seize a block amount on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {SeizeBlockAmount} seizeBlockAmount Represents the information for seizing a block amount on 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} */ makeSeizure( depositAccountId: string, seizeBlockAmount: SeizeBlockAmount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeSeizure( depositAccountId, seizeBlockAmount, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Create transfer transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {TransferDepositTransactionInput} transferDepositTransactionInput Represents the information needed for a transfer transaction. * @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} */ makeTransfer( depositAccountId: string, transferDepositTransactionInput: TransferDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeTransfer( depositAccountId, transferDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Create withdrawal transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {WithdrawalDepositTransactionInput} withdrawalDepositTransactionInput Represents the information for a withdrawal transaction. * @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} */ makeWithdrawal( depositAccountId: string, withdrawalDepositTransactionInput: WithdrawalDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .makeWithdrawal( depositAccountId, withdrawalDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(axios, basePath)); }, /** * * @summary Search deposit transactions for deposit accounts by various criteria * @param {DepositTransactionSearchCriteria} depositTransactionSearchCriteria The criteria to use to search deposit transactions. * @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( depositTransactionSearchCriteria: DepositTransactionSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ): AxiosPromise> { return localVarFp .search( depositTransactionSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, options, ) .then((request) => request(axios, basePath)); }, }; }; /** * DepositTransactionsApi - object-oriented interface */ export class DepositTransactionsApi extends BaseAPI { /** * * @summary Adjust a deposit transaction, which may bulk adjust multiple transactions * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {DepositTransactionAdjustmentDetails} depositTransactionAdjustmentDetails Represents information about the adjustment action. * @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 adjust( depositTransactionId: string, depositTransactionAdjustmentDetails: DepositTransactionAdjustmentDetails, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .adjust( depositTransactionId, depositTransactionAdjustmentDetails, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Apply a fee on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {FeeAppliedDepositTransactionInput} feeAppliedDepositTransactionInput Represents the information for creating a `FEE_APPLIED` type transaction on a deposit. * @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 applyFee( depositAccountId: string, feeAppliedDepositTransactionInput: FeeAppliedDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .applyFee( depositAccountId, feeAppliedDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Edit custom information or notes for deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @param {Array} patchOperation Patch operations to be applied to a resource. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public editTransactionDetails( depositTransactionId: string, patchOperation: Array, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .editTransactionDetails(depositTransactionId, patchOperation, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get deposit transactions * @param {string} depositAccountId The ID or encoded key of the deposit account used to get all of its transactions. * @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 {*} [options] Override http request option. * @throws {RequiredError} */ public getAll( depositAccountId: string, offset?: number, limit?: number, paginationDetails?: GetAllPaginationDetailsEnum, detailsLevel?: GetAllDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .getAll( depositAccountId, offset, limit, paginationDetails, detailsLevel, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Get deposit transaction * @param {string} depositTransactionId The ID or encoded key of the deposit transaction. * @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( depositTransactionId: string, detailsLevel?: GetByIdDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .getById(depositTransactionId, detailsLevel, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create bulk deposit transactions. * @param {BulkDepositTransactionsInput} bulkDepositTransactionsInput Represents the information for making bulk deposit transactions. * @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 makeBulkDeposits( bulkDepositTransactionsInput: BulkDepositTransactionsInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .makeBulkDeposits(bulkDepositTransactionsInput, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create deposit transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {DepositTransactionInput} depositTransactionInput Represents the information needed to create a deposit transaction. * @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 makeDeposit( depositAccountId: string, depositTransactionInput: DepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .makeDeposit( depositAccountId, depositTransactionInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Seize a block amount on a deposit account * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {SeizeBlockAmount} seizeBlockAmount Represents the information for seizing a block amount on 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 makeSeizure( depositAccountId: string, seizeBlockAmount: SeizeBlockAmount, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .makeSeizure(depositAccountId, seizeBlockAmount, idempotencyKey, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create transfer transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {TransferDepositTransactionInput} transferDepositTransactionInput Represents the information needed for a transfer transaction. * @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 makeTransfer( depositAccountId: string, transferDepositTransactionInput: TransferDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .makeTransfer( depositAccountId, transferDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Create withdrawal transaction * @param {string} depositAccountId The ID or encoded key of the deposit that the transaction will be created for. * @param {WithdrawalDepositTransactionInput} withdrawalDepositTransactionInput Represents the information for a withdrawal transaction. * @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 makeWithdrawal( depositAccountId: string, withdrawalDepositTransactionInput: WithdrawalDepositTransactionInput, idempotencyKey?: string, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .makeWithdrawal( depositAccountId, withdrawalDepositTransactionInput, idempotencyKey, options, ) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Search deposit transactions for deposit accounts by various criteria * @param {DepositTransactionSearchCriteria} depositTransactionSearchCriteria The criteria to use to search deposit transactions. * @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( depositTransactionSearchCriteria: DepositTransactionSearchCriteria, offset?: number, limit?: number, paginationDetails?: SearchPaginationDetailsEnum, cursor?: string, detailsLevel?: SearchDetailsLevelEnum, options?: RawAxiosRequestConfig, ) { return DepositTransactionsApiFp(this.configuration) .search( depositTransactionSearchCriteria, offset, limit, paginationDetails, cursor, detailsLevel, 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 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];