@emilgroup/billing-sdk-node 1.3.0 → 1.4.1
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 +7 -0
- package/README.md +2 -2
- package/api/correction-invoices-api.ts +29 -11
- package/api/estimated-invoices-api.ts +17 -9
- package/api/initial-invoices-api.ts +29 -11
- package/api/invoices-api.ts +95 -87
- package/api/recurring-invoices-api.ts +29 -11
- package/api.ts +1 -6
- package/base.ts +6 -5
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api/correction-invoices-api.d.ts +21 -8
- package/dist/api/correction-invoices-api.js +21 -11
- package/dist/api/estimated-invoices-api.d.ts +17 -9
- package/dist/api/estimated-invoices-api.js +17 -9
- package/dist/api/initial-invoices-api.d.ts +21 -8
- package/dist/api/initial-invoices-api.js +21 -11
- package/dist/api/invoices-api.d.ts +95 -87
- package/dist/api/invoices-api.js +53 -45
- package/dist/api/recurring-invoices-api.d.ts +21 -8
- package/dist/api/recurring-invoices-api.js +21 -11
- package/dist/api.d.ts +1 -5
- package/dist/api.js +1 -7
- package/dist/base.d.ts +4 -3
- package/dist/base.js +6 -5
- package/dist/common.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/models/create-correction-invoices-response-class.d.ts +5 -5
- package/dist/models/create-correction-invoices-response-class.js +1 -1
- package/dist/models/create-custom-estimated-invoice-request-dto.d.ts +3 -3
- package/dist/models/create-custom-estimated-invoice-request-dto.js +1 -1
- package/dist/models/create-custom-estimated-invoice-response-class.d.ts +1 -1
- package/dist/models/create-custom-estimated-invoice-response-class.js +1 -1
- package/dist/models/create-estimated-invoice-request-dto.d.ts +3 -3
- package/dist/models/create-estimated-invoice-request-dto.js +1 -1
- package/dist/models/create-estimated-invoice-response-class.d.ts +3 -3
- package/dist/models/create-estimated-invoice-response-class.js +1 -1
- package/dist/models/create-invoice-request-dto.d.ts +16 -14
- package/dist/models/create-invoice-request-dto.js +4 -2
- package/dist/models/create-invoice-response-class.d.ts +5 -5
- package/dist/models/create-invoice-response-class.js +1 -1
- package/dist/models/create-invoice-status-request-dto.d.ts +35 -0
- package/dist/models/create-invoice-status-request-dto.js +20 -0
- package/dist/models/create-termination-invoice-request-dto.d.ts +48 -0
- package/dist/models/create-termination-invoice-request-dto.js +15 -0
- package/dist/models/currency-class.d.ts +48 -0
- package/dist/models/currency-class.js +15 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/dist/models/invoice-class.d.ts +50 -20
- package/dist/models/invoice-class.js +16 -1
- package/dist/models/invoice-item-class.d.ts +26 -17
- package/dist/models/invoice-item-class.js +10 -1
- package/dist/models/invoice-status-class.d.ts +47 -0
- package/dist/models/invoice-status-class.js +20 -0
- package/dist/models/list-invoices-response-class.d.ts +3 -3
- package/dist/models/list-invoices-response-class.js +1 -1
- package/dist/models/list-policies-billing-dates-response-class.d.ts +6 -5
- package/dist/models/list-policies-billing-dates-response-class.js +1 -1
- package/dist/models/list-request-dto.d.ts +1 -1
- package/dist/models/list-request-dto.js +1 -1
- package/dist/models/omit-type-class.d.ts +144 -0
- package/dist/models/omit-type-class.js +30 -0
- package/dist/models/policy-billing-date-class.d.ts +42 -0
- package/dist/models/policy-billing-date-class.js +15 -0
- package/dist/models/policy-dto.d.ts +62 -25
- package/dist/models/policy-dto.js +8 -1
- package/dist/models/policy-object-dto.d.ts +10 -10
- package/dist/models/policy-object-dto.js +1 -1
- package/dist/models/policy-premium-dto.d.ts +12 -12
- package/dist/models/policy-premium-dto.js +1 -1
- package/dist/models/policy-premium-item-dto.d.ts +20 -14
- package/dist/models/policy-premium-item-dto.js +1 -1
- package/dist/models/policy-version-dto.d.ts +17 -17
- package/dist/models/policy-version-dto.js +1 -1
- package/dist/models/premium-formula-dto.d.ts +20 -20
- package/dist/models/premium-formula-dto.js +1 -1
- package/dist/models/revert-invoice-request-dto.d.ts +24 -0
- package/dist/models/revert-invoice-request-dto.js +15 -0
- package/dist/models/timeslice-dto.d.ts +13 -13
- package/dist/models/timeslice-dto.js +1 -1
- package/index.ts +2 -2
- package/models/create-correction-invoices-response-class.ts +5 -5
- package/models/create-custom-estimated-invoice-request-dto.ts +3 -3
- package/models/create-custom-estimated-invoice-response-class.ts +1 -1
- package/models/create-estimated-invoice-request-dto.ts +3 -3
- package/models/create-estimated-invoice-response-class.ts +3 -3
- package/models/create-invoice-request-dto.ts +17 -15
- package/models/create-invoice-response-class.ts +5 -5
- package/models/create-invoice-status-request-dto.ts +44 -0
- package/models/create-termination-invoice-request-dto.ts +54 -0
- package/models/currency-class.ts +54 -0
- package/models/index.ts +7 -0
- package/models/invoice-class.ts +54 -20
- package/models/invoice-item-class.ts +29 -17
- package/models/invoice-status-class.ts +56 -0
- package/models/list-invoices-response-class.ts +3 -3
- package/models/list-policies-billing-dates-response-class.ts +6 -5
- package/models/list-request-dto.ts +1 -1
- package/models/omit-type-class.ts +154 -0
- package/models/policy-billing-date-class.ts +48 -0
- package/models/policy-dto.ts +65 -25
- package/models/policy-object-dto.ts +10 -10
- package/models/policy-premium-dto.ts +12 -12
- package/models/policy-premium-item-dto.ts +20 -14
- package/models/policy-version-dto.ts +17 -17
- package/models/premium-formula-dto.ts +20 -20
- package/models/revert-invoice-request-dto.ts +30 -0
- package/models/timeslice-dto.ts +13 -13
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -20,18 +20,25 @@ models/create-estimated-invoice-request-dto.ts
|
|
|
20
20
|
models/create-estimated-invoice-response-class.ts
|
|
21
21
|
models/create-invoice-request-dto.ts
|
|
22
22
|
models/create-invoice-response-class.ts
|
|
23
|
+
models/create-invoice-status-request-dto.ts
|
|
24
|
+
models/create-termination-invoice-request-dto.ts
|
|
25
|
+
models/currency-class.ts
|
|
23
26
|
models/index.ts
|
|
24
27
|
models/invoice-class.ts
|
|
25
28
|
models/invoice-item-class.ts
|
|
29
|
+
models/invoice-status-class.ts
|
|
26
30
|
models/list-invoices-response-class.ts
|
|
27
31
|
models/list-policies-billing-dates-response-class.ts
|
|
28
32
|
models/list-request-dto.ts
|
|
33
|
+
models/omit-type-class.ts
|
|
34
|
+
models/policy-billing-date-class.ts
|
|
29
35
|
models/policy-dto.ts
|
|
30
36
|
models/policy-object-dto.ts
|
|
31
37
|
models/policy-premium-dto.ts
|
|
32
38
|
models/policy-premium-item-dto.ts
|
|
33
39
|
models/policy-version-dto.ts
|
|
34
40
|
models/premium-formula-dto.ts
|
|
41
|
+
models/revert-invoice-request-dto.ts
|
|
35
42
|
models/timeslice-dto.ts
|
|
36
43
|
package.json
|
|
37
44
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/billing-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/billing-sdk-node@1.4.1 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/billing-sdk-node@1.4.1
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `InvoicesApi`.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL BillingService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -35,13 +35,15 @@ const FormData = require('form-data');
|
|
|
35
35
|
export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
36
|
return {
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
39
|
+
* @summary Create the correction invoice
|
|
39
40
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
40
41
|
* @param {string} [authorization] Bearer Token
|
|
42
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
41
43
|
* @param {*} [options] Override http request option.
|
|
42
44
|
* @throws {RequiredError}
|
|
43
45
|
*/
|
|
44
|
-
createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
47
|
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
46
48
|
assertParamExists('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
47
49
|
const localVarPath = `/billingservice/v1/correction-invoices`;
|
|
@@ -66,6 +68,10 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
66
68
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
72
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
|
|
70
76
|
|
|
71
77
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -91,14 +97,16 @@ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
91
97
|
const localVarAxiosParamCreator = CorrectionInvoicesApiAxiosParamCreator(configuration)
|
|
92
98
|
return {
|
|
93
99
|
/**
|
|
94
|
-
*
|
|
100
|
+
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
101
|
+
* @summary Create the correction invoice
|
|
95
102
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
96
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.
|
|
97
105
|
* @param {*} [options] Override http request option.
|
|
98
106
|
* @throws {RequiredError}
|
|
99
107
|
*/
|
|
100
|
-
async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
|
|
101
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, options);
|
|
108
|
+
async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
102
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
103
111
|
},
|
|
104
112
|
}
|
|
@@ -112,14 +120,16 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
112
120
|
const localVarFp = CorrectionInvoicesApiFp(configuration)
|
|
113
121
|
return {
|
|
114
122
|
/**
|
|
115
|
-
*
|
|
123
|
+
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
124
|
+
* @summary Create the correction invoice
|
|
116
125
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
117
126
|
* @param {string} [authorization] Bearer Token
|
|
127
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
118
128
|
* @param {*} [options] Override http request option.
|
|
119
129
|
* @throws {RequiredError}
|
|
120
130
|
*/
|
|
121
|
-
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
|
|
122
|
-
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
131
|
+
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
|
|
132
|
+
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
123
133
|
},
|
|
124
134
|
};
|
|
125
135
|
};
|
|
@@ -143,6 +153,13 @@ export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
|
143
153
|
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
144
154
|
*/
|
|
145
155
|
readonly authorization?: string
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
159
|
+
* @type {string}
|
|
160
|
+
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
161
|
+
*/
|
|
162
|
+
readonly idempotencyKey?: string
|
|
146
163
|
}
|
|
147
164
|
|
|
148
165
|
/**
|
|
@@ -153,13 +170,14 @@ export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
|
153
170
|
*/
|
|
154
171
|
export class CorrectionInvoicesApi extends BaseAPI {
|
|
155
172
|
/**
|
|
156
|
-
*
|
|
173
|
+
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
174
|
+
* @summary Create the correction invoice
|
|
157
175
|
* @param {CorrectionInvoicesApiCreateCorrectionInvoiceRequest} requestParameters Request parameters.
|
|
158
176
|
* @param {*} [options] Override http request option.
|
|
159
177
|
* @throws {RequiredError}
|
|
160
178
|
* @memberof CorrectionInvoicesApi
|
|
161
179
|
*/
|
|
162
180
|
public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
|
|
163
|
-
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
181
|
+
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
164
182
|
}
|
|
165
183
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL BillingService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -39,7 +39,8 @@ const FormData = require('form-data');
|
|
|
39
39
|
export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
40
40
|
return {
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* This will create a custom estimated invoice.
|
|
43
|
+
* @summary Create the custom estimated invoice
|
|
43
44
|
* @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
|
|
44
45
|
* @param {string} [authorization] Bearer Token
|
|
45
46
|
* @param {*} [options] Override http request option.
|
|
@@ -85,7 +86,8 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
85
86
|
};
|
|
86
87
|
},
|
|
87
88
|
/**
|
|
88
|
-
*
|
|
89
|
+
* This will create an estimated invoice. It will not be saved in the database.
|
|
90
|
+
* @summary Create the estimated invoice
|
|
89
91
|
* @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
|
|
90
92
|
* @param {string} [authorization] Bearer Token
|
|
91
93
|
* @param {*} [options] Override http request option.
|
|
@@ -141,7 +143,8 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
141
143
|
const localVarAxiosParamCreator = EstimatedInvoicesApiAxiosParamCreator(configuration)
|
|
142
144
|
return {
|
|
143
145
|
/**
|
|
144
|
-
*
|
|
146
|
+
* This will create a custom estimated invoice.
|
|
147
|
+
* @summary Create the custom estimated invoice
|
|
145
148
|
* @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
|
|
146
149
|
* @param {string} [authorization] Bearer Token
|
|
147
150
|
* @param {*} [options] Override http request option.
|
|
@@ -152,7 +155,8 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
152
155
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
153
156
|
},
|
|
154
157
|
/**
|
|
155
|
-
*
|
|
158
|
+
* This will create an estimated invoice. It will not be saved in the database.
|
|
159
|
+
* @summary Create the estimated invoice
|
|
156
160
|
* @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
|
|
157
161
|
* @param {string} [authorization] Bearer Token
|
|
158
162
|
* @param {*} [options] Override http request option.
|
|
@@ -173,7 +177,8 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
|
|
|
173
177
|
const localVarFp = EstimatedInvoicesApiFp(configuration)
|
|
174
178
|
return {
|
|
175
179
|
/**
|
|
176
|
-
*
|
|
180
|
+
* This will create a custom estimated invoice.
|
|
181
|
+
* @summary Create the custom estimated invoice
|
|
177
182
|
* @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
|
|
178
183
|
* @param {string} [authorization] Bearer Token
|
|
179
184
|
* @param {*} [options] Override http request option.
|
|
@@ -183,7 +188,8 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
|
|
|
183
188
|
return localVarFp.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
184
189
|
},
|
|
185
190
|
/**
|
|
186
|
-
*
|
|
191
|
+
* This will create an estimated invoice. It will not be saved in the database.
|
|
192
|
+
* @summary Create the estimated invoice
|
|
187
193
|
* @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
|
|
188
194
|
* @param {string} [authorization] Bearer Token
|
|
189
195
|
* @param {*} [options] Override http request option.
|
|
@@ -245,7 +251,8 @@ export interface EstimatedInvoicesApiCreateEstimatedInvoiceRequest {
|
|
|
245
251
|
*/
|
|
246
252
|
export class EstimatedInvoicesApi extends BaseAPI {
|
|
247
253
|
/**
|
|
248
|
-
*
|
|
254
|
+
* This will create a custom estimated invoice.
|
|
255
|
+
* @summary Create the custom estimated invoice
|
|
249
256
|
* @param {EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest} requestParameters Request parameters.
|
|
250
257
|
* @param {*} [options] Override http request option.
|
|
251
258
|
* @throws {RequiredError}
|
|
@@ -256,7 +263,8 @@ export class EstimatedInvoicesApi extends BaseAPI {
|
|
|
256
263
|
}
|
|
257
264
|
|
|
258
265
|
/**
|
|
259
|
-
*
|
|
266
|
+
* This will create an estimated invoice. It will not be saved in the database.
|
|
267
|
+
* @summary Create the estimated invoice
|
|
260
268
|
* @param {EstimatedInvoicesApiCreateEstimatedInvoiceRequest} requestParameters Request parameters.
|
|
261
269
|
* @param {*} [options] Override http request option.
|
|
262
270
|
* @throws {RequiredError}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The EMIL BillingService API description
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
|
-
*
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -35,13 +35,15 @@ const FormData = require('form-data');
|
|
|
35
35
|
export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
36
|
return {
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* 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.
|
|
39
|
+
* @summary Create the initial invoice
|
|
39
40
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
40
41
|
* @param {string} [authorization] Bearer Token
|
|
42
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
41
43
|
* @param {*} [options] Override http request option.
|
|
42
44
|
* @throws {RequiredError}
|
|
43
45
|
*/
|
|
44
|
-
createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
47
|
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
46
48
|
assertParamExists('createInitialInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
47
49
|
const localVarPath = `/billingservice/v1/initial-invoices`;
|
|
@@ -66,6 +68,10 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
66
68
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
72
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
|
|
70
76
|
|
|
71
77
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -91,14 +97,16 @@ export const InitialInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
91
97
|
const localVarAxiosParamCreator = InitialInvoicesApiAxiosParamCreator(configuration)
|
|
92
98
|
return {
|
|
93
99
|
/**
|
|
94
|
-
*
|
|
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
|
+
* @summary Create the initial invoice
|
|
95
102
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
96
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.
|
|
97
105
|
* @param {*} [options] Override http request option.
|
|
98
106
|
* @throws {RequiredError}
|
|
99
107
|
*/
|
|
100
|
-
async createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
101
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceRequestDto, authorization, options);
|
|
108
|
+
async createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
102
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
103
111
|
},
|
|
104
112
|
}
|
|
@@ -112,14 +120,16 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
112
120
|
const localVarFp = InitialInvoicesApiFp(configuration)
|
|
113
121
|
return {
|
|
114
122
|
/**
|
|
115
|
-
*
|
|
123
|
+
* 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.
|
|
124
|
+
* @summary Create the initial invoice
|
|
116
125
|
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
117
126
|
* @param {string} [authorization] Bearer Token
|
|
127
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
118
128
|
* @param {*} [options] Override http request option.
|
|
119
129
|
* @throws {RequiredError}
|
|
120
130
|
*/
|
|
121
|
-
createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
122
|
-
return localVarFp.createInitialInvoice(createInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
131
|
+
createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
132
|
+
return localVarFp.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
123
133
|
},
|
|
124
134
|
};
|
|
125
135
|
};
|
|
@@ -143,6 +153,13 @@ export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
|
143
153
|
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
144
154
|
*/
|
|
145
155
|
readonly authorization?: string
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
159
|
+
* @type {string}
|
|
160
|
+
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
161
|
+
*/
|
|
162
|
+
readonly idempotencyKey?: string
|
|
146
163
|
}
|
|
147
164
|
|
|
148
165
|
/**
|
|
@@ -153,13 +170,14 @@ export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
|
153
170
|
*/
|
|
154
171
|
export class InitialInvoicesApi extends BaseAPI {
|
|
155
172
|
/**
|
|
156
|
-
*
|
|
173
|
+
* 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.
|
|
174
|
+
* @summary Create the initial invoice
|
|
157
175
|
* @param {InitialInvoicesApiCreateInitialInvoiceRequest} requestParameters Request parameters.
|
|
158
176
|
* @param {*} [options] Override http request option.
|
|
159
177
|
* @throws {RequiredError}
|
|
160
178
|
* @memberof InitialInvoicesApi
|
|
161
179
|
*/
|
|
162
180
|
public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
|
|
163
|
-
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
181
|
+
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
164
182
|
}
|
|
165
183
|
}
|