/* tslint:disable */ /* eslint-disable */ /** * configuration/depositproducts.yaml * 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 { DepositProductsConfiguration } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; /** * DepositProductsConfigurationApi - axios parameter creator */ export const DepositProductsConfigurationApiAxiosParamCreator = function ( configuration?: Configuration, ) { return { /** * * @summary Get configuration for all deposit products * @param {Array} [type] The product type of the deposit products to get. When this is used multiple times it will get all the deposit products of the given types.If the parameter is absent, all the deposit products will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ get: async ( type?: Array, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/configuration/depositproducts.yaml`; // 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 (type) { localVarQueryParameter['type'] = type; } localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+yaml'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update all deposit products configuration * @param {boolean} [xMambuAsync] * @param {string} [xMambuCallback] * @param {DepositProductsConfiguration} [depositProductsConfiguration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ update: async ( xMambuAsync?: boolean, xMambuCallback?: string, depositProductsConfiguration?: DepositProductsConfiguration, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/configuration/depositproducts.yaml`; // 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/yaml'; localVarHeaderParameter['Accept'] = 'application/vnd.mambu.v2+yaml'; if (xMambuAsync != null) { localVarHeaderParameter['X-Mambu-Async'] = typeof xMambuAsync === 'string' ? xMambuAsync : JSON.stringify(xMambuAsync, replaceWithSerializableTypeIfNeeded); } if (xMambuCallback != null) { localVarHeaderParameter['X-Mambu-Callback'] = String(xMambuCallback); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers, }; localVarRequestOptions.data = serializeDataIfNeeded( depositProductsConfiguration, localVarRequestOptions, configuration, ); return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * DepositProductsConfigurationApi - functional programming interface */ export const DepositProductsConfigurationApiFp = function ( configuration?: Configuration, ) { const localVarAxiosParamCreator = DepositProductsConfigurationApiAxiosParamCreator(configuration); return { /** * * @summary Get configuration for all deposit products * @param {Array} [type] The product type of the deposit products to get. When this is used multiple times it will get all the deposit products of the given types.If the parameter is absent, all the deposit products will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async get( type?: Array, options?: RawAxiosRequestConfig, ): Promise< ( axios?: AxiosInstance, basePath?: string, ) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.get( type, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositProductsConfigurationApi.get']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update all deposit products configuration * @param {boolean} [xMambuAsync] * @param {string} [xMambuCallback] * @param {DepositProductsConfiguration} [depositProductsConfiguration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async update( xMambuAsync?: boolean, xMambuCallback?: string, depositProductsConfiguration?: DepositProductsConfiguration, options?: RawAxiosRequestConfig, ): Promise< (axios?: AxiosInstance, basePath?: string) => AxiosPromise > { const localVarAxiosArgs = await localVarAxiosParamCreator.update( xMambuAsync, xMambuCallback, depositProductsConfiguration, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DepositProductsConfigurationApi.update']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, globalAxios, BASE_PATH, configuration, )(axios, localVarOperationServerBasePath || basePath); }, }; }; /** * DepositProductsConfigurationApi - factory interface */ export const DepositProductsConfigurationApiFactory = function ( configuration?: Configuration, basePath?: string, axios?: AxiosInstance, ) { const localVarFp = DepositProductsConfigurationApiFp(configuration); return { /** * * @summary Get configuration for all deposit products * @param {Array} [type] The product type of the deposit products to get. When this is used multiple times it will get all the deposit products of the given types.If the parameter is absent, all the deposit products will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ get( type?: Array, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .get(type, options) .then((request) => request(axios, basePath)); }, /** * * @summary Update all deposit products configuration * @param {boolean} [xMambuAsync] * @param {string} [xMambuCallback] * @param {DepositProductsConfiguration} [depositProductsConfiguration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ update( xMambuAsync?: boolean, xMambuCallback?: string, depositProductsConfiguration?: DepositProductsConfiguration, options?: RawAxiosRequestConfig, ): AxiosPromise { return localVarFp .update( xMambuAsync, xMambuCallback, depositProductsConfiguration, options, ) .then((request) => request(axios, basePath)); }, }; }; /** * DepositProductsConfigurationApi - object-oriented interface */ export class DepositProductsConfigurationApi extends BaseAPI { /** * * @summary Get configuration for all deposit products * @param {Array} [type] The product type of the deposit products to get. When this is used multiple times it will get all the deposit products of the given types.If the parameter is absent, all the deposit products will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public get(type?: Array, options?: RawAxiosRequestConfig) { return DepositProductsConfigurationApiFp(this.configuration) .get(type, options) .then((request) => request(this.axios, this.basePath)); } /** * * @summary Update all deposit products configuration * @param {boolean} [xMambuAsync] * @param {string} [xMambuCallback] * @param {DepositProductsConfiguration} [depositProductsConfiguration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public update( xMambuAsync?: boolean, xMambuCallback?: string, depositProductsConfiguration?: DepositProductsConfiguration, options?: RawAxiosRequestConfig, ) { return DepositProductsConfigurationApiFp(this.configuration) .update( xMambuAsync, xMambuCallback, depositProductsConfiguration, options, ) .then((request) => request(this.axios, this.basePath)); } } export const GetTypeEnum = { CurrentAccount: 'CURRENT_ACCOUNT', RegularSavings: 'REGULAR_SAVINGS', FixedDeposit: 'FIXED_DEPOSIT', SavingsPlan: 'SAVINGS_PLAN', InvestorAccount: 'INVESTOR_ACCOUNT', } as const; export type GetTypeEnum = (typeof GetTypeEnum)[keyof typeof GetTypeEnum];