@emilgroup/billing-sdk 1.63.1-beta.4 → 1.63.1-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/correction-invoices-api.ts +23 -8
- package/api/draft-invoice-api.ts +24 -9
- package/api/estimated-invoices-api.ts +32 -12
- package/api/health-api.ts +1 -1
- package/api/initial-invoices-api.ts +15 -5
- package/api/invoices-api.ts +47 -22
- package/api/policy-billing-api.ts +24 -9
- package/api/recurring-invoices-api.ts +15 -5
- package/api/termination-invoices-api.ts +15 -5
- package/api/withdraw-invoices-api.ts +15 -5
- package/base.ts +239 -43
- package/common.ts +3 -2
- package/configuration.ts +20 -0
- package/dist/api/correction-invoices-api.d.ts +2 -2
- package/dist/api/correction-invoices-api.js +35 -18
- package/dist/api/draft-invoice-api.d.ts +3 -3
- package/dist/api/draft-invoice-api.js +45 -24
- package/dist/api/estimated-invoices-api.d.ts +4 -4
- package/dist/api/estimated-invoices-api.js +60 -32
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/api/initial-invoices-api.d.ts +1 -1
- package/dist/api/initial-invoices-api.js +20 -10
- package/dist/api/invoices-api.d.ts +12 -12
- package/dist/api/invoices-api.js +59 -37
- package/dist/api/policy-billing-api.d.ts +3 -3
- package/dist/api/policy-billing-api.js +41 -23
- package/dist/api/recurring-invoices-api.d.ts +1 -1
- package/dist/api/recurring-invoices-api.js +20 -10
- package/dist/api/termination-invoices-api.d.ts +1 -1
- package/dist/api/termination-invoices-api.js +20 -10
- package/dist/api/withdraw-invoices-api.d.ts +1 -1
- package/dist/api/withdraw-invoices-api.js +20 -10
- package/dist/base.d.ts +26 -0
- package/dist/base.js +243 -60
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/configuration.d.ts +17 -0
- package/dist/configuration.js +2 -0
- package/dist/models/invoice-item-class.d.ts +12 -0
- package/models/invoice-item-class.ts +12 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/billing-sdk@1.63.1-beta.
|
|
20
|
+
npm install @emilgroup/billing-sdk@1.63.1-beta.41 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk@1.63.1-beta.
|
|
24
|
+
yarn add @emilgroup/billing-sdk@1.63.1-beta.41
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `InvoicesApi`.
|
|
@@ -64,12 +64,22 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
64
64
|
// http bearer authentication required
|
|
65
65
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
68
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
69
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
70
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
71
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
72
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
73
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
77
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
78
|
+
const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
79
|
+
const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
80
|
+
const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
81
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
82
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
|
|
@@ -114,8 +124,13 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
114
124
|
// http bearer authentication required
|
|
115
125
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
116
126
|
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
128
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
129
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
130
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
131
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
132
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
119
134
|
}
|
|
120
135
|
|
|
121
136
|
|
|
@@ -266,7 +281,7 @@ export class CorrectionInvoicesApi extends BaseAPI {
|
|
|
266
281
|
* @memberof CorrectionInvoicesApi
|
|
267
282
|
*/
|
|
268
283
|
public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
|
|
269
|
-
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
284
|
+
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
270
285
|
}
|
|
271
286
|
|
|
272
287
|
/**
|
|
@@ -277,6 +292,6 @@ export class CorrectionInvoicesApi extends BaseAPI {
|
|
|
277
292
|
* @memberof CorrectionInvoicesApi
|
|
278
293
|
*/
|
|
279
294
|
public revertInvoice(requestParameters: CorrectionInvoicesApiRevertInvoiceRequest, options?: AxiosRequestConfig) {
|
|
280
|
-
return CorrectionInvoicesApiFp(this.configuration).revertInvoice(requestParameters.revertInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
295
|
+
return CorrectionInvoicesApiFp(this.configuration).revertInvoice(requestParameters.revertInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
281
296
|
}
|
|
282
297
|
}
|
package/api/draft-invoice-api.ts
CHANGED
|
@@ -56,8 +56,13 @@ export const DraftInvoiceApiAxiosParamCreator = function (configuration?: Config
|
|
|
56
56
|
// http bearer authentication required
|
|
57
57
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
60
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
61
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
62
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
63
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
64
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
65
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
|
|
@@ -99,8 +104,13 @@ export const DraftInvoiceApiAxiosParamCreator = function (configuration?: Config
|
|
|
99
104
|
// http bearer authentication required
|
|
100
105
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
101
106
|
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
108
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
109
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
110
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
111
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
112
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
113
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
104
114
|
}
|
|
105
115
|
|
|
106
116
|
|
|
@@ -142,8 +152,13 @@ export const DraftInvoiceApiAxiosParamCreator = function (configuration?: Config
|
|
|
142
152
|
// http bearer authentication required
|
|
143
153
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
144
154
|
|
|
145
|
-
|
|
146
|
-
|
|
155
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
156
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
157
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
158
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
159
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
160
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
161
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
147
162
|
}
|
|
148
163
|
|
|
149
164
|
|
|
@@ -315,7 +330,7 @@ export class DraftInvoiceApi extends BaseAPI {
|
|
|
315
330
|
* @memberof DraftInvoiceApi
|
|
316
331
|
*/
|
|
317
332
|
public createDraftInvoice(requestParameters: DraftInvoiceApiCreateDraftInvoiceRequest, options?: AxiosRequestConfig) {
|
|
318
|
-
return DraftInvoiceApiFp(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
333
|
+
return DraftInvoiceApiFp(this.configuration).createDraftInvoice(requestParameters.createDraftInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
319
334
|
}
|
|
320
335
|
|
|
321
336
|
/**
|
|
@@ -326,7 +341,7 @@ export class DraftInvoiceApi extends BaseAPI {
|
|
|
326
341
|
* @memberof DraftInvoiceApi
|
|
327
342
|
*/
|
|
328
343
|
public deleteAllDraftInvoices(requestParameters: DraftInvoiceApiDeleteAllDraftInvoicesRequest = {}, options?: AxiosRequestConfig) {
|
|
329
|
-
return DraftInvoiceApiFp(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
344
|
+
return DraftInvoiceApiFp(this.configuration).deleteAllDraftInvoices(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
330
345
|
}
|
|
331
346
|
|
|
332
347
|
/**
|
|
@@ -337,6 +352,6 @@ export class DraftInvoiceApi extends BaseAPI {
|
|
|
337
352
|
* @memberof DraftInvoiceApi
|
|
338
353
|
*/
|
|
339
354
|
public deleteDraftInvoice(requestParameters: DraftInvoiceApiDeleteDraftInvoiceRequest, options?: AxiosRequestConfig) {
|
|
340
|
-
return DraftInvoiceApiFp(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
355
|
+
return DraftInvoiceApiFp(this.configuration).deleteDraftInvoice(requestParameters.body, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
341
356
|
}
|
|
342
357
|
}
|
|
@@ -71,8 +71,13 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
71
71
|
// http bearer authentication required
|
|
72
72
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
75
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
76
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
77
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
78
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
79
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
80
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
|
|
@@ -118,8 +123,13 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
118
123
|
// http bearer authentication required
|
|
119
124
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
120
125
|
|
|
121
|
-
|
|
122
|
-
|
|
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
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
129
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
130
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
131
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
132
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
|
|
@@ -165,8 +175,13 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
165
175
|
// http bearer authentication required
|
|
166
176
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
167
177
|
|
|
168
|
-
|
|
169
|
-
|
|
178
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
179
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
180
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
181
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
182
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
183
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
184
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
170
185
|
}
|
|
171
186
|
|
|
172
187
|
|
|
@@ -216,8 +231,13 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
216
231
|
// http bearer authentication required
|
|
217
232
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
218
233
|
|
|
219
|
-
|
|
220
|
-
|
|
234
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
235
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
236
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
237
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
238
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
239
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
240
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
221
241
|
}
|
|
222
242
|
|
|
223
243
|
|
|
@@ -458,7 +478,7 @@ export class EstimatedInvoicesApi extends BaseAPI {
|
|
|
458
478
|
* @memberof EstimatedInvoicesApi
|
|
459
479
|
*/
|
|
460
480
|
public createCustomEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
|
|
461
|
-
return EstimatedInvoicesApiFp(this.configuration).createCustomEstimatedInvoice(requestParameters.createCustomEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
481
|
+
return EstimatedInvoicesApiFp(this.configuration).createCustomEstimatedInvoice(requestParameters.createCustomEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
462
482
|
}
|
|
463
483
|
|
|
464
484
|
/**
|
|
@@ -470,7 +490,7 @@ export class EstimatedInvoicesApi extends BaseAPI {
|
|
|
470
490
|
* @memberof EstimatedInvoicesApi
|
|
471
491
|
*/
|
|
472
492
|
public createEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
|
|
473
|
-
return EstimatedInvoicesApiFp(this.configuration).createEstimatedInvoice(requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
493
|
+
return EstimatedInvoicesApiFp(this.configuration).createEstimatedInvoice(requestParameters.createEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
474
494
|
}
|
|
475
495
|
|
|
476
496
|
/**
|
|
@@ -482,7 +502,7 @@ export class EstimatedInvoicesApi extends BaseAPI {
|
|
|
482
502
|
* @memberof EstimatedInvoicesApi
|
|
483
503
|
*/
|
|
484
504
|
public createEstimatedInvoiceFromInterval(requestParameters: EstimatedInvoicesApiCreateEstimatedInvoiceFromIntervalRequest, options?: AxiosRequestConfig) {
|
|
485
|
-
return EstimatedInvoicesApiFp(this.configuration).createEstimatedInvoiceFromInterval(requestParameters.createEstimatedInvoiceForIntervalRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
505
|
+
return EstimatedInvoicesApiFp(this.configuration).createEstimatedInvoiceFromInterval(requestParameters.createEstimatedInvoiceForIntervalRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
486
506
|
}
|
|
487
507
|
|
|
488
508
|
/**
|
|
@@ -494,6 +514,6 @@ export class EstimatedInvoicesApi extends BaseAPI {
|
|
|
494
514
|
* @memberof EstimatedInvoicesApi
|
|
495
515
|
*/
|
|
496
516
|
public createProductEstimatedInvoice(requestParameters: EstimatedInvoicesApiCreateProductEstimatedInvoiceRequest, options?: AxiosRequestConfig) {
|
|
497
|
-
return EstimatedInvoicesApiFp(this.configuration).createProductEstimatedInvoice(requestParameters.productSlug, requestParameters.createProductEstimatedInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
517
|
+
return EstimatedInvoicesApiFp(this.configuration).createProductEstimatedInvoice(requestParameters.productSlug, requestParameters.createProductEstimatedInvoiceRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
498
518
|
}
|
|
499
519
|
}
|
package/api/health-api.ts
CHANGED
|
@@ -115,6 +115,6 @@ export class HealthApi extends BaseAPI {
|
|
|
115
115
|
* @memberof HealthApi
|
|
116
116
|
*/
|
|
117
117
|
public check(options?: AxiosRequestConfig) {
|
|
118
|
-
return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
|
|
118
|
+
return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -60,12 +60,22 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
60
60
|
// http bearer authentication required
|
|
61
61
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
64
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
65
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
66
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
67
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
68
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
69
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
73
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
74
|
+
const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
75
|
+
const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
76
|
+
const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
77
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
78
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
|
|
@@ -174,6 +184,6 @@ export class InitialInvoicesApi extends BaseAPI {
|
|
|
174
184
|
* @memberof InitialInvoicesApi
|
|
175
185
|
*/
|
|
176
186
|
public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
|
|
177
|
-
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
187
|
+
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
178
188
|
}
|
|
179
189
|
}
|
package/api/invoices-api.ts
CHANGED
|
@@ -66,12 +66,22 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
66
66
|
// http bearer authentication required
|
|
67
67
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
70
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
71
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
72
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
73
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
74
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
75
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
79
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
80
|
+
const idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
81
|
+
const idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
82
|
+
const idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
83
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
84
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
|
|
@@ -125,8 +135,13 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
125
135
|
localVarQueryParameter['expand'] = expand;
|
|
126
136
|
}
|
|
127
137
|
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
139
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
140
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
141
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
142
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
143
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
144
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
130
145
|
}
|
|
131
146
|
|
|
132
147
|
|
|
@@ -146,11 +161,11 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
146
161
|
* @param {string} [authorization] Bearer Token
|
|
147
162
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
148
163
|
* @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.
|
|
149
|
-
* @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>
|
|
164
|
+
* @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>
|
|
150
165
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
151
166
|
* @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>
|
|
152
167
|
* @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>
|
|
153
|
-
* @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>
|
|
168
|
+
* @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>
|
|
154
169
|
* @param {*} [options] Override http request option.
|
|
155
170
|
* @throws {RequiredError}
|
|
156
171
|
*/
|
|
@@ -201,8 +216,13 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
201
216
|
localVarQueryParameter['filters'] = filters;
|
|
202
217
|
}
|
|
203
218
|
|
|
204
|
-
|
|
205
|
-
|
|
219
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
220
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
221
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
222
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
223
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
224
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
225
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
206
226
|
}
|
|
207
227
|
|
|
208
228
|
|
|
@@ -278,8 +298,13 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
278
298
|
localVarQueryParameter['filters'] = filters;
|
|
279
299
|
}
|
|
280
300
|
|
|
281
|
-
|
|
282
|
-
|
|
301
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
302
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
303
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
304
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
305
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
306
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
307
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
283
308
|
}
|
|
284
309
|
|
|
285
310
|
|
|
@@ -335,11 +360,11 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
335
360
|
* @param {string} [authorization] Bearer Token
|
|
336
361
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
337
362
|
* @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.
|
|
338
|
-
* @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>
|
|
363
|
+
* @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>
|
|
339
364
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
340
365
|
* @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>
|
|
341
366
|
* @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>
|
|
342
|
-
* @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>
|
|
367
|
+
* @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>
|
|
343
368
|
* @param {*} [options] Override http request option.
|
|
344
369
|
* @throws {RequiredError}
|
|
345
370
|
*/
|
|
@@ -406,11 +431,11 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
406
431
|
* @param {string} [authorization] Bearer Token
|
|
407
432
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
408
433
|
* @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.
|
|
409
|
-
* @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>
|
|
434
|
+
* @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>
|
|
410
435
|
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
411
436
|
* @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>
|
|
412
437
|
* @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>
|
|
413
|
-
* @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>
|
|
438
|
+
* @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>
|
|
414
439
|
* @param {*} [options] Override http request option.
|
|
415
440
|
* @throws {RequiredError}
|
|
416
441
|
*/
|
|
@@ -522,7 +547,7 @@ export interface InvoicesApiListInvoicesRequest {
|
|
|
522
547
|
readonly pageToken?: string
|
|
523
548
|
|
|
524
549
|
/**
|
|
525
|
-
* 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>
|
|
550
|
+
* 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>
|
|
526
551
|
* @type {string}
|
|
527
552
|
* @memberof InvoicesApiListInvoices
|
|
528
553
|
*/
|
|
@@ -550,7 +575,7 @@ export interface InvoicesApiListInvoicesRequest {
|
|
|
550
575
|
readonly expand?: string
|
|
551
576
|
|
|
552
577
|
/**
|
|
553
|
-
* 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>
|
|
578
|
+
* 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>
|
|
554
579
|
* @type {string}
|
|
555
580
|
* @memberof InvoicesApiListInvoices
|
|
556
581
|
*/
|
|
@@ -636,7 +661,7 @@ export class InvoicesApi extends BaseAPI {
|
|
|
636
661
|
* @memberof InvoicesApi
|
|
637
662
|
*/
|
|
638
663
|
public createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig) {
|
|
639
|
-
return InvoicesApiFp(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
664
|
+
return InvoicesApiFp(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
640
665
|
}
|
|
641
666
|
|
|
642
667
|
/**
|
|
@@ -648,7 +673,7 @@ export class InvoicesApi extends BaseAPI {
|
|
|
648
673
|
* @memberof InvoicesApi
|
|
649
674
|
*/
|
|
650
675
|
public getInvoice(requestParameters: InvoicesApiGetInvoiceRequest, options?: AxiosRequestConfig) {
|
|
651
|
-
return InvoicesApiFp(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
676
|
+
return InvoicesApiFp(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
652
677
|
}
|
|
653
678
|
|
|
654
679
|
/**
|
|
@@ -660,7 +685,7 @@ export class InvoicesApi extends BaseAPI {
|
|
|
660
685
|
* @memberof InvoicesApi
|
|
661
686
|
*/
|
|
662
687
|
public listInvoices(requestParameters: InvoicesApiListInvoicesRequest = {}, options?: AxiosRequestConfig) {
|
|
663
|
-
return InvoicesApiFp(this.configuration).listInvoices(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
688
|
+
return InvoicesApiFp(this.configuration).listInvoices(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
664
689
|
}
|
|
665
690
|
|
|
666
691
|
/**
|
|
@@ -673,6 +698,6 @@ export class InvoicesApi extends BaseAPI {
|
|
|
673
698
|
* @memberof InvoicesApi
|
|
674
699
|
*/
|
|
675
700
|
public listPoliciesBillingDates(requestParameters: InvoicesApiListPoliciesBillingDatesRequest = {}, options?: AxiosRequestConfig) {
|
|
676
|
-
return InvoicesApiFp(this.configuration).listPoliciesBillingDates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
701
|
+
return InvoicesApiFp(this.configuration).listPoliciesBillingDates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
677
702
|
}
|
|
678
703
|
}
|
|
@@ -63,8 +63,13 @@ export const PolicyBillingApiAxiosParamCreator = function (configuration?: Confi
|
|
|
63
63
|
// http bearer authentication required
|
|
64
64
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
67
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
68
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
69
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
70
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
71
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
72
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
|
|
@@ -142,8 +147,13 @@ export const PolicyBillingApiAxiosParamCreator = function (configuration?: Confi
|
|
|
142
147
|
localVarQueryParameter['filters'] = filters;
|
|
143
148
|
}
|
|
144
149
|
|
|
145
|
-
|
|
146
|
-
|
|
150
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
151
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
152
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
153
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
154
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
155
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
156
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
147
157
|
}
|
|
148
158
|
|
|
149
159
|
|
|
@@ -190,8 +200,13 @@ export const PolicyBillingApiAxiosParamCreator = function (configuration?: Confi
|
|
|
190
200
|
// http bearer authentication required
|
|
191
201
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
192
202
|
|
|
193
|
-
|
|
194
|
-
|
|
203
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
204
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
205
|
+
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
206
|
+
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
207
|
+
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
208
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
209
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
195
210
|
}
|
|
196
211
|
|
|
197
212
|
|
|
@@ -442,7 +457,7 @@ export class PolicyBillingApi extends BaseAPI {
|
|
|
442
457
|
* @memberof PolicyBillingApi
|
|
443
458
|
*/
|
|
444
459
|
public createPolicyBilling(requestParameters: PolicyBillingApiCreatePolicyBillingRequest, options?: AxiosRequestConfig) {
|
|
445
|
-
return PolicyBillingApiFp(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
460
|
+
return PolicyBillingApiFp(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
446
461
|
}
|
|
447
462
|
|
|
448
463
|
/**
|
|
@@ -454,7 +469,7 @@ export class PolicyBillingApi extends BaseAPI {
|
|
|
454
469
|
* @memberof PolicyBillingApi
|
|
455
470
|
*/
|
|
456
471
|
public listPoliciesBillings(requestParameters: PolicyBillingApiListPoliciesBillingsRequest = {}, options?: AxiosRequestConfig) {
|
|
457
|
-
return PolicyBillingApiFp(this.configuration).listPoliciesBillings(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
472
|
+
return PolicyBillingApiFp(this.configuration).listPoliciesBillings(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
458
473
|
}
|
|
459
474
|
|
|
460
475
|
/**
|
|
@@ -466,6 +481,6 @@ export class PolicyBillingApi extends BaseAPI {
|
|
|
466
481
|
* @memberof PolicyBillingApi
|
|
467
482
|
*/
|
|
468
483
|
public updatePolicyBilling(requestParameters: PolicyBillingApiUpdatePolicyBillingRequest, options?: AxiosRequestConfig) {
|
|
469
|
-
return PolicyBillingApiFp(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
484
|
+
return PolicyBillingApiFp(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
|
|
470
485
|
}
|
|
471
486
|
}
|