@emilgroup/billing-sdk 1.63.1-beta.37 → 1.63.1-beta.39
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/.openapi-generator/FILES +3 -0
- 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 +39 -14
- 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 +189 -0
- package/api.ts +2 -0
- 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 +4 -4
- package/dist/api/invoices-api.js +53 -31
- 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 +106 -0
- package/dist/api/withdraw-invoices-api.js +240 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- 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/create-withdraw-invoice-request-dto-rest.d.ts +50 -0
- package/dist/models/create-withdraw-invoice-request-dto-rest.js +15 -0
- package/dist/models/create-withdraw-invoice-request-dto.d.ts +50 -0
- package/dist/models/create-withdraw-invoice-request-dto.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/invoice-item-class.d.ts +12 -0
- package/models/create-withdraw-invoice-request-dto-rest.ts +54 -0
- package/models/create-withdraw-invoice-request-dto.ts +54 -0
- package/models/index.ts +2 -0
- package/models/invoice-item-class.ts +12 -0
- package/package.json +2 -2
|
@@ -104,9 +104,10 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
104
104
|
createInitialInvoice: 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
|
-
|
|
109
|
-
|
|
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)('createInitialInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
@@ -121,16 +122,25 @@ var InitialInvoicesApiAxiosParamCreator = 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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
133
|
-
|
|
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 InitialInvoicesApi = /** @class */ (function (_super) {
|
|
|
223
233
|
*/
|
|
224
234
|
InitialInvoicesApi.prototype.createInitialInvoice = function (requestParameters, options) {
|
|
225
235
|
var _this = this;
|
|
226
|
-
return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
236
|
+
return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
227
237
|
};
|
|
228
238
|
return InitialInvoicesApi;
|
|
229
239
|
}(base_1.BaseAPI));
|
|
@@ -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
|
}
|
package/dist/api/invoices-api.js
CHANGED
|
@@ -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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
133
|
-
|
|
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
|
-
|
|
162
|
-
|
|
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
|
-
|
|
195
|
+
_b.sent();
|
|
185
196
|
if (expand !== undefined) {
|
|
186
197
|
localVarQueryParameter['expand'] = expand;
|
|
187
198
|
}
|
|
188
|
-
|
|
189
|
-
|
|
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 : {};
|
|
@@ -216,9 +230,10 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
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
|
-
|
|
221
|
-
|
|
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
|
-
|
|
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
|
-
|
|
261
|
-
|
|
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
|
-
|
|
294
|
-
|
|
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
|
-
|
|
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
|
-
|
|
334
|
-
|
|
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 : {};
|
|
@@ -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
|
-
|
|
108
|
-
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
163
|
-
|
|
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
|
-
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
|
|
230
|
-
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
109
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
133
|
-
|
|
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
|
}
|
|
@@ -104,9 +104,10 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
104
104
|
createTerminationInvoice: 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
|
-
|
|
109
|
-
|
|
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)('createTerminationInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
@@ -121,16 +122,25 @@ var TerminationInvoicesApiAxiosParamCreator = 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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
133
|
-
|
|
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 TerminationInvoicesApi = /** @class */ (function (_super) {
|
|
|
223
233
|
*/
|
|
224
234
|
TerminationInvoicesApi.prototype.createTerminationInvoice = function (requestParameters, options) {
|
|
225
235
|
var _this = this;
|
|
226
|
-
return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
236
|
+
return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
227
237
|
};
|
|
228
238
|
return TerminationInvoicesApi;
|
|
229
239
|
}(base_1.BaseAPI));
|