@emilgroup/billing-sdk-node 1.63.1-beta.4 → 1.63.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.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/api/correction-invoices-api.ts +23 -8
  3. package/api/draft-invoice-api.ts +24 -9
  4. package/api/estimated-invoices-api.ts +32 -12
  5. package/api/health-api.ts +1 -1
  6. package/api/initial-invoices-api.ts +15 -5
  7. package/api/invoices-api.ts +47 -22
  8. package/api/policy-billing-api.ts +24 -9
  9. package/api/recurring-invoices-api.ts +15 -5
  10. package/api/termination-invoices-api.ts +15 -5
  11. package/api/withdraw-invoices-api.ts +15 -5
  12. package/base.ts +4 -0
  13. package/common.ts +3 -2
  14. package/dist/api/correction-invoices-api.d.ts +2 -2
  15. package/dist/api/correction-invoices-api.js +35 -18
  16. package/dist/api/draft-invoice-api.d.ts +3 -3
  17. package/dist/api/draft-invoice-api.js +45 -24
  18. package/dist/api/estimated-invoices-api.d.ts +4 -4
  19. package/dist/api/estimated-invoices-api.js +60 -32
  20. package/dist/api/health-api.d.ts +1 -1
  21. package/dist/api/health-api.js +1 -1
  22. package/dist/api/initial-invoices-api.d.ts +1 -1
  23. package/dist/api/initial-invoices-api.js +20 -10
  24. package/dist/api/invoices-api.d.ts +12 -12
  25. package/dist/api/invoices-api.js +59 -37
  26. package/dist/api/policy-billing-api.d.ts +3 -3
  27. package/dist/api/policy-billing-api.js +41 -23
  28. package/dist/api/recurring-invoices-api.d.ts +1 -1
  29. package/dist/api/recurring-invoices-api.js +20 -10
  30. package/dist/api/termination-invoices-api.d.ts +1 -1
  31. package/dist/api/termination-invoices-api.js +20 -10
  32. package/dist/api/withdraw-invoices-api.d.ts +1 -1
  33. package/dist/api/withdraw-invoices-api.js +20 -10
  34. package/dist/base.d.ts +1 -0
  35. package/dist/base.js +3 -0
  36. package/dist/common.d.ts +1 -1
  37. package/dist/common.js +1 -0
  38. package/dist/models/invoice-item-class.d.ts +12 -0
  39. package/models/invoice-item-class.ts +12 -0
  40. package/package.json +2 -2
