@enfuce/nextgen-sdk 0.0.3 → 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.
@@ -0,0 +1,418 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Exchange Rates API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1
9
+ * Contact: info@enfuce.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.GetFXExchangeRatesApi = exports.GetFXExchangeRatesApiFactory = exports.GetFXExchangeRatesApiFp = exports.GetFXExchangeRatesApiAxiosParamCreator = exports.GetECBSupportedCurrenciesApi = exports.GetECBSupportedCurrenciesApiFactory = exports.GetECBSupportedCurrenciesApiFp = exports.GetECBSupportedCurrenciesApiAxiosParamCreator = exports.GetECBExchangeRateApi = exports.GetECBExchangeRateApiFactory = exports.GetECBExchangeRateApiFp = exports.GetECBExchangeRateApiAxiosParamCreator = exports.PaymentScheme = exports.ErrorResponseErrorTypeEnum = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("./common");
30
+ // @ts-ignore
31
+ const base_1 = require("./base");
32
+ exports.ErrorResponseErrorTypeEnum = {
33
+ StaticValidationError: 'STATIC_VALIDATION_ERROR',
34
+ DynamicValidationError: 'DYNAMIC_VALIDATION_ERROR',
35
+ IntegrationError: 'INTEGRATION_ERROR',
36
+ SecurityError: 'SECURITY_ERROR',
37
+ UnexpectedError: 'UNEXPECTED_ERROR',
38
+ };
39
+ /**
40
+ * Indicates the applicable payment scheme
41
+ */
42
+ exports.PaymentScheme = {
43
+ Visa: 'VISA',
44
+ Mc: 'MC',
45
+ };
46
+ /**
47
+ * GetECBExchangeRateApi - axios parameter creator
48
+ */
49
+ const GetECBExchangeRateApiAxiosParamCreator = function (configuration) {
50
+ return {
51
+ /**
52
+ * Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
53
+ * @summary ECB Exchange Rates
54
+ * @param {string} fromCurrency
55
+ * @param {string} toCurrency
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ */
59
+ getEcbRateV1: (fromCurrency_1, toCurrency_1, ...args_1) => __awaiter(this, [fromCurrency_1, toCurrency_1, ...args_1], void 0, function* (fromCurrency, toCurrency, options = {}) {
60
+ // verify required parameter 'fromCurrency' is not null or undefined
61
+ (0, common_1.assertParamExists)('getEcbRateV1', 'fromCurrency', fromCurrency);
62
+ // verify required parameter 'toCurrency' is not null or undefined
63
+ (0, common_1.assertParamExists)('getEcbRateV1', 'toCurrency', toCurrency);
64
+ const localVarPath = `/v1/ecb/{fromCurrency}/{toCurrency}`
65
+ .replace('{fromCurrency}', encodeURIComponent(String(fromCurrency)))
66
+ .replace('{toCurrency}', encodeURIComponent(String(toCurrency)));
67
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
68
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
69
+ let baseOptions;
70
+ if (configuration) {
71
+ baseOptions = configuration.baseOptions;
72
+ }
73
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
74
+ const localVarHeaderParameter = {};
75
+ const localVarQueryParameter = {};
76
+ localVarHeaderParameter['Accept'] = 'application/json';
77
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
80
+ return {
81
+ url: (0, common_1.toPathString)(localVarUrlObj),
82
+ options: localVarRequestOptions,
83
+ };
84
+ }),
85
+ };
86
+ };
87
+ exports.GetECBExchangeRateApiAxiosParamCreator = GetECBExchangeRateApiAxiosParamCreator;
88
+ /**
89
+ * GetECBExchangeRateApi - functional programming interface
90
+ */
91
+ const GetECBExchangeRateApiFp = function (configuration) {
92
+ const localVarAxiosParamCreator = (0, exports.GetECBExchangeRateApiAxiosParamCreator)(configuration);
93
+ return {
94
+ /**
95
+ * Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
96
+ * @summary ECB Exchange Rates
97
+ * @param {string} fromCurrency
98
+ * @param {string} toCurrency
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ getEcbRateV1(fromCurrency, toCurrency, options) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ var _a, _b, _c;
105
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getEcbRateV1(fromCurrency, toCurrency, options);
106
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
107
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetECBExchangeRateApi.getEcbRateV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
108
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
109
+ });
110
+ },
111
+ };
112
+ };
113
+ exports.GetECBExchangeRateApiFp = GetECBExchangeRateApiFp;
114
+ /**
115
+ * GetECBExchangeRateApi - factory interface
116
+ */
117
+ const GetECBExchangeRateApiFactory = function (configuration, basePath, axios) {
118
+ const localVarFp = (0, exports.GetECBExchangeRateApiFp)(configuration);
119
+ return {
120
+ /**
121
+ * Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
122
+ * @summary ECB Exchange Rates
123
+ * @param {string} fromCurrency
124
+ * @param {string} toCurrency
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ */
128
+ getEcbRateV1(fromCurrency, toCurrency, options) {
129
+ return localVarFp.getEcbRateV1(fromCurrency, toCurrency, options).then((request) => request(axios, basePath));
130
+ },
131
+ };
132
+ };
133
+ exports.GetECBExchangeRateApiFactory = GetECBExchangeRateApiFactory;
134
+ /**
135
+ * GetECBExchangeRateApi - object-oriented interface
136
+ */
137
+ class GetECBExchangeRateApi extends base_1.BaseAPI {
138
+ /**
139
+ * Send a request to this endpoint to get ECB rate for a given “from” and “to” currency pair.
140
+ * @summary ECB Exchange Rates
141
+ * @param {string} fromCurrency
142
+ * @param {string} toCurrency
143
+ * @param {*} [options] Override http request option.
144
+ * @throws {RequiredError}
145
+ */
146
+ getEcbRateV1(fromCurrency, toCurrency, options) {
147
+ return (0, exports.GetECBExchangeRateApiFp)(this.configuration).getEcbRateV1(fromCurrency, toCurrency, options).then((request) => request(this.axios, this.basePath));
148
+ }
149
+ }
150
+ exports.GetECBExchangeRateApi = GetECBExchangeRateApi;
151
+ /**
152
+ * GetECBSupportedCurrenciesApi - axios parameter creator
153
+ */
154
+ const GetECBSupportedCurrenciesApiAxiosParamCreator = function (configuration) {
155
+ return {
156
+ /**
157
+ * Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
158
+ * @summary ECB Supported Currencies
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ getEcbSupportedCurrenciesV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
163
+ const localVarPath = `/v1/ecb/currencies`;
164
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
165
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
166
+ let baseOptions;
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ }
170
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
171
+ const localVarHeaderParameter = {};
172
+ const localVarQueryParameter = {};
173
+ localVarHeaderParameter['Accept'] = 'application/json';
174
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
175
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
176
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
177
+ return {
178
+ url: (0, common_1.toPathString)(localVarUrlObj),
179
+ options: localVarRequestOptions,
180
+ };
181
+ }),
182
+ };
183
+ };
184
+ exports.GetECBSupportedCurrenciesApiAxiosParamCreator = GetECBSupportedCurrenciesApiAxiosParamCreator;
185
+ /**
186
+ * GetECBSupportedCurrenciesApi - functional programming interface
187
+ */
188
+ const GetECBSupportedCurrenciesApiFp = function (configuration) {
189
+ const localVarAxiosParamCreator = (0, exports.GetECBSupportedCurrenciesApiAxiosParamCreator)(configuration);
190
+ return {
191
+ /**
192
+ * Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
193
+ * @summary ECB Supported Currencies
194
+ * @param {*} [options] Override http request option.
195
+ * @throws {RequiredError}
196
+ */
197
+ getEcbSupportedCurrenciesV1(options) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ var _a, _b, _c;
200
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getEcbSupportedCurrenciesV1(options);
201
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
202
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetECBSupportedCurrenciesApi.getEcbSupportedCurrenciesV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
203
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
204
+ });
205
+ },
206
+ };
207
+ };
208
+ exports.GetECBSupportedCurrenciesApiFp = GetECBSupportedCurrenciesApiFp;
209
+ /**
210
+ * GetECBSupportedCurrenciesApi - factory interface
211
+ */
212
+ const GetECBSupportedCurrenciesApiFactory = function (configuration, basePath, axios) {
213
+ const localVarFp = (0, exports.GetECBSupportedCurrenciesApiFp)(configuration);
214
+ return {
215
+ /**
216
+ * Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
217
+ * @summary ECB Supported Currencies
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ getEcbSupportedCurrenciesV1(options) {
222
+ return localVarFp.getEcbSupportedCurrenciesV1(options).then((request) => request(axios, basePath));
223
+ },
224
+ };
225
+ };
226
+ exports.GetECBSupportedCurrenciesApiFactory = GetECBSupportedCurrenciesApiFactory;
227
+ /**
228
+ * GetECBSupportedCurrenciesApi - object-oriented interface
229
+ */
230
+ class GetECBSupportedCurrenciesApi extends base_1.BaseAPI {
231
+ /**
232
+ * Send a request to this endpoint to retrieve the list of currencies that the ECB supports.
233
+ * @summary ECB Supported Currencies
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ */
237
+ getEcbSupportedCurrenciesV1(options) {
238
+ return (0, exports.GetECBSupportedCurrenciesApiFp)(this.configuration).getEcbSupportedCurrenciesV1(options).then((request) => request(this.axios, this.basePath));
239
+ }
240
+ }
241
+ exports.GetECBSupportedCurrenciesApi = GetECBSupportedCurrenciesApi;
242
+ /**
243
+ * GetFXExchangeRatesApi - axios parameter creator
244
+ */
245
+ const GetFXExchangeRatesApiAxiosParamCreator = function (configuration) {
246
+ return {
247
+ /**
248
+ * Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
249
+ * @summary FX Exchange Rates for Visa and Mastercard
250
+ * @param {PaymentScheme} paymentScheme Payment scheme
251
+ * @param {GetFxRatesV2Request} getFxRatesV2Request
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ getSchemeFxRatesV2: (paymentScheme_1, getFxRatesV2Request_1, ...args_1) => __awaiter(this, [paymentScheme_1, getFxRatesV2Request_1, ...args_1], void 0, function* (paymentScheme, getFxRatesV2Request, options = {}) {
256
+ // verify required parameter 'paymentScheme' is not null or undefined
257
+ (0, common_1.assertParamExists)('getSchemeFxRatesV2', 'paymentScheme', paymentScheme);
258
+ // verify required parameter 'getFxRatesV2Request' is not null or undefined
259
+ (0, common_1.assertParamExists)('getSchemeFxRatesV2', 'getFxRatesV2Request', getFxRatesV2Request);
260
+ const localVarPath = `/v2/{paymentScheme}/fx`
261
+ .replace('{paymentScheme}', encodeURIComponent(String(paymentScheme)));
262
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
263
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ let baseOptions;
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ }
268
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
269
+ const localVarHeaderParameter = {};
270
+ const localVarQueryParameter = {};
271
+ localVarHeaderParameter['Content-Type'] = 'application/json';
272
+ localVarHeaderParameter['Accept'] = 'application/json';
273
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
274
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
275
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
276
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getFxRatesV2Request, localVarRequestOptions, configuration);
277
+ return {
278
+ url: (0, common_1.toPathString)(localVarUrlObj),
279
+ options: localVarRequestOptions,
280
+ };
281
+ }),
282
+ /**
283
+ * This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
284
+ * @summary VISA FX Exchange Rates
285
+ * @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
286
+ * @param {*} [options] Override http request option.
287
+ * @deprecated
288
+ * @throws {RequiredError}
289
+ */
290
+ getVisaFxRatesV1: (getVisaFxRatesV1Request_1, ...args_1) => __awaiter(this, [getVisaFxRatesV1Request_1, ...args_1], void 0, function* (getVisaFxRatesV1Request, options = {}) {
291
+ // verify required parameter 'getVisaFxRatesV1Request' is not null or undefined
292
+ (0, common_1.assertParamExists)('getVisaFxRatesV1', 'getVisaFxRatesV1Request', getVisaFxRatesV1Request);
293
+ const localVarPath = `/v1/visa/fx`;
294
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
295
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
296
+ let baseOptions;
297
+ if (configuration) {
298
+ baseOptions = configuration.baseOptions;
299
+ }
300
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
301
+ const localVarHeaderParameter = {};
302
+ const localVarQueryParameter = {};
303
+ localVarHeaderParameter['Content-Type'] = 'application/json';
304
+ localVarHeaderParameter['Accept'] = 'application/json';
305
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getVisaFxRatesV1Request, localVarRequestOptions, configuration);
309
+ return {
310
+ url: (0, common_1.toPathString)(localVarUrlObj),
311
+ options: localVarRequestOptions,
312
+ };
313
+ }),
314
+ };
315
+ };
316
+ exports.GetFXExchangeRatesApiAxiosParamCreator = GetFXExchangeRatesApiAxiosParamCreator;
317
+ /**
318
+ * GetFXExchangeRatesApi - functional programming interface
319
+ */
320
+ const GetFXExchangeRatesApiFp = function (configuration) {
321
+ const localVarAxiosParamCreator = (0, exports.GetFXExchangeRatesApiAxiosParamCreator)(configuration);
322
+ return {
323
+ /**
324
+ * Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
325
+ * @summary FX Exchange Rates for Visa and Mastercard
326
+ * @param {PaymentScheme} paymentScheme Payment scheme
327
+ * @param {GetFxRatesV2Request} getFxRatesV2Request
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
332
+ return __awaiter(this, void 0, void 0, function* () {
333
+ var _a, _b, _c;
334
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options);
335
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
336
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetFXExchangeRatesApi.getSchemeFxRatesV2']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
337
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
338
+ });
339
+ },
340
+ /**
341
+ * This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
342
+ * @summary VISA FX Exchange Rates
343
+ * @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
344
+ * @param {*} [options] Override http request option.
345
+ * @deprecated
346
+ * @throws {RequiredError}
347
+ */
348
+ getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
349
+ return __awaiter(this, void 0, void 0, function* () {
350
+ var _a, _b, _c;
351
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getVisaFxRatesV1(getVisaFxRatesV1Request, options);
352
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
353
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetFXExchangeRatesApi.getVisaFxRatesV1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
354
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
355
+ });
356
+ },
357
+ };
358
+ };
359
+ exports.GetFXExchangeRatesApiFp = GetFXExchangeRatesApiFp;
360
+ /**
361
+ * GetFXExchangeRatesApi - factory interface
362
+ */
363
+ const GetFXExchangeRatesApiFactory = function (configuration, basePath, axios) {
364
+ const localVarFp = (0, exports.GetFXExchangeRatesApiFp)(configuration);
365
+ return {
366
+ /**
367
+ * Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
368
+ * @summary FX Exchange Rates for Visa and Mastercard
369
+ * @param {PaymentScheme} paymentScheme Payment scheme
370
+ * @param {GetFxRatesV2Request} getFxRatesV2Request
371
+ * @param {*} [options] Override http request option.
372
+ * @throws {RequiredError}
373
+ */
374
+ getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
375
+ return localVarFp.getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options).then((request) => request(axios, basePath));
376
+ },
377
+ /**
378
+ * This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
379
+ * @summary VISA FX Exchange Rates
380
+ * @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
381
+ * @param {*} [options] Override http request option.
382
+ * @deprecated
383
+ * @throws {RequiredError}
384
+ */
385
+ getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
386
+ return localVarFp.getVisaFxRatesV1(getVisaFxRatesV1Request, options).then((request) => request(axios, basePath));
387
+ },
388
+ };
389
+ };
390
+ exports.GetFXExchangeRatesApiFactory = GetFXExchangeRatesApiFactory;
391
+ /**
392
+ * GetFXExchangeRatesApi - object-oriented interface
393
+ */
394
+ class GetFXExchangeRatesApi extends base_1.BaseAPI {
395
+ /**
396
+ * Send a request to this endpoint to retrieve the Visa/Mastercard treasury FX rates for a given “from” and “to” currency pair.
397
+ * @summary FX Exchange Rates for Visa and Mastercard
398
+ * @param {PaymentScheme} paymentScheme Payment scheme
399
+ * @param {GetFxRatesV2Request} getFxRatesV2Request
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options) {
404
+ return (0, exports.GetFXExchangeRatesApiFp)(this.configuration).getSchemeFxRatesV2(paymentScheme, getFxRatesV2Request, options).then((request) => request(this.axios, this.basePath));
405
+ }
406
+ /**
407
+ * This operation is to get the VISA treasury FX rates for a given “from” and “to” currency pair.
408
+ * @summary VISA FX Exchange Rates
409
+ * @param {GetVisaFxRatesV1Request} getVisaFxRatesV1Request
410
+ * @param {*} [options] Override http request option.
411
+ * @deprecated
412
+ * @throws {RequiredError}
413
+ */
414
+ getVisaFxRatesV1(getVisaFxRatesV1Request, options) {
415
+ return (0, exports.GetFXExchangeRatesApiFp)(this.configuration).getVisaFxRatesV1(getVisaFxRatesV1Request, options).then((request) => request(this.axios, this.basePath));
416
+ }
417
+ }
418
+ exports.GetFXExchangeRatesApi = GetFXExchangeRatesApi;
@@ -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,46 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Exchange Rates API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1
9
+ * Contact: info@enfuce.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
+ const axios_1 = require("axios");
18
+ exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
19
+ exports.COLLECTION_FORMATS = {
20
+ csv: ",",
21
+ ssv: " ",
22
+ tsv: "\t",
23
+ pipes: "|",
24
+ };
25
+ class BaseAPI {
26
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
27
+ var _a;
28
+ this.basePath = basePath;
29
+ this.axios = axios;
30
+ if (configuration) {
31
+ this.configuration = configuration;
32
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
33
+ }
34
+ }
35
+ }
36
+ exports.BaseAPI = BaseAPI;
37
+ ;
38
+ class RequiredError extends Error {
39
+ constructor(field, msg) {
40
+ super(msg);
41
+ this.field = field;
42
+ this.name = "RequiredError";
43
+ }
44
+ }
45
+ exports.RequiredError = RequiredError;
46
+ exports.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>;