@emilgroup/payment-sdk-node 1.8.2 → 1.12.1

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.
Files changed (91) hide show
  1. package/.openapi-generator/FILES +17 -2
  2. package/README.md +2 -2
  3. package/api/bank-accounts-api.ts +4 -4
  4. package/api/bank-transaction-api.ts +569 -0
  5. package/api/payment-methods-api.ts +4 -4
  6. package/api/payment-reminders-api.ts +12 -10
  7. package/api/payments-api.ts +4 -4
  8. package/api/refunds-api.ts +464 -0
  9. package/api/tenant-bank-account-api.ts +655 -0
  10. package/api.ts +6 -2
  11. package/dist/api/bank-accounts-api.d.ts +4 -4
  12. package/dist/api/bank-accounts-api.js +3 -3
  13. package/dist/api/bank-transaction-api.d.ts +318 -0
  14. package/dist/api/bank-transaction-api.js +543 -0
  15. package/dist/api/payment-methods-api.d.ts +4 -4
  16. package/dist/api/payment-methods-api.js +3 -3
  17. package/dist/api/payment-reminders-api.d.ts +12 -11
  18. package/dist/api/payment-reminders-api.js +7 -7
  19. package/dist/api/payments-api.d.ts +4 -4
  20. package/dist/api/payments-api.js +3 -3
  21. package/dist/api/refunds-api.d.ts +260 -0
  22. package/dist/api/refunds-api.js +445 -0
  23. package/dist/api/tenant-bank-account-api.d.ts +361 -0
  24. package/dist/api/tenant-bank-account-api.js +620 -0
  25. package/dist/api.d.ts +3 -1
  26. package/dist/api.js +3 -1
  27. package/dist/models/bank-transaction-response-class.d.ts +122 -0
  28. package/dist/models/create-payment-reminder-request-dto.d.ts +2 -0
  29. package/dist/models/create-payment-reminder-request-dto.js +3 -1
  30. package/dist/models/create-payment-request-dto.d.ts +3 -3
  31. package/dist/models/create-refund-request-dto.d.ts +24 -0
  32. package/dist/models/create-refund-request-dto.js +15 -0
  33. package/dist/models/create-refund-response-class.d.ts +25 -0
  34. package/dist/models/create-refund-response-class.js +15 -0
  35. package/dist/models/create-tenant-bank-account-request-dto.d.ts +42 -0
  36. package/dist/models/create-tenant-bank-account-request-dto.js +15 -0
  37. package/dist/models/deactivate-payment-reminder-response-class.d.ts +25 -0
  38. package/dist/models/deactivate-payment-reminder-response-class.js +15 -0
  39. package/dist/models/get-bank-transactions-response-class.d.ts +25 -0
  40. package/dist/models/get-bank-transactions-response-class.js +15 -0
  41. package/dist/models/{validate-pspconfig-response-class.d.ts → get-refund-response-class.d.ts} +7 -6
  42. package/dist/models/get-refund-response-class.js +15 -0
  43. package/dist/models/get-tenant-bank-account-response-class.d.ts +25 -0
  44. package/dist/models/get-tenant-bank-account-response-class.js +15 -0
  45. package/dist/models/index.d.ts +14 -1
  46. package/dist/models/index.js +14 -1
  47. package/dist/models/inline-response200.d.ts +6 -6
  48. package/dist/models/inline-response503.d.ts +6 -6
  49. package/dist/models/link-bank-transaction-request-dto.d.ts +30 -0
  50. package/dist/models/link-bank-transaction-request-dto.js +15 -0
  51. package/dist/models/list-bank-transactions-response-class.d.ts +31 -0
  52. package/dist/models/list-bank-transactions-response-class.js +15 -0
  53. package/dist/models/list-refunds-response-class.d.ts +31 -0
  54. package/dist/models/list-refunds-response-class.js +15 -0
  55. package/dist/models/payment-class.d.ts +1 -1
  56. package/dist/models/payment-method-class.d.ts +8 -2
  57. package/dist/models/payment-reminder-class.d.ts +4 -0
  58. package/dist/models/payment-reminder-class.js +6 -2
  59. package/dist/models/refund-class.d.ts +104 -0
  60. package/dist/models/refund-class.js +28 -0
  61. package/dist/models/tenant-bank-account-response-class.d.ts +66 -0
  62. package/dist/models/tenant-bank-account-response-class.js +15 -0
  63. package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +36 -0
  64. package/dist/models/update-tenant-bank-account-rest-request-dto.js +15 -0
  65. package/models/bank-transaction-response-class.ts +128 -0
  66. package/models/create-payment-reminder-request-dto.ts +3 -1
  67. package/models/create-payment-request-dto.ts +3 -3
  68. package/models/create-refund-request-dto.ts +30 -0
  69. package/models/create-refund-response-class.ts +31 -0
  70. package/models/create-tenant-bank-account-request-dto.ts +48 -0
  71. package/models/deactivate-payment-reminder-response-class.ts +31 -0
  72. package/models/get-bank-transactions-response-class.ts +31 -0
  73. package/models/{validate-pspconfig-response-class.ts → get-refund-response-class.ts} +7 -6
  74. package/models/get-tenant-bank-account-response-class.ts +31 -0
  75. package/models/index.ts +14 -1
  76. package/models/inline-response200.ts +6 -6
  77. package/models/inline-response503.ts +6 -6
  78. package/models/link-bank-transaction-request-dto.ts +36 -0
  79. package/models/list-bank-transactions-response-class.ts +37 -0
  80. package/models/list-refunds-response-class.ts +37 -0
  81. package/models/payment-class.ts +1 -1
  82. package/models/payment-method-class.ts +8 -2
  83. package/models/payment-reminder-class.ts +6 -2
  84. package/models/refund-class.ts +114 -0
  85. package/models/tenant-bank-account-response-class.ts +72 -0
  86. package/models/update-tenant-bank-account-rest-request-dto.ts +42 -0
  87. package/package.json +1 -1
  88. package/api/payment-service-providers-api.ts +0 -165
  89. package/dist/api/payment-service-providers-api.d.ts +0 -93
  90. package/dist/api/payment-service-providers-api.js +0 -224
  91. /package/dist/models/{validate-pspconfig-response-class.js → bank-transaction-response-class.js} +0 -0
