@enfuce/nextgen-sdk 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authorisation-control/api.d.ts +0 -302
- package/dist/authorisation-control/api.js +10 -28
- package/dist/authorisation-control/base.d.ts +0 -24
- package/dist/authorisation-control/base.js +0 -19
- package/dist/authorisation-control/common.d.ts +4 -35
- package/dist/authorisation-control/common.js +16 -38
- package/dist/authorisation-control/configuration.d.ts +24 -17
- package/dist/authorisation-control/configuration.js +3 -3
- package/dist/card/api.d.ts +41 -740
- package/dist/card/api.js +38 -105
- package/dist/card/base.d.ts +0 -24
- package/dist/card/base.js +0 -19
- package/dist/card/common.d.ts +4 -35
- package/dist/card/common.js +16 -38
- package/dist/card/configuration.d.ts +24 -17
- package/dist/card/configuration.js +3 -3
- package/dist/cardholder/api.d.ts +959 -686
- package/dist/cardholder/api.js +783 -73
- package/dist/cardholder/base.d.ts +0 -24
- package/dist/cardholder/base.js +0 -19
- package/dist/cardholder/common.d.ts +4 -35
- package/dist/cardholder/common.js +16 -38
- package/dist/cardholder/configuration.d.ts +24 -17
- package/dist/cardholder/configuration.js +3 -3
- package/dist/cards/api.d.ts +0 -7
- package/dist/cards/api.js +2 -9
- package/dist/cards/base.d.ts +0 -24
- package/dist/cards/base.js +0 -19
- package/dist/cards/common.d.ts +4 -35
- package/dist/cards/common.js +16 -38
- package/dist/cards/configuration.d.ts +24 -17
- package/dist/cards/configuration.js +3 -3
- package/dist/clearing-file-copy/api.d.ts +0 -497
- package/dist/clearing-file-copy/api.js +12 -26
- package/dist/clearing-file-copy/base.d.ts +0 -24
- package/dist/clearing-file-copy/base.js +0 -19
- package/dist/clearing-file-copy/common.d.ts +4 -35
- package/dist/clearing-file-copy/common.js +16 -38
- package/dist/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/authorisation-control/api.d.ts +0 -302
- package/dist/esm/authorisation-control/api.js +10 -28
- package/dist/esm/authorisation-control/base.d.ts +0 -24
- package/dist/esm/authorisation-control/base.js +0 -19
- package/dist/esm/authorisation-control/common.d.ts +4 -35
- package/dist/esm/authorisation-control/common.js +14 -37
- package/dist/esm/authorisation-control/configuration.d.ts +24 -17
- package/dist/esm/authorisation-control/configuration.js +3 -3
- package/dist/esm/card/api.d.ts +41 -740
- package/dist/esm/card/api.js +38 -105
- package/dist/esm/card/base.d.ts +0 -24
- package/dist/esm/card/base.js +0 -19
- package/dist/esm/card/common.d.ts +4 -35
- package/dist/esm/card/common.js +14 -37
- package/dist/esm/card/configuration.d.ts +24 -17
- package/dist/esm/card/configuration.js +3 -3
- package/dist/esm/cardholder/api.d.ts +959 -686
- package/dist/esm/cardholder/api.js +782 -72
- package/dist/esm/cardholder/base.d.ts +0 -24
- package/dist/esm/cardholder/base.js +0 -19
- package/dist/esm/cardholder/common.d.ts +4 -35
- package/dist/esm/cardholder/common.js +14 -37
- package/dist/esm/cardholder/configuration.d.ts +24 -17
- package/dist/esm/cardholder/configuration.js +3 -3
- package/dist/esm/cards/api.d.ts +0 -7
- package/dist/esm/cards/api.js +2 -9
- package/dist/esm/cards/base.d.ts +0 -24
- package/dist/esm/cards/base.js +0 -19
- package/dist/esm/cards/common.d.ts +4 -35
- package/dist/esm/cards/common.js +14 -37
- package/dist/esm/cards/configuration.d.ts +24 -17
- package/dist/esm/cards/configuration.js +3 -3
- package/dist/esm/clearing-file-copy/api.d.ts +0 -497
- package/dist/esm/clearing-file-copy/api.js +12 -26
- package/dist/esm/clearing-file-copy/base.d.ts +0 -24
- package/dist/esm/clearing-file-copy/base.js +0 -19
- package/dist/esm/clearing-file-copy/common.d.ts +4 -35
- package/dist/esm/clearing-file-copy/common.js +14 -37
- package/dist/esm/clearing-file-copy/configuration.d.ts +24 -17
- package/dist/esm/clearing-file-copy/configuration.js +3 -3
- package/dist/esm/exchange-rate/api.d.ts +409 -0
- package/dist/esm/exchange-rate/api.js +403 -0
- package/dist/esm/exchange-rate/base.d.ts +42 -0
- package/dist/esm/exchange-rate/base.js +41 -0
- package/dist/esm/exchange-rate/common.d.ts +34 -0
- package/dist/esm/exchange-rate/common.js +126 -0
- package/dist/esm/exchange-rate/configuration.d.ts +98 -0
- package/dist/esm/exchange-rate/configuration.js +40 -0
- package/dist/esm/exchange-rate/index.d.ts +13 -0
- package/dist/esm/exchange-rate/index.js +15 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/issuer-events/api.d.ts +639 -601
- package/dist/esm/issuer-events/api.js +520 -54
- package/dist/esm/issuer-events/base.d.ts +0 -24
- package/dist/esm/issuer-events/base.js +0 -19
- package/dist/esm/issuer-events/common.d.ts +4 -35
- package/dist/esm/issuer-events/common.js +14 -37
- package/dist/esm/issuer-events/configuration.d.ts +24 -17
- package/dist/esm/issuer-events/configuration.js +3 -3
- package/dist/esm/pin/api.d.ts +0 -76
- package/dist/esm/pin/api.js +3 -15
- package/dist/esm/pin/base.d.ts +0 -24
- package/dist/esm/pin/base.js +0 -19
- package/dist/esm/pin/common.d.ts +4 -35
- package/dist/esm/pin/common.js +14 -37
- package/dist/esm/pin/configuration.d.ts +24 -17
- package/dist/esm/pin/configuration.js +3 -3
- package/dist/esm/threeds/api.d.ts +0 -18
- package/dist/esm/threeds/api.js +1 -8
- package/dist/esm/threeds/base.d.ts +0 -24
- package/dist/esm/threeds/base.js +0 -19
- package/dist/esm/threeds/common.d.ts +4 -35
- package/dist/esm/threeds/common.js +14 -37
- package/dist/esm/threeds/configuration.d.ts +24 -17
- package/dist/esm/threeds/configuration.js +3 -3
- package/dist/esm/threeds-oob/api.d.ts +0 -90
- package/dist/esm/threeds-oob/api.js +2 -9
- package/dist/esm/threeds-oob/base.d.ts +0 -24
- package/dist/esm/threeds-oob/base.js +0 -19
- package/dist/esm/threeds-oob/common.d.ts +4 -35
- package/dist/esm/threeds-oob/common.js +14 -37
- package/dist/esm/threeds-oob/configuration.d.ts +24 -17
- package/dist/esm/threeds-oob/configuration.js +3 -3
- package/dist/esm/transaction-event/api.d.ts +0 -452
- package/dist/esm/transaction-event/api.js +11 -27
- package/dist/esm/transaction-event/base.d.ts +0 -24
- package/dist/esm/transaction-event/base.js +0 -19
- package/dist/esm/transaction-event/common.d.ts +4 -35
- package/dist/esm/transaction-event/common.js +14 -37
- package/dist/esm/transaction-event/configuration.d.ts +24 -17
- package/dist/esm/transaction-event/configuration.js +3 -3
- package/dist/esm/wallet/api.d.ts +0 -342
- package/dist/esm/wallet/api.js +29 -83
- package/dist/esm/wallet/base.d.ts +0 -24
- package/dist/esm/wallet/base.js +0 -19
- package/dist/esm/wallet/common.d.ts +4 -35
- package/dist/esm/wallet/common.js +14 -37
- package/dist/esm/wallet/configuration.d.ts +24 -17
- package/dist/esm/wallet/configuration.js +3 -3
- package/dist/exchange-rate/api.d.ts +409 -0
- package/dist/exchange-rate/api.js +418 -0
- package/dist/exchange-rate/base.d.ts +42 -0
- package/dist/exchange-rate/base.js +46 -0
- package/dist/exchange-rate/common.d.ts +34 -0
- package/dist/exchange-rate/common.js +139 -0
- package/dist/exchange-rate/configuration.d.ts +98 -0
- package/dist/exchange-rate/configuration.js +44 -0
- package/dist/exchange-rate/index.d.ts +13 -0
- package/dist/exchange-rate/index.js +31 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/issuer-events/api.d.ts +639 -601
- package/dist/issuer-events/api.js +521 -55
- package/dist/issuer-events/base.d.ts +0 -24
- package/dist/issuer-events/base.js +0 -19
- package/dist/issuer-events/common.d.ts +4 -35
- package/dist/issuer-events/common.js +16 -38
- package/dist/issuer-events/configuration.d.ts +24 -17
- package/dist/issuer-events/configuration.js +3 -3
- package/dist/pin/api.d.ts +0 -76
- package/dist/pin/api.js +3 -15
- package/dist/pin/base.d.ts +0 -24
- package/dist/pin/base.js +0 -19
- package/dist/pin/common.d.ts +4 -35
- package/dist/pin/common.js +16 -38
- package/dist/pin/configuration.d.ts +24 -17
- package/dist/pin/configuration.js +3 -3
- package/dist/threeds/api.d.ts +0 -18
- package/dist/threeds/api.js +1 -8
- package/dist/threeds/base.d.ts +0 -24
- package/dist/threeds/base.js +0 -19
- package/dist/threeds/common.d.ts +4 -35
- package/dist/threeds/common.js +16 -38
- package/dist/threeds/configuration.d.ts +24 -17
- package/dist/threeds/configuration.js +3 -3
- package/dist/threeds-oob/api.d.ts +0 -90
- package/dist/threeds-oob/api.js +2 -9
- package/dist/threeds-oob/base.d.ts +0 -24
- package/dist/threeds-oob/base.js +0 -19
- package/dist/threeds-oob/common.d.ts +4 -35
- package/dist/threeds-oob/common.js +16 -38
- package/dist/threeds-oob/configuration.d.ts +24 -17
- package/dist/threeds-oob/configuration.js +3 -3
- package/dist/transaction-event/api.d.ts +0 -452
- package/dist/transaction-event/api.js +11 -27
- package/dist/transaction-event/base.d.ts +0 -24
- package/dist/transaction-event/base.js +0 -19
- package/dist/transaction-event/common.d.ts +4 -35
- package/dist/transaction-event/common.js +16 -38
- package/dist/transaction-event/configuration.d.ts +24 -17
- package/dist/transaction-event/configuration.js +3 -3
- package/dist/wallet/api.d.ts +0 -342
- package/dist/wallet/api.js +29 -83
- package/dist/wallet/base.d.ts +0 -24
- package/dist/wallet/base.js +0 -19
- package/dist/wallet/common.d.ts +4 -35
- package/dist/wallet/common.js +16 -38
- package/dist/wallet/configuration.d.ts +24 -17
- package/dist/wallet/configuration.js +3 -3
- package/package.json +2 -2
- package/src/authorisation-control/api.ts +11 -314
- package/src/authorisation-control/base.ts +0 -24
- package/src/authorisation-control/common.ts +15 -38
- package/src/authorisation-control/configuration.ts +26 -20
- package/src/card/api.ts +80 -786
- package/src/card/base.ts +0 -24
- package/src/card/common.ts +15 -38
- package/src/card/configuration.ts +26 -20
- package/src/cardholder/api.ts +987 -714
- package/src/cardholder/base.ts +0 -24
- package/src/cardholder/common.ts +15 -38
- package/src/cardholder/configuration.ts +26 -20
- package/src/cards/api.ts +3 -11
- package/src/cards/base.ts +0 -24
- package/src/cards/common.ts +15 -38
- package/src/cards/configuration.ts +26 -20
- package/src/clearing-file-copy/api.ts +13 -510
- package/src/clearing-file-copy/base.ts +0 -24
- package/src/clearing-file-copy/common.ts +15 -38
- package/src/clearing-file-copy/configuration.ts +26 -20
- package/src/exchange-rate/api.ts +615 -0
- package/src/exchange-rate/base.ts +62 -0
- package/src/exchange-rate/common.ts +127 -0
- package/src/exchange-rate/configuration.ts +121 -0
- package/src/exchange-rate/index.ts +18 -0
- package/src/index.ts +1 -0
- package/src/issuer-events/api.ts +661 -628
- package/src/issuer-events/base.ts +0 -24
- package/src/issuer-events/common.ts +15 -38
- package/src/issuer-events/configuration.ts +26 -20
- package/src/pin/api.ts +4 -83
- package/src/pin/base.ts +0 -24
- package/src/pin/common.ts +15 -38
- package/src/pin/configuration.ts +26 -20
- package/src/threeds/api.ts +2 -22
- package/src/threeds/base.ts +0 -24
- package/src/threeds/common.ts +15 -38
- package/src/threeds/configuration.ts +26 -20
- package/src/threeds-oob/api.ts +3 -95
- package/src/threeds-oob/base.ts +0 -24
- package/src/threeds-oob/common.ts +15 -38
- package/src/threeds-oob/configuration.ts +26 -20
- package/src/transaction-event/api.ts +12 -464
- package/src/transaction-event/base.ts +0 -24
- package/src/transaction-event/common.ts +15 -38
- package/src/transaction-event/configuration.ts +26 -20
- package/src/wallet/api.ts +30 -377
- package/src/wallet/base.ts +0 -24
- package/src/wallet/common.ts +15 -38
- package/src/wallet/configuration.ts +26 -20
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Exchange Rates API
|
|
5
|
+
* Endpoint for querying FX rates of payment scheme (including benchmark to ECB FX rates). API enables the issuer to comply with regulation (EU) 2019/518) and provide the cardholder with a better user experience by providing real-time visibility to scheme FX rates that are used for card transactions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1
|
|
8
|
+
* Contact: info@enfuce.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
export const ErrorResponseErrorTypeEnum = {
|
|
30
|
+
StaticValidationError: 'STATIC_VALIDATION_ERROR',
|
|
31
|
+
DynamicValidationError: 'DYNAMIC_VALIDATION_ERROR',
|
|
32
|
+
IntegrationError: 'INTEGRATION_ERROR',
|
|
33
|
+
SecurityError: 'SECURITY_ERROR',
|
|
34
|
+
UnexpectedError: 'UNEXPECTED_ERROR',
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Indicates the applicable payment scheme
|
|
38
|
+
*/
|
|
39
|
+
export const PaymentScheme = {
|
|
40
|
+
Visa: 'VISA',
|
|
41
|
+
Mc: 'MC',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* GetECBExchangeRateApi - axios parameter creator
|
|
45
|
+
*/
|
|
46
|
+
export const GetECBExchangeRateApiAxiosParamCreator = function (configuration) {
|
|
47
|
+
return {
|
|
48
|
+
/**
|
|
49
|
+
* Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
|
|
50
|
+
* @summary ECB Exchange Rates
|
|
51
|
+
* @param {string} fromCurrency
|
|
52
|
+
* @param {string} toCurrency
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
*/
|
|
56
|
+
getEcbRateV1: (fromCurrency_1, toCurrency_1, ...args_1) => __awaiter(this, [fromCurrency_1, toCurrency_1, ...args_1], void 0, function* (fromCurrency, toCurrency, options = {}) {
|
|
57
|
+
// verify required parameter 'fromCurrency' is not null or undefined
|
|
58
|
+
assertParamExists('getEcbRateV1', 'fromCurrency', fromCurrency);
|
|
59
|
+
// verify required parameter 'toCurrency' is not null or undefined
|
|
60
|
+
assertParamExists('getEcbRateV1', 'toCurrency', toCurrency);
|
|
61
|
+
const localVarPath = `/v1/ecb/{fromCurrency}/{toCurrency}`
|
|
62
|
+
.replace('{fromCurrency}', encodeURIComponent(String(fromCurrency)))
|
|
63
|
+
.replace('{toCurrency}', encodeURIComponent(String(toCurrency)));
|
|
64
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
65
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
66
|
+
let baseOptions;
|
|
67
|
+
if (configuration) {
|
|
68
|
+
baseOptions = configuration.baseOptions;
|
|
69
|
+
}
|
|
70
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
71
|
+
const localVarHeaderParameter = {};
|
|
72
|
+
const localVarQueryParameter = {};
|
|
73
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
74
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
77
|
+
return {
|
|
78
|
+
url: toPathString(localVarUrlObj),
|
|
79
|
+
options: localVarRequestOptions,
|
|
80
|
+
};
|
|
81
|
+
}),
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* GetECBExchangeRateApi - functional programming interface
|
|
86
|
+
*/
|
|
87
|
+
export const GetECBExchangeRateApiFp = function (configuration) {
|
|
88
|
+
const localVarAxiosParamCreator = GetECBExchangeRateApiAxiosParamCreator(configuration);
|
|
89
|
+
return {
|
|
90
|
+
/**
|
|
91
|
+
* Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
|
|
92
|
+
* @summary ECB Exchange Rates
|
|
93
|
+
* @param {string} fromCurrency
|
|
94
|
+
* @param {string} toCurrency
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
*/
|
|
98
|
+
getEcbRateV1(fromCurrency, toCurrency, options) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
var _a, _b, _c;
|
|
101
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getEcbRateV1(fromCurrency, toCurrency, options);
|
|
102
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
103
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['GetECBExchangeRateApi.getEcbRateV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
104
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* GetECBExchangeRateApi - factory interface
|
|
111
|
+
*/
|
|
112
|
+
export const GetECBExchangeRateApiFactory = function (configuration, basePath, axios) {
|
|
113
|
+
const localVarFp = GetECBExchangeRateApiFp(configuration);
|
|
114
|
+
return {
|
|
115
|
+
/**
|
|
116
|
+
* Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
|
|
117
|
+
* @summary ECB Exchange Rates
|
|
118
|
+
* @param {string} fromCurrency
|
|
119
|
+
* @param {string} toCurrency
|
|
120
|
+
* @param {*} [options] Override http request option.
|
|
121
|
+
* @throws {RequiredError}
|
|
122
|
+
*/
|
|
123
|
+
getEcbRateV1(fromCurrency, toCurrency, options) {
|
|
124
|
+
return localVarFp.getEcbRateV1(fromCurrency, toCurrency, options).then((request) => request(axios, basePath));
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* GetECBExchangeRateApi - object-oriented interface
|
|
130
|
+
*/
|
|
131
|
+
export class GetECBExchangeRateApi extends BaseAPI {
|
|
132
|
+
/**
|
|
133
|
+
* Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
|
|
134
|
+
* @summary ECB Exchange Rates
|
|
135
|
+
* @param {string} fromCurrency
|
|
136
|
+
* @param {string} toCurrency
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
*/
|
|
140
|
+
getEcbRateV1(fromCurrency, toCurrency, options) {
|
|
141
|
+
return GetECBExchangeRateApiFp(this.configuration).getEcbRateV1(fromCurrency, toCurrency, options).then((request) => request(this.axios, this.basePath));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* GetECBSupportedCurrenciesApi - axios parameter creator
|
|
146
|
+
*/
|
|
147
|
+
export const GetECBSupportedCurrenciesApiAxiosParamCreator = function (configuration) {
|
|
148
|
+
return {
|
|
149
|
+
/**
|
|
150
|
+
* Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
|
|
151
|
+
* @summary ECB Supported Currencies
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
getEcbSupportedCurrenciesV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
156
|
+
const localVarPath = `/v1/ecb/currencies`;
|
|
157
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
158
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
159
|
+
let baseOptions;
|
|
160
|
+
if (configuration) {
|
|
161
|
+
baseOptions = configuration.baseOptions;
|
|
162
|
+
}
|
|
163
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
164
|
+
const localVarHeaderParameter = {};
|
|
165
|
+
const localVarQueryParameter = {};
|
|
166
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
167
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
168
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
169
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
170
|
+
return {
|
|
171
|
+
url: toPathString(localVarUrlObj),
|
|
172
|
+
options: localVarRequestOptions,
|
|
173
|
+
};
|
|
174
|
+
}),
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* GetECBSupportedCurrenciesApi - functional programming interface
|
|
179
|
+
*/
|
|
180
|
+
export const GetECBSupportedCurrenciesApiFp = function (configuration) {
|
|
181
|
+
const localVarAxiosParamCreator = GetECBSupportedCurrenciesApiAxiosParamCreator(configuration);
|
|
182
|
+
return {
|
|
183
|
+
/**
|
|
184
|
+
* Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
|
|
185
|
+
* @summary ECB Supported Currencies
|
|
186
|
+
* @param {*} [options] Override http request option.
|
|
187
|
+
* @throws {RequiredError}
|
|
188
|
+
*/
|
|
189
|
+
getEcbSupportedCurrenciesV1(options) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
var _a, _b, _c;
|
|
192
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getEcbSupportedCurrenciesV1(options);
|
|
193
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
194
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['GetECBSupportedCurrenciesApi.getEcbSupportedCurrenciesV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
195
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* GetECBSupportedCurrenciesApi - factory interface
|
|
202
|
+
*/
|
|
203
|
+
export const GetECBSupportedCurrenciesApiFactory = function (configuration, basePath, axios) {
|
|
204
|
+
const localVarFp = GetECBSupportedCurrenciesApiFp(configuration);
|
|
205
|
+
return {
|
|
206
|
+
/**
|
|
207
|
+
* Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
|
|
208
|
+
* @summary ECB Supported Currencies
|
|
209
|
+
* @param {*} [options] Override http request option.
|
|
210
|
+
* @throws {RequiredError}
|
|
211
|
+
*/
|
|
212
|
+
getEcbSupportedCurrenciesV1(options) {
|
|
213
|
+
return localVarFp.getEcbSupportedCurrenciesV1(options).then((request) => request(axios, basePath));
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* GetECBSupportedCurrenciesApi - object-oriented interface
|
|
219
|
+
*/
|
|
220
|
+
export class GetECBSupportedCurrenciesApi extends BaseAPI {
|
|
221
|
+
/**
|
|
222
|
+
* Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
|
|
223
|
+
* @summary ECB Supported Currencies
|
|
224
|
+
* @param {*} [options] Override http request option.
|
|
225
|
+
* @throws {RequiredError}
|
|
226
|
+
*/
|
|
227
|
+
getEcbSupportedCurrenciesV1(options) {
|
|
228
|
+
return GetECBSupportedCurrenciesApiFp(this.configuration).getEcbSupportedCurrenciesV1(options).then((request) => request(this.axios, this.basePath));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* GetFXExchangeRatesApi - axios parameter creator
|
|
233
|
+
*/
|
|
234
|
+
export const GetFXExchangeRatesApiAxiosParamCreator = function (configuration) {
|
|
235
|
+
return {
|
|
236
|
+
/**
|
|
237
|
+
* Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
|
|
238
|
+
* @summary FX Exchange Rates for Visa and Mastercard
|
|
239
|
+
* @param {PaymentScheme} paymentScheme Payment scheme
|
|
240
|
+
* @param {GetFxRatesV2Request} getFxRatesV2Request
|
|
241
|
+
* @param {*} [options] Override http request option.
|
|
242
|
+
* @throws {RequiredError}
|
|
243
|
+
*/
|
|
244
|
+
getSchemeFxRatesV2: (paymentScheme_1, getFxRatesV2Request_1, ...args_1) => __awaiter(this, [paymentScheme_1, getFxRatesV2Request_1, ...args_1], void 0, function* (paymentScheme, getFxRatesV2Request, options = {}) {
|
|
245
|
+
// verify required parameter 'paymentScheme' is not null or undefined
|
|
246
|
+
assertParamExists('getSchemeFxRatesV2', 'paymentScheme', paymentScheme);
|
|
247
|
+
// verify required parameter 'getFxRatesV2Request' is not null or undefined
|
|
248
|
+
assertParamExists('getSchemeFxRatesV2', 'getFxRatesV2Request', getFxRatesV2Request);
|
|
249
|
+
const localVarPath = `/v2/{paymentScheme}/fx`
|
|
250
|
+
.replace('{paymentScheme}', encodeURIComponent(String(paymentScheme)));
|
|
251
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
252
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
253
|
+
let baseOptions;
|
|
254
|
+
if (configuration) {
|
|
255
|
+
baseOptions = configuration.baseOptions;
|
|
256
|
+
}
|
|
257
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
258
|
+
const localVarHeaderParameter = {};
|
|
259
|
+
const localVarQueryParameter = {};
|
|
260
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
261
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
262
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
263
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
264
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
265
|
+
localVarRequestOptions.data = serializeDataIfNeeded(getFxRatesV2Request, localVarRequestOptions, configuration);
|
|
266
|
+
return {
|
|
267
|
+
url: toPathString(localVarUrlObj),
|
|
268
|
+
options: localVarRequestOptions,
|
|
269
|
+
};
|
|
270
|
+
}),
|
|
271
|
+
/**
|
|
272
|
+
* This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
|
|
273
|
+
* @summary VISA FX Exchange Rates
|
|
274
|
+
* @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @deprecated
|
|
277
|
+
* @throws {RequiredError}
|
|
278
|
+
*/
|
|
279
|
+
getVisaFxRatesV1: (getVisaFxRatesV1Request_1, ...args_1) => __awaiter(this, [getVisaFxRatesV1Request_1, ...args_1], void 0, function* (getVisaFxRatesV1Request, options = {}) {
|
|
280
|
+
// verify required parameter 'getVisaFxRatesV1Request' is not null or undefined
|
|
281
|
+
assertParamExists('getVisaFxRatesV1', 'getVisaFxRatesV1Request', getVisaFxRatesV1Request);
|
|
282
|
+
const localVarPath = `/v1/visa/fx`;
|
|
283
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
284
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
285
|
+
let baseOptions;
|
|
286
|
+
if (configuration) {
|
|
287
|
+
baseOptions = configuration.baseOptions;
|
|
288
|
+
}
|
|
289
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
290
|
+
const localVarHeaderParameter = {};
|
|
291
|
+
const localVarQueryParameter = {};
|
|
292
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
293
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
294
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
295
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
296
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
297
|
+
localVarRequestOptions.data = serializeDataIfNeeded(getVisaFxRatesV1Request, localVarRequestOptions, configuration);
|
|
298
|
+
return {
|
|
299
|
+
url: toPathString(localVarUrlObj),
|
|
300
|
+
options: localVarRequestOptions,
|
|
301
|
+
};
|
|
302
|
+
}),
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* GetFXExchangeRatesApi - functional programming interface
|
|
307
|
+
*/
|
|
308
|
+
export const GetFXExchangeRatesApiFp = function (configuration) {
|
|
309
|
+
const localVarAxiosParamCreator = GetFXExchangeRatesApiAxiosParamCreator(configuration);
|
|
310
|
+
return {
|
|
311
|
+
/**
|
|
312
|
+
* Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
|
|
313
|
+
* @summary FX Exchange Rates for Visa and Mastercard
|
|
314
|
+
* @param {PaymentScheme} paymentScheme Payment scheme
|
|
315
|
+
* @param {GetFxRatesV2Request} getFxRatesV2Request
|
|
316
|
+
* @param {*} [options] Override http request option.
|
|
317
|
+
* @throws {RequiredError}
|
|
318
|
+
*/
|
|
319
|
+
getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
var _a, _b, _c;
|
|
322
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options);
|
|
323
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
324
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['GetFXExchangeRatesApi.getSchemeFxRatesV2']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
325
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
326
|
+
});
|
|
327
|
+
},
|
|
328
|
+
/**
|
|
329
|
+
* This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
|
|
330
|
+
* @summary VISA FX Exchange Rates
|
|
331
|
+
* @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @deprecated
|
|
334
|
+
* @throws {RequiredError}
|
|
335
|
+
*/
|
|
336
|
+
getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
|
|
337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
var _a, _b, _c;
|
|
339
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getVisaFxRatesV1(getVisaFxRatesV1Request, options);
|
|
340
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
341
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['GetFXExchangeRatesApi.getVisaFxRatesV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
342
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
343
|
+
});
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* GetFXExchangeRatesApi - factory interface
|
|
349
|
+
*/
|
|
350
|
+
export const GetFXExchangeRatesApiFactory = function (configuration, basePath, axios) {
|
|
351
|
+
const localVarFp = GetFXExchangeRatesApiFp(configuration);
|
|
352
|
+
return {
|
|
353
|
+
/**
|
|
354
|
+
* Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
|
|
355
|
+
* @summary FX Exchange Rates for Visa and Mastercard
|
|
356
|
+
* @param {PaymentScheme} paymentScheme Payment scheme
|
|
357
|
+
* @param {GetFxRatesV2Request} getFxRatesV2Request
|
|
358
|
+
* @param {*} [options] Override http request option.
|
|
359
|
+
* @throws {RequiredError}
|
|
360
|
+
*/
|
|
361
|
+
getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
|
|
362
|
+
return localVarFp.getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options).then((request) => request(axios, basePath));
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
|
|
366
|
+
* @summary VISA FX Exchange Rates
|
|
367
|
+
* @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @deprecated
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
|
|
373
|
+
return localVarFp.getVisaFxRatesV1(getVisaFxRatesV1Request, options).then((request) => request(axios, basePath));
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* GetFXExchangeRatesApi - object-oriented interface
|
|
379
|
+
*/
|
|
380
|
+
export class GetFXExchangeRatesApi extends BaseAPI {
|
|
381
|
+
/**
|
|
382
|
+
* Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
|
|
383
|
+
* @summary FX Exchange Rates for Visa and Mastercard
|
|
384
|
+
* @param {PaymentScheme} paymentScheme Payment scheme
|
|
385
|
+
* @param {GetFxRatesV2Request} getFxRatesV2Request
|
|
386
|
+
* @param {*} [options] Override http request option.
|
|
387
|
+
* @throws {RequiredError}
|
|
388
|
+
*/
|
|
389
|
+
getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
|
|
390
|
+
return GetFXExchangeRatesApiFp(this.configuration).getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options).then((request) => request(this.axios, this.basePath));
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
|
|
394
|
+
* @summary VISA FX Exchange Rates
|
|
395
|
+
* @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @deprecated
|
|
398
|
+
* @throws {RequiredError}
|
|
399
|
+
*/
|
|
400
|
+
getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
|
|
401
|
+
return GetFXExchangeRatesApiFp(this.configuration).getVisaFxRatesV1(getVisaFxRatesV1Request, options).then((request) => request(this.axios, this.basePath));
|
|
402
|
+
}
|
|
403
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exchange Rates API
|
|
3
|
+
* Endpoint for querying FX rates of payment scheme (including benchmark to ECB FX rates). API enables the issuer to comply with regulation (EU) 2019/518) and provide the cardholder with a better user experience by providing real-time visibility to scheme FX rates that are used for card transactions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1
|
|
6
|
+
* Contact: info@enfuce.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
export declare const COLLECTION_FORMATS: {
|
|
16
|
+
csv: string;
|
|
17
|
+
ssv: string;
|
|
18
|
+
tsv: string;
|
|
19
|
+
pipes: string;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestArgs {
|
|
22
|
+
url: string;
|
|
23
|
+
options: RawAxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class BaseAPI {
|
|
26
|
+
protected basePath: string;
|
|
27
|
+
protected axios: AxiosInstance;
|
|
28
|
+
protected configuration: Configuration | undefined;
|
|
29
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
30
|
+
}
|
|
31
|
+
export declare class RequiredError extends Error {
|
|
32
|
+
field: string;
|
|
33
|
+
constructor(field: string, msg?: string);
|
|
34
|
+
}
|
|
35
|
+
interface ServerMap {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare const operationServerMap: ServerMap;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Exchange Rates API
|
|
5
|
+
* Endpoint for querying FX rates of payment scheme (including benchmark to ECB FX rates). API enables the issuer to comply with regulation (EU) 2019/518) and provide the cardholder with a better user experience by providing real-time visibility to scheme FX rates that are used for card transactions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1
|
|
8
|
+
* Contact: info@enfuce.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
16
|
+
export const COLLECTION_FORMATS = {
|
|
17
|
+
csv: ",",
|
|
18
|
+
ssv: " ",
|
|
19
|
+
tsv: "\t",
|
|
20
|
+
pipes: "|",
|
|
21
|
+
};
|
|
22
|
+
export class BaseAPI {
|
|
23
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
24
|
+
var _a;
|
|
25
|
+
this.basePath = basePath;
|
|
26
|
+
this.axios = axios;
|
|
27
|
+
if (configuration) {
|
|
28
|
+
this.configuration = configuration;
|
|
29
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
;
|
|
34
|
+
export class RequiredError extends Error {
|
|
35
|
+
constructor(field, msg) {
|
|
36
|
+
super(msg);
|
|
37
|
+
this.field = field;
|
|
38
|
+
this.name = "RequiredError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const operationServerMap = {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exchange Rates API
|
|
3
|
+
* Endpoint for querying FX rates of payment scheme (including benchmark to ECB FX rates). API enables the issuer to comply with regulation (EU) 2019/518) and provide the cardholder with a better user experience by providing real-time visibility to scheme FX rates that are used for card transactions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1
|
|
6
|
+
* Contact: info@enfuce.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @throws {RequiredError}
|
|
19
|
+
*/
|
|
20
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
21
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
22
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
23
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
24
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
25
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
28
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
29
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
30
|
+
*/
|
|
31
|
+
export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
|
|
32
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
33
|
+
export declare const toPathString: (url: URL) => string;
|
|
34
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Exchange Rates API
|
|
5
|
+
* Endpoint for querying FX rates of payment scheme (including benchmark to ECB FX rates). API enables the issuer to comply with regulation (EU) 2019/518) and provide the cardholder with a better user experience by providing real-time visibility to scheme FX rates that are used for card transactions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1
|
|
8
|
+
* Contact: info@enfuce.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import { RequiredError } from "./base";
|
|
24
|
+
export const DUMMY_BASE_URL = 'https://example.com';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
*/
|
|
29
|
+
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
30
|
+
if (paramValue === null || paramValue === undefined) {
|
|
31
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (configuration && configuration.apiKey) {
|
|
37
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
38
|
+
? yield configuration.apiKey(keyParamName)
|
|
39
|
+
: yield configuration.apiKey;
|
|
40
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export const setBasicAuthToObject = function (object, configuration) {
|
|
45
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
46
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const setBearerAuthToObject = function (object, configuration) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
if (configuration && configuration.accessToken) {
|
|
52
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
53
|
+
? yield configuration.accessToken()
|
|
54
|
+
: yield configuration.accessToken;
|
|
55
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
export const setOAuthToObject = function (object, name, scopes, configuration) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
if (configuration && configuration.accessToken) {
|
|
62
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
63
|
+
? yield configuration.accessToken(name, scopes)
|
|
64
|
+
: yield configuration.accessToken;
|
|
65
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
70
|
+
if (parameter == null)
|
|
71
|
+
return;
|
|
72
|
+
if (typeof parameter === "object") {
|
|
73
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
74
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (urlSearchParams.has(key)) {
|
|
82
|
+
urlSearchParams.append(key, parameter);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
urlSearchParams.set(key, parameter);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export const setSearchParams = function (url, ...objects) {
|
|
90
|
+
const searchParams = new URLSearchParams(url.search);
|
|
91
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
92
|
+
url.search = searchParams.toString();
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
98
|
+
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function (key, value) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
109
|
+
const nonString = typeof value !== 'string';
|
|
110
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
111
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
112
|
+
: nonString;
|
|
113
|
+
return needsSerialization
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
115
|
+
: (value || "");
|
|
116
|
+
};
|
|
117
|
+
export const toPathString = function (url) {
|
|
118
|
+
return url.pathname + url.search + url.hash;
|
|
119
|
+
};
|
|
120
|
+
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
121
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
122
|
+
var _a;
|
|
123
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
|
|
124
|
+
return axios.request(axiosRequestArgs);
|
|
125
|
+
};
|
|
126
|
+
};
|