UNPKG

@nikhil-patil/ngx-firefly-iii-api-client

Version:
1,004 lines 237 kB
/** * Firefly III API v2.1.0 * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-05-19T04:33:01+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * * The version of the OpenAPI document: 2.1.0 * Contact: james@firefly-iii.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpContext } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; // @ts-ignore import { BASE_PATH } from '../variables'; import { HttpConfiguration } from '../configuration'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common/http"; import * as i2 from "../configuration"; export class CurrenciesService { constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; this.basePath = 'https://demo.firefly-iii.org/api'; this.defaultHeaders = new HttpHeaders(); this.configuration = new HttpConfiguration(); if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined; if (firstBasePath != undefined) { basePath = firstBasePath; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } defaultCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling defaultCurrency.'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/default`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } deleteCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling deleteCurrency.'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`; return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } disableCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling disableCurrency.'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/disable`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } enableCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling enableCurrency.'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/enable`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } getCurrency(code, xTraceId, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling getCurrency.'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } getDefaultCurrency(xTraceId, observe = 'body', reportProgress = false, options) { let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/default`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listAccountByCurrency(code, xTraceId, limit, page, date, type, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listAccountByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } if (date !== undefined && date !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, date, 'date'); } if (type !== undefined && type !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/accounts`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listAvailableBudgetByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listAvailableBudgetByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/available-budgets`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listBillByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listBillByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/bills`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listBudgetLimitByCurrency(code, xTraceId, limit, page, start, end, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listBudgetLimitByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } if (start !== undefined && start !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start'); } if (end !== undefined && end !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/budget_limits`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listCurrency(xTraceId, limit, page, observe = 'body', reportProgress = false, options) { let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listRecurrenceByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listRecurrenceByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/recurrences`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listRuleByCurrency(code, xTraceId, limit, page, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listRuleByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/v1/currencies/${this.configuration.encodeParam({ name: "code", value: code, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "string" })}/rules`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } listTransactionByCurrency(code, xTraceId, limit, page, start, end, type, observe = 'body', reportProgress = false, options) { if (code === null || code === undefined) { throw new Error('Required parameter code was null or undefined when calling listTransactionByCurrency.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (limit !== undefined && limit !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, limit, 'limit'); } if (page !== undefined && page !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, 'page'); } if (start !== undefined && start !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, start, 'start'); } if (end !== undefined && end !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, end, 'end'); } if (type !== undefined && type !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, type, 'type'); } let localVarHeaders = this.defaultHeaders; if (xTraceId !== undefined && xTraceId !== null) { localVarHeaders = localVarHeaders.set('X-Trace-Id', String(xTraceId)); } let localVarCredential; // authentication (firefly_iii_auth) required localVarCredential = this.configuration.lookupCredential('firefly_iii_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } // authentication (local_bearer_auth) required localVarCredential = this.configuration.lookupCredential('local_bearer_auth'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/vnd.api+json', 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text'))