@emilgroup/payment-sdk-node 1.22.1-beta.39 → 1.22.1-beta.40

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.22.1-beta.39 --save
20
+ npm install @emilgroup/payment-sdk-node@1.22.1-beta.40 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk-node@1.22.1-beta.39
24
+ yarn add @emilgroup/payment-sdk-node@1.22.1-beta.40
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -36,6 +36,51 @@ const FormData = require('form-data');
36
36
  */
37
37
  export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?: Configuration) {
38
38
  return {
39
+ /**
40
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
41
+ * @summary Create the activate policy payment method
42
+ * @param {string} code
43
+ * @param {string} [authorization] Bearer Token
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ */
47
+ activatePolicyPaymentMethod: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
+ // verify required parameter 'code' is not null or undefined
49
+ assertParamExists('activatePolicyPaymentMethod', 'code', code)
50
+ const localVarPath = `/paymentservice/v1/policy-payment-methods/activate/{code}`
51
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
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
+ // authentication bearer required
66
+ // http bearer authentication required
67
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
+
69
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
71
+ }
72
+
73
+
74
+
75
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
76
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
77
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
39
84
  /**
40
85
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
41
86
  * @summary Create the policy payment method
@@ -169,6 +214,18 @@ export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?
169
214
  export const PolicyPaymentMethodsApiFp = function(configuration?: Configuration) {
170
215
  const localVarAxiosParamCreator = PolicyPaymentMethodsApiAxiosParamCreator(configuration)
171
216
  return {
217
+ /**
218
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
219
+ * @summary Create the activate policy payment method
220
+ * @param {string} code
221
+ * @param {string} [authorization] Bearer Token
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ async activatePolicyPaymentMethod(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
226
+ const localVarAxiosArgs = await localVarAxiosParamCreator.activatePolicyPaymentMethod(code, authorization, options);
227
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
228
+ },
172
229
  /**
173
230
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
174
231
  * @summary Create the policy payment method
@@ -209,6 +266,17 @@ export const PolicyPaymentMethodsApiFp = function(configuration?: Configuration)
209
266
  export const PolicyPaymentMethodsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
210
267
  const localVarFp = PolicyPaymentMethodsApiFp(configuration)
211
268
  return {
269
+ /**
270
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
271
+ * @summary Create the activate policy payment method
272
+ * @param {string} code
273
+ * @param {string} [authorization] Bearer Token
274
+ * @param {*} [options] Override http request option.
275
+ * @throws {RequiredError}
276
+ */
277
+ activatePolicyPaymentMethod(code: string, authorization?: string, options?: any): AxiosPromise<object> {
278
+ return localVarFp.activatePolicyPaymentMethod(code, authorization, options).then((request) => request(axios, basePath));
279
+ },
212
280
  /**
213
281
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
214
282
  * @summary Create the policy payment method
@@ -240,6 +308,27 @@ export const PolicyPaymentMethodsApiFactory = function (configuration?: Configur
240
308
  };
241
309
  };
242
310
 
311
+ /**
312
+ * Request parameters for activatePolicyPaymentMethod operation in PolicyPaymentMethodsApi.
313
+ * @export
314
+ * @interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest
315
+ */
316
+ export interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest {
317
+ /**
318
+ *
319
+ * @type {string}
320
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
321
+ */
322
+ readonly code: string
323
+
324
+ /**
325
+ * Bearer Token
326
+ * @type {string}
327
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
328
+ */
329
+ readonly authorization?: string
330
+ }
331
+
243
332
  /**
244
333
  * Request parameters for createPolicyPaymentMethod operation in PolicyPaymentMethodsApi.
245
334
  * @export
@@ -331,6 +420,18 @@ export interface PolicyPaymentMethodsApiListPolicyPaymentMethodsRequest {
331
420
  * @extends {BaseAPI}
332
421
  */
333
422
  export class PolicyPaymentMethodsApi extends BaseAPI {
423
+ /**
424
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
425
+ * @summary Create the activate policy payment method
426
+ * @param {PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest} requestParameters Request parameters.
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ * @memberof PolicyPaymentMethodsApi
430
+ */
431
+ public activatePolicyPaymentMethod(requestParameters: PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest, options?: AxiosRequestConfig) {
432
+ return PolicyPaymentMethodsApiFp(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
433
+ }
434
+
334
435
  /**
335
436
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
336
437
  * @summary Create the policy payment method
@@ -20,6 +20,15 @@ import { ListPolicyPaymentMethodsResponseClass } from '../models';
20
20
  * @export
21
21
  */
22
22
  export declare const PolicyPaymentMethodsApiAxiosParamCreator: (configuration?: Configuration) => {
23
+ /**
24
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
25
+ * @summary Create the activate policy payment method
26
+ * @param {string} code
27
+ * @param {string} [authorization] Bearer Token
28
+ * @param {*} [options] Override http request option.
29
+ * @throws {RequiredError}
30
+ */
31
+ activatePolicyPaymentMethod: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
23
32
  /**
24
33
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
25
34
  * @summary Create the policy payment method
@@ -50,6 +59,15 @@ export declare const PolicyPaymentMethodsApiAxiosParamCreator: (configuration?:
50
59
  * @export
51
60
  */
52
61
  export declare const PolicyPaymentMethodsApiFp: (configuration?: Configuration) => {
62
+ /**
63
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
64
+ * @summary Create the activate policy payment method
65
+ * @param {string} code
66
+ * @param {string} [authorization] Bearer Token
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ activatePolicyPaymentMethod(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
53
71
  /**
54
72
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
55
73
  * @summary Create the policy payment method
@@ -80,6 +98,15 @@ export declare const PolicyPaymentMethodsApiFp: (configuration?: Configuration)
80
98
  * @export
81
99
  */
82
100
  export declare const PolicyPaymentMethodsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
101
+ /**
102
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
103
+ * @summary Create the activate policy payment method
104
+ * @param {string} code
105
+ * @param {string} [authorization] Bearer Token
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ activatePolicyPaymentMethod(code: string, authorization?: string, options?: any): AxiosPromise<object>;
83
110
  /**
84
111
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
85
112
  * @summary Create the policy payment method
@@ -105,6 +132,25 @@ export declare const PolicyPaymentMethodsApiFactory: (configuration?: Configurat
105
132
  */
106
133
  listPolicyPaymentMethods(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPolicyPaymentMethodsResponseClass>;
107
134
  };
135
+ /**
136
+ * Request parameters for activatePolicyPaymentMethod operation in PolicyPaymentMethodsApi.
137
+ * @export
138
+ * @interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest
139
+ */
140
+ export interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest {
141
+ /**
142
+ *
143
+ * @type {string}
144
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
145
+ */
146
+ readonly code: string;
147
+ /**
148
+ * Bearer Token
149
+ * @type {string}
150
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
151
+ */
152
+ readonly authorization?: string;
153
+ }
108
154
  /**
109
155
  * Request parameters for createPolicyPaymentMethod operation in PolicyPaymentMethodsApi.
110
156
  * @export
@@ -186,6 +232,15 @@ export interface PolicyPaymentMethodsApiListPolicyPaymentMethodsRequest {
186
232
  * @extends {BaseAPI}
187
233
  */
188
234
  export declare class PolicyPaymentMethodsApi extends BaseAPI {
235
+ /**
236
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
237
+ * @summary Create the activate policy payment method
238
+ * @param {PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest} requestParameters Request parameters.
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ * @memberof PolicyPaymentMethodsApi
242
+ */
243
+ activatePolicyPaymentMethod(requestParameters: PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
189
244
  /**
190
245
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
191
246
  * @summary Create the policy payment method
@@ -96,6 +96,54 @@ var FormData = require('form-data');
96
96
  var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
+ /**
100
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
101
+ * @summary Create the activate policy payment method
102
+ * @param {string} code
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ activatePolicyPaymentMethod: function (code, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'code' is not null or undefined
115
+ (0, common_1.assertParamExists)('activatePolicyPaymentMethod', 'code', code);
116
+ localVarPath = "/paymentservice/v1/policy-payment-methods/activate/{code}"
117
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
118
+ localVarUrlObj = new url_1.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
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ case 1:
130
+ // authentication bearer required
131
+ // http bearer authentication required
132
+ _a.sent();
133
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ }
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ return [2 /*return*/, {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ }];
143
+ }
144
+ });
145
+ });
146
+ },
99
147
  /**
100
148
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
101
149
  * @summary Create the policy payment method
@@ -227,6 +275,27 @@ exports.PolicyPaymentMethodsApiAxiosParamCreator = PolicyPaymentMethodsApiAxiosP
227
275
  var PolicyPaymentMethodsApiFp = function (configuration) {
228
276
  var localVarAxiosParamCreator = (0, exports.PolicyPaymentMethodsApiAxiosParamCreator)(configuration);
229
277
  return {
278
+ /**
279
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
280
+ * @summary Create the activate policy payment method
281
+ * @param {string} code
282
+ * @param {string} [authorization] Bearer Token
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ activatePolicyPaymentMethod: function (code, authorization, options) {
287
+ return __awaiter(this, void 0, void 0, function () {
288
+ var localVarAxiosArgs;
289
+ return __generator(this, function (_a) {
290
+ switch (_a.label) {
291
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.activatePolicyPaymentMethod(code, authorization, options)];
292
+ case 1:
293
+ localVarAxiosArgs = _a.sent();
294
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
295
+ }
296
+ });
297
+ });
298
+ },
230
299
  /**
231
300
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
232
301
  * @summary Create the policy payment method
@@ -285,6 +354,17 @@ exports.PolicyPaymentMethodsApiFp = PolicyPaymentMethodsApiFp;
285
354
  var PolicyPaymentMethodsApiFactory = function (configuration, basePath, axios) {
286
355
  var localVarFp = (0, exports.PolicyPaymentMethodsApiFp)(configuration);
287
356
  return {
357
+ /**
358
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
359
+ * @summary Create the activate policy payment method
360
+ * @param {string} code
361
+ * @param {string} [authorization] Bearer Token
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ activatePolicyPaymentMethod: function (code, authorization, options) {
366
+ return localVarFp.activatePolicyPaymentMethod(code, authorization, options).then(function (request) { return request(axios, basePath); });
367
+ },
288
368
  /**
289
369
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
290
370
  * @summary Create the policy payment method
@@ -327,6 +407,18 @@ var PolicyPaymentMethodsApi = /** @class */ (function (_super) {
327
407
  function PolicyPaymentMethodsApi() {
328
408
  return _super !== null && _super.apply(this, arguments) || this;
329
409
  }
410
+ /**
411
+ * Activates the requested policy payment method and automatically deactivates any currently active policy payment method for the same policy. **Required Permissions** \"payment-management.payments.update\"
412
+ * @summary Create the activate policy payment method
413
+ * @param {PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest} requestParameters Request parameters.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ * @memberof PolicyPaymentMethodsApi
417
+ */
418
+ PolicyPaymentMethodsApi.prototype.activatePolicyPaymentMethod = function (requestParameters, options) {
419
+ var _this = this;
420
+ return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
421
+ };
330
422
  /**
331
423
  * Attaches a payment method to a policy by creating a policy payment method and setting it as active. Any previous payment method attachment will be deactivated. **Required Permissions** \"payment-management.payments.create\"
332
424
  * @summary Create the policy payment method
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/payment-sdk-node",
3
- "version": "1.22.1-beta.39",
3
+ "version": "1.22.1-beta.40",
4
4
  "description": "OpenAPI client for @emilgroup/payment-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [