@emilgroup/billing-sdk 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 (43) 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 +239 -43
  13. package/common.ts +3 -2
  14. package/configuration.ts +20 -0
  15. package/dist/api/correction-invoices-api.d.ts +2 -2
  16. package/dist/api/correction-invoices-api.js +35 -18
  17. package/dist/api/draft-invoice-api.d.ts +3 -3
  18. package/dist/api/draft-invoice-api.js +45 -24
  19. package/dist/api/estimated-invoices-api.d.ts +4 -4
  20. package/dist/api/estimated-invoices-api.js +60 -32
  21. package/dist/api/health-api.d.ts +1 -1
  22. package/dist/api/health-api.js +1 -1
  23. package/dist/api/initial-invoices-api.d.ts +1 -1
  24. package/dist/api/initial-invoices-api.js +20 -10
  25. package/dist/api/invoices-api.d.ts +12 -12
  26. package/dist/api/invoices-api.js +59 -37
  27. package/dist/api/policy-billing-api.d.ts +3 -3
  28. package/dist/api/policy-billing-api.js +41 -23
  29. package/dist/api/recurring-invoices-api.d.ts +1 -1
  30. package/dist/api/recurring-invoices-api.js +20 -10
  31. package/dist/api/termination-invoices-api.d.ts +1 -1
  32. package/dist/api/termination-invoices-api.js +20 -10
  33. package/dist/api/withdraw-invoices-api.d.ts +1 -1
  34. package/dist/api/withdraw-invoices-api.js +20 -10
  35. package/dist/base.d.ts +26 -0
  36. package/dist/base.js +243 -60
  37. package/dist/common.d.ts +1 -1
  38. package/dist/common.js +1 -0
  39. package/dist/configuration.d.ts +17 -0
  40. package/dist/configuration.js +2 -0
  41. package/dist/models/invoice-item-class.d.ts +12 -0
  42. package/models/invoice-item-class.ts +12 -0
  43. package/package.json +2 -2
@@ -48,11 +48,11 @@ export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuratio
48
48
  * @param {string} [authorization] Bearer Token
49
49
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
50
50
  * @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.
51
- * @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>
51
+ * @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>
52
52
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
53
53
  * @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>
54
54
  * @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>
55
- * @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>
55
+ * @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>
56
56
  * @param {*} [options] Override http request option.
57
57
  * @throws {RequiredError}
58
58
  */
@@ -105,11 +105,11 @@ export declare const InvoicesApiFp: (configuration?: Configuration) => {
105
105
  * @param {string} [authorization] Bearer Token
106
106
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
107
107
  * @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.
108
- * @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>
108
+ * @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>
109
109
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
110
110
  * @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>
111
111
  * @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>
112
- * @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>
112
+ * @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>
113
113
  * @param {*} [options] Override http request option.
114
114
  * @throws {RequiredError}
115
115
  */
@@ -162,11 +162,11 @@ export declare const InvoicesApiFactory: (configuration?: Configuration, basePat
162
162
  * @param {string} [authorization] Bearer Token
163
163
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
164
164
  * @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.
165
- * @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>
165
+ * @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>
166
166
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
167
167
  * @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>
168
168
  * @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>
169
- * @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>
169
+ * @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>
170
170
  * @param {*} [options] Override http request option.
171
171
  * @throws {RequiredError}
172
172
  */
@@ -263,7 +263,7 @@ export interface InvoicesApiListInvoicesRequest {
263
263
  */
264
264
  readonly pageToken?: string;
265
265
  /**
266
- * 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>
266
+ * 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>
267
267
  * @type {string}
268
268
  * @memberof InvoicesApiListInvoices
269
269
  */
@@ -287,7 +287,7 @@ export interface InvoicesApiListInvoicesRequest {
287
287
  */
288
288
  readonly expand?: string;
289
289
  /**
290
- * 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>
290
+ * 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>
291
291
  * @type {string}
292
292
  * @memberof InvoicesApiListInvoices
293
293
  */
@@ -363,7 +363,7 @@ export declare class InvoicesApi extends BaseAPI {
363
363
  * @throws {RequiredError}
364
364
  * @memberof InvoicesApi
365
365
  */
366
- createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
366
+ createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
367
367
  /**
368
368
  * Gets an invoice. **Required Permissions** \"billing-management.invoices.view\"
369
369
  * @summary Retrieve the invoice
@@ -372,7 +372,7 @@ export declare class InvoicesApi extends BaseAPI {
372
372
  * @throws {RequiredError}
373
373
  * @memberof InvoicesApi
374
374
  */
375
- getInvoice(requestParameters: InvoicesApiGetInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInvoiceResponseClass, any, {}>>;
375
+ getInvoice(requestParameters: InvoicesApiGetInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInvoiceResponseClass, any, {}, any>>;
376
376
  /**
377
377
  * 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\"
378
378
  * @summary List invoices
@@ -381,7 +381,7 @@ export declare class InvoicesApi extends BaseAPI {
381
381
  * @throws {RequiredError}
382
382
  * @memberof InvoicesApi
383
383
  */
384
- listInvoices(requestParameters?: InvoicesApiListInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInvoicesResponseClass, any, {}>>;
384
+ listInvoices(requestParameters?: InvoicesApiListInvoicesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInvoicesResponseClass, any, {}, any>>;
385
385
  /**
386
386
  * 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\"
387
387
  * @summary List policies billing dates
@@ -391,5 +391,5 @@ export declare class InvoicesApi extends BaseAPI {
391
391
  * @throws {RequiredError}
392
392
  * @memberof InvoicesApi
393
393
  */
394
- listPoliciesBillingDates(requestParameters?: InvoicesApiListPoliciesBillingDatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPoliciesBillingsResponseClass, any, {}>>;
394
+ listPoliciesBillingDates(requestParameters?: InvoicesApiListPoliciesBillingDatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListPoliciesBillingsResponseClass, any, {}, any>>;
395
395
  }
@@ -104,9 +104,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
108
+ var _a, _b;
109
+ return __generator(this, function (_c) {
110
+ switch (_c.label) {
110
111
  case 0:
111
112
  // verify required parameter 'createInvoiceRequestDto' is not null or undefined
112
113
  (0, common_1.assertParamExists)('createInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto);
@@ -121,16 +122,25 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
121
122
  localVarQueryParameter = {};
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ ];
125
129
  case 1:
126
130
  // authentication bearer required
127
131
  // http bearer authentication required
128
- _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
132
+ _c.sent();
133
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
134
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
135
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (authorizationValue || authorizationKeepEmpty) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
138
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
140
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
141
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
142
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
143
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
144
  }
135
145
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -157,9 +167,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
157
167
  getInvoice: function (code, expand, authorization, options) {
158
168
  if (options === void 0) { options = {}; }
159
169
  return __awaiter(_this, void 0, void 0, function () {
160
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
161
- return __generator(this, function (_a) {
162
- switch (_a.label) {
170
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
171
+ var _a;
172
+ return __generator(this, function (_b) {
173
+ switch (_b.label) {
163
174
  case 0:
164
175
  // verify required parameter 'code' is not null or undefined
165
176
  (0, common_1.assertParamExists)('getInvoice', 'code', code);
@@ -181,12 +192,15 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
181
192
  case 1:
182
193
  // authentication bearer required
183
194
  // http bearer authentication required
184
- _a.sent();
195
+ _b.sent();
185
196
  if (expand !== undefined) {
186
197
  localVarQueryParameter['expand'] = expand;
187
198
  }
188
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
189
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
199
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
200
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
201
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
202
+ if (authorizationValue || authorizationKeepEmpty) {
203
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
190
204
  }
191
205
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
192
206
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -205,20 +219,21 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
205
219
  * @param {string} [authorization] Bearer Token
206
220
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
207
221
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
208
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
222
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
209
223
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
210
224
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
211
225
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
212
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
226
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
213
227
  * @param {*} [options] Override http request option.
214
228
  * @throws {RequiredError}
215
229
  */
216
230
  listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
217
231
  if (options === void 0) { options = {}; }
218
232
  return __awaiter(_this, void 0, void 0, function () {
219
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
220
- return __generator(this, function (_a) {
221
- switch (_a.label) {
233
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
234
+ var _a;
235
+ return __generator(this, function (_b) {
236
+ switch (_b.label) {
222
237
  case 0:
223
238
  localVarPath = "/billingservice/v1/invoices";
224
239
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -235,7 +250,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
235
250
  case 1:
236
251
  // authentication bearer required
237
252
  // http bearer authentication required
238
- _a.sent();
253
+ _b.sent();
239
254
  if (pageSize !== undefined) {
240
255
  localVarQueryParameter['pageSize'] = pageSize;
241
256
  }
@@ -257,8 +272,11 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
257
272
  if (filters !== undefined) {
258
273
  localVarQueryParameter['filters'] = filters;
259
274
  }
260
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
261
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
275
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
276
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
277
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
278
+ if (authorizationValue || authorizationKeepEmpty) {
279
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
262
280
  }
263
281
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
264
282
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -289,9 +307,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
289
307
  listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
290
308
  if (options === void 0) { options = {}; }
291
309
  return __awaiter(_this, void 0, void 0, function () {
292
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
293
- return __generator(this, function (_a) {
294
- switch (_a.label) {
310
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
311
+ var _a;
312
+ return __generator(this, function (_b) {
313
+ switch (_b.label) {
295
314
  case 0:
296
315
  localVarPath = "/billingservice/v1/invoices/policies-billing-dates";
297
316
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -308,7 +327,7 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
308
327
  case 1:
309
328
  // authentication bearer required
310
329
  // http bearer authentication required
311
- _a.sent();
330
+ _b.sent();
312
331
  if (pageSize !== undefined) {
313
332
  localVarQueryParameter['pageSize'] = pageSize;
314
333
  }
@@ -330,8 +349,11 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
330
349
  if (filters !== undefined) {
331
350
  localVarQueryParameter['filters'] = filters;
332
351
  }
333
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
334
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
352
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
353
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
354
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
355
+ if (authorizationValue || authorizationKeepEmpty) {
356
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
335
357
  }
336
358
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
337
359
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -404,11 +426,11 @@ var InvoicesApiFp = function (configuration) {
404
426
  * @param {string} [authorization] Bearer Token
405
427
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
406
428
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
407
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
429
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
408
430
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
409
431
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
410
432
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
411
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
433
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
412
434
  * @param {*} [options] Override http request option.
413
435
  * @throws {RequiredError}
414
436
  */
@@ -493,11 +515,11 @@ var InvoicesApiFactory = function (configuration, basePath, axios) {
493
515
  * @param {string} [authorization] Bearer Token
494
516
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
495
517
  * @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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
496
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
518
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
497
519
  * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
498
520
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id, paymentMethodType, paymentMethodPsp&lt;/i&gt;
499
521
  * @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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments, invoiceItems&lt;i&gt;
500
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, paymentMethodType, paymentMethodPsp&lt;/i&gt;
522
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, invoiceNumber, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt, dueDate, grossAmount, paymentMethodType, paymentMethodPsp&lt;/i&gt;
501
523
  * @param {*} [options] Override http request option.
502
524
  * @throws {RequiredError}
503
525
  */
@@ -546,7 +568,7 @@ var InvoicesApi = /** @class */ (function (_super) {
546
568
  */
547
569
  InvoicesApi.prototype.createInvoice = function (requestParameters, options) {
548
570
  var _this = this;
549
- return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
571
+ 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); });
550
572
  };
551
573
  /**
552
574
  * Gets an invoice. **Required Permissions** \"billing-management.invoices.view\"
@@ -558,7 +580,7 @@ var InvoicesApi = /** @class */ (function (_super) {
558
580
  */
559
581
  InvoicesApi.prototype.getInvoice = function (requestParameters, options) {
560
582
  var _this = this;
561
- return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
583
+ 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); });
562
584
  };
563
585
  /**
564
586
  * 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\"
@@ -571,7 +593,7 @@ var InvoicesApi = /** @class */ (function (_super) {
571
593
  InvoicesApi.prototype.listInvoices = function (requestParameters, options) {
572
594
  var _this = this;
573
595
  if (requestParameters === void 0) { requestParameters = {}; }
574
- 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); });
596
+ 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); });
575
597
  };
576
598
  /**
577
599
  * 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\"
@@ -585,7 +607,7 @@ var InvoicesApi = /** @class */ (function (_super) {
585
607
  InvoicesApi.prototype.listPoliciesBillingDates = function (requestParameters, options) {
586
608
  var _this = this;
587
609
  if (requestParameters === void 0) { requestParameters = {}; }
588
- 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); });
610
+ 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); });
589
611
  };
590
612
  return InvoicesApi;
591
613
  }(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
  }
@@ -103,9 +103,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
103
103
  createPolicyBilling: function (createPolicyBillingRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
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) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createPolicyBillingRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createPolicyBilling', 'createPolicyBillingRequestDto', createPolicyBillingRequestDto);
@@ -120,13 +121,19 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -158,9 +165,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
158
165
  listPoliciesBillings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
159
166
  if (options === void 0) { options = {}; }
160
167
  return __awaiter(_this, void 0, void 0, function () {
161
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
162
- return __generator(this, function (_a) {
163
- switch (_a.label) {
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
169
+ var _a;
170
+ return __generator(this, function (_b) {
171
+ switch (_b.label) {
164
172
  case 0:
165
173
  localVarPath = "/billingservice/v1/policies-billings";
166
174
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -177,7 +185,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
177
185
  case 1:
178
186
  // authentication bearer required
179
187
  // http bearer authentication required
180
- _a.sent();
188
+ _b.sent();
181
189
  if (pageSize !== undefined) {
182
190
  localVarQueryParameter['pageSize'] = pageSize;
183
191
  }
@@ -199,8 +207,11 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
199
207
  if (filters !== undefined) {
200
208
  localVarQueryParameter['filters'] = filters;
201
209
  }
202
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
203
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
210
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
211
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
212
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
213
+ if (authorizationValue || authorizationKeepEmpty) {
214
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
204
215
  }
205
216
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
206
217
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -225,9 +236,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
225
236
  updatePolicyBilling: function (code, updatePolicyBillingRequestDto, authorization, options) {
226
237
  if (options === void 0) { options = {}; }
227
238
  return __awaiter(_this, void 0, void 0, function () {
228
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
229
- return __generator(this, function (_a) {
230
- switch (_a.label) {
239
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
240
+ var _a;
241
+ return __generator(this, function (_b) {
242
+ switch (_b.label) {
231
243
  case 0:
232
244
  // verify required parameter 'code' is not null or undefined
233
245
  (0, common_1.assertParamExists)('updatePolicyBilling', 'code', code);
@@ -245,13 +257,19 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
245
257
  localVarQueryParameter = {};
246
258
  // authentication bearer required
247
259
  // http bearer authentication required
248
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
260
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
261
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
262
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
263
+ ];
249
264
  case 1:
250
265
  // authentication bearer required
251
266
  // http bearer authentication required
252
- _a.sent();
253
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
254
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
267
+ _b.sent();
268
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
269
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
270
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
271
+ if (authorizationValue || authorizationKeepEmpty) {
272
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
255
273
  }
256
274
  localVarHeaderParameter['Content-Type'] = 'application/json';
257
275
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -420,7 +438,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
420
438
  */
421
439
  PolicyBillingApi.prototype.createPolicyBilling = function (requestParameters, options) {
422
440
  var _this = this;
423
- return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
441
+ return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
424
442
  };
425
443
  /**
426
444
  * 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\"
@@ -433,7 +451,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
433
451
  PolicyBillingApi.prototype.listPoliciesBillings = function (requestParameters, options) {
434
452
  var _this = this;
435
453
  if (requestParameters === void 0) { requestParameters = {}; }
436
- 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); });
454
+ 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); });
437
455
  };
438
456
  /**
439
457
  * 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\"
@@ -445,7 +463,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
445
463
  */
446
464
  PolicyBillingApi.prototype.updatePolicyBilling = function (requestParameters, options) {
447
465
  var _this = this;
448
- return (0, exports.PolicyBillingApiFp)(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
466
+ 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); });
449
467
  };
450
468
  return PolicyBillingApi;
451
469
  }(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
  }
@@ -104,9 +104,10 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
104
104
  createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
108
+ var _a, _b;
109
+ return __generator(this, function (_c) {
110
+ switch (_c.label) {
110
111
  case 0:
111
112
  // verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
112
113
  (0, common_1.assertParamExists)('createRecurringInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
@@ -121,16 +122,25 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
121
122
  localVarQueryParameter = {};
122
123
  // authentication bearer required
123
124
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
126
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
127
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
128
+ ];
125
129
  case 1:
126
130
  // authentication bearer required
127
131
  // http bearer authentication required
128
- _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
132
+ _c.sent();
133
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
134
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
135
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
136
+ if (authorizationValue || authorizationKeepEmpty) {
137
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
138
  }
132
- if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
139
+ idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
140
+ idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
141
+ idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
142
+ if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
143
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
134
144
  }
135
145
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
146
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -223,7 +233,7 @@ var RecurringInvoicesApi = /** @class */ (function (_super) {
223
233
  */
224
234
  RecurringInvoicesApi.prototype.createRecurringInvoice = function (requestParameters, options) {
225
235
  var _this = this;
226
- return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
236
+ 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); });
227
237
  };
228
238
  return RecurringInvoicesApi;
229
239
  }(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
  }