@emilgroup/payment-sdk 1.16.1-beta.64 → 1.16.1-beta.66

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