@emilgroup/payment-sdk 1.16.1-beta.96 → 1.16.1-beta.97
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/README.md +2 -2
- package/api/webhooks-api.ts +41 -54
- package/dist/api/webhooks-api.d.ts +27 -36
- package/dist/api/webhooks-api.js +27 -33
- package/package.json +1 -1
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.16.1-beta.
|
|
20
|
+
npm install @emilgroup/payment-sdk@1.16.1-beta.97 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/payment-sdk@1.16.1-beta.
|
|
24
|
+
yarn add @emilgroup/payment-sdk@1.16.1-beta.97
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PaymentsApi`.
|
package/api/webhooks-api.ts
CHANGED
|
@@ -31,24 +31,20 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
31
31
|
* @summary Handle the webhook from PSP
|
|
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
|
-
* @param {string} productSlug
|
|
35
34
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
36
35
|
* @param {*} [options] Override http request option.
|
|
37
36
|
* @throws {RequiredError}
|
|
38
37
|
*/
|
|
39
|
-
|
|
38
|
+
postWebhook: async (pspType: string, tenantSlug: string, body: object, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
40
39
|
// verify required parameter 'pspType' is not null or undefined
|
|
41
|
-
assertParamExists('
|
|
40
|
+
assertParamExists('postWebhook', 'pspType', pspType)
|
|
42
41
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
43
|
-
assertParamExists('
|
|
44
|
-
// verify required parameter 'productSlug' is not null or undefined
|
|
45
|
-
assertParamExists('postWebhook0', 'productSlug', productSlug)
|
|
42
|
+
assertParamExists('postWebhook', 'tenantSlug', tenantSlug)
|
|
46
43
|
// verify required parameter 'body' is not null or undefined
|
|
47
|
-
assertParamExists('
|
|
44
|
+
assertParamExists('postWebhook', 'body', body)
|
|
48
45
|
const localVarPath = `/paymentservice/v1/webhooks/{pspType}/{tenantSlug}`
|
|
49
46
|
.replace(`{${"pspType"}}`, encodeURIComponent(String(pspType)))
|
|
50
|
-
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
51
|
-
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
47
|
+
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)));
|
|
52
48
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
49
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54
50
|
let baseOptions;
|
|
@@ -81,20 +77,20 @@ export const WebhooksApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
81
77
|
* @summary Handle the webhook from PSP
|
|
82
78
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
83
79
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
84
|
-
* @param {string} productSlug
|
|
80
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
85
81
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
86
82
|
* @param {*} [options] Override http request option.
|
|
87
83
|
* @throws {RequiredError}
|
|
88
84
|
*/
|
|
89
|
-
|
|
85
|
+
postWebhookWithProductSlug: async (pspType: string, tenantSlug: string, productSlug: string, body: object, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
90
86
|
// verify required parameter 'pspType' is not null or undefined
|
|
91
|
-
assertParamExists('
|
|
87
|
+
assertParamExists('postWebhookWithProductSlug', 'pspType', pspType)
|
|
92
88
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
93
|
-
assertParamExists('
|
|
89
|
+
assertParamExists('postWebhookWithProductSlug', 'tenantSlug', tenantSlug)
|
|
94
90
|
// verify required parameter 'productSlug' is not null or undefined
|
|
95
|
-
assertParamExists('
|
|
91
|
+
assertParamExists('postWebhookWithProductSlug', 'productSlug', productSlug)
|
|
96
92
|
// verify required parameter 'body' is not null or undefined
|
|
97
|
-
assertParamExists('
|
|
93
|
+
assertParamExists('postWebhookWithProductSlug', 'body', body)
|
|
98
94
|
const localVarPath = `/paymentservice/v1/webhooks/{pspType}/{tenantSlug}/{productSlug}`
|
|
99
95
|
.replace(`{${"pspType"}}`, encodeURIComponent(String(pspType)))
|
|
100
96
|
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
@@ -141,13 +137,12 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
|
141
137
|
* @summary Handle the webhook from PSP
|
|
142
138
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
143
139
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
144
|
-
* @param {string} productSlug
|
|
145
140
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
146
141
|
* @param {*} [options] Override http request option.
|
|
147
142
|
* @throws {RequiredError}
|
|
148
143
|
*/
|
|
149
|
-
async
|
|
150
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
144
|
+
async postWebhook(pspType: string, tenantSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
145
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, body, options);
|
|
151
146
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
152
147
|
},
|
|
153
148
|
/**
|
|
@@ -155,13 +150,13 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
|
155
150
|
* @summary Handle the webhook from PSP
|
|
156
151
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
157
152
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
158
|
-
* @param {string} productSlug
|
|
153
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
159
154
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
160
155
|
* @param {*} [options] Override http request option.
|
|
161
156
|
* @throws {RequiredError}
|
|
162
157
|
*/
|
|
163
|
-
async
|
|
164
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
158
|
+
async postWebhookWithProductSlug(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
159
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhookWithProductSlug(pspType, tenantSlug, productSlug, body, options);
|
|
165
160
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
166
161
|
},
|
|
167
162
|
}
|
|
@@ -179,96 +174,88 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
|
|
|
179
174
|
* @summary Handle the webhook from PSP
|
|
180
175
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
181
176
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
182
|
-
* @param {string} productSlug
|
|
183
177
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
184
178
|
* @param {*} [options] Override http request option.
|
|
185
179
|
* @throws {RequiredError}
|
|
186
180
|
*/
|
|
187
|
-
|
|
188
|
-
return localVarFp.
|
|
181
|
+
postWebhook(pspType: string, tenantSlug: string, body: object, options?: any): AxiosPromise<void> {
|
|
182
|
+
return localVarFp.postWebhook(pspType, tenantSlug, body, options).then((request) => request(axios, basePath));
|
|
189
183
|
},
|
|
190
184
|
/**
|
|
191
185
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
192
186
|
* @summary Handle the webhook from PSP
|
|
193
187
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
194
188
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
195
|
-
* @param {string} productSlug
|
|
189
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
196
190
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
197
191
|
* @param {*} [options] Override http request option.
|
|
198
192
|
* @throws {RequiredError}
|
|
199
193
|
*/
|
|
200
|
-
|
|
201
|
-
return localVarFp.
|
|
194
|
+
postWebhookWithProductSlug(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: any): AxiosPromise<void> {
|
|
195
|
+
return localVarFp.postWebhookWithProductSlug(pspType, tenantSlug, productSlug, body, options).then((request) => request(axios, basePath));
|
|
202
196
|
},
|
|
203
197
|
};
|
|
204
198
|
};
|
|
205
199
|
|
|
206
200
|
/**
|
|
207
|
-
* Request parameters for
|
|
201
|
+
* Request parameters for postWebhook operation in WebhooksApi.
|
|
208
202
|
* @export
|
|
209
|
-
* @interface
|
|
203
|
+
* @interface WebhooksApiPostWebhookRequest
|
|
210
204
|
*/
|
|
211
|
-
export interface
|
|
205
|
+
export interface WebhooksApiPostWebhookRequest {
|
|
212
206
|
/**
|
|
213
207
|
* The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
214
208
|
* @type {string}
|
|
215
|
-
* @memberof
|
|
209
|
+
* @memberof WebhooksApiPostWebhook
|
|
216
210
|
*/
|
|
217
211
|
readonly pspType: string
|
|
218
212
|
|
|
219
213
|
/**
|
|
220
214
|
* Unique slug identifier representing a tenant.
|
|
221
215
|
* @type {string}
|
|
222
|
-
* @memberof
|
|
216
|
+
* @memberof WebhooksApiPostWebhook
|
|
223
217
|
*/
|
|
224
218
|
readonly tenantSlug: string
|
|
225
219
|
|
|
226
|
-
/**
|
|
227
|
-
*
|
|
228
|
-
* @type {string}
|
|
229
|
-
* @memberof WebhooksApiPostWebhook0
|
|
230
|
-
*/
|
|
231
|
-
readonly productSlug: string
|
|
232
|
-
|
|
233
220
|
/**
|
|
234
221
|
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
235
222
|
* @type {object}
|
|
236
|
-
* @memberof
|
|
223
|
+
* @memberof WebhooksApiPostWebhook
|
|
237
224
|
*/
|
|
238
225
|
readonly body: object
|
|
239
226
|
}
|
|
240
227
|
|
|
241
228
|
/**
|
|
242
|
-
* Request parameters for
|
|
229
|
+
* Request parameters for postWebhookWithProductSlug operation in WebhooksApi.
|
|
243
230
|
* @export
|
|
244
|
-
* @interface
|
|
231
|
+
* @interface WebhooksApiPostWebhookWithProductSlugRequest
|
|
245
232
|
*/
|
|
246
|
-
export interface
|
|
233
|
+
export interface WebhooksApiPostWebhookWithProductSlugRequest {
|
|
247
234
|
/**
|
|
248
235
|
* The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
249
236
|
* @type {string}
|
|
250
|
-
* @memberof
|
|
237
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
251
238
|
*/
|
|
252
239
|
readonly pspType: string
|
|
253
240
|
|
|
254
241
|
/**
|
|
255
242
|
* Unique slug identifier representing a tenant.
|
|
256
243
|
* @type {string}
|
|
257
|
-
* @memberof
|
|
244
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
258
245
|
*/
|
|
259
246
|
readonly tenantSlug: string
|
|
260
247
|
|
|
261
248
|
/**
|
|
262
|
-
*
|
|
249
|
+
* Optional product slug associated with the webhook.
|
|
263
250
|
* @type {string}
|
|
264
|
-
* @memberof
|
|
251
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
265
252
|
*/
|
|
266
253
|
readonly productSlug: string
|
|
267
254
|
|
|
268
255
|
/**
|
|
269
256
|
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
270
257
|
* @type {object}
|
|
271
|
-
* @memberof
|
|
258
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
272
259
|
*/
|
|
273
260
|
readonly body: object
|
|
274
261
|
}
|
|
@@ -283,24 +270,24 @@ export class WebhooksApi extends BaseAPI {
|
|
|
283
270
|
/**
|
|
284
271
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
285
272
|
* @summary Handle the webhook from PSP
|
|
286
|
-
* @param {
|
|
273
|
+
* @param {WebhooksApiPostWebhookRequest} requestParameters Request parameters.
|
|
287
274
|
* @param {*} [options] Override http request option.
|
|
288
275
|
* @throws {RequiredError}
|
|
289
276
|
* @memberof WebhooksApi
|
|
290
277
|
*/
|
|
291
|
-
public
|
|
292
|
-
return WebhooksApiFp(this.configuration).
|
|
278
|
+
public postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig) {
|
|
279
|
+
return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
293
280
|
}
|
|
294
281
|
|
|
295
282
|
/**
|
|
296
283
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
297
284
|
* @summary Handle the webhook from PSP
|
|
298
|
-
* @param {
|
|
285
|
+
* @param {WebhooksApiPostWebhookWithProductSlugRequest} requestParameters Request parameters.
|
|
299
286
|
* @param {*} [options] Override http request option.
|
|
300
287
|
* @throws {RequiredError}
|
|
301
288
|
* @memberof WebhooksApi
|
|
302
289
|
*/
|
|
303
|
-
public
|
|
304
|
-
return WebhooksApiFp(this.configuration).
|
|
290
|
+
public postWebhookWithProductSlug(requestParameters: WebhooksApiPostWebhookWithProductSlugRequest, options?: AxiosRequestConfig) {
|
|
291
|
+
return WebhooksApiFp(this.configuration).postWebhookWithProductSlug(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
305
292
|
}
|
|
306
293
|
}
|
|
@@ -22,23 +22,22 @@ export declare const WebhooksApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
22
22
|
* @summary Handle the webhook from PSP
|
|
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
|
-
* @param {string} productSlug
|
|
26
25
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
27
26
|
* @param {*} [options] Override http request option.
|
|
28
27
|
* @throws {RequiredError}
|
|
29
28
|
*/
|
|
30
|
-
|
|
29
|
+
postWebhook: (pspType: string, tenantSlug: string, body: object, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
31
30
|
/**
|
|
32
31
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
33
32
|
* @summary Handle the webhook from PSP
|
|
34
33
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
35
34
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
36
|
-
* @param {string} productSlug
|
|
35
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
37
36
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
38
37
|
* @param {*} [options] Override http request option.
|
|
39
38
|
* @throws {RequiredError}
|
|
40
39
|
*/
|
|
41
|
-
|
|
40
|
+
postWebhookWithProductSlug: (pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
42
41
|
};
|
|
43
42
|
/**
|
|
44
43
|
* WebhooksApi - functional programming interface
|
|
@@ -50,23 +49,22 @@ export declare const WebhooksApiFp: (configuration?: Configuration) => {
|
|
|
50
49
|
* @summary Handle the webhook from PSP
|
|
51
50
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
52
51
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
53
|
-
* @param {string} productSlug
|
|
54
52
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
55
53
|
* @param {*} [options] Override http request option.
|
|
56
54
|
* @throws {RequiredError}
|
|
57
55
|
*/
|
|
58
|
-
|
|
56
|
+
postWebhook(pspType: string, tenantSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
59
57
|
/**
|
|
60
58
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
61
59
|
* @summary Handle the webhook from PSP
|
|
62
60
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
63
61
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
64
|
-
* @param {string} productSlug
|
|
62
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
65
63
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
66
64
|
* @param {*} [options] Override http request option.
|
|
67
65
|
* @throws {RequiredError}
|
|
68
66
|
*/
|
|
69
|
-
|
|
67
|
+
postWebhookWithProductSlug(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
70
68
|
};
|
|
71
69
|
/**
|
|
72
70
|
* WebhooksApi - factory interface
|
|
@@ -78,83 +76,76 @@ export declare const WebhooksApiFactory: (configuration?: Configuration, basePat
|
|
|
78
76
|
* @summary Handle the webhook from PSP
|
|
79
77
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
80
78
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
81
|
-
* @param {string} productSlug
|
|
82
79
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
83
80
|
* @param {*} [options] Override http request option.
|
|
84
81
|
* @throws {RequiredError}
|
|
85
82
|
*/
|
|
86
|
-
|
|
83
|
+
postWebhook(pspType: string, tenantSlug: string, body: object, options?: any): AxiosPromise<void>;
|
|
87
84
|
/**
|
|
88
85
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
89
86
|
* @summary Handle the webhook from PSP
|
|
90
87
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
91
88
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
92
|
-
* @param {string} productSlug
|
|
89
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
93
90
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
94
91
|
* @param {*} [options] Override http request option.
|
|
95
92
|
* @throws {RequiredError}
|
|
96
93
|
*/
|
|
97
|
-
|
|
94
|
+
postWebhookWithProductSlug(pspType: string, tenantSlug: string, productSlug: string, body: object, options?: any): AxiosPromise<void>;
|
|
98
95
|
};
|
|
99
96
|
/**
|
|
100
|
-
* Request parameters for
|
|
97
|
+
* Request parameters for postWebhook operation in WebhooksApi.
|
|
101
98
|
* @export
|
|
102
|
-
* @interface
|
|
99
|
+
* @interface WebhooksApiPostWebhookRequest
|
|
103
100
|
*/
|
|
104
|
-
export interface
|
|
101
|
+
export interface WebhooksApiPostWebhookRequest {
|
|
105
102
|
/**
|
|
106
103
|
* The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
107
104
|
* @type {string}
|
|
108
|
-
* @memberof
|
|
105
|
+
* @memberof WebhooksApiPostWebhook
|
|
109
106
|
*/
|
|
110
107
|
readonly pspType: string;
|
|
111
108
|
/**
|
|
112
109
|
* Unique slug identifier representing a tenant.
|
|
113
110
|
* @type {string}
|
|
114
|
-
* @memberof
|
|
111
|
+
* @memberof WebhooksApiPostWebhook
|
|
115
112
|
*/
|
|
116
113
|
readonly tenantSlug: string;
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* @type {string}
|
|
120
|
-
* @memberof WebhooksApiPostWebhook0
|
|
121
|
-
*/
|
|
122
|
-
readonly productSlug: string;
|
|
123
114
|
/**
|
|
124
115
|
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
125
116
|
* @type {object}
|
|
126
|
-
* @memberof
|
|
117
|
+
* @memberof WebhooksApiPostWebhook
|
|
127
118
|
*/
|
|
128
119
|
readonly body: object;
|
|
129
120
|
}
|
|
130
121
|
/**
|
|
131
|
-
* Request parameters for
|
|
122
|
+
* Request parameters for postWebhookWithProductSlug operation in WebhooksApi.
|
|
132
123
|
* @export
|
|
133
|
-
* @interface
|
|
124
|
+
* @interface WebhooksApiPostWebhookWithProductSlugRequest
|
|
134
125
|
*/
|
|
135
|
-
export interface
|
|
126
|
+
export interface WebhooksApiPostWebhookWithProductSlugRequest {
|
|
136
127
|
/**
|
|
137
128
|
* The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
138
129
|
* @type {string}
|
|
139
|
-
* @memberof
|
|
130
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
140
131
|
*/
|
|
141
132
|
readonly pspType: string;
|
|
142
133
|
/**
|
|
143
134
|
* Unique slug identifier representing a tenant.
|
|
144
135
|
* @type {string}
|
|
145
|
-
* @memberof
|
|
136
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
146
137
|
*/
|
|
147
138
|
readonly tenantSlug: string;
|
|
148
139
|
/**
|
|
149
|
-
*
|
|
140
|
+
* Optional product slug associated with the webhook.
|
|
150
141
|
* @type {string}
|
|
151
|
-
* @memberof
|
|
142
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
152
143
|
*/
|
|
153
144
|
readonly productSlug: string;
|
|
154
145
|
/**
|
|
155
146
|
* Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
156
147
|
* @type {object}
|
|
157
|
-
* @memberof
|
|
148
|
+
* @memberof WebhooksApiPostWebhookWithProductSlug
|
|
158
149
|
*/
|
|
159
150
|
readonly body: object;
|
|
160
151
|
}
|
|
@@ -168,19 +159,19 @@ export declare class WebhooksApi extends BaseAPI {
|
|
|
168
159
|
/**
|
|
169
160
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
170
161
|
* @summary Handle the webhook from PSP
|
|
171
|
-
* @param {
|
|
162
|
+
* @param {WebhooksApiPostWebhookRequest} requestParameters Request parameters.
|
|
172
163
|
* @param {*} [options] Override http request option.
|
|
173
164
|
* @throws {RequiredError}
|
|
174
165
|
* @memberof WebhooksApi
|
|
175
166
|
*/
|
|
176
|
-
|
|
167
|
+
postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
177
168
|
/**
|
|
178
169
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
179
170
|
* @summary Handle the webhook from PSP
|
|
180
|
-
* @param {
|
|
171
|
+
* @param {WebhooksApiPostWebhookWithProductSlugRequest} requestParameters Request parameters.
|
|
181
172
|
* @param {*} [options] Override http request option.
|
|
182
173
|
* @throws {RequiredError}
|
|
183
174
|
* @memberof WebhooksApi
|
|
184
175
|
*/
|
|
185
|
-
|
|
176
|
+
postWebhookWithProductSlug(requestParameters: WebhooksApiPostWebhookWithProductSlugRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
186
177
|
}
|
package/dist/api/webhooks-api.js
CHANGED
|
@@ -97,28 +97,24 @@ var WebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
* @summary Handle the webhook from PSP
|
|
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
|
-
* @param {string} productSlug
|
|
101
100
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
102
101
|
* @param {*} [options] Override http request option.
|
|
103
102
|
* @throws {RequiredError}
|
|
104
103
|
*/
|
|
105
|
-
|
|
104
|
+
postWebhook: function (pspType, tenantSlug, body, options) {
|
|
106
105
|
if (options === void 0) { options = {}; }
|
|
107
106
|
return __awaiter(_this, void 0, void 0, function () {
|
|
108
107
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
109
108
|
return __generator(this, function (_a) {
|
|
110
109
|
// verify required parameter 'pspType' is not null or undefined
|
|
111
|
-
(0, common_1.assertParamExists)('
|
|
110
|
+
(0, common_1.assertParamExists)('postWebhook', 'pspType', pspType);
|
|
112
111
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
113
|
-
(0, common_1.assertParamExists)('
|
|
114
|
-
// verify required parameter 'productSlug' is not null or undefined
|
|
115
|
-
(0, common_1.assertParamExists)('postWebhook0', 'productSlug', productSlug);
|
|
112
|
+
(0, common_1.assertParamExists)('postWebhook', 'tenantSlug', tenantSlug);
|
|
116
113
|
// verify required parameter 'body' is not null or undefined
|
|
117
|
-
(0, common_1.assertParamExists)('
|
|
114
|
+
(0, common_1.assertParamExists)('postWebhook', 'body', body);
|
|
118
115
|
localVarPath = "/paymentservice/v1/webhooks/{pspType}/{tenantSlug}"
|
|
119
116
|
.replace("{".concat("pspType", "}"), encodeURIComponent(String(pspType)))
|
|
120
|
-
.replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)))
|
|
121
|
-
.replace("{".concat("productSlug", "}"), encodeURIComponent(String(productSlug)));
|
|
117
|
+
.replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)));
|
|
122
118
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
123
119
|
if (configuration) {
|
|
124
120
|
baseOptions = configuration.baseOptions;
|
|
@@ -144,24 +140,24 @@ var WebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
144
140
|
* @summary Handle the webhook from PSP
|
|
145
141
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
146
142
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
147
|
-
* @param {string} productSlug
|
|
143
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
148
144
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
149
145
|
* @param {*} [options] Override http request option.
|
|
150
146
|
* @throws {RequiredError}
|
|
151
147
|
*/
|
|
152
|
-
|
|
148
|
+
postWebhookWithProductSlug: function (pspType, tenantSlug, productSlug, body, options) {
|
|
153
149
|
if (options === void 0) { options = {}; }
|
|
154
150
|
return __awaiter(_this, void 0, void 0, function () {
|
|
155
151
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
152
|
return __generator(this, function (_a) {
|
|
157
153
|
// verify required parameter 'pspType' is not null or undefined
|
|
158
|
-
(0, common_1.assertParamExists)('
|
|
154
|
+
(0, common_1.assertParamExists)('postWebhookWithProductSlug', 'pspType', pspType);
|
|
159
155
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
160
|
-
(0, common_1.assertParamExists)('
|
|
156
|
+
(0, common_1.assertParamExists)('postWebhookWithProductSlug', 'tenantSlug', tenantSlug);
|
|
161
157
|
// verify required parameter 'productSlug' is not null or undefined
|
|
162
|
-
(0, common_1.assertParamExists)('
|
|
158
|
+
(0, common_1.assertParamExists)('postWebhookWithProductSlug', 'productSlug', productSlug);
|
|
163
159
|
// verify required parameter 'body' is not null or undefined
|
|
164
|
-
(0, common_1.assertParamExists)('
|
|
160
|
+
(0, common_1.assertParamExists)('postWebhookWithProductSlug', 'body', body);
|
|
165
161
|
localVarPath = "/paymentservice/v1/webhooks/{pspType}/{tenantSlug}/{productSlug}"
|
|
166
162
|
.replace("{".concat("pspType", "}"), encodeURIComponent(String(pspType)))
|
|
167
163
|
.replace("{".concat("tenantSlug", "}"), encodeURIComponent(String(tenantSlug)))
|
|
@@ -201,17 +197,16 @@ var WebhooksApiFp = function (configuration) {
|
|
|
201
197
|
* @summary Handle the webhook from PSP
|
|
202
198
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
203
199
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
204
|
-
* @param {string} productSlug
|
|
205
200
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
206
201
|
* @param {*} [options] Override http request option.
|
|
207
202
|
* @throws {RequiredError}
|
|
208
203
|
*/
|
|
209
|
-
|
|
204
|
+
postWebhook: function (pspType, tenantSlug, body, options) {
|
|
210
205
|
return __awaiter(this, void 0, void 0, function () {
|
|
211
206
|
var localVarAxiosArgs;
|
|
212
207
|
return __generator(this, function (_a) {
|
|
213
208
|
switch (_a.label) {
|
|
214
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
209
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, body, options)];
|
|
215
210
|
case 1:
|
|
216
211
|
localVarAxiosArgs = _a.sent();
|
|
217
212
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -224,17 +219,17 @@ var WebhooksApiFp = function (configuration) {
|
|
|
224
219
|
* @summary Handle the webhook from PSP
|
|
225
220
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
226
221
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
227
|
-
* @param {string} productSlug
|
|
222
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
228
223
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
229
224
|
* @param {*} [options] Override http request option.
|
|
230
225
|
* @throws {RequiredError}
|
|
231
226
|
*/
|
|
232
|
-
|
|
227
|
+
postWebhookWithProductSlug: function (pspType, tenantSlug, productSlug, body, options) {
|
|
233
228
|
return __awaiter(this, void 0, void 0, function () {
|
|
234
229
|
var localVarAxiosArgs;
|
|
235
230
|
return __generator(this, function (_a) {
|
|
236
231
|
switch (_a.label) {
|
|
237
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
232
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.postWebhookWithProductSlug(pspType, tenantSlug, productSlug, body, options)];
|
|
238
233
|
case 1:
|
|
239
234
|
localVarAxiosArgs = _a.sent();
|
|
240
235
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -257,26 +252,25 @@ var WebhooksApiFactory = function (configuration, basePath, axios) {
|
|
|
257
252
|
* @summary Handle the webhook from PSP
|
|
258
253
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
259
254
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
260
|
-
* @param {string} productSlug
|
|
261
255
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
262
256
|
* @param {*} [options] Override http request option.
|
|
263
257
|
* @throws {RequiredError}
|
|
264
258
|
*/
|
|
265
|
-
|
|
266
|
-
return localVarFp.
|
|
259
|
+
postWebhook: function (pspType, tenantSlug, body, options) {
|
|
260
|
+
return localVarFp.postWebhook(pspType, tenantSlug, body, options).then(function (request) { return request(axios, basePath); });
|
|
267
261
|
},
|
|
268
262
|
/**
|
|
269
263
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
270
264
|
* @summary Handle the webhook from PSP
|
|
271
265
|
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis, adyen</i>
|
|
272
266
|
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
273
|
-
* @param {string} productSlug
|
|
267
|
+
* @param {string} productSlug Optional product slug associated with the webhook.
|
|
274
268
|
* @param {object} body Accepts a webhook payload. The structure may vary depending on the payment service provider.
|
|
275
269
|
* @param {*} [options] Override http request option.
|
|
276
270
|
* @throws {RequiredError}
|
|
277
271
|
*/
|
|
278
|
-
|
|
279
|
-
return localVarFp.
|
|
272
|
+
postWebhookWithProductSlug: function (pspType, tenantSlug, productSlug, body, options) {
|
|
273
|
+
return localVarFp.postWebhookWithProductSlug(pspType, tenantSlug, productSlug, body, options).then(function (request) { return request(axios, basePath); });
|
|
280
274
|
},
|
|
281
275
|
};
|
|
282
276
|
};
|
|
@@ -295,26 +289,26 @@ var WebhooksApi = /** @class */ (function (_super) {
|
|
|
295
289
|
/**
|
|
296
290
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
297
291
|
* @summary Handle the webhook from PSP
|
|
298
|
-
* @param {
|
|
292
|
+
* @param {WebhooksApiPostWebhookRequest} requestParameters Request parameters.
|
|
299
293
|
* @param {*} [options] Override http request option.
|
|
300
294
|
* @throws {RequiredError}
|
|
301
295
|
* @memberof WebhooksApi
|
|
302
296
|
*/
|
|
303
|
-
WebhooksApi.prototype.
|
|
297
|
+
WebhooksApi.prototype.postWebhook = function (requestParameters, options) {
|
|
304
298
|
var _this = this;
|
|
305
|
-
return (0, exports.WebhooksApiFp)(this.configuration).
|
|
299
|
+
return (0, exports.WebhooksApiFp)(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.body, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
306
300
|
};
|
|
307
301
|
/**
|
|
308
302
|
* This will processes the webhook from external payment service provider. **Required Permissions** none
|
|
309
303
|
* @summary Handle the webhook from PSP
|
|
310
|
-
* @param {
|
|
304
|
+
* @param {WebhooksApiPostWebhookWithProductSlugRequest} requestParameters Request parameters.
|
|
311
305
|
* @param {*} [options] Override http request option.
|
|
312
306
|
* @throws {RequiredError}
|
|
313
307
|
* @memberof WebhooksApi
|
|
314
308
|
*/
|
|
315
|
-
WebhooksApi.prototype.
|
|
309
|
+
WebhooksApi.prototype.postWebhookWithProductSlug = function (requestParameters, options) {
|
|
316
310
|
var _this = this;
|
|
317
|
-
return (0, exports.WebhooksApiFp)(this.configuration).
|
|
311
|
+
return (0, exports.WebhooksApiFp)(this.configuration).postWebhookWithProductSlug(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, requestParameters.body, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
318
312
|
};
|
|
319
313
|
return WebhooksApi;
|
|
320
314
|
}(base_1.BaseAPI));
|