@@ -108,9 +108,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
112
+ var _a, _b;
113
+ return __generator(this, function (_c) {
114
+ switch (_c.label) {
114
115
  case 0:
115
116
  // verify required parameter 'createInvoiceRequestDto' is not null or undefined
116
117
  (0, common_1.assertParamExists)('createInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto);
@@ -125,16 +126,25 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
125
126
  localVarQueryParameter = {};
126
127
  // authentication bearer required
127
128
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
130
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
131
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
132
+ ];
129
133
  case 1:
130
134
  // authentication bearer required
131
135
  // http bearer authentication required
132
- _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
136
+ _c.sent();
137
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
138
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
139
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
140
+ if (authorizationValue || authorizationKeepEmpty) {
141
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
142
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
143
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
144
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
145
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
146
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
147
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
148
  }
139
149
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
150
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -161,9 +171,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
161
171
  getInvoice: function (code, expand, authorization, options) {
162
172
  if (options === void 0) { options = {}; }
163
173
  return __awaiter(_this, void 0, void 0, function () {
164
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
165
- return __generator(this, function (_a) {
166
- switch (_a.label) {
174
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
175
+ var _a;
176
+ return __generator(this, function (_b) {
177
+ switch (_b.label) {
167
178
  case 0:
168
179
  // verify required parameter 'code' is not null or undefined
169
180
  (0, common_1.assertParamExists)('getInvoice', 'code', code);
@@ -185,12 +196,15 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
185
196
  case 1:
186
197
  // authentication bearer required
187
198
  // http bearer authentication required
188
- _a.sent();
199
+ _b.sent();
189
200
  if (expand !== undefined) {
190
201
  localVarQueryParameter['expand'] = expand;
191
202
  }
192
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
193
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
203
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
204
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
205
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
206
+ if (authorizationValue || authorizationKeepEmpty) {
207
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
194
208
  }
195
209
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
196
210
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -209,20 +223,21 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
209
223
  * @param {string} [authorization] Bearer Token
210
224
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
211
225
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
212
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
226
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
213
227
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
214
228
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
215
229
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments, invoiceItems<i>
216
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
230
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
217
231
  * @param {*} [options] Override http request option.
218
232
  * @throws {RequiredError}
219
233
  */
220
234
  listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
221
235
  if (options === void 0) { options = {}; }
222
236
  return __awaiter(_this, void 0, void 0, function () {
223
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
224
- return __generator(this, function (_a) {
225
- switch (_a.label) {
237
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
238
+ var _a;
239
+ return __generator(this, function (_b) {
240
+ switch (_b.label) {
226
241
  case 0:
227
242
  localVarPath = "/billingservice/v1/invoices";
228
243
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -239,7 +254,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
239
254
  case 1:
240
255
  // authentication bearer required
241
256
  // http bearer authentication required
242
- _a.sent();
257
+ _b.sent();
243
258
  if (pageSize !== undefined) {
244
259
  localVarQueryParameter['pageSize'] = pageSize;
245
260
  }
@@ -261,8 +276,11 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
261
276
  if (filters !== undefined) {
262
277
  localVarQueryParameter['filters'] = filters;
263
278
  }
264
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
265
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
279
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
280
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
281
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
282
+ if (authorizationValue || authorizationKeepEmpty) {
283
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
266
284
  }
267
285
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
268
286
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -293,9 +311,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
293
311
  listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
294
312
  if (options === void 0) { options = {}; }
295
313
  return __awaiter(_this, void 0, void 0, function () {
296
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
297
- return __generator(this, function (_a) {
298
- switch (_a.label) {
314
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
315
+ var _a;
316
+ return __generator(this, function (_b) {
317
+ switch (_b.label) {
299
318
  case 0:
300
319
  localVarPath = "/billingservice/v1/invoices/policies-billing-dates";
301
320
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -312,7 +331,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
312
331
  case 1:
313
332
  // authentication bearer required
314
333
  // http bearer authentication required
315
- _a.sent();
334
+ _b.sent();
316
335
  if (pageSize !== undefined) {
317
336
  localVarQueryParameter['pageSize'] = pageSize;
318
337
  }
@@ -334,8 +353,11 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
334
353
  if (filters !== undefined) {
335
354
  localVarQueryParameter['filters'] = filters;
336
355
  }
337
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
338
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
356
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
357
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
358
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
359
+ if (authorizationValue || authorizationKeepEmpty) {
360
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
339
361
  }
340
362
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
341
363
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -408,11 +430,11 @@ var InvoicesApiFp = function (configuration) {
408
430
  * @param {string} [authorization] Bearer Token
409
431
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
410
432
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
411
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
433
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
412
434
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
413
435
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
414
436
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments, invoiceItems<i>
415
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
437
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
416
438
  * @param {*} [options] Override http request option.
417
439
  * @throws {RequiredError}
418
440
  */
@@ -497,11 +519,11 @@ var InvoicesApiFactory = function (configuration, basePath, axios) {
497
519
  * @param {string} [authorization] Bearer Token
498
520
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
499
521
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
500
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
522
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
501
523
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
502
524
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp</i>
503
525
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments, invoiceItems<i>
504
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp</i>
526
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp</i>
505
527
  * @param {*} [options] Override http request option.
506
528
  * @throws {RequiredError}
507
529
  */
@@ -550,7 +572,7 @@ var InvoicesApi = /** @class */ (function (_super) {
550
572
  */
551
573
  InvoicesApi.prototype.createInvoice = function (requestParameters, options) {
552
574
  var _this = this;
553
- return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
575
+ return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
554
576
  };
555
577
  /**
556
578
  * Gets an invoice. **Required Permissions** \"billing-management.invoices.view\"
@@ -562,7 +584,7 @@ var InvoicesApi = /** @class */ (function (_super) {
562
584
  */
563
585
  InvoicesApi.prototype.getInvoice = function (requestParameters, options) {
564
586
  var _this = this;
565
- return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
587
+ return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
566
588
  };
567
589
  /**
568
590
  * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
@@ -575,7 +597,7 @@ var InvoicesApi = /** @class */ (function (_super) {
575
597
  InvoicesApi.prototype.listInvoices = function (requestParameters, options) {
576
598
  var _this = this;
577
599
  if (requestParameters === void 0) { requestParameters = {}; }
578
- return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(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); });
600
+ return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(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); });
579
601
  };
580
602
  /**
581
603
  * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
@@ -589,7 +611,7 @@ var InvoicesApi = /** @class */ (function (_super) {
589
611
  InvoicesApi.prototype.listPoliciesBillingDates = function (requestParameters, options) {
590
612
  var _this = this;
591
613
  if (requestParameters === void 0) { requestParameters = {}; }
592
- return (0, exports.InvoicesApiFp)(this.configuration).listPoliciesBillingDates(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); });
614
+ return (0, exports.InvoicesApiFp)(this.configuration).listPoliciesBillingDates(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); });
593
615
  };
594
616
  return InvoicesApi;
595
617
  }(base_1.BaseAPI));
@@ -250,7 +250,7 @@ export declare class PolicyBillingApi extends BaseAPI {
250
250
  * @throws {RequiredError}
251
251
  * @memberof PolicyBillingApi
252
252
  */
253
- createPolicyBilling(requestParameters: PolicyBillingApiCreatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyBillingResponseClass, any, {}>>;
253
+ createPolicyBilling(requestParameters: PolicyBillingApiCreatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePolicyBillingResponseClass, any, {}, any>>;
254
254
  /**
255
255
  * Returns a list of policies billings you have previously created. The policies billings are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
256
256
  * @summary List policies billings
@@ -259,7 +259,7 @@ export declare class PolicyBillingApi extends BaseAPI {
259
259
  * @throws {RequiredError}
260
260
  * @memberof PolicyBillingApi
261
261
  */
262
- listPoliciesBillings(requestParameters?: PolicyBillingApiListPoliciesBillingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
262
+ listPoliciesBillings(requestParameters?: PolicyBillingApiListPoliciesBillingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
263
263
  /**
264
264
  * Updates the specified request message by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"billing-management.invoices.update\"
265
265
  * @summary Update the request message
@@ -268,5 +268,5 @@ export declare class PolicyBillingApi extends BaseAPI {
268
268
  * @throws {RequiredError}
269
269
  * @memberof PolicyBillingApi
270
270
  */
271
- updatePolicyBilling(requestParameters: PolicyBillingApiUpdatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdatePolicyBillingResponseClass, any, {}>>;
271
+ updatePolicyBilling(requestParameters: PolicyBillingApiUpdatePolicyBillingRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdatePolicyBillingResponseClass, any, {}, any>>;
272
272
  }
@@ -107,9 +107,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
107
107
  createPolicyBilling: function (createPolicyBillingRequestDto, 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 'createPolicyBillingRequestDto' is not null or undefined
115
116
  (0, common_1.assertParamExists)('createPolicyBilling', 'createPolicyBillingRequestDto', createPolicyBillingRequestDto);
@@ -124,13 +125,19 @@ var PolicyBillingApiAxiosParamCreator = 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);
@@ -162,9 +169,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
162
169
  listPoliciesBillings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
163
170
  if (options === void 0) { options = {}; }
164
171
  return __awaiter(_this, void 0, void 0, function () {
165
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
166
- return __generator(this, function (_a) {
167
- switch (_a.label) {
172
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
173
+ var _a;
174
+ return __generator(this, function (_b) {
175
+ switch (_b.label) {
168
176
  case 0:
169
177
  localVarPath = "/billingservice/v1/policies-billings";
170
178
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -181,7 +189,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
181
189
  case 1:
182
190
  // authentication bearer required
183
191
  // http bearer authentication required
184
- _a.sent();
192
+ _b.sent();
185
193
  if (pageSize !== undefined) {
186
194
  localVarQueryParameter['pageSize'] = pageSize;
187
195
  }
@@ -203,8 +211,11 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
203
211
  if (filters !== undefined) {
204
212
  localVarQueryParameter['filters'] = filters;
205
213
  }
206
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
207
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
214
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
215
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
216
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
217
+ if (authorizationValue || authorizationKeepEmpty) {
218
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
208
219
  }
209
220
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
210
221
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -229,9 +240,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
229
240
  updatePolicyBilling: function (code, updatePolicyBillingRequestDto, authorization, options) {
230
241
  if (options === void 0) { options = {}; }
231
242
  return __awaiter(_this, void 0, void 0, function () {
232
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
233
- return __generator(this, function (_a) {
234
- switch (_a.label) {
243
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
244
+ var _a;
245
+ return __generator(this, function (_b) {
246
+ switch (_b.label) {
235
247
  case 0:
236
248
  // verify required parameter 'code' is not null or undefined
237
249
  (0, common_1.assertParamExists)('updatePolicyBilling', 'code', code);
@@ -249,13 +261,19 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
249
261
  localVarQueryParameter = {};
250
262
  // authentication bearer required
251
263
  // http bearer authentication required
252
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
264
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
265
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
266
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
267
+ ];
253
268
  case 1:
254
269
  // authentication bearer required
255
270
  // http bearer authentication required
256
- _a.sent();
257
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
258
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
271
+ _b.sent();
272
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
273
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
274
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
275
+ if (authorizationValue || authorizationKeepEmpty) {
276
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
259
277
  }
260
278
  localVarHeaderParameter['Content-Type'] = 'application/json';
261
279
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -424,7 +442,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
424
442
  */
425
443
  PolicyBillingApi.prototype.createPolicyBilling = function (requestParameters, options) {
426
444
  var _this = this;
427
- return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
445
+ return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
428
446
  };
429
447
  /**
430
448
  * Returns a list of policies billings you have previously created. The policies billings are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
@@ -437,7 +455,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
437
455
  PolicyBillingApi.prototype.listPoliciesBillings = function (requestParameters, options) {
438
456
  var _this = this;
439
457
  if (requestParameters === void 0) { requestParameters = {}; }
440
- return (0, exports.PolicyBillingApiFp)(this.configuration).listPoliciesBillings(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); });
458
+ return (0, exports.PolicyBillingApiFp)(this.configuration).listPoliciesBillings(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); });
441
459
  };
442
460
  /**
443
461
  * Updates the specified request message by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"billing-management.invoices.update\"
@@ -449,7 +467,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
449
467
  */
450
468
  PolicyBillingApi.prototype.updatePolicyBilling = function (requestParameters, options) {
451
469
  var _this = this;
452
- return (0, exports.PolicyBillingApiFp)(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
470
+ return (0, exports.PolicyBillingApiFp)(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
453
471
  };
454
472
  return PolicyBillingApi;
455
473
  }(base_1.BaseAPI));
@@ -102,5 +102,5 @@ export declare class RecurringInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof RecurringInvoicesApi
104
104
  */
105
- createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -108,9 +108,10 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
112
+ var _a, _b;
113
+ return __generator(this, function (_c) {
114
+ switch (_c.label) {
114
115
  case 0:
115
116
  // verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
116
117
  (0, common_1.assertParamExists)('createRecurringInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
@@ -125,16 +126,25 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
125
126
  localVarQueryParameter = {};
126
127
  // authentication bearer required
127
128
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
130
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
131
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
132
+ ];
129
133
  case 1:
130
134
  // authentication bearer required
131
135
  // http bearer authentication required
132
- _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
136
+ _c.sent();
137
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
138
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
139
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
140
+ if (authorizationValue || authorizationKeepEmpty) {
141
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
142
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
143
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
144
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
145
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
146
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
147
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
148
  }
139
149
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
150
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -227,7 +237,7 @@ var RecurringInvoicesApi = /** @class */ (function (_super) {
227
237
  */
228
238
  RecurringInvoicesApi.prototype.createRecurringInvoice = function (requestParameters, options) {
229
239
  var _this = this;
230
- return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
240
+ return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
231
241
  };
232
242
  return RecurringInvoicesApi;
233
243
  }(base_1.BaseAPI));
@@ -102,5 +102,5 @@ export declare class TerminationInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof TerminationInvoicesApi
104
104
  */
105
- createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }
@@ -108,9 +108,10 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
108
108
  createTerminationInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
109
109
  if (options === void 0) { options = {}; }
110
110
  return __awaiter(_this, void 0, void 0, function () {
111
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
112
+ var _a, _b;
113
+ return __generator(this, function (_c) {
114
+ switch (_c.label) {
114
115
  case 0:
115
116
  // verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
116
117
  (0, common_1.assertParamExists)('createTerminationInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
@@ -125,16 +126,25 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
125
126
  localVarQueryParameter = {};
126
127
  // authentication bearer required
127
128
  // http bearer authentication required
128
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
130
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
131
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
132
+ ];
129
133
  case 1:
130
134
  // authentication bearer required
131
135
  // http bearer authentication required
132
- _a.sent();
133
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
136
+ _c.sent();
137
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
138
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
139
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
140
+ if (authorizationValue || authorizationKeepEmpty) {
141
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
135
142
  }
136
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
143
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
144
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
145
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
146
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
147
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
138
148
  }
139
149
  localVarHeaderParameter['Content-Type'] = 'application/json';
140
150
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -227,7 +237,7 @@ var TerminationInvoicesApi = /** @class */ (function (_super) {
227
237
  */
228
238
  TerminationInvoicesApi.prototype.createTerminationInvoice = function (requestParameters, options) {
229
239
  var _this = this;
230
- return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
240
+ return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
231
241
  };
232
242
  return TerminationInvoicesApi;
233
243
  }(base_1.BaseAPI));
@@ -102,5 +102,5 @@ export declare class WithdrawInvoicesApi extends BaseAPI {
102
102
  * @throws {RequiredError}
103
103
  * @memberof WithdrawInvoicesApi
104
104
  */
105
- createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
105
+ createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
106
106
  }