@emilgroup/payment-sdk 1.14.1-beta.40 → 1.14.1-beta.42

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.14.1-beta.40 --save
20
+ npm install @emilgroup/payment-sdk@1.14.1-beta.42 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/payment-sdk@1.14.1-beta.40
24
+ yarn add @emilgroup/payment-sdk@1.14.1-beta.42
25
25
  ```
26
26
 
27
27
  And then you can import `PaymentsApi`.
@@ -32,6 +32,51 @@ import { ListPolicyPaymentMethodsResponseClass } from '../models';
32
32
  */
33
33
  export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?: Configuration) {
34
34
  return {
35
+ /**
36
+ * 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\"
37
+ * @summary Activate the policy payment method
38
+ * @param {string} code
39
+ * @param {string} [authorization] Bearer Token
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ activatePolicyPaymentMethod: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ // verify required parameter 'code' is not null or undefined
45
+ assertParamExists('activatePolicyPaymentMethod', 'code', code)
46
+ const localVarPath = `/paymentservice/v1/policy-payment-methods/activate/{code}`
47
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
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
+ // authentication bearer required
62
+ // http bearer authentication required
63
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
64
+
65
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
66
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
67
+ }
68
+
69
+
70
+
71
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
72
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
73
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
74
+
75
+ return {
76
+ url: toPathString(localVarUrlObj),
77
+ options: localVarRequestOptions,
78
+ };
79
+ },
35
80
  /**
36
81
  * 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\"
37
82
  * @summary Create the policy payment method
@@ -165,6 +210,18 @@ export const PolicyPaymentMethodsApiAxiosParamCreator = function (configuration?
165
210
  export const PolicyPaymentMethodsApiFp = function(configuration?: Configuration) {
166
211
  const localVarAxiosParamCreator = PolicyPaymentMethodsApiAxiosParamCreator(configuration)
167
212
  return {
213
+ /**
214
+ * 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\"
215
+ * @summary Activate the policy payment method
216
+ * @param {string} code
217
+ * @param {string} [authorization] Bearer Token
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ async activatePolicyPaymentMethod(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
222
+ const localVarAxiosArgs = await localVarAxiosParamCreator.activatePolicyPaymentMethod(code, authorization, options);
223
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
224
+ },
168
225
  /**
169
226
  * 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\"
170
227
  * @summary Create the policy payment method
@@ -205,6 +262,17 @@ export const PolicyPaymentMethodsApiFp = function(configuration?: Configuration)
205
262
  export const PolicyPaymentMethodsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
206
263
  const localVarFp = PolicyPaymentMethodsApiFp(configuration)
207
264
  return {
265
+ /**
266
+ * 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\"
267
+ * @summary Activate the policy payment method
268
+ * @param {string} code
269
+ * @param {string} [authorization] Bearer Token
270
+ * @param {*} [options] Override http request option.
271
+ * @throws {RequiredError}
272
+ */
273
+ activatePolicyPaymentMethod(code: string, authorization?: string, options?: any): AxiosPromise<object> {
274
+ return localVarFp.activatePolicyPaymentMethod(code, authorization, options).then((request) => request(axios, basePath));
275
+ },
208
276
  /**
209
277
  * 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\"
210
278
  * @summary Create the policy payment method
@@ -236,6 +304,27 @@ export const PolicyPaymentMethodsApiFactory = function (configuration?: Configur
236
304
  };
237
305
  };
238
306
 
307
+ /**
308
+ * Request parameters for activatePolicyPaymentMethod operation in PolicyPaymentMethodsApi.
309
+ * @export
310
+ * @interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest
311
+ */
312
+ export interface PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest {
313
+ /**
314
+ *
315
+ * @type {string}
316
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
317
+ */
318
+ readonly code: string
319
+
320
+ /**
321
+ * Bearer Token
322
+ * @type {string}
323
+ * @memberof PolicyPaymentMethodsApiActivatePolicyPaymentMethod
324
+ */
325
+ readonly authorization?: string
326
+ }
327
+
239
328
  /**
240
329
  * Request parameters for createPolicyPaymentMethod operation in PolicyPaymentMethodsApi.
241
330
  * @export
@@ -327,6 +416,18 @@ export interface PolicyPaymentMethodsApiListPolicyPaymentMethodsRequest {
327
416
  * @extends {BaseAPI}
328
417
  */
329
418
  export class PolicyPaymentMethodsApi extends BaseAPI {
419
+ /**
420
+ * 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\"
421
+ * @summary Activate the policy payment method
422
+ * @param {PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest} requestParameters Request parameters.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ * @memberof PolicyPaymentMethodsApi
426
+ */
427
+ public activatePolicyPaymentMethod(requestParameters: PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest, options?: AxiosRequestConfig) {
428
+ return PolicyPaymentMethodsApiFp(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
429
+ }
430
+
330
431
  /**
331
432
  * 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
433
  * @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 Activate the 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 Activate the 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 Activate the 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 Activate the 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
@@ -92,6 +92,54 @@ var base_1 = require("../base");
92
92
  var PolicyPaymentMethodsApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
+ /**
96
+ * 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\"
97
+ * @summary Activate the policy payment method
98
+ * @param {string} code
99
+ * @param {string} [authorization] Bearer Token
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ activatePolicyPaymentMethod: function (code, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'code' is not null or undefined
111
+ (0, common_1.assertParamExists)('activatePolicyPaymentMethod', 'code', code);
112
+ localVarPath = "/paymentservice/v1/policy-payment-methods/activate/{code}"
113
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
114
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ baseAccessToken = configuration.accessToken;
118
+ }
119
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
120
+ localVarHeaderParameter = {};
121
+ localVarQueryParameter = {};
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ case 1:
126
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ _a.sent();
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
95
143
  /**
96
144
  * 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\"
97
145
  * @summary Create the policy payment method
@@ -223,6 +271,27 @@ exports.PolicyPaymentMethodsApiAxiosParamCreator = PolicyPaymentMethodsApiAxiosP
223
271
  var PolicyPaymentMethodsApiFp = function (configuration) {
224
272
  var localVarAxiosParamCreator = (0, exports.PolicyPaymentMethodsApiAxiosParamCreator)(configuration);
225
273
  return {
274
+ /**
275
+ * 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\"
276
+ * @summary Activate the policy payment method
277
+ * @param {string} code
278
+ * @param {string} [authorization] Bearer Token
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ activatePolicyPaymentMethod: function (code, authorization, options) {
283
+ return __awaiter(this, void 0, void 0, function () {
284
+ var localVarAxiosArgs;
285
+ return __generator(this, function (_a) {
286
+ switch (_a.label) {
287
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.activatePolicyPaymentMethod(code, authorization, options)];
288
+ case 1:
289
+ localVarAxiosArgs = _a.sent();
290
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
291
+ }
292
+ });
293
+ });
294
+ },
226
295
  /**
227
296
  * 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\"
228
297
  * @summary Create the policy payment method
@@ -281,6 +350,17 @@ exports.PolicyPaymentMethodsApiFp = PolicyPaymentMethodsApiFp;
281
350
  var PolicyPaymentMethodsApiFactory = function (configuration, basePath, axios) {
282
351
  var localVarFp = (0, exports.PolicyPaymentMethodsApiFp)(configuration);
283
352
  return {
353
+ /**
354
+ * 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\"
355
+ * @summary Activate the policy payment method
356
+ * @param {string} code
357
+ * @param {string} [authorization] Bearer Token
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ activatePolicyPaymentMethod: function (code, authorization, options) {
362
+ return localVarFp.activatePolicyPaymentMethod(code, authorization, options).then(function (request) { return request(axios, basePath); });
363
+ },
284
364
  /**
285
365
  * 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\"
286
366
  * @summary Create the policy payment method
@@ -323,6 +403,18 @@ var PolicyPaymentMethodsApi = /** @class */ (function (_super) {
323
403
  function PolicyPaymentMethodsApi() {
324
404
  return _super !== null && _super.apply(this, arguments) || this;
325
405
  }
406
+ /**
407
+ * 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\"
408
+ * @summary Activate the policy payment method
409
+ * @param {PolicyPaymentMethodsApiActivatePolicyPaymentMethodRequest} requestParameters Request parameters.
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ * @memberof PolicyPaymentMethodsApi
413
+ */
414
+ PolicyPaymentMethodsApi.prototype.activatePolicyPaymentMethod = function (requestParameters, options) {
415
+ var _this = this;
416
+ return (0, exports.PolicyPaymentMethodsApiFp)(this.configuration).activatePolicyPaymentMethod(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
417
+ };
326
418
  /**
327
419
  * 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\"
328
420
  * @summary Create the policy payment method
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/payment-sdk",
3
- "version": "1.14.1-beta.40",
3
+ "version": "1.14.1-beta.42",
4
4
  "description": "OpenAPI client for @emilgroup/payment-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [