/* 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 { ErrorResponse } from '../models'; // @ts-ignore import type { LoanAccountSchedule } from '../models'; /** * FundedLoanAccountsApi - axios parameter creator */ export const FundedLoanAccountsApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Allows retrieval of the loan account schedule for a loan account with the given id or encodedKey and funded by the deposit account with the given id or encodedKey. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScheduleForFundedAccount: async ( depositAccountId: string, loanAccountId: string, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'depositAccountId' is not null or undefined assertParamExists( 'getScheduleForFundedAccount', 'depositAccountId', depositAccountId, ); // verify required parameter 'loanAccountId' is not null or undefined assertParamExists( 'getScheduleForFundedAccount', 'loanAccountId', loanAccountId, ); const localVarPath = `/deposits/{depositAccountId}/funding/{loanAccountId}/schedule` .replace( `{${'depositAccountId'}}`, encodeURIComponent(String(depositAccountId)), ) .replace( `{${'loanAccountId'}}`, encodeURIComponent(String(loanAccountId)), ); // 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, }; }, }; }; /** * FundedLoanAccountsApi - functional programming interface */ export const FundedLoanAccountsApiFp = function ( configuration?: Configuration, ) { const localVarAxiosParamCreator = FundedLoanAccountsApiAxiosParamCreator(configuration); return { /** * * @summary Allows retrieval of the loan account schedule for a loan account with the given id or encodedKey and funded by the deposit account with the given id or encodedKey. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getScheduleForFundedAccount( depositAccountId: string, loanAccountId: string, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.getScheduleForFundedAccount( depositAccountId, loanAccountId, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap[ 'FundedLoanAccountsApi.getScheduleForFundedAccount' ]?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * FundedLoanAccountsApi - factory interface */ export const FundedLoanAccountsApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = FundedLoanAccountsApiFp(configuration); return { /** * * @summary Allows retrieval of the loan account schedule for a loan account with the given id or encodedKey and funded by the deposit account with the given id or encodedKey. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScheduleForFundedAccount( depositAccountId: string, loanAccountId: string, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .getScheduleForFundedAccount(depositAccountId, loanAccountId, options) .then((request) => request(axios, basePath)); }, }; }; /** * FundedLoanAccountsApi - object-oriented interface */ export class FundedLoanAccountsApi extends BaseAPI { /** * * @summary Allows retrieval of the loan account schedule for a loan account with the given id or encodedKey and funded by the deposit account with the given id or encodedKey. * @param {string} depositAccountId The ID or encoded key of the deposit account. * @param {string} loanAccountId The ID or encoded key of the loan account. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getScheduleForFundedAccount( depositAccountId: string, loanAccountId: string, options?: RawAxiosRequestConfig, ) { return FundedLoanAccountsApiFp(this.configuration) .getScheduleForFundedAccount(depositAccountId, loanAccountId, options) .then((request) => request(this.axios, this.basePath)); } }