@emilgroup/billing-sdk-node 1.29.0 → 1.29.1-beta.0
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 +2 -0
- package/README.md +2 -2
- package/api/correction-invoices-api.ts +15 -15
- package/api/initial-invoices-api.ts +15 -15
- package/api/invoices-api.ts +121 -0
- package/api/recurring-invoices-api.ts +15 -15
- package/dist/api/correction-invoices-api.d.ts +9 -9
- package/dist/api/correction-invoices-api.js +12 -12
- package/dist/api/initial-invoices-api.d.ts +9 -9
- package/dist/api/initial-invoices-api.js +12 -12
- package/dist/api/invoices-api.d.ts +66 -0
- package/dist/api/invoices-api.js +99 -0
- package/dist/api/recurring-invoices-api.d.ts +9 -9
- package/dist/api/recurring-invoices-api.js +12 -12
- package/dist/models/create-invoice-for-policy-request-dto.d.ts +83 -0
- package/dist/models/create-invoice-for-policy-request-dto.js +26 -0
- package/dist/models/create-invoice-request-dto.d.ts +16 -9
- package/dist/models/create-item-request-dto.d.ts +101 -0
- package/dist/models/create-item-request-dto.js +36 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/list-request-dto.d.ts +6 -0
- package/dist/models/policy-dto.d.ts +12 -0
- package/dist/models/policy-object-dto.d.ts +12 -0
- package/dist/models/policy-premium-dto.d.ts +12 -0
- package/dist/models/policy-premium-item-dto.d.ts +12 -0
- package/dist/models/policy-version-dto.d.ts +12 -0
- package/dist/models/premium-formula-dto.d.ts +12 -0
- package/dist/models/timeslice-dto.d.ts +12 -0
- package/models/create-invoice-for-policy-request-dto.ts +92 -0
- package/models/create-invoice-request-dto.ts +16 -9
- package/models/create-item-request-dto.ts +112 -0
- package/models/index.ts +2 -0
- package/models/list-request-dto.ts +6 -0
- package/models/policy-dto.ts +12 -0
- package/models/policy-object-dto.ts +12 -0
- package/models/policy-premium-dto.ts +12 -0
- package/models/policy-premium-item-dto.ts +12 -0
- package/models/policy-version-dto.ts +12 -0
- package/models/premium-formula-dto.ts +12 -0
- package/models/timeslice-dto.ts +12 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
-
import {
|
|
15
|
+
import { CreateInvoiceForPolicyRequestDto } from '../models';
|
|
16
16
|
import { CreateInvoiceResponseClass } from '../models';
|
|
17
17
|
/**
|
|
18
18
|
* InitialInvoicesApi - axios parameter creator
|
|
@@ -22,13 +22,13 @@ export declare const InitialInvoicesApiAxiosParamCreator: (configuration?: Confi
|
|
|
22
22
|
/**
|
|
23
23
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
24
24
|
* @summary Create the initial invoice
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
26
26
|
* @param {string} [authorization] Bearer Token
|
|
27
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
28
|
* @param {*} [options] Override http request option.
|
|
29
29
|
* @throws {RequiredError}
|
|
30
30
|
*/
|
|
31
|
-
createInitialInvoice: (
|
|
31
|
+
createInitialInvoice: (createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* InitialInvoicesApi - functional programming interface
|
|
@@ -38,13 +38,13 @@ export declare const InitialInvoicesApiFp: (configuration?: Configuration) => {
|
|
|
38
38
|
/**
|
|
39
39
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
40
40
|
* @summary Create the initial invoice
|
|
41
|
-
* @param {
|
|
41
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
42
42
|
* @param {string} [authorization] Bearer Token
|
|
43
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
44
|
* @param {*} [options] Override http request option.
|
|
45
45
|
* @throws {RequiredError}
|
|
46
46
|
*/
|
|
47
|
-
createInitialInvoice(
|
|
47
|
+
createInitialInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>>;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* InitialInvoicesApi - factory interface
|
|
@@ -54,13 +54,13 @@ export declare const InitialInvoicesApiFactory: (configuration?: Configuration,
|
|
|
54
54
|
/**
|
|
55
55
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
56
56
|
* @summary Create the initial invoice
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
58
58
|
* @param {string} [authorization] Bearer Token
|
|
59
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
60
|
* @param {*} [options] Override http request option.
|
|
61
61
|
* @throws {RequiredError}
|
|
62
62
|
*/
|
|
63
|
-
createInitialInvoice(
|
|
63
|
+
createInitialInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Request parameters for createInitialInvoice operation in InitialInvoicesApi.
|
|
@@ -70,10 +70,10 @@ export declare const InitialInvoicesApiFactory: (configuration?: Configuration,
|
|
|
70
70
|
export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
|
-
* @type {
|
|
73
|
+
* @type {CreateInvoiceForPolicyRequestDto}
|
|
74
74
|
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
75
75
|
*/
|
|
76
|
-
readonly
|
|
76
|
+
readonly createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto;
|
|
77
77
|
/**
|
|
78
78
|
* Bearer Token
|
|
79
79
|
* @type {string}
|
|
@@ -99,21 +99,21 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
101
101
|
* @summary Create the initial invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
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
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
createInitialInvoice: function (
|
|
108
|
+
createInitialInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
109
109
|
if (options === void 0) { options = {}; }
|
|
110
110
|
return __awaiter(_this, void 0, void 0, function () {
|
|
111
111
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
112
|
return __generator(this, function (_a) {
|
|
113
113
|
switch (_a.label) {
|
|
114
114
|
case 0:
|
|
115
|
-
// verify required parameter '
|
|
116
|
-
(0, common_1.assertParamExists)('createInitialInvoice', '
|
|
115
|
+
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('createInitialInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
117
117
|
localVarPath = "/billingservice/v1/initial-invoices";
|
|
118
118
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
119
119
|
if (configuration) {
|
|
@@ -140,7 +140,7 @@ var InitialInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
140
140
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
141
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
142
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceForPolicyRequestDto, localVarRequestOptions, configuration);
|
|
144
144
|
return [2 /*return*/, {
|
|
145
145
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
146
|
options: localVarRequestOptions,
|
|
@@ -162,18 +162,18 @@ var InitialInvoicesApiFp = function (configuration) {
|
|
|
162
162
|
/**
|
|
163
163
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
164
164
|
* @summary Create the initial invoice
|
|
165
|
-
* @param {
|
|
165
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
166
166
|
* @param {string} [authorization] Bearer Token
|
|
167
167
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
168
168
|
* @param {*} [options] Override http request option.
|
|
169
169
|
* @throws {RequiredError}
|
|
170
170
|
*/
|
|
171
|
-
createInitialInvoice: function (
|
|
171
|
+
createInitialInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
172
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
173
|
var localVarAxiosArgs;
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInitialInvoice(
|
|
176
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInitialInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options)];
|
|
177
177
|
case 1:
|
|
178
178
|
localVarAxiosArgs = _a.sent();
|
|
179
179
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -194,14 +194,14 @@ var InitialInvoicesApiFactory = function (configuration, basePath, axios) {
|
|
|
194
194
|
/**
|
|
195
195
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
196
196
|
* @summary Create the initial invoice
|
|
197
|
-
* @param {
|
|
197
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
198
198
|
* @param {string} [authorization] Bearer Token
|
|
199
199
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
200
200
|
* @param {*} [options] Override http request option.
|
|
201
201
|
* @throws {RequiredError}
|
|
202
202
|
*/
|
|
203
|
-
createInitialInvoice: function (
|
|
204
|
-
return localVarFp.createInitialInvoice(
|
|
203
|
+
createInitialInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
204
|
+
return localVarFp.createInitialInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
205
205
|
},
|
|
206
206
|
};
|
|
207
207
|
};
|
|
@@ -227,7 +227,7 @@ var InitialInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
227
|
*/
|
|
228
228
|
InitialInvoicesApi.prototype.createInitialInvoice = function (requestParameters, options) {
|
|
229
229
|
var _this = this;
|
|
230
|
-
return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.
|
|
230
|
+
return (0, exports.InitialInvoicesApiFp)(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
231
|
};
|
|
232
232
|
return InitialInvoicesApi;
|
|
233
233
|
}(base_1.BaseAPI));
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { CreateInvoiceRequestDto } from '../models';
|
|
16
|
+
import { CreateInvoiceResponseClass } from '../models';
|
|
15
17
|
import { GetInvoiceResponseClass } from '../models';
|
|
16
18
|
import { ListInvoicesResponseClass } from '../models';
|
|
17
19
|
import { ListPoliciesBillingDatesResponseClass } from '../models';
|
|
@@ -20,6 +22,16 @@ import { ListPoliciesBillingDatesResponseClass } from '../models';
|
|
|
20
22
|
* @export
|
|
21
23
|
*/
|
|
22
24
|
export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
25
|
+
/**
|
|
26
|
+
* This will create invoice for a policy and save it in the DB.
|
|
27
|
+
* @summary Create the invoice
|
|
28
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
29
|
+
* @param {string} [authorization] Bearer Token
|
|
30
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
31
|
+
* @param {*} [options] Override http request option.
|
|
32
|
+
* @throws {RequiredError}
|
|
33
|
+
*/
|
|
34
|
+
createInvoice: (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
23
35
|
/**
|
|
24
36
|
* Gets an invoice.
|
|
25
37
|
* @summary Retrieve the invoice
|
|
@@ -66,6 +78,16 @@ export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
66
78
|
* @export
|
|
67
79
|
*/
|
|
68
80
|
export declare const InvoicesApiFp: (configuration?: Configuration) => {
|
|
81
|
+
/**
|
|
82
|
+
* This will create invoice for a policy and save it in the DB.
|
|
83
|
+
* @summary Create the invoice
|
|
84
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
85
|
+
* @param {string} [authorization] Bearer Token
|
|
86
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
87
|
+
* @param {*} [options] Override http request option.
|
|
88
|
+
* @throws {RequiredError}
|
|
89
|
+
*/
|
|
90
|
+
createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>>;
|
|
69
91
|
/**
|
|
70
92
|
* Gets an invoice.
|
|
71
93
|
* @summary Retrieve the invoice
|
|
@@ -112,6 +134,16 @@ export declare const InvoicesApiFp: (configuration?: Configuration) => {
|
|
|
112
134
|
* @export
|
|
113
135
|
*/
|
|
114
136
|
export declare const InvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
137
|
+
/**
|
|
138
|
+
* This will create invoice for a policy and save it in the DB.
|
|
139
|
+
* @summary Create the invoice
|
|
140
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
141
|
+
* @param {string} [authorization] Bearer Token
|
|
142
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
*/
|
|
146
|
+
createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass>;
|
|
115
147
|
/**
|
|
116
148
|
* Gets an invoice.
|
|
117
149
|
* @summary Retrieve the invoice
|
|
@@ -153,6 +185,31 @@ export declare const InvoicesApiFactory: (configuration?: Configuration, basePat
|
|
|
153
185
|
*/
|
|
154
186
|
listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPoliciesBillingDatesResponseClass>;
|
|
155
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* Request parameters for createInvoice operation in InvoicesApi.
|
|
190
|
+
* @export
|
|
191
|
+
* @interface InvoicesApiCreateInvoiceRequest
|
|
192
|
+
*/
|
|
193
|
+
export interface InvoicesApiCreateInvoiceRequest {
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
* @type {CreateInvoiceRequestDto}
|
|
197
|
+
* @memberof InvoicesApiCreateInvoice
|
|
198
|
+
*/
|
|
199
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto;
|
|
200
|
+
/**
|
|
201
|
+
* Bearer Token
|
|
202
|
+
* @type {string}
|
|
203
|
+
* @memberof InvoicesApiCreateInvoice
|
|
204
|
+
*/
|
|
205
|
+
readonly authorization?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
208
|
+
* @type {string}
|
|
209
|
+
* @memberof InvoicesApiCreateInvoice
|
|
210
|
+
*/
|
|
211
|
+
readonly idempotencyKey?: string;
|
|
212
|
+
}
|
|
156
213
|
/**
|
|
157
214
|
* Request parameters for getInvoice operation in InvoicesApi.
|
|
158
215
|
* @export
|
|
@@ -295,6 +352,15 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
|
|
|
295
352
|
* @extends {BaseAPI}
|
|
296
353
|
*/
|
|
297
354
|
export declare class InvoicesApi extends BaseAPI {
|
|
355
|
+
/**
|
|
356
|
+
* This will create invoice for a policy and save it in the DB.
|
|
357
|
+
* @summary Create the invoice
|
|
358
|
+
* @param {InvoicesApiCreateInvoiceRequest} requestParameters Request parameters.
|
|
359
|
+
* @param {*} [options] Override http request option.
|
|
360
|
+
* @throws {RequiredError}
|
|
361
|
+
* @memberof InvoicesApi
|
|
362
|
+
*/
|
|
363
|
+
createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInvoiceResponseClass, any>>;
|
|
298
364
|
/**
|
|
299
365
|
* Gets an invoice.
|
|
300
366
|
* @summary Retrieve the invoice
|
package/dist/api/invoices-api.js
CHANGED
|
@@ -96,6 +96,59 @@ var FormData = require('form-data');
|
|
|
96
96
|
var InvoicesApiAxiosParamCreator = function (configuration) {
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
|
+
/**
|
|
100
|
+
* This will create invoice for a policy and save it in the DB.
|
|
101
|
+
* @summary Create the invoice
|
|
102
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
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
|
+
createInvoice: function (createInvoiceRequestDto, 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, headersFromBaseOptions;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0:
|
|
115
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('createInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto);
|
|
117
|
+
localVarPath = "/billingservice/v1/invoices";
|
|
118
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
119
|
+
if (configuration) {
|
|
120
|
+
baseOptions = configuration.baseOptions;
|
|
121
|
+
baseAccessToken = configuration.accessToken;
|
|
122
|
+
}
|
|
123
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
124
|
+
localVarHeaderParameter = {};
|
|
125
|
+
localVarQueryParameter = {};
|
|
126
|
+
// authentication bearer required
|
|
127
|
+
// http bearer authentication required
|
|
128
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
129
|
+
case 1:
|
|
130
|
+
// authentication bearer required
|
|
131
|
+
// http bearer authentication required
|
|
132
|
+
_a.sent();
|
|
133
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
134
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
135
|
+
}
|
|
136
|
+
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
137
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
138
|
+
}
|
|
139
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
140
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceRequestDto, localVarRequestOptions, configuration);
|
|
144
|
+
return [2 /*return*/, {
|
|
145
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
|
+
options: localVarRequestOptions,
|
|
147
|
+
}];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
},
|
|
99
152
|
/**
|
|
100
153
|
* Gets an invoice.
|
|
101
154
|
* @summary Retrieve the invoice
|
|
@@ -304,6 +357,28 @@ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
|
|
|
304
357
|
var InvoicesApiFp = function (configuration) {
|
|
305
358
|
var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
|
|
306
359
|
return {
|
|
360
|
+
/**
|
|
361
|
+
* This will create invoice for a policy and save it in the DB.
|
|
362
|
+
* @summary Create the invoice
|
|
363
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
364
|
+
* @param {string} [authorization] Bearer Token
|
|
365
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
366
|
+
* @param {*} [options] Override http request option.
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
createInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
370
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
371
|
+
var localVarAxiosArgs;
|
|
372
|
+
return __generator(this, function (_a) {
|
|
373
|
+
switch (_a.label) {
|
|
374
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options)];
|
|
375
|
+
case 1:
|
|
376
|
+
localVarAxiosArgs = _a.sent();
|
|
377
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
},
|
|
307
382
|
/**
|
|
308
383
|
* Gets an invoice.
|
|
309
384
|
* @summary Retrieve the invoice
|
|
@@ -390,6 +465,18 @@ exports.InvoicesApiFp = InvoicesApiFp;
|
|
|
390
465
|
var InvoicesApiFactory = function (configuration, basePath, axios) {
|
|
391
466
|
var localVarFp = (0, exports.InvoicesApiFp)(configuration);
|
|
392
467
|
return {
|
|
468
|
+
/**
|
|
469
|
+
* This will create invoice for a policy and save it in the DB.
|
|
470
|
+
* @summary Create the invoice
|
|
471
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
472
|
+
* @param {string} [authorization] Bearer Token
|
|
473
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
474
|
+
* @param {*} [options] Override http request option.
|
|
475
|
+
* @throws {RequiredError}
|
|
476
|
+
*/
|
|
477
|
+
createInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
478
|
+
return localVarFp.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
479
|
+
},
|
|
393
480
|
/**
|
|
394
481
|
* Gets an invoice.
|
|
395
482
|
* @summary Retrieve the invoice
|
|
@@ -450,6 +537,18 @@ var InvoicesApi = /** @class */ (function (_super) {
|
|
|
450
537
|
function InvoicesApi() {
|
|
451
538
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
452
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* This will create invoice for a policy and save it in the DB.
|
|
542
|
+
* @summary Create the invoice
|
|
543
|
+
* @param {InvoicesApiCreateInvoiceRequest} requestParameters Request parameters.
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
* @memberof InvoicesApi
|
|
547
|
+
*/
|
|
548
|
+
InvoicesApi.prototype.createInvoice = function (requestParameters, options) {
|
|
549
|
+
var _this = this;
|
|
550
|
+
return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
551
|
+
};
|
|
453
552
|
/**
|
|
454
553
|
* Gets an invoice.
|
|
455
554
|
* @summary Retrieve the invoice
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
-
import {
|
|
15
|
+
import { CreateInvoiceForPolicyRequestDto } from '../models';
|
|
16
16
|
import { CreateInvoiceResponseClass } from '../models';
|
|
17
17
|
/**
|
|
18
18
|
* RecurringInvoicesApi - axios parameter creator
|
|
@@ -22,13 +22,13 @@ export declare const RecurringInvoicesApiAxiosParamCreator: (configuration?: Con
|
|
|
22
22
|
/**
|
|
23
23
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
24
24
|
* @summary Create the recurring invoice
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
26
26
|
* @param {string} [authorization] Bearer Token
|
|
27
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
28
|
* @param {*} [options] Override http request option.
|
|
29
29
|
* @throws {RequiredError}
|
|
30
30
|
*/
|
|
31
|
-
createRecurringInvoice: (
|
|
31
|
+
createRecurringInvoice: (createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* RecurringInvoicesApi - functional programming interface
|
|
@@ -38,13 +38,13 @@ export declare const RecurringInvoicesApiFp: (configuration?: Configuration) =>
|
|
|
38
38
|
/**
|
|
39
39
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
40
40
|
* @summary Create the recurring invoice
|
|
41
|
-
* @param {
|
|
41
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
42
42
|
* @param {string} [authorization] Bearer Token
|
|
43
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
44
|
* @param {*} [options] Override http request option.
|
|
45
45
|
* @throws {RequiredError}
|
|
46
46
|
*/
|
|
47
|
-
createRecurringInvoice(
|
|
47
|
+
createRecurringInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>>;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* RecurringInvoicesApi - factory interface
|
|
@@ -54,13 +54,13 @@ export declare const RecurringInvoicesApiFactory: (configuration?: Configuration
|
|
|
54
54
|
/**
|
|
55
55
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
56
56
|
* @summary Create the recurring invoice
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
58
58
|
* @param {string} [authorization] Bearer Token
|
|
59
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
60
|
* @param {*} [options] Override http request option.
|
|
61
61
|
* @throws {RequiredError}
|
|
62
62
|
*/
|
|
63
|
-
createRecurringInvoice(
|
|
63
|
+
createRecurringInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Request parameters for createRecurringInvoice operation in RecurringInvoicesApi.
|
|
@@ -70,10 +70,10 @@ export declare const RecurringInvoicesApiFactory: (configuration?: Configuration
|
|
|
70
70
|
export interface RecurringInvoicesApiCreateRecurringInvoiceRequest {
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
|
-
* @type {
|
|
73
|
+
* @type {CreateInvoiceForPolicyRequestDto}
|
|
74
74
|
* @memberof RecurringInvoicesApiCreateRecurringInvoice
|
|
75
75
|
*/
|
|
76
|
-
readonly
|
|
76
|
+
readonly createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto;
|
|
77
77
|
/**
|
|
78
78
|
* Bearer Token
|
|
79
79
|
* @type {string}
|
|
@@ -99,21 +99,21 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
101
101
|
* @summary Create the recurring invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
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
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
createRecurringInvoice: function (
|
|
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
111
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
112
|
return __generator(this, function (_a) {
|
|
113
113
|
switch (_a.label) {
|
|
114
114
|
case 0:
|
|
115
|
-
// verify required parameter '
|
|
116
|
-
(0, common_1.assertParamExists)('createRecurringInvoice', '
|
|
115
|
+
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('createRecurringInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto);
|
|
117
117
|
localVarPath = "/billingservice/v1/recurring-invoices";
|
|
118
118
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
119
119
|
if (configuration) {
|
|
@@ -140,7 +140,7 @@ var RecurringInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
140
140
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
141
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
142
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceForPolicyRequestDto, localVarRequestOptions, configuration);
|
|
144
144
|
return [2 /*return*/, {
|
|
145
145
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
146
|
options: localVarRequestOptions,
|
|
@@ -162,18 +162,18 @@ var RecurringInvoicesApiFp = function (configuration) {
|
|
|
162
162
|
/**
|
|
163
163
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
164
164
|
* @summary Create the recurring invoice
|
|
165
|
-
* @param {
|
|
165
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
166
166
|
* @param {string} [authorization] Bearer Token
|
|
167
167
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
168
168
|
* @param {*} [options] Override http request option.
|
|
169
169
|
* @throws {RequiredError}
|
|
170
170
|
*/
|
|
171
|
-
createRecurringInvoice: function (
|
|
171
|
+
createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
172
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
173
|
var localVarAxiosArgs;
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createRecurringInvoice(
|
|
176
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createRecurringInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options)];
|
|
177
177
|
case 1:
|
|
178
178
|
localVarAxiosArgs = _a.sent();
|
|
179
179
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -194,14 +194,14 @@ var RecurringInvoicesApiFactory = function (configuration, basePath, axios) {
|
|
|
194
194
|
/**
|
|
195
195
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
196
196
|
* @summary Create the recurring invoice
|
|
197
|
-
* @param {
|
|
197
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
198
198
|
* @param {string} [authorization] Bearer Token
|
|
199
199
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
200
200
|
* @param {*} [options] Override http request option.
|
|
201
201
|
* @throws {RequiredError}
|
|
202
202
|
*/
|
|
203
|
-
createRecurringInvoice: function (
|
|
204
|
-
return localVarFp.createRecurringInvoice(
|
|
203
|
+
createRecurringInvoice: function (createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options) {
|
|
204
|
+
return localVarFp.createRecurringInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
205
205
|
},
|
|
206
206
|
};
|
|
207
207
|
};
|
|
@@ -227,7 +227,7 @@ var RecurringInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
227
|
*/
|
|
228
228
|
RecurringInvoicesApi.prototype.createRecurringInvoice = function (requestParameters, options) {
|
|
229
229
|
var _this = this;
|
|
230
|
-
return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.
|
|
230
|
+
return (0, exports.RecurringInvoicesApiFp)(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
231
|
};
|
|
232
232
|
return RecurringInvoicesApi;
|
|
233
233
|
}(base_1.BaseAPI));
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateInvoiceForPolicyRequestDto
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateInvoiceForPolicyRequestDto {
|
|
18
|
+
/**
|
|
19
|
+
* Unique number for the invoice. If not set, the system will automatically assign a value.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
22
|
+
*/
|
|
23
|
+
'invoiceNumber'?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Account number.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
28
|
+
*/
|
|
29
|
+
'accountNumber': string;
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier of the policy that this object belongs to.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
34
|
+
*/
|
|
35
|
+
'policyCode': string;
|
|
36
|
+
/**
|
|
37
|
+
* Policy number.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
40
|
+
*/
|
|
41
|
+
'policyNumber': string;
|
|
42
|
+
/**
|
|
43
|
+
* Type of the invoice.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
46
|
+
*/
|
|
47
|
+
'type'?: CreateInvoiceForPolicyRequestDtoTypeEnum;
|
|
48
|
+
/**
|
|
49
|
+
* Metadata contains extra information that the object would need for specific cases.
|
|
50
|
+
* @type {object}
|
|
51
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
52
|
+
*/
|
|
53
|
+
'metadata'?: object;
|
|
54
|
+
/**
|
|
55
|
+
* This is the date from which the invoice interval starts.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
58
|
+
*/
|
|
59
|
+
'billingIntervalFrom': string;
|
|
60
|
+
/**
|
|
61
|
+
* This is the date that the invoice interval ends.
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
64
|
+
*/
|
|
65
|
+
'billingIntervalTo': string;
|
|
66
|
+
/**
|
|
67
|
+
* Invoice due date.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof CreateInvoiceForPolicyRequestDto
|
|
70
|
+
*/
|
|
71
|
+
'dueDate'?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const CreateInvoiceForPolicyRequestDtoTypeEnum: {
|
|
74
|
+
readonly Initial: "initial";
|
|
75
|
+
readonly Recurring: "recurring";
|
|
76
|
+
readonly Correction: "correction";
|
|
77
|
+
readonly Estimated: "estimated";
|
|
78
|
+
readonly Penalty: "penalty";
|
|
79
|
+
readonly Other: "other";
|
|
80
|
+
readonly Withdraw: "withdraw";
|
|
81
|
+
readonly Final: "final";
|
|
82
|
+
};
|
|
83
|
+
export type CreateInvoiceForPolicyRequestDtoTypeEnum = typeof CreateInvoiceForPolicyRequestDtoTypeEnum[keyof typeof CreateInvoiceForPolicyRequestDtoTypeEnum];
|