@emilgroup/payment-sdk-node 1.23.1-beta.67 → 1.23.1-beta.69

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