@emilgroup/payment-sdk 1.6.1-beta.1 → 1.6.1-beta.10
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/.openapi-generator/FILES +2 -0
- package/README.md +2 -2
- package/api/webhooks-api.ts +21 -6
- package/base.ts +20 -7
- package/dist/api/webhooks-api.d.ts +12 -3
- package/dist/api/webhooks-api.js +13 -6
- package/dist/base.d.ts +0 -1
- package/dist/base.js +18 -6
- package/dist/models/card-details-dto.d.ts +42 -0
- package/dist/models/card-details-dto.js +15 -0
- package/dist/models/complete-adyen-payment-setup-request-dto.d.ts +34 -14
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/initiate-adyen-payment-setup-response-class.d.ts +42 -0
- package/dist/models/initiate-adyen-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-payment-setup-response-class.d.ts +7 -0
- package/models/card-details-dto.ts +48 -0
- package/models/complete-adyen-payment-setup-request-dto.ts +34 -14
- package/models/index.ts +2 -0
- package/models/initiate-adyen-payment-setup-response-class.ts +48 -0
- package/models/initiate-payment-setup-response-class.ts +7 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -24,6 +24,7 @@ models/bank-transaction-class-without-expand-properties.ts
|
|
|
24
24
|
models/bank-transaction-class.ts
|
|
25
25
|
models/billing-profile-dto.ts
|
|
26
26
|
models/billing-profile-limited-response-dto.ts
|
|
27
|
+
models/card-details-dto.ts
|
|
27
28
|
models/complete-adyen-payment-setup-request-dto.ts
|
|
28
29
|
models/complete-braintree-payment-setup-request-dto.ts
|
|
29
30
|
models/complete-payment-setup-request-dto.ts
|
|
@@ -54,6 +55,7 @@ models/get-tenant-bank-account-response-class.ts
|
|
|
54
55
|
models/import-bank-transactions-response-class.ts
|
|
55
56
|
models/index.ts
|
|
56
57
|
models/initiate-adyen-payment-setup-request-dto.ts
|
|
58
|
+
models/initiate-adyen-payment-setup-response-class.ts
|
|
57
59
|
models/initiate-braintree-payment-setup-request-dto.ts
|
|
58
60
|
models/initiate-braintree-payment-setup-response-class.ts
|
|
59
61
|
models/initiate-payment-setup-request-dto.ts
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/payment-sdk@1.6.1-beta.
|
|
20
|
+
npm install @emilgroup/payment-sdk@1.6.1-beta.10 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/payment-sdk@1.6.1-beta.
|
|
24
|
+
yarn add @emilgroup/payment-sdk@1.6.1-beta.10
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PaymentsApi`.
|
package/api/webhooks-api.ts
CHANGED
|
@@ -32,16 +32,19 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
32
32
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
33
33
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
34
34
|
* @param {string} productSlug
|
|
35
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
35
36
|
* @param {*} [options] Override http request option.
|
|
36
37
|
* @throws {RequiredError}
|
|
37
38
|
*/
|
|
38
|
-
postWebhook: async (pspType: string, tenantSlug: string, productSlug: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
+
postWebhook: async (pspType: string, tenantSlug: string, productSlug: string, body: object, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
40
|
// verify required parameter 'pspType' is not null or undefined
|
|
40
41
|
assertParamExists('postWebhook', 'pspType', pspType)
|
|
41
42
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
42
43
|
assertParamExists('postWebhook', 'tenantSlug', tenantSlug)
|
|
43
44
|
// verify required parameter 'productSlug' is not null or undefined
|
|
44
45
|
assertParamExists('postWebhook', 'productSlug', productSlug)
|
|
46
|
+
// verify required parameter 'body' is not null or undefined
|
|
47
|
+
assertParamExists('postWebhook', 'body', body)
|
|
45
48
|
const localVarPath = `/paymentservice/v1/webhooks/{pspType}/{tenantSlug}/{productSlug}`
|
|
46
49
|
.replace(`{${"pspType"}}`, encodeURIComponent(String(pspType)))
|
|
47
50
|
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
@@ -61,9 +64,12 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
61
64
|
|
|
62
65
|
|
|
63
66
|
|
|
67
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
68
|
+
|
|
64
69
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
65
70
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
66
71
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
72
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
67
73
|
|
|
68
74
|
return {
|
|
69
75
|
url: toPathString(localVarUrlObj),
|
|
@@ -86,11 +92,12 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
|
86
92
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
87
93
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
88
94
|
* @param {string} productSlug
|
|
95
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
89
96
|
* @param {*} [options] Override http request option.
|
|
90
97
|
* @throws {RequiredError}
|
|
91
98
|
*/
|
|
92
|
-
async postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
93
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, productSlug, options);
|
|
99
|
+
async postWebhook(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
100
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, productSlug, body, options);
|
|
94
101
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
95
102
|
},
|
|
96
103
|
}
|
|
@@ -109,11 +116,12 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
|
|
|
109
116
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
110
117
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
111
118
|
* @param {string} productSlug
|
|
119
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
112
120
|
* @param {*} [options] Override http request option.
|
|
113
121
|
* @throws {RequiredError}
|
|
114
122
|
*/
|
|
115
|
-
postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: any): AxiosPromise<void> {
|
|
116
|
-
return localVarFp.postWebhook(pspType, tenantSlug, productSlug, options).then((request) => request(axios, basePath));
|
|
123
|
+
postWebhook(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: any): AxiosPromise<void> {
|
|
124
|
+
return localVarFp.postWebhook(pspType, tenantSlug, productSlug, body, options).then((request) => request(axios, basePath));
|
|
117
125
|
},
|
|
118
126
|
};
|
|
119
127
|
};
|
|
@@ -144,6 +152,13 @@ export interface WebhooksApiPostWebhookRequest {
|
|
|
144
152
|
* @memberof WebhooksApiPostWebhook
|
|
145
153
|
*/
|
|
146
154
|
readonly productSlug: string
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
158
|
+
* @type {object}
|
|
159
|
+
* @memberof WebhooksApiPostWebhook
|
|
160
|
+
*/
|
|
161
|
+
readonly body: object
|
|
147
162
|
}
|
|
148
163
|
|
|
149
164
|
/**
|
|
@@ -162,6 +177,6 @@ export class WebhooksApi extends BaseAPI {
|
|
|
162
177
|
* @memberof WebhooksApi
|
|
163
178
|
*/
|
|
164
179
|
public postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig) {
|
|
165
|
-
return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, options).then((request) => request(this.axios, this.basePath));
|
|
180
|
+
return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
166
181
|
}
|
|
167
182
|
}
|
package/base.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface RequestArgs {
|
|
|
64
64
|
interface TokenData {
|
|
65
65
|
accessToken?: string;
|
|
66
66
|
username?: string;
|
|
67
|
+
permissions?: string;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
const NETWORK_ERROR_MESSAGE = "Network Error";
|
|
@@ -77,7 +78,6 @@ const TOKEN_DATA = 'APP_TOKEN';
|
|
|
77
78
|
export class BaseAPI {
|
|
78
79
|
protected configuration: Configuration | undefined;
|
|
79
80
|
private tokenData?: TokenData;
|
|
80
|
-
private permissions?: string;
|
|
81
81
|
|
|
82
82
|
constructor(configuration?: Configuration,
|
|
83
83
|
protected basePath: string = BASE_PATH,
|
|
@@ -111,7 +111,11 @@ export class BaseAPI {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
getPermissions(): Array<string> {
|
|
114
|
-
|
|
114
|
+
if (!this.tokenData?.permissions) {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return this.tokenData.permissions.split(',');
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
async authorize(username: string, password: string): Promise<void> {
|
|
@@ -134,7 +138,7 @@ export class BaseAPI {
|
|
|
134
138
|
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
135
139
|
this.tokenData.username = username;
|
|
136
140
|
this.tokenData.accessToken = accessToken;
|
|
137
|
-
this.permissions = permissions;
|
|
141
|
+
this.tokenData.permissions = permissions;
|
|
138
142
|
|
|
139
143
|
this.storeTokenData({
|
|
140
144
|
...this.tokenData
|
|
@@ -148,6 +152,16 @@ export class BaseAPI {
|
|
|
148
152
|
throw new Error('Failed to refresh token.');
|
|
149
153
|
}
|
|
150
154
|
|
|
155
|
+
const refreshTokenAxios = globalAxios.create()
|
|
156
|
+
refreshTokenAxios.interceptors.response.use(response => {
|
|
157
|
+
const { permissions } = response.data;
|
|
158
|
+
|
|
159
|
+
this.tokenData.permissions = permissions;
|
|
160
|
+
this.storeTokenData(this.tokenData);
|
|
161
|
+
|
|
162
|
+
return response;
|
|
163
|
+
})
|
|
164
|
+
|
|
151
165
|
const options: AxiosRequestConfig = {
|
|
152
166
|
method: 'POST',
|
|
153
167
|
url: `${this.configuration.basePath}/authservice/v1/refresh-token`,
|
|
@@ -158,8 +172,7 @@ export class BaseAPI {
|
|
|
158
172
|
withCredentials: true,
|
|
159
173
|
};
|
|
160
174
|
|
|
161
|
-
const response = await
|
|
162
|
-
|
|
175
|
+
const response = await refreshTokenAxios.request<LoginClass>(options);
|
|
163
176
|
return response.data;
|
|
164
177
|
}
|
|
165
178
|
|
|
@@ -196,7 +209,7 @@ export class BaseAPI {
|
|
|
196
209
|
try {
|
|
197
210
|
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
198
211
|
const accessToken = `Bearer ${tokenString}`;
|
|
199
|
-
this.permissions = permissions;
|
|
212
|
+
this.tokenData.permissions = permissions;
|
|
200
213
|
|
|
201
214
|
delete originalConfig.headers['Authorization']
|
|
202
215
|
|
|
@@ -223,7 +236,7 @@ export class BaseAPI {
|
|
|
223
236
|
try {
|
|
224
237
|
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
225
238
|
const accessToken = `Bearer ${tokenString}`;
|
|
226
|
-
this.permissions = permissions;
|
|
239
|
+
this.tokenData.permissions = permissions;
|
|
227
240
|
|
|
228
241
|
_retry = true;
|
|
229
242
|
originalConfig.headers['Authorization'] = accessToken;
|
|
@@ -23,10 +23,11 @@ export declare const WebhooksApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
23
23
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
24
24
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
25
25
|
* @param {string} productSlug
|
|
26
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
26
27
|
* @param {*} [options] Override http request option.
|
|
27
28
|
* @throws {RequiredError}
|
|
28
29
|
*/
|
|
29
|
-
postWebhook: (pspType: string, tenantSlug: string, productSlug: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
|
+
postWebhook: (pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
31
|
};
|
|
31
32
|
/**
|
|
32
33
|
* WebhooksApi - functional programming interface
|
|
@@ -39,10 +40,11 @@ export declare const WebhooksApiFp: (configuration?: Configuration) => {
|
|
|
39
40
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
40
41
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
41
42
|
* @param {string} productSlug
|
|
43
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
42
44
|
* @param {*} [options] Override http request option.
|
|
43
45
|
* @throws {RequiredError}
|
|
44
46
|
*/
|
|
45
|
-
postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
47
|
+
postWebhook(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
46
48
|
};
|
|
47
49
|
/**
|
|
48
50
|
* WebhooksApi - factory interface
|
|
@@ -55,10 +57,11 @@ export declare const WebhooksApiFactory: (configuration?: Configuration, basePat
|
|
|
55
57
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
56
58
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
57
59
|
* @param {string} productSlug
|
|
60
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
58
61
|
* @param {*} [options] Override http request option.
|
|
59
62
|
* @throws {RequiredError}
|
|
60
63
|
*/
|
|
61
|
-
postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: any): AxiosPromise<void>;
|
|
64
|
+
postWebhook(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: any): AxiosPromise<void>;
|
|
62
65
|
};
|
|
63
66
|
/**
|
|
64
67
|
* Request parameters for postWebhook operation in WebhooksApi.
|
|
@@ -84,6 +87,12 @@ export interface WebhooksApiPostWebhookRequest {
|
|
|
84
87
|
* @memberof WebhooksApiPostWebhook
|
|
85
88
|
*/
|
|
86
89
|
readonly productSlug: string;
|
|
90
|
+
/**
|
|
91
|
+
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
92
|
+
* @type {object}
|
|
93
|
+
* @memberof WebhooksApiPostWebhook
|
|
94
|
+
*/
|
|
95
|
+
readonly body: object;
|
|
87
96
|
}
|
|
88
97
|
/**
|
|
89
98
|
* WebhooksApi - object-oriented interface
|
package/dist/api/webhooks-api.js
CHANGED
|
@@ -98,10 +98,11 @@ var WebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
98
98
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
99
99
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
100
100
|
* @param {string} productSlug
|
|
101
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
101
102
|
* @param {*} [options] Override http request option.
|
|
102
103
|
* @throws {RequiredError}
|
|
103
104
|
*/
|
|
104
|
-
postWebhook: function (pspType, tenantSlug, productSlug, options) {
|
|
105
|
+
postWebhook: function (pspType, tenantSlug, productSlug, body, options) {
|
|
105
106
|
if (options === void 0) { options = {}; }
|
|
106
107
|
return __awaiter(_this, void 0, void 0, function () {
|
|
107
108
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -112,6 +113,8 @@ var WebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
112
113
|
(0, common_1.assertParamExists)('postWebhook', 'tenantSlug', tenantSlug);
|
|
113
114
|
// verify required parameter 'productSlug' is not null or undefined
|
|
114
115
|
(0, common_1.assertParamExists)('postWebhook', 'productSlug', productSlug);
|
|
116
|
+
// verify required parameter 'body' is not null or undefined
|
|
117
|
+
(0, common_1.assertParamExists)('postWebhook', 'body', body);
|
|
115
118
|
localVarPath = "/paymentservice/v1/webhooks/{pspType}/{tenantSlug}/{productSlug}"
|
|
116
119
|
.replace("{".concat("pspType", "}"), encodeURIComponent(String(pspType)))
|
|
117
120
|
.replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)))
|
|
@@ -124,9 +127,11 @@ var WebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
124
127
|
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
125
128
|
localVarHeaderParameter = {};
|
|
126
129
|
localVarQueryParameter = {};
|
|
130
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
127
131
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
128
132
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
129
133
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
134
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
130
135
|
return [2 /*return*/, {
|
|
131
136
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
132
137
|
options: localVarRequestOptions,
|
|
@@ -150,15 +155,16 @@ var WebhooksApiFp = function (configuration) {
|
|
|
150
155
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
151
156
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
152
157
|
* @param {string} productSlug
|
|
158
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
153
159
|
* @param {*} [options] Override http request option.
|
|
154
160
|
* @throws {RequiredError}
|
|
155
161
|
*/
|
|
156
|
-
postWebhook: function (pspType, tenantSlug, productSlug, options) {
|
|
162
|
+
postWebhook: function (pspType, tenantSlug, productSlug, body, options) {
|
|
157
163
|
return __awaiter(this, void 0, void 0, function () {
|
|
158
164
|
var localVarAxiosArgs;
|
|
159
165
|
return __generator(this, function (_a) {
|
|
160
166
|
switch (_a.label) {
|
|
161
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, productSlug, options)];
|
|
167
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, productSlug, body, options)];
|
|
162
168
|
case 1:
|
|
163
169
|
localVarAxiosArgs = _a.sent();
|
|
164
170
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -182,11 +188,12 @@ var WebhooksApiFactory = function (configuration, basePath, axios) {
|
|
|
182
188
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
183
189
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
184
190
|
* @param {string} productSlug
|
|
191
|
+
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
185
192
|
* @param {*} [options] Override http request option.
|
|
186
193
|
* @throws {RequiredError}
|
|
187
194
|
*/
|
|
188
|
-
postWebhook: function (pspType, tenantSlug, productSlug, options) {
|
|
189
|
-
return localVarFp.postWebhook(pspType, tenantSlug, productSlug, options).then(function (request) { return request(axios, basePath); });
|
|
195
|
+
postWebhook: function (pspType, tenantSlug, productSlug, body, options) {
|
|
196
|
+
return localVarFp.postWebhook(pspType, tenantSlug, productSlug, body, options).then(function (request) { return request(axios, basePath); });
|
|
190
197
|
},
|
|
191
198
|
};
|
|
192
199
|
};
|
|
@@ -212,7 +219,7 @@ var WebhooksApi = /** @class */ (function (_super) {
|
|
|
212
219
|
*/
|
|
213
220
|
WebhooksApi.prototype.postWebhook = function (requestParameters, options) {
|
|
214
221
|
var _this = this;
|
|
215
|
-
return (0, exports.WebhooksApiFp)(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
222
|
+
return (0, exports.WebhooksApiFp)(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
216
223
|
};
|
|
217
224
|
return WebhooksApi;
|
|
218
225
|
}(base_1.BaseAPI));
|
package/dist/base.d.ts
CHANGED
|
@@ -52,7 +52,6 @@ export declare class BaseAPI {
|
|
|
52
52
|
protected axios: AxiosInstance;
|
|
53
53
|
protected configuration: Configuration | undefined;
|
|
54
54
|
private tokenData?;
|
|
55
|
-
private permissions?;
|
|
56
55
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
57
56
|
selectEnvironment(env: Environment): void;
|
|
58
57
|
selectBasePath(path: string): void;
|
package/dist/base.js
CHANGED
|
@@ -144,7 +144,11 @@ var BaseAPI = /** @class */ (function () {
|
|
|
144
144
|
this.configuration.basePath = path;
|
|
145
145
|
};
|
|
146
146
|
BaseAPI.prototype.getPermissions = function () {
|
|
147
|
-
|
|
147
|
+
var _a;
|
|
148
|
+
if (!((_a = this.tokenData) === null || _a === void 0 ? void 0 : _a.permissions)) {
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
return this.tokenData.permissions.split(',');
|
|
148
152
|
};
|
|
149
153
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
150
154
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -170,7 +174,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
170
174
|
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
171
175
|
this.tokenData.username = username;
|
|
172
176
|
this.tokenData.accessToken = accessToken;
|
|
173
|
-
this.permissions = permissions;
|
|
177
|
+
this.tokenData.permissions = permissions;
|
|
174
178
|
this.storeTokenData(__assign({}, this.tokenData));
|
|
175
179
|
return [2 /*return*/];
|
|
176
180
|
}
|
|
@@ -179,7 +183,8 @@ var BaseAPI = /** @class */ (function () {
|
|
|
179
183
|
};
|
|
180
184
|
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
181
185
|
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
-
var username, options, response;
|
|
186
|
+
var username, refreshTokenAxios, options, response;
|
|
187
|
+
var _this = this;
|
|
183
188
|
return __generator(this, function (_a) {
|
|
184
189
|
switch (_a.label) {
|
|
185
190
|
case 0:
|
|
@@ -187,6 +192,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
187
192
|
if (!username) {
|
|
188
193
|
throw new Error('Failed to refresh token.');
|
|
189
194
|
}
|
|
195
|
+
refreshTokenAxios = axios_1.default.create();
|
|
196
|
+
refreshTokenAxios.interceptors.response.use(function (response) {
|
|
197
|
+
var permissions = response.data.permissions;
|
|
198
|
+
_this.tokenData.permissions = permissions;
|
|
199
|
+
_this.storeTokenData(_this.tokenData);
|
|
200
|
+
return response;
|
|
201
|
+
});
|
|
190
202
|
options = {
|
|
191
203
|
method: 'POST',
|
|
192
204
|
url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
|
|
@@ -196,7 +208,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
196
208
|
data: { username: username },
|
|
197
209
|
withCredentials: true,
|
|
198
210
|
};
|
|
199
|
-
return [4 /*yield*/,
|
|
211
|
+
return [4 /*yield*/, refreshTokenAxios.request(options)];
|
|
200
212
|
case 1:
|
|
201
213
|
response = _a.sent();
|
|
202
214
|
return [2 /*return*/, response.data];
|
|
@@ -241,7 +253,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
241
253
|
case 2:
|
|
242
254
|
_a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
|
|
243
255
|
accessToken = "Bearer ".concat(tokenString);
|
|
244
|
-
this.permissions = permissions;
|
|
256
|
+
this.tokenData.permissions = permissions;
|
|
245
257
|
delete originalConfig.headers['Authorization'];
|
|
246
258
|
originalConfig.headers['Authorization'] = accessToken;
|
|
247
259
|
this.configuration.accessToken = accessToken;
|
|
@@ -267,7 +279,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
267
279
|
case 7:
|
|
268
280
|
_b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
|
|
269
281
|
accessToken = "Bearer ".concat(tokenString);
|
|
270
|
-
this.permissions = permissions;
|
|
282
|
+
this.tokenData.permissions = permissions;
|
|
271
283
|
_retry = true;
|
|
272
284
|
originalConfig.headers['Authorization'] = accessToken;
|
|
273
285
|
this.configuration.accessToken = accessToken;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CardDetailsDto
|
|
16
|
+
*/
|
|
17
|
+
export interface CardDetailsDto {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CardDetailsDto
|
|
22
|
+
*/
|
|
23
|
+
'encryptedCardNumber': string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CardDetailsDto
|
|
28
|
+
*/
|
|
29
|
+
'encryptedExpiryMonth': string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CardDetailsDto
|
|
34
|
+
*/
|
|
35
|
+
'encryptedExpiryYear': string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CardDetailsDto
|
|
40
|
+
*/
|
|
41
|
+
'encryptedSecurityCode': string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { CardDetailsDto } from './card-details-dto';
|
|
13
|
+
import { SepaDirectDto } from './sepa-direct-dto';
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
14
16
|
* @export
|
|
@@ -16,47 +18,65 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export interface CompleteAdyenPaymentSetupRequestDto {
|
|
18
20
|
/**
|
|
19
|
-
*
|
|
21
|
+
* Unique identifier for the shopper on Adyen.
|
|
20
22
|
* @type {string}
|
|
21
23
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
22
24
|
*/
|
|
23
|
-
'
|
|
25
|
+
'shopperReference': string;
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
27
|
+
* The payment method type on Adyen.
|
|
26
28
|
* @type {string}
|
|
27
29
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
28
30
|
*/
|
|
29
|
-
'
|
|
31
|
+
'paymentMethodType': CompleteAdyenPaymentSetupRequestDtoPaymentMethodTypeEnum;
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
33
|
+
* Unique identifier of the lead that this object belongs to.
|
|
32
34
|
* @type {string}
|
|
33
35
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
34
36
|
*/
|
|
35
|
-
'
|
|
37
|
+
'leadCode'?: string;
|
|
36
38
|
/**
|
|
37
|
-
*
|
|
39
|
+
* The account\'s type.
|
|
38
40
|
* @type {string}
|
|
39
41
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
40
42
|
*/
|
|
41
|
-
'
|
|
43
|
+
'accountType': string;
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* The accounts holder\'s first name.
|
|
44
46
|
* @type {string}
|
|
45
47
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
46
48
|
*/
|
|
47
|
-
'
|
|
49
|
+
'firstName'?: string;
|
|
48
50
|
/**
|
|
49
|
-
*
|
|
51
|
+
* The account holder\'s last name.
|
|
50
52
|
* @type {string}
|
|
51
53
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
52
54
|
*/
|
|
53
|
-
'
|
|
55
|
+
'lastName'?: string;
|
|
54
56
|
/**
|
|
55
|
-
* The
|
|
57
|
+
* The account\'s company name.
|
|
56
58
|
* @type {string}
|
|
57
59
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
58
60
|
*/
|
|
59
|
-
'
|
|
61
|
+
'companyName'?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The account\'s email address
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
66
|
+
*/
|
|
67
|
+
'email': string;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {CardDetailsDto}
|
|
71
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
72
|
+
*/
|
|
73
|
+
'cardDetails'?: CardDetailsDto;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {SepaDirectDto}
|
|
77
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
78
|
+
*/
|
|
79
|
+
'sepaDetails'?: SepaDirectDto;
|
|
60
80
|
}
|
|
61
81
|
export declare const CompleteAdyenPaymentSetupRequestDtoPaymentMethodTypeEnum: {
|
|
62
82
|
readonly Paypal: "paypal";
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './bank-transaction-class';
|
|
|
4
4
|
export * from './bank-transaction-class-without-expand-properties';
|
|
5
5
|
export * from './billing-profile-dto';
|
|
6
6
|
export * from './billing-profile-limited-response-dto';
|
|
7
|
+
export * from './card-details-dto';
|
|
7
8
|
export * from './complete-adyen-payment-setup-request-dto';
|
|
8
9
|
export * from './complete-braintree-payment-setup-request-dto';
|
|
9
10
|
export * from './complete-payment-setup-request-dto';
|
|
@@ -33,6 +34,7 @@ export * from './get-refund-response-class';
|
|
|
33
34
|
export * from './get-tenant-bank-account-response-class';
|
|
34
35
|
export * from './import-bank-transactions-response-class';
|
|
35
36
|
export * from './initiate-adyen-payment-setup-request-dto';
|
|
37
|
+
export * from './initiate-adyen-payment-setup-response-class';
|
|
36
38
|
export * from './initiate-braintree-payment-setup-request-dto';
|
|
37
39
|
export * from './initiate-braintree-payment-setup-response-class';
|
|
38
40
|
export * from './initiate-payment-setup-request-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./bank-transaction-class"), exports);
|
|
|
20
20
|
__exportStar(require("./bank-transaction-class-without-expand-properties"), exports);
|
|
21
21
|
__exportStar(require("./billing-profile-dto"), exports);
|
|
22
22
|
__exportStar(require("./billing-profile-limited-response-dto"), exports);
|
|
23
|
+
__exportStar(require("./card-details-dto"), exports);
|
|
23
24
|
__exportStar(require("./complete-adyen-payment-setup-request-dto"), exports);
|
|
24
25
|
__exportStar(require("./complete-braintree-payment-setup-request-dto"), exports);
|
|
25
26
|
__exportStar(require("./complete-payment-setup-request-dto"), exports);
|
|
@@ -49,6 +50,7 @@ __exportStar(require("./get-refund-response-class"), exports);
|
|
|
49
50
|
__exportStar(require("./get-tenant-bank-account-response-class"), exports);
|
|
50
51
|
__exportStar(require("./import-bank-transactions-response-class"), exports);
|
|
51
52
|
__exportStar(require("./initiate-adyen-payment-setup-request-dto"), exports);
|
|
53
|
+
__exportStar(require("./initiate-adyen-payment-setup-response-class"), exports);
|
|
52
54
|
__exportStar(require("./initiate-braintree-payment-setup-request-dto"), exports);
|
|
53
55
|
__exportStar(require("./initiate-braintree-payment-setup-response-class"), exports);
|
|
54
56
|
__exportStar(require("./initiate-payment-setup-request-dto"), exports);
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface InitiateAdyenPaymentSetupResponseClass
|
|
16
|
+
*/
|
|
17
|
+
export interface InitiateAdyenPaymentSetupResponseClass {
|
|
18
|
+
/**
|
|
19
|
+
* The client key associated with the Adyen account.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
22
|
+
*/
|
|
23
|
+
'clientKey': string;
|
|
24
|
+
/**
|
|
25
|
+
* A unique reference for the shopper.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
28
|
+
*/
|
|
29
|
+
'shopperReference': string;
|
|
30
|
+
/**
|
|
31
|
+
* The environment in which the payment request is being made (e.g., \"TEST\" or \"LIVE\").
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
34
|
+
*/
|
|
35
|
+
'environment': string;
|
|
36
|
+
/**
|
|
37
|
+
* The country code associated with the shopper\'s payment details.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
40
|
+
*/
|
|
41
|
+
'country'?: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { InitiateAdyenPaymentSetupResponseClass } from './initiate-adyen-payment-setup-response-class';
|
|
12
13
|
import { InitiateBraintreePaymentSetupResponseClass } from './initiate-braintree-payment-setup-response-class';
|
|
13
14
|
import { InitiateStripePaymentSetupResponseClass } from './initiate-stripe-payment-setup-response-class';
|
|
14
15
|
/**
|
|
@@ -29,4 +30,10 @@ export interface InitiatePaymentSetupResponseClass {
|
|
|
29
30
|
* @memberof InitiatePaymentSetupResponseClass
|
|
30
31
|
*/
|
|
31
32
|
'braintree': InitiateBraintreePaymentSetupResponseClass;
|
|
33
|
+
/**
|
|
34
|
+
* Adyen response after generating client token.
|
|
35
|
+
* @type {InitiateAdyenPaymentSetupResponseClass}
|
|
36
|
+
* @memberof InitiatePaymentSetupResponseClass
|
|
37
|
+
*/
|
|
38
|
+
'adyen': InitiateAdyenPaymentSetupResponseClass;
|
|
32
39
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 CardDetailsDto
|
|
21
|
+
*/
|
|
22
|
+
export interface CardDetailsDto {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof CardDetailsDto
|
|
27
|
+
*/
|
|
28
|
+
'encryptedCardNumber': string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof CardDetailsDto
|
|
33
|
+
*/
|
|
34
|
+
'encryptedExpiryMonth': string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof CardDetailsDto
|
|
39
|
+
*/
|
|
40
|
+
'encryptedExpiryYear': string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof CardDetailsDto
|
|
45
|
+
*/
|
|
46
|
+
'encryptedSecurityCode': string;
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
import { CardDetailsDto } from './card-details-dto';
|
|
17
|
+
import { SepaDirectDto } from './sepa-direct-dto';
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
*
|
|
@@ -21,47 +23,65 @@
|
|
|
21
23
|
*/
|
|
22
24
|
export interface CompleteAdyenPaymentSetupRequestDto {
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Unique identifier for the shopper on Adyen.
|
|
25
27
|
* @type {string}
|
|
26
28
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
27
29
|
*/
|
|
28
|
-
'
|
|
30
|
+
'shopperReference': string;
|
|
29
31
|
/**
|
|
30
|
-
*
|
|
32
|
+
* The payment method type on Adyen.
|
|
31
33
|
* @type {string}
|
|
32
34
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
33
35
|
*/
|
|
34
|
-
'
|
|
36
|
+
'paymentMethodType': CompleteAdyenPaymentSetupRequestDtoPaymentMethodTypeEnum;
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
38
|
+
* Unique identifier of the lead that this object belongs to.
|
|
37
39
|
* @type {string}
|
|
38
40
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
39
41
|
*/
|
|
40
|
-
'
|
|
42
|
+
'leadCode'?: string;
|
|
41
43
|
/**
|
|
42
|
-
*
|
|
44
|
+
* The account\'s type.
|
|
43
45
|
* @type {string}
|
|
44
46
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
45
47
|
*/
|
|
46
|
-
'
|
|
48
|
+
'accountType': string;
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
50
|
+
* The accounts holder\'s first name.
|
|
49
51
|
* @type {string}
|
|
50
52
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
51
53
|
*/
|
|
52
|
-
'
|
|
54
|
+
'firstName'?: string;
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
56
|
+
* The account holder\'s last name.
|
|
55
57
|
* @type {string}
|
|
56
58
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
57
59
|
*/
|
|
58
|
-
'
|
|
60
|
+
'lastName'?: string;
|
|
59
61
|
/**
|
|
60
|
-
* The
|
|
62
|
+
* The account\'s company name.
|
|
61
63
|
* @type {string}
|
|
62
64
|
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
63
65
|
*/
|
|
64
|
-
'
|
|
66
|
+
'companyName'?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The account\'s email address
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
71
|
+
*/
|
|
72
|
+
'email': string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {CardDetailsDto}
|
|
76
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
77
|
+
*/
|
|
78
|
+
'cardDetails'?: CardDetailsDto;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {SepaDirectDto}
|
|
82
|
+
* @memberof CompleteAdyenPaymentSetupRequestDto
|
|
83
|
+
*/
|
|
84
|
+
'sepaDetails'?: SepaDirectDto;
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
export const CompleteAdyenPaymentSetupRequestDtoPaymentMethodTypeEnum = {
|
package/models/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './bank-transaction-class';
|
|
|
4
4
|
export * from './bank-transaction-class-without-expand-properties';
|
|
5
5
|
export * from './billing-profile-dto';
|
|
6
6
|
export * from './billing-profile-limited-response-dto';
|
|
7
|
+
export * from './card-details-dto';
|
|
7
8
|
export * from './complete-adyen-payment-setup-request-dto';
|
|
8
9
|
export * from './complete-braintree-payment-setup-request-dto';
|
|
9
10
|
export * from './complete-payment-setup-request-dto';
|
|
@@ -33,6 +34,7 @@ export * from './get-refund-response-class';
|
|
|
33
34
|
export * from './get-tenant-bank-account-response-class';
|
|
34
35
|
export * from './import-bank-transactions-response-class';
|
|
35
36
|
export * from './initiate-adyen-payment-setup-request-dto';
|
|
37
|
+
export * from './initiate-adyen-payment-setup-response-class';
|
|
36
38
|
export * from './initiate-braintree-payment-setup-request-dto';
|
|
37
39
|
export * from './initiate-braintree-payment-setup-response-class';
|
|
38
40
|
export * from './initiate-payment-setup-request-dto';
|
|
@@ -0,0 +1,48 @@
|
|
|
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 InitiateAdyenPaymentSetupResponseClass
|
|
21
|
+
*/
|
|
22
|
+
export interface InitiateAdyenPaymentSetupResponseClass {
|
|
23
|
+
/**
|
|
24
|
+
* The client key associated with the Adyen account.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
27
|
+
*/
|
|
28
|
+
'clientKey': string;
|
|
29
|
+
/**
|
|
30
|
+
* A unique reference for the shopper.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
33
|
+
*/
|
|
34
|
+
'shopperReference': string;
|
|
35
|
+
/**
|
|
36
|
+
* The environment in which the payment request is being made (e.g., \"TEST\" or \"LIVE\").
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
39
|
+
*/
|
|
40
|
+
'environment': string;
|
|
41
|
+
/**
|
|
42
|
+
* The country code associated with the shopper\'s payment details.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof InitiateAdyenPaymentSetupResponseClass
|
|
45
|
+
*/
|
|
46
|
+
'country'?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
import { InitiateAdyenPaymentSetupResponseClass } from './initiate-adyen-payment-setup-response-class';
|
|
16
17
|
import { InitiateBraintreePaymentSetupResponseClass } from './initiate-braintree-payment-setup-response-class';
|
|
17
18
|
import { InitiateStripePaymentSetupResponseClass } from './initiate-stripe-payment-setup-response-class';
|
|
18
19
|
|
|
@@ -34,5 +35,11 @@ export interface InitiatePaymentSetupResponseClass {
|
|
|
34
35
|
* @memberof InitiatePaymentSetupResponseClass
|
|
35
36
|
*/
|
|
36
37
|
'braintree': InitiateBraintreePaymentSetupResponseClass;
|
|
38
|
+
/**
|
|
39
|
+
* Adyen response after generating client token.
|
|
40
|
+
* @type {InitiateAdyenPaymentSetupResponseClass}
|
|
41
|
+
* @memberof InitiatePaymentSetupResponseClass
|
|
42
|
+
*/
|
|
43
|
+
'adyen': InitiateAdyenPaymentSetupResponseClass;
|
|
37
44
|
}
|
|
38
45
|
|