@@ -0,0 +1,72 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil Payment Service
5
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface TenantBankAccountResponseClass
21
+ */
22
+ export interface TenantBankAccountResponseClass {
23
+ /**
24
+ * Internal unique identifier for the object. You should not have to use this, use code instead.
25
+ * @type {number}
26
+ * @memberof TenantBankAccountResponseClass
27
+ */
28
+ 'id': number;
29
+ /**
30
+ * Unique identifier for the object.
31
+ * @type {string}
32
+ * @memberof TenantBankAccountResponseClass
33
+ */
34
+ 'code': string;
35
+ /**
36
+ * IBAN number for the bank account
37
+ * @type {string}
38
+ * @memberof TenantBankAccountResponseClass
39
+ */
40
+ 'iban': string;
41
+ /**
42
+ * Name of the account given by the user - to quickly identify the account
43
+ * @type {string}
44
+ * @memberof TenantBankAccountResponseClass
45
+ */
46
+ 'accountName': string;
47
+ /**
48
+ * Name of the bank the account belongs to
49
+ * @type {string}
50
+ * @memberof TenantBankAccountResponseClass
51
+ */
52
+ 'bankName': string;
53
+ /**
54
+ * Number of the booking account this bank account belongs to
55
+ * @type {string}
56
+ * @memberof TenantBankAccountResponseClass
57
+ */
58
+ 'bookingAccount': string;
59
+ /**
60
+ * Time at which the object was created.
61
+ * @type {string}
62
+ * @memberof TenantBankAccountResponseClass
63
+ */
64
+ 'createdAt': string;
65
+ /**
66
+ * Time at which the object was updated.
67
+ * @type {string}
68
+ * @memberof TenantBankAccountResponseClass
69
+ */
70
+ 'updatedAt': string;
71
+ }
72
+
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil Payment Service
5
+ * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface UpdateTenantBankAccountRestRequestDto
21
+ */
22
+ export interface UpdateTenantBankAccountRestRequestDto {
23
+ /**
24
+ * Name of the account given by the user - to quickly identify the account
25
+ * @type {string}
26
+ * @memberof UpdateTenantBankAccountRestRequestDto
27
+ */
28
+ 'accountName': string;
29
+ /**
30
+ * Name of the bank the account belongs to
31
+ * @type {string}
32
+ * @memberof UpdateTenantBankAccountRestRequestDto
33
+ */
34
+ 'bankName': string;
35
+ /**
36
+ * The name of the account
37
+ * @type {string}
38
+ * @memberof UpdateTenantBankAccountRestRequestDto
39
+ */
40
+ 'bookingAccount': string;
41
+ }
42
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/payment-sdk-node",
3
- "version": "1.8.2",
3
+ "version": "1.12.1",
4
4
  "description": "OpenAPI client for @emilgroup/payment-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -1,165 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Emil Payment Service
