@emilgroup/discount-sdk-node 1.12.1-beta.16 → 1.12.1-beta.18

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.
@@ -107,9 +107,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
107
107
  chargePolicyVoucher: function (chargePolicyVoucherRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
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) {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
111
+ var _a;
112
+ return __generator(this, function (_b) {
113
+ switch (_b.label) {
113
114
  case 0:
114
115
  // verify required parameter 'chargePolicyVoucherRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('chargePolicyVoucher', 'chargePolicyVoucherRequestDto', chargePolicyVoucherRequestDto);
@@ -124,13 +125,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
124
125
  localVarQueryParameter = {};
125
126
  // authentication bearer required
126
127
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
129
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
130
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
131
+ ];
128
132
  case 1:
129
133
  // authentication bearer required
130
134
  // http bearer authentication required
131
- _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ _b.sent();
136
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
137
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
138
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
139
+ if (authorizationValue || authorizationKeepEmpty) {
140
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
141
  }
135
142
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
143
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,9 +163,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
156
163
  checkAccountEligibility: function (checkAccountEligibilityRequestDto, authorization, options) {
157
164
  if (options === void 0) { options = {}; }
158
165
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
167
+ var _a;
168
+ return __generator(this, function (_b) {
169
+ switch (_b.label) {
162
170
  case 0:
163
171
  // verify required parameter 'checkAccountEligibilityRequestDto' is not null or undefined
164
172
  (0, common_1.assertParamExists)('checkAccountEligibility', 'checkAccountEligibilityRequestDto', checkAccountEligibilityRequestDto);
@@ -173,13 +181,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
173
181
  localVarQueryParameter = {};
174
182
  // authentication bearer required
175
183
  // http bearer authentication required
176
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
184
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
185
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
186
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
187
+ ];
177
188
  case 1:
178
189
  // authentication bearer required
179
190
  // http bearer authentication required
180
- _a.sent();
181
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
191
+ _b.sent();
192
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
193
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
194
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
195
+ if (authorizationValue || authorizationKeepEmpty) {
196
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
183
197
  }
184
198
  localVarHeaderParameter['Content-Type'] = 'application/json';
185
199
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -205,9 +219,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
205
219
  createPolicyVoucher: function (createPolicyVoucherRequestDto, authorization, options) {
206
220
  if (options === void 0) { options = {}; }
207
221
  return __awaiter(_this, void 0, void 0, function () {
208
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
- return __generator(this, function (_a) {
210
- switch (_a.label) {
222
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
223
+ var _a;
224
+ return __generator(this, function (_b) {
225
+ switch (_b.label) {
211
226
  case 0:
212
227
  // verify required parameter 'createPolicyVoucherRequestDto' is not null or undefined
213
228
  (0, common_1.assertParamExists)('createPolicyVoucher', 'createPolicyVoucherRequestDto', createPolicyVoucherRequestDto);
@@ -222,13 +237,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
222
237
  localVarQueryParameter = {};
223
238
  // authentication bearer required
224
239
  // http bearer authentication required
225
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
240
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
241
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
242
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
243
+ ];
226
244
  case 1:
227
245
  // authentication bearer required
228
246
  // http bearer authentication required
229
- _a.sent();
230
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
247
+ _b.sent();
248
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
249
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
250
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
251
+ if (authorizationValue || authorizationKeepEmpty) {
252
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
232
253
  }
233
254
  localVarHeaderParameter['Content-Type'] = 'application/json';
234
255
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -254,9 +275,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
254
275
  deletePolicyVoucher: function (code, authorization, options) {
255
276
  if (options === void 0) { options = {}; }
256
277
  return __awaiter(_this, void 0, void 0, function () {
257
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
- return __generator(this, function (_a) {
259
- switch (_a.label) {
278
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
279
+ var _a;
280
+ return __generator(this, function (_b) {
281
+ switch (_b.label) {
260
282
  case 0:
261
283
  // verify required parameter 'code' is not null or undefined
262
284
  (0, common_1.assertParamExists)('deletePolicyVoucher', 'code', code);
@@ -272,13 +294,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
272
294
  localVarQueryParameter = {};
273
295
  // authentication bearer required
274
296
  // http bearer authentication required
275
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
297
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
298
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
299
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
300
+ ];
276
301
  case 1:
277
302
  // authentication bearer required
278
303
  // http bearer authentication required
279
- _a.sent();
280
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
304
+ _b.sent();
305
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
306
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
307
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
308
+ if (authorizationValue || authorizationKeepEmpty) {
309
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
282
310
  }
283
311
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
284
312
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -303,9 +331,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
303
331
  getPolicyVoucher: function (code, authorization, expand, options) {
304
332
  if (options === void 0) { options = {}; }
305
333
  return __awaiter(_this, void 0, void 0, function () {
306
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
307
- return __generator(this, function (_a) {
308
- switch (_a.label) {
334
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
335
+ var _a;
336
+ return __generator(this, function (_b) {
337
+ switch (_b.label) {
309
338
  case 0:
310
339
  // verify required parameter 'code' is not null or undefined
311
340
  (0, common_1.assertParamExists)('getPolicyVoucher', 'code', code);
@@ -325,12 +354,15 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
325
354
  case 1:
326
355
  // authentication bearer required
327
356
  // http bearer authentication required
328
- _a.sent();
357
+ _b.sent();
329
358
  if (expand !== undefined) {
330
359
  localVarQueryParameter['expand'] = expand;
331
360
  }
332
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
333
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
361
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
362
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
363
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
364
+ if (authorizationValue || authorizationKeepEmpty) {
365
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
334
366
  }
335
367
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
336
368
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -360,9 +392,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
360
392
  listPolicyVouchers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
361
393
  if (options === void 0) { options = {}; }
362
394
  return __awaiter(_this, void 0, void 0, function () {
363
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
364
- return __generator(this, function (_a) {
365
- switch (_a.label) {
395
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
396
+ var _a;
397
+ return __generator(this, function (_b) {
398
+ switch (_b.label) {
366
399
  case 0:
367
400
  localVarPath = "/discountservice/v1/policy-vouchers";
368
401
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -379,7 +412,7 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
379
412
  case 1:
380
413
  // authentication bearer required
381
414
  // http bearer authentication required
382
- _a.sent();
415
+ _b.sent();
383
416
  if (pageSize !== undefined) {
384
417
  localVarQueryParameter['pageSize'] = pageSize;
385
418
  }
@@ -401,8 +434,11 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
401
434
  if (filters !== undefined) {
402
435
  localVarQueryParameter['filters'] = filters;
403
436
  }
404
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
405
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
437
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
438
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
439
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
440
+ if (authorizationValue || authorizationKeepEmpty) {
441
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
406
442
  }
407
443
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
408
444
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -426,9 +462,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
426
462
  redeemPolicyVoucher: function (redeemPolicyVoucherRequestDto, authorization, options) {
427
463
  if (options === void 0) { options = {}; }
428
464
  return __awaiter(_this, void 0, void 0, function () {
429
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
430
- return __generator(this, function (_a) {
431
- switch (_a.label) {
465
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
466
+ var _a;
467
+ return __generator(this, function (_b) {
468
+ switch (_b.label) {
432
469
  case 0:
433
470
  // verify required parameter 'redeemPolicyVoucherRequestDto' is not null or undefined
434
471
  (0, common_1.assertParamExists)('redeemPolicyVoucher', 'redeemPolicyVoucherRequestDto', redeemPolicyVoucherRequestDto);
@@ -443,13 +480,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
443
480
  localVarQueryParameter = {};
444
481
  // authentication bearer required
445
482
  // http bearer authentication required
446
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
483
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
484
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
485
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
486
+ ];
447
487
  case 1:
448
488
  // authentication bearer required
449
489
  // http bearer authentication required
450
- _a.sent();
451
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
452
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
490
+ _b.sent();
491
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
492
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
493
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
494
+ if (authorizationValue || authorizationKeepEmpty) {
495
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
453
496
  }
454
497
  localVarHeaderParameter['Content-Type'] = 'application/json';
455
498
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -475,9 +518,10 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
475
518
  withdrawPolicyVoucher: function (withdrawPolicyVoucherRequestDto, authorization, options) {
476
519
  if (options === void 0) { options = {}; }
477
520
  return __awaiter(_this, void 0, void 0, function () {
478
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
479
- return __generator(this, function (_a) {
480
- switch (_a.label) {
521
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
522
+ var _a;
523
+ return __generator(this, function (_b) {
524
+ switch (_b.label) {
481
525
  case 0:
482
526
  // verify required parameter 'withdrawPolicyVoucherRequestDto' is not null or undefined
483
527
  (0, common_1.assertParamExists)('withdrawPolicyVoucher', 'withdrawPolicyVoucherRequestDto', withdrawPolicyVoucherRequestDto);
@@ -492,13 +536,19 @@ var PolicyVouchersApiAxiosParamCreator = function (configuration) {
492
536
  localVarQueryParameter = {};
493
537
  // authentication bearer required
494
538
  // http bearer authentication required
495
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
539
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
540
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
541
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
542
+ ];
496
543
  case 1:
497
544
  // authentication bearer required
498
545
  // http bearer authentication required
499
- _a.sent();
500
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
501
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
546
+ _b.sent();
547
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
548
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
549
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
550
+ if (authorizationValue || authorizationKeepEmpty) {
551
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
502
552
  }
503
553
  localVarHeaderParameter['Content-Type'] = 'application/json';
504
554
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -827,7 +877,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
827
877
  */
828
878
  PolicyVouchersApi.prototype.chargePolicyVoucher = function (requestParameters, options) {
829
879
  var _this = this;
830
- return (0, exports.PolicyVouchersApiFp)(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
880
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).chargePolicyVoucher(requestParameters.chargePolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
831
881
  };
832
882
  /**
833
883
  * This will check if the account is eligible for a specific voucher.
@@ -839,7 +889,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
839
889
  */
840
890
  PolicyVouchersApi.prototype.checkAccountEligibility = function (requestParameters, options) {
841
891
  var _this = this;
842
- return (0, exports.PolicyVouchersApiFp)(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
892
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).checkAccountEligibility(requestParameters.checkAccountEligibilityRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
843
893
  };
844
894
  /**
845
895
  * This will create an policy voucher.
@@ -851,7 +901,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
851
901
  */
852
902
  PolicyVouchersApi.prototype.createPolicyVoucher = function (requestParameters, options) {
853
903
  var _this = this;
854
- return (0, exports.PolicyVouchersApiFp)(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
904
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).createPolicyVoucher(requestParameters.createPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
855
905
  };
856
906
  /**
857
907
  * This will delete an policy voucher.
@@ -863,7 +913,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
863
913
  */
864
914
  PolicyVouchersApi.prototype.deletePolicyVoucher = function (requestParameters, options) {
865
915
  var _this = this;
866
- return (0, exports.PolicyVouchersApiFp)(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
916
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).deletePolicyVoucher(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
867
917
  };
868
918
  /**
869
919
  * This will get an policy voucher.
@@ -875,7 +925,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
875
925
  */
876
926
  PolicyVouchersApi.prototype.getPolicyVoucher = function (requestParameters, options) {
877
927
  var _this = this;
878
- return (0, exports.PolicyVouchersApiFp)(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
928
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).getPolicyVoucher(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
879
929
  };
880
930
  /**
881
931
  * Returns a list of policy vouchers you have previously created. The policy vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -888,7 +938,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
888
938
  PolicyVouchersApi.prototype.listPolicyVouchers = function (requestParameters, options) {
889
939
  var _this = this;
890
940
  if (requestParameters === void 0) { requestParameters = {}; }
891
- return (0, exports.PolicyVouchersApiFp)(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
941
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).listPolicyVouchers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
892
942
  };
893
943
  /**
894
944
  * This will redeem the policy voucher.
@@ -900,7 +950,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
900
950
  */
901
951
  PolicyVouchersApi.prototype.redeemPolicyVoucher = function (requestParameters, options) {
902
952
  var _this = this;
903
- return (0, exports.PolicyVouchersApiFp)(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
953
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).redeemPolicyVoucher(requestParameters.redeemPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
904
954
  };
905
955
  /**
906
956
  * This will withdraw the policy voucher.
@@ -912,7 +962,7 @@ var PolicyVouchersApi = /** @class */ (function (_super) {
912
962
  */
913
963
  PolicyVouchersApi.prototype.withdrawPolicyVoucher = function (requestParameters, options) {
914
964
  var _this = this;
915
- return (0, exports.PolicyVouchersApiFp)(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
965
+ return (0, exports.PolicyVouchersApiFp)(this.configuration).withdrawPolicyVoucher(requestParameters.withdrawPolicyVoucherRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
916
966
  };
917
967
  return PolicyVouchersApi;
918
968
  }(base_1.BaseAPI));
@@ -353,7 +353,7 @@ export declare class VouchersApi extends BaseAPI {
353
353
  * @throws {RequiredError}
354
354
  * @memberof VouchersApi
355
355
  */
356
- createVoucher(requestParameters: VouchersApiCreateVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateVoucherResponseClass, any, {}>>;
356
+ createVoucher(requestParameters: VouchersApiCreateVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateVoucherResponseClass, any, {}, any>>;
357
357
  /**
358
358
  * This will delete a voucher.
359
359
  * @summary Delete the Voucher
@@ -362,7 +362,7 @@ export declare class VouchersApi extends BaseAPI {
362
362
  * @throws {RequiredError}
363
363
  * @memberof VouchersApi
364
364
  */
365
- deleteVoucher(requestParameters: VouchersApiDeleteVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
365
+ deleteVoucher(requestParameters: VouchersApiDeleteVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
366
366
  /**
367
367
  * This will get a voucher.
368
368
  * @summary Retrieve the Voucher
@@ -371,7 +371,7 @@ export declare class VouchersApi extends BaseAPI {
371
371
  * @throws {RequiredError}
372
372
  * @memberof VouchersApi
373
373
  */
374
- getVoucher(requestParameters: VouchersApiGetVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetVoucherResponseClass, any, {}>>;
374
+ getVoucher(requestParameters: VouchersApiGetVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetVoucherResponseClass, any, {}, any>>;
375
375
  /**
376
376
  * Returns a list of Vouchers you have previously created. The Vouchers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
377
377
  * @summary List Vouchers
@@ -380,7 +380,7 @@ export declare class VouchersApi extends BaseAPI {
380
380
  * @throws {RequiredError}
381
381
  * @memberof VouchersApi
382
382
  */
383
- listVouchers(requestParameters?: VouchersApiListVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListVouchersResponseClass, any, {}>>;
383
+ listVouchers(requestParameters?: VouchersApiListVouchersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListVouchersResponseClass, any, {}, any>>;
384
384
  /**
385
385
  * This will update a voucher.
386
386
  * @summary Update the Voucher
@@ -389,5 +389,5 @@ export declare class VouchersApi extends BaseAPI {
389
389
  * @throws {RequiredError}
390
390
  * @memberof VouchersApi
391
391
  */
392
- updateVoucher(requestParameters: VouchersApiUpdateVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateVoucherResponseClass, any, {}>>;
392
+ updateVoucher(requestParameters: VouchersApiUpdateVoucherRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateVoucherResponseClass, any, {}, any>>;
393
393
  }