@emilgroup/billing-sdk-node 1.63.1-beta.38 → 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 +193 -0
- package/api.ts +2 -0
- package/base.ts +4 -0
- package/common.ts +3 -2
- 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 +244 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.d.ts +1 -0
- package/dist/base.js +3 -0
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -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
|
@@ -107,9 +107,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
107
107
|
createPolicyBilling: function (createPolicyBillingRequestDto, authorization, options) {
|
|
108
108
|
if (options === void 0) { options = {}; }
|
|
109
109
|
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
111
|
+
var _a;
|
|
112
|
+
return __generator(this, function (_b) {
|
|
113
|
+
switch (_b.label) {
|
|
113
114
|
case 0:
|
|
114
115
|
// verify required parameter 'createPolicyBillingRequestDto' is not null or undefined
|
|
115
116
|
(0, common_1.assertParamExists)('createPolicyBilling', 'createPolicyBillingRequestDto', createPolicyBillingRequestDto);
|
|
@@ -124,13 +125,19 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
124
125
|
localVarQueryParameter = {};
|
|
125
126
|
// authentication bearer required
|
|
126
127
|
// http bearer authentication required
|
|
127
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
128
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
129
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
130
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
131
|
+
];
|
|
128
132
|
case 1:
|
|
129
133
|
// authentication bearer required
|
|
130
134
|
// http bearer authentication required
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
_b.sent();
|
|
136
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
137
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
138
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
139
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
140
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
134
141
|
}
|
|
135
142
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
143
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -162,9 +169,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
162
169
|
listPoliciesBillings: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
163
170
|
if (options === void 0) { options = {}; }
|
|
164
171
|
return __awaiter(_this, void 0, void 0, function () {
|
|
165
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
166
|
-
|
|
167
|
-
|
|
172
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
173
|
+
var _a;
|
|
174
|
+
return __generator(this, function (_b) {
|
|
175
|
+
switch (_b.label) {
|
|
168
176
|
case 0:
|
|
169
177
|
localVarPath = "/billingservice/v1/policies-billings";
|
|
170
178
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -181,7 +189,7 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
181
189
|
case 1:
|
|
182
190
|
// authentication bearer required
|
|
183
191
|
// http bearer authentication required
|
|
184
|
-
|
|
192
|
+
_b.sent();
|
|
185
193
|
if (pageSize !== undefined) {
|
|
186
194
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
187
195
|
}
|
|
@@ -203,8 +211,11 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
203
211
|
if (filters !== undefined) {
|
|
204
212
|
localVarQueryParameter['filters'] = filters;
|
|
205
213
|
}
|
|
206
|
-
|
|
207
|
-
|
|
214
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
215
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
216
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
217
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
218
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
208
219
|
}
|
|
209
220
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
210
221
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -229,9 +240,10 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
229
240
|
updatePolicyBilling: function (code, updatePolicyBillingRequestDto, authorization, options) {
|
|
230
241
|
if (options === void 0) { options = {}; }
|
|
231
242
|
return __awaiter(_this, void 0, void 0, function () {
|
|
232
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
233
|
-
|
|
234
|
-
|
|
243
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
244
|
+
var _a;
|
|
245
|
+
return __generator(this, function (_b) {
|
|
246
|
+
switch (_b.label) {
|
|
235
247
|
case 0:
|
|
236
248
|
// verify required parameter 'code' is not null or undefined
|
|
237
249
|
(0, common_1.assertParamExists)('updatePolicyBilling', 'code', code);
|
|
@@ -249,13 +261,19 @@ var PolicyBillingApiAxiosParamCreator = function (configuration) {
|
|
|
249
261
|
localVarQueryParameter = {};
|
|
250
262
|
// authentication bearer required
|
|
251
263
|
// http bearer authentication required
|
|
252
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
264
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
265
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
266
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
267
|
+
];
|
|
253
268
|
case 1:
|
|
254
269
|
// authentication bearer required
|
|
255
270
|
// http bearer authentication required
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
271
|
+
_b.sent();
|
|
272
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
273
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
274
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
275
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
276
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
259
277
|
}
|
|
260
278
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
261
279
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -424,7 +442,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
|
|
|
424
442
|
*/
|
|
425
443
|
PolicyBillingApi.prototype.createPolicyBilling = function (requestParameters, options) {
|
|
426
444
|
var _this = this;
|
|
427
|
-
return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
445
|
+
return (0, exports.PolicyBillingApiFp)(this.configuration).createPolicyBilling(requestParameters.createPolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
428
446
|
};
|
|
429
447
|
/**
|
|
430
448
|
* Returns a list of policies billings you have previously created. The policies billings are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"billing-management.invoices.view\"
|
|
@@ -437,7 +455,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
|
|
|
437
455
|
PolicyBillingApi.prototype.listPoliciesBillings = function (requestParameters, options) {
|
|
438
456
|
var _this = this;
|
|
439
457
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
440
|
-
return (0, exports.PolicyBillingApiFp)(this.configuration).listPoliciesBillings(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
458
|
+
return (0, exports.PolicyBillingApiFp)(this.configuration).listPoliciesBillings(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
441
459
|
};
|
|
442
460
|
/**
|
|
443
461
|
* Updates the specified request message by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"billing-management.invoices.update\"
|
|
@@ -449,7 +467,7 @@ var PolicyBillingApi = /** @class */ (function (_super) {
|
|
|
449
467
|
*/
|
|
450
468
|
PolicyBillingApi.prototype.updatePolicyBilling = function (requestParameters, options) {
|
|
451
469
|
var _this = this;
|
|
452
|
-
return (0, exports.PolicyBillingApiFp)(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
470
|
+
return (0, exports.PolicyBillingApiFp)(this.configuration).updatePolicyBilling(requestParameters.code, requestParameters.updatePolicyBillingRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
453
471
|
};
|
|
454
472
|
return PolicyBillingApi;
|
|
455
473
|
}(base_1.BaseAPI));
|
|
@@ -102,5 +102,5 @@ export declare class RecurringInvoicesApi extends BaseAPI {
|
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
* @memberof RecurringInvoicesApi
|
|
104
104
|
*/
|
|
105
|
-
createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
|
|
105
|
+
createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
|
|
106
106
|
}
|
|
@@ -108,9 +108,10 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
108
108
|
createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
109
109
|
if (options === void 0) { options = {}; }
|
|
110
110
|
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return __generator(this, function (_c) {
|
|
114
|
+
switch (_c.label) {
|
|
114
115
|
case 0:
|
|
115
116
|
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
116
117
|
(0, common_1.assertParamExists)('createRecurringInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
@@ -125,16 +126,25 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
125
126
|
localVarQueryParameter = {};
|
|
126
127
|
// authentication bearer required
|
|
127
128
|
// http bearer authentication required
|
|
128
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
129
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
130
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
131
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
132
|
+
];
|
|
129
133
|
case 1:
|
|
130
134
|
// authentication bearer required
|
|
131
135
|
// http bearer authentication required
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
_c.sent();
|
|
137
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
138
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
139
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
140
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
141
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
142
|
}
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
144
|
+
idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
145
|
+
idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
|
|
146
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
147
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
138
148
|
}
|
|
139
149
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
150
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -227,7 +237,7 @@ var RecurringInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
237
|
*/
|
|
228
238
|
RecurringInvoicesApi.prototype.createRecurringInvoice = function (requestParameters, options) {
|
|
229
239
|
var _this = this;
|
|
230
|
-
return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
240
|
+
return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
241
|
};
|
|
232
242
|
return RecurringInvoicesApi;
|
|
233
243
|
}(base_1.BaseAPI));
|
|
@@ -102,5 +102,5 @@ export declare class TerminationInvoicesApi extends BaseAPI {
|
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
* @memberof TerminationInvoicesApi
|
|
104
104
|
*/
|
|
105
|
-
createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}>>;
|
|
105
|
+
createTerminationInvoice(requestParameters: TerminationInvoicesApiCreateTerminationInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
|
|
106
106
|
}
|
|
@@ -108,9 +108,10 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
108
108
|
createTerminationInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
109
109
|
if (options === void 0) { options = {}; }
|
|
110
110
|
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return __generator(this, function (_c) {
|
|
114
|
+
switch (_c.label) {
|
|
114
115
|
case 0:
|
|
115
116
|
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
116
117
|
(0, common_1.assertParamExists)('createTerminationInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
@@ -125,16 +126,25 @@ var TerminationInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
125
126
|
localVarQueryParameter = {};
|
|
126
127
|
// authentication bearer required
|
|
127
128
|
// http bearer authentication required
|
|
128
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
129
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
130
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
131
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
132
|
+
];
|
|
129
133
|
case 1:
|
|
130
134
|
// authentication bearer required
|
|
131
135
|
// http bearer authentication required
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
_c.sent();
|
|
137
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
138
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
139
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
140
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
141
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
135
142
|
}
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
144
|
+
idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
145
|
+
idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
|
|
146
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
147
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
138
148
|
}
|
|
139
149
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
150
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -227,7 +237,7 @@ var TerminationInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
237
|
*/
|
|
228
238
|
TerminationInvoicesApi.prototype.createTerminationInvoice = function (requestParameters, options) {
|
|
229
239
|
var _this = this;
|
|
230
|
-
return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
240
|
+
return (0, exports.TerminationInvoicesApiFp)(this.configuration).createTerminationInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
241
|
};
|
|
232
242
|
return TerminationInvoicesApi;
|
|
233
243
|
}(base_1.BaseAPI));
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL BillingService
|
|
3
|
+
* The EMIL BillingService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { CreateInvoiceResponseClass } from '../models';
|
|
16
|
+
import { CreateWithdrawInvoiceRequestDtoRest } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* WithdrawInvoicesApi - axios parameter creator
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
export declare const WithdrawInvoicesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
22
|
+
/**
|
|
23
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
24
|
+
* @summary Create the Withdraw invoice
|
|
25
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
26
|
+
* @param {string} [authorization] Bearer Token
|
|
27
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
*/
|
|
31
|
+
createWithdrawInvoice: (createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* WithdrawInvoicesApi - functional programming interface
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
export declare const WithdrawInvoicesApiFp: (configuration?: Configuration) => {
|
|
38
|
+
/**
|
|
39
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
40
|
+
* @summary Create the Withdraw invoice
|
|
41
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
42
|
+
* @param {string} [authorization] Bearer Token
|
|
43
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>>;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* WithdrawInvoicesApi - factory interface
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const WithdrawInvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
54
|
+
/**
|
|
55
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
56
|
+
* @summary Create the Withdraw invoice
|
|
57
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
58
|
+
* @param {string} [authorization] Bearer Token
|
|
59
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
60
|
+
* @param {*} [options] Override http request option.
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
*/
|
|
63
|
+
createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass>;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Request parameters for createWithdrawInvoice operation in WithdrawInvoicesApi.
|
|
67
|
+
* @export
|
|
68
|
+
* @interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest
|
|
69
|
+
*/
|
|
70
|
+
export interface WithdrawInvoicesApiCreateWithdrawInvoiceRequest {
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {CreateWithdrawInvoiceRequestDtoRest}
|
|
74
|
+
* @memberof WithdrawInvoicesApiCreateWithdrawInvoice
|
|
75
|
+
*/
|
|
76
|
+
readonly createWithdrawInvoiceRequestDtoRest: CreateWithdrawInvoiceRequestDtoRest;
|
|
77
|
+
/**
|
|
78
|
+
* Bearer Token
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof WithdrawInvoicesApiCreateWithdrawInvoice
|
|
81
|
+
*/
|
|
82
|
+
readonly authorization?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof WithdrawInvoicesApiCreateWithdrawInvoice
|
|
87
|
+
*/
|
|
88
|
+
readonly idempotencyKey?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* WithdrawInvoicesApi - object-oriented interface
|
|
92
|
+
* @export
|
|
93
|
+
* @class WithdrawInvoicesApi
|
|
94
|
+
* @extends {BaseAPI}
|
|
95
|
+
*/
|
|
96
|
+
export declare class WithdrawInvoicesApi extends BaseAPI {
|
|
97
|
+
/**
|
|
98
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
99
|
+
* @summary Create the Withdraw invoice
|
|
100
|
+
* @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof WithdrawInvoicesApi
|
|
104
|
+
*/
|
|
105
|
+
createWithdrawInvoice(requestParameters: WithdrawInvoicesApiCreateWithdrawInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any, {}, any>>;
|
|
106
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL BillingService
|
|
6
|
+
* The EMIL BillingService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.WithdrawInvoicesApi = exports.WithdrawInvoicesApiFactory = exports.WithdrawInvoicesApiFp = exports.WithdrawInvoicesApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* WithdrawInvoicesApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var WithdrawInvoicesApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
101
|
+
* @summary Create the Withdraw invoice
|
|
102
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
103
|
+
* @param {string} [authorization] Bearer Token
|
|
104
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
|
|
109
|
+
if (options === void 0) { options = {}; }
|
|
110
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, idempotencyKeyIsAuth, idempotencyKeyValue, idempotencyKeyKeepEmpty, headersFromBaseOptions;
|
|
112
|
+
var _a, _b;
|
|
113
|
+
return __generator(this, function (_c) {
|
|
114
|
+
switch (_c.label) {
|
|
115
|
+
case 0:
|
|
116
|
+
// verify required parameter 'createWithdrawInvoiceRequestDtoRest' is not null or undefined
|
|
117
|
+
(0, common_1.assertParamExists)('createWithdrawInvoice', 'createWithdrawInvoiceRequestDtoRest', createWithdrawInvoiceRequestDtoRest);
|
|
118
|
+
localVarPath = "/billingservice/v1/withdraw-invoices";
|
|
119
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
120
|
+
if (configuration) {
|
|
121
|
+
baseOptions = configuration.baseOptions;
|
|
122
|
+
baseAccessToken = configuration.accessToken;
|
|
123
|
+
}
|
|
124
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
125
|
+
localVarHeaderParameter = {};
|
|
126
|
+
localVarQueryParameter = {};
|
|
127
|
+
// authentication bearer required
|
|
128
|
+
// http bearer authentication required
|
|
129
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
130
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
131
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
132
|
+
];
|
|
133
|
+
case 1:
|
|
134
|
+
// authentication bearer required
|
|
135
|
+
// http bearer authentication required
|
|
136
|
+
_c.sent();
|
|
137
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
138
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
139
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
140
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
141
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
142
|
+
}
|
|
143
|
+
idempotencyKeyIsAuth = 'Idempotency-Key'.toLowerCase() === 'authorization';
|
|
144
|
+
idempotencyKeyValue = idempotencyKeyIsAuth ? (idempotencyKey || baseAccessToken) : idempotencyKey;
|
|
145
|
+
idempotencyKeyKeepEmpty = idempotencyKeyIsAuth && idempotencyKeyValue === '' && !((_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _b === void 0 ? void 0 : _b['X-Emil-Account']);
|
|
146
|
+
if (idempotencyKeyValue || idempotencyKeyKeepEmpty) {
|
|
147
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKeyValue);
|
|
148
|
+
}
|
|
149
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
150
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
151
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
152
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
153
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWithdrawInvoiceRequestDtoRest, localVarRequestOptions, configuration);
|
|
154
|
+
return [2 /*return*/, {
|
|
155
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
156
|
+
options: localVarRequestOptions,
|
|
157
|
+
}];
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
exports.WithdrawInvoicesApiAxiosParamCreator = WithdrawInvoicesApiAxiosParamCreator;
|
|
165
|
+
/**
|
|
166
|
+
* WithdrawInvoicesApi - functional programming interface
|
|
167
|
+
* @export
|
|
168
|
+
*/
|
|
169
|
+
var WithdrawInvoicesApiFp = function (configuration) {
|
|
170
|
+
var localVarAxiosParamCreator = (0, exports.WithdrawInvoicesApiAxiosParamCreator)(configuration);
|
|
171
|
+
return {
|
|
172
|
+
/**
|
|
173
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
174
|
+
* @summary Create the Withdraw invoice
|
|
175
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
176
|
+
* @param {string} [authorization] Bearer Token
|
|
177
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
+
var localVarAxiosArgs;
|
|
184
|
+
return __generator(this, function (_a) {
|
|
185
|
+
switch (_a.label) {
|
|
186
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options)];
|
|
187
|
+
case 1:
|
|
188
|
+
localVarAxiosArgs = _a.sent();
|
|
189
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
exports.WithdrawInvoicesApiFp = WithdrawInvoicesApiFp;
|
|
197
|
+
/**
|
|
198
|
+
* WithdrawInvoicesApi - factory interface
|
|
199
|
+
* @export
|
|
200
|
+
*/
|
|
201
|
+
var WithdrawInvoicesApiFactory = function (configuration, basePath, axios) {
|
|
202
|
+
var localVarFp = (0, exports.WithdrawInvoicesApiFp)(configuration);
|
|
203
|
+
return {
|
|
204
|
+
/**
|
|
205
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
206
|
+
* @summary Create the Withdraw invoice
|
|
207
|
+
* @param {CreateWithdrawInvoiceRequestDtoRest} createWithdrawInvoiceRequestDtoRest
|
|
208
|
+
* @param {string} [authorization] Bearer Token
|
|
209
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
210
|
+
* @param {*} [options] Override http request option.
|
|
211
|
+
* @throws {RequiredError}
|
|
212
|
+
*/
|
|
213
|
+
createWithdrawInvoice: function (createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options) {
|
|
214
|
+
return localVarFp.createWithdrawInvoice(createWithdrawInvoiceRequestDtoRest, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
exports.WithdrawInvoicesApiFactory = WithdrawInvoicesApiFactory;
|
|
219
|
+
/**
|
|
220
|
+
* WithdrawInvoicesApi - object-oriented interface
|
|
221
|
+
* @export
|
|
222
|
+
* @class WithdrawInvoicesApi
|
|
223
|
+
* @extends {BaseAPI}
|
|
224
|
+
*/
|
|
225
|
+
var WithdrawInvoicesApi = /** @class */ (function (_super) {
|
|
226
|
+
__extends(WithdrawInvoicesApi, _super);
|
|
227
|
+
function WithdrawInvoicesApi() {
|
|
228
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* This will create a withdraw invoice that negates existing invoice line items for a policy. **Required Permissions** \"billing-management.invoices.create\"
|
|
232
|
+
* @summary Create the Withdraw invoice
|
|
233
|
+
* @param {WithdrawInvoicesApiCreateWithdrawInvoiceRequest} requestParameters Request parameters.
|
|
234
|
+
* @param {*} [options] Override http request option.
|
|
235
|
+
* @throws {RequiredError}
|
|
236
|
+
* @memberof WithdrawInvoicesApi
|
|
237
|
+
*/
|
|
238
|
+
WithdrawInvoicesApi.prototype.createWithdrawInvoice = function (requestParameters, options) {
|
|
239
|
+
var _this = this;
|
|
240
|
+
return (0, exports.WithdrawInvoicesApiFp)(this.configuration).createWithdrawInvoice(requestParameters.createWithdrawInvoiceRequestDtoRest, requestParameters.authorization, requestParameters.idempotencyKey, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
241
|
+
};
|
|
242
|
+
return WithdrawInvoicesApi;
|
|
243
|
+
}(base_1.BaseAPI));
|
|
244
|
+
exports.WithdrawInvoicesApi = WithdrawInvoicesApi;
|
package/dist/api.d.ts
CHANGED