5
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
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
-
15
-
16
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
- import { Configuration } from '../configuration';
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
- // @ts-ignore
22
- import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
- // @ts-ignore
24
- import { ValidatePSPConfigRequestDto } from '../models';
25
- // @ts-ignore
26
- import { ValidatePSPConfigResponseClass } from '../models';
27
- // URLSearchParams not necessarily used
28
- // @ts-ignore
29
- import { URL, URLSearchParams } from 'url';
30
- const FormData = require('form-data');
31
- /**
32
- * PaymentServiceProvidersApi - axios parameter creator
33
- * @export
34
- */
35
- export const PaymentServiceProvidersApiAxiosParamCreator = function (configuration?: Configuration) {
36
- return {
37
- /**
38
- *
39
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
40
- * @param {string} [authorization] Bearer Token
41
- * @param {*} [options] Override http request option.
42
- * @throws {RequiredError}
43
- */
44
- validateConfiguration: async (validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
45
- // verify required parameter 'validatePSPConfigRequestDto' is not null or undefined
46
- assertParamExists('validateConfiguration', 'validatePSPConfigRequestDto', validatePSPConfigRequestDto)
47
- const localVarPath = `/paymentservice/v1/psps/validate`;
48
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
50
- let baseOptions;
51
- let baseAccessToken;
52
- if (configuration) {
53
- baseOptions = configuration.baseOptions;
54
- baseAccessToken = configuration.accessToken;
55
- }
56
-
57
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
58
- const localVarHeaderParameter = {} as any;
59
- const localVarQueryParameter = {} as any;
60
-
61
- // authentication bearer required
62
- // http bearer authentication required
63
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
64
-
65
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
66
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
67
- }
68
-
69
-
70
-
71
- localVarHeaderParameter['Content-Type'] = 'application/json';
72
-
73
- setSearchParams(localVarUrlObj, localVarQueryParameter);
74
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
75
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
76
- localVarRequestOptions.data = serializeDataIfNeeded(validatePSPConfigRequestDto, localVarRequestOptions, configuration)
77
-
78
- return {
79
- url: toPathString(localVarUrlObj),
80
- options: localVarRequestOptions,
81
- };
82
- },
83
- }
84
- };
85
-
86
- /**
87
- * PaymentServiceProvidersApi - functional programming interface
88
- * @export
89
- */
90
- export const PaymentServiceProvidersApiFp = function(configuration?: Configuration) {
91
- const localVarAxiosParamCreator = PaymentServiceProvidersApiAxiosParamCreator(configuration)
92
- return {
93
- /**
94
- *
95
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
96
- * @param {string} [authorization] Bearer Token
97
- * @param {*} [options] Override http request option.
98
- * @throws {RequiredError}
99
- */
100
- async validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidatePSPConfigResponseClass>> {
101
- const localVarAxiosArgs = await localVarAxiosParamCreator.validateConfiguration(validatePSPConfigRequestDto, authorization, options);
102
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
103
- },
104
- }
105
- };
106
-
107
- /**
108
- * PaymentServiceProvidersApi - factory interface
109
- * @export
110
- */
111
- export const PaymentServiceProvidersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
112
- const localVarFp = PaymentServiceProvidersApiFp(configuration)
113
- return {
114
- /**
115
- *
116
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
117
- * @param {string} [authorization] Bearer Token
118
- * @param {*} [options] Override http request option.
119
- * @throws {RequiredError}
120
- */
121
- validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidatePSPConfigResponseClass> {
122
- return localVarFp.validateConfiguration(validatePSPConfigRequestDto, authorization, options).then((request) => request(axios, basePath));
123
- },
124
- };
125
- };
126
-
127
- /**
128
- * Request parameters for validateConfiguration operation in PaymentServiceProvidersApi.
129
- * @export
130
- * @interface PaymentServiceProvidersApiValidateConfigurationRequest
131
- */
132
- export interface PaymentServiceProvidersApiValidateConfigurationRequest {
133
- /**
134
- *
135
- * @type {ValidatePSPConfigRequestDto}
136
- * @memberof PaymentServiceProvidersApiValidateConfiguration
137
- */
138
- readonly validatePSPConfigRequestDto: ValidatePSPConfigRequestDto
139
-
140
- /**
141
- * Bearer Token
142
- * @type {string}
143
- * @memberof PaymentServiceProvidersApiValidateConfiguration
144
- */
145
- readonly authorization?: string
146
- }
147
-
148
- /**
149
- * PaymentServiceProvidersApi - object-oriented interface
150
- * @export
151
- * @class PaymentServiceProvidersApi
152
- * @extends {BaseAPI}
153
- */
154
- export class PaymentServiceProvidersApi extends BaseAPI {
155
- /**
156
- *
157
- * @param {PaymentServiceProvidersApiValidateConfigurationRequest} requestParameters Request parameters.
158
- * @param {*} [options] Override http request option.
159
- * @throws {RequiredError}
160
- * @memberof PaymentServiceProvidersApi
161
- */
162
- public validateConfiguration(requestParameters: PaymentServiceProvidersApiValidateConfigurationRequest, options?: AxiosRequestConfig) {
163
- return PaymentServiceProvidersApiFp(this.configuration).validateConfiguration(requestParameters.validatePSPConfigRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
164
- }
165
- }
@@ -1,93 +0,0 @@
1
- /**
2
- * Emil Payment Service
3
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
14
- import { RequestArgs, BaseAPI } from '../base';
15
- import { ValidatePSPConfigRequestDto } from '../models';
16
- import { ValidatePSPConfigResponseClass } from '../models';
17
- /**
18
- * PaymentServiceProvidersApi - axios parameter creator
19
- * @export
20
- */
21
- export declare const PaymentServiceProvidersApiAxiosParamCreator: (configuration?: Configuration) => {
22
- /**
23
- *
24
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
25
- * @param {string} [authorization] Bearer Token
26
- * @param {*} [options] Override http request option.
27
- * @throws {RequiredError}
28
- */
29
- validateConfiguration: (validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
30
- };
31
- /**
32
- * PaymentServiceProvidersApi - functional programming interface
33
- * @export
34
- */
35
- export declare const PaymentServiceProvidersApiFp: (configuration?: Configuration) => {
36
- /**
37
- *
38
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
39
- * @param {string} [authorization] Bearer Token
40
- * @param {*} [options] Override http request option.
41
- * @throws {RequiredError}
42
- */
43
- validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidatePSPConfigResponseClass>>;
44
- };
45
- /**
46
- * PaymentServiceProvidersApi - factory interface
47
- * @export
48
- */
49
- export declare const PaymentServiceProvidersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
50
- /**
51
- *
52
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
53
- * @param {string} [authorization] Bearer Token
54
- * @param {*} [options] Override http request option.
55
- * @throws {RequiredError}
56
- */
57
- validateConfiguration(validatePSPConfigRequestDto: ValidatePSPConfigRequestDto, authorization?: string, options?: any): AxiosPromise<ValidatePSPConfigResponseClass>;
58
- };
59
- /**
60
- * Request parameters for validateConfiguration operation in PaymentServiceProvidersApi.
61
- * @export
62
- * @interface PaymentServiceProvidersApiValidateConfigurationRequest
63
- */
64
- export interface PaymentServiceProvidersApiValidateConfigurationRequest {
65
- /**
66
- *
67
- * @type {ValidatePSPConfigRequestDto}
68
- * @memberof PaymentServiceProvidersApiValidateConfiguration
69
- */
70
- readonly validatePSPConfigRequestDto: ValidatePSPConfigRequestDto;
71
- /**
72
- * Bearer Token
73
- * @type {string}
74
- * @memberof PaymentServiceProvidersApiValidateConfiguration
75
- */
76
- readonly authorization?: string;
77
- }
78
- /**
79
- * PaymentServiceProvidersApi - object-oriented interface
80
- * @export
81
- * @class PaymentServiceProvidersApi
82
- * @extends {BaseAPI}
83
- */
84
- export declare class PaymentServiceProvidersApi extends BaseAPI {
85
- /**
86
- *
87
- * @param {PaymentServiceProvidersApiValidateConfigurationRequest} requestParameters Request parameters.
88
- * @param {*} [options] Override http request option.
89
- * @throws {RequiredError}
90
- * @memberof PaymentServiceProvidersApi
91
- */
92
- validateConfiguration(requestParameters: PaymentServiceProvidersApiValidateConfigurationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ValidatePSPConfigResponseClass, any>>;
93
- }
@@ -1,224 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Emil Payment Service
6
- * This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
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 __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __assign = (this && this.__assign) || function () {
31
- __assign = Object.assign || function(t) {
32
- for (var s, i = 1, n = arguments.length; i < n; i++) {
33
- s = arguments[i];
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
- t[p] = s[p];
36
- }
37
- return t;
38
- };
39
- return __assign.apply(this, arguments);
40
- };
41
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
- return new (P || (P = Promise))(function (resolve, reject) {
44
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
- step((generator = generator.apply(thisArg, _arguments || [])).next());
48
- });
49
- };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
- var __importDefault = (this && this.__importDefault) || function (mod) {
78
- return (mod && mod.__esModule) ? mod : { "default": mod };
79
- };
80
- Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.PaymentServiceProvidersApi = exports.PaymentServiceProvidersApiFactory = exports.PaymentServiceProvidersApiFp = exports.PaymentServiceProvidersApiAxiosParamCreator = void 0;
82
- var axios_1 = __importDefault(require("axios"));
83
- // Some imports not used depending on template conditions
84
- // @ts-ignore
85
- var common_1 = require("../common");
86
- // @ts-ignore
87
- var base_1 = require("../base");
88
- // URLSearchParams not necessarily used
89
- // @ts-ignore
90
- var url_1 = require("url");
91
- var FormData = require('form-data');
92
- /**
93
- * PaymentServiceProvidersApi - axios parameter creator
94
- * @export
95
- */
96
- var PaymentServiceProvidersApiAxiosParamCreator = function (configuration) {
97
- var _this = this;
98
- return {
99
- /**
100
- *
101
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
102
- * @param {string} [authorization] Bearer Token
103
- * @param {*} [options] Override http request option.
104
- * @throws {RequiredError}
105
- */
106
- validateConfiguration: function (validatePSPConfigRequestDto, authorization, options) {
107
- if (options === void 0) { options = {}; }
108
- return __awaiter(_this, void 0, void 0, function () {
109
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
- return __generator(this, function (_a) {
111
- switch (_a.label) {
112
- case 0:
113
- // verify required parameter 'validatePSPConfigRequestDto' is not null or undefined
114
- (0, common_1.assertParamExists)('validateConfiguration', 'validatePSPConfigRequestDto', validatePSPConfigRequestDto);
115
- localVarPath = "/paymentservice/v1/psps/validate";
116
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
117
- if (configuration) {
118
- baseOptions = configuration.baseOptions;
119
- baseAccessToken = configuration.accessToken;
120
- }
121
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
122
- localVarHeaderParameter = {};
123
- localVarQueryParameter = {};
124
- // authentication bearer required
125
- // http bearer authentication required
126
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
127
- case 1:
128
- // authentication bearer required
129
- // http bearer authentication required
130
- _a.sent();
131
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
132
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
133
- }
134
- localVarHeaderParameter['Content-Type'] = 'application/json';
135
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(validatePSPConfigRequestDto, localVarRequestOptions, configuration);
139
- return [2 /*return*/, {
140
- url: (0, common_1.toPathString)(localVarUrlObj),
141
- options: localVarRequestOptions,
142
- }];
143
- }
144
- });
145
- });
146
- },
147
- };
148
- };
149
- exports.PaymentServiceProvidersApiAxiosParamCreator = PaymentServiceProvidersApiAxiosParamCreator;
150
- /**
151
- * PaymentServiceProvidersApi - functional programming interface
152
- * @export
153
- */
154
- var PaymentServiceProvidersApiFp = function (configuration) {
155
- var localVarAxiosParamCreator = (0, exports.PaymentServiceProvidersApiAxiosParamCreator)(configuration);
156
- return {
157
- /**
158
- *
159
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
160
- * @param {string} [authorization] Bearer Token
161
- * @param {*} [options] Override http request option.
162
- * @throws {RequiredError}
163
- */
164
- validateConfiguration: function (validatePSPConfigRequestDto, authorization, options) {
165
- return __awaiter(this, void 0, void 0, function () {
166
- var localVarAxiosArgs;
167
- return __generator(this, function (_a) {
168
- switch (_a.label) {
169
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateConfiguration(validatePSPConfigRequestDto, authorization, options)];
170
- case 1:
171
- localVarAxiosArgs = _a.sent();
172
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
173
- }
174
- });
175
- });
176
- },
177
- };
178
- };
179
- exports.PaymentServiceProvidersApiFp = PaymentServiceProvidersApiFp;
180
- /**
181
- * PaymentServiceProvidersApi - factory interface
182
- * @export
183
- */
184
- var PaymentServiceProvidersApiFactory = function (configuration, basePath, axios) {
185
- var localVarFp = (0, exports.PaymentServiceProvidersApiFp)(configuration);
186
- return {
187
- /**
188
- *
189
- * @param {ValidatePSPConfigRequestDto} validatePSPConfigRequestDto
190
- * @param {string} [authorization] Bearer Token
191
- * @param {*} [options] Override http request option.
192
- * @throws {RequiredError}
193
- */
194
- validateConfiguration: function (validatePSPConfigRequestDto, authorization, options) {
195
- return localVarFp.validateConfiguration(validatePSPConfigRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
196
- },
197
- };
198
- };
199
- exports.PaymentServiceProvidersApiFactory = PaymentServiceProvidersApiFactory;
200
- /**
201
- * PaymentServiceProvidersApi - object-oriented interface
202
- * @export
203
- * @class PaymentServiceProvidersApi
204
- * @extends {BaseAPI}
205
- */
206
- var PaymentServiceProvidersApi = /** @class */ (function (_super) {
207
- __extends(PaymentServiceProvidersApi, _super);
208
- function PaymentServiceProvidersApi() {
209
- return _super !== null && _super.apply(this, arguments) || this;
210
- }
211
- /**
212
- *
213
- * @param {PaymentServiceProvidersApiValidateConfigurationRequest} requestParameters Request parameters.
214
- * @param {*} [options] Override http request option.
215
- * @throws {RequiredError}
216
- * @memberof PaymentServiceProvidersApi
217
- */
218
- PaymentServiceProvidersApi.prototype.validateConfiguration = function (requestParameters, options) {
219
- var _this = this;
220
- return (0, exports.PaymentServiceProvidersApiFp)(this.configuration).validateConfiguration(requestParameters.validatePSPConfigRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
221
- };
222
- return PaymentServiceProvidersApi;
223
- }(base_1.BaseAPI));
224
- exports.PaymentServiceProvidersApi = PaymentServiceProvidersApi;