@emilgroup/billing-sdk-node 1.28.0 → 1.28.2-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 +19 -0
- package/README.md +2 -2
- package/api/correction-invoices-api.ts +17 -15
- package/api/estimated-invoices-api.ts +12 -6
- package/api/initial-invoices-api.ts +17 -15
- package/api/invoices-api.ts +133 -6
- package/api/recurring-invoices-api.ts +17 -15
- package/dist/api/correction-invoices-api.d.ts +11 -10
- package/dist/api/correction-invoices-api.js +12 -12
- package/dist/api/estimated-invoices-api.d.ts +12 -9
- package/dist/api/initial-invoices-api.d.ts +11 -10
- package/dist/api/initial-invoices-api.js +12 -12
- package/dist/api/invoices-api.d.ts +78 -9
- package/dist/api/invoices-api.js +99 -0
- package/dist/api/recurring-invoices-api.d.ts +11 -10
- package/dist/api/recurring-invoices-api.js +12 -12
- package/dist/models/create-correction-invoices-response-class.d.ts +25 -0
- package/dist/models/create-correction-invoices-response-class.js +15 -0
- package/dist/models/create-custom-estimated-invoice-response-class.d.ts +24 -0
- package/dist/models/create-custom-estimated-invoice-response-class.js +15 -0
- package/dist/models/create-estimated-invoice-for-interval-response-class.d.ts +25 -0
- package/dist/models/create-estimated-invoice-for-interval-response-class.js +15 -0
- package/dist/models/create-estimated-invoice-request-dto.d.ts +7 -1
- package/dist/models/create-estimated-invoice-response-class.d.ts +37 -0
- package/dist/models/create-estimated-invoice-response-class.js +15 -0
- 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-payment-request-dto.d.ts +7 -1
- package/dist/models/create-invoice-request-dto.d.ts +14 -7
- package/dist/models/create-invoice-response-class.d.ts +25 -0
- package/dist/models/create-invoice-response-class.js +15 -0
- package/dist/models/create-invoice-status-request-dto.d.ts +37 -0
- package/dist/models/create-invoice-status-request-dto.js +22 -0
- package/dist/models/create-item-request-dto.d.ts +101 -0
- package/dist/models/create-item-request-dto.js +36 -0
- package/dist/models/create-termination-invoice-request-dto.d.ts +54 -0
- package/dist/models/create-termination-invoice-request-dto.js +15 -0
- package/dist/models/get-invoice-response-class.d.ts +25 -0
- package/dist/models/get-invoice-response-class.js +15 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.js +19 -0
- package/dist/models/invoice-class.d.ts +183 -0
- package/dist/models/invoice-class.js +32 -0
- package/dist/models/invoice-item-class.d.ts +153 -0
- package/dist/models/invoice-item-class.js +24 -0
- package/dist/models/invoice-payment-class.d.ts +108 -0
- package/dist/models/invoice-payment-class.js +15 -0
- package/dist/models/invoice-payments-class.d.ts +25 -0
- package/dist/models/invoice-payments-class.js +15 -0
- package/dist/models/invoice-status-class.d.ts +61 -0
- package/dist/models/invoice-status-class.js +22 -0
- package/dist/models/list-invoices-response-class.d.ts +31 -0
- package/dist/models/list-invoices-response-class.js +15 -0
- package/dist/models/list-policies-billing-dates-response-class.d.ts +31 -0
- package/dist/models/list-policies-billing-dates-response-class.js +15 -0
- package/dist/models/list-request-dto.d.ts +6 -0
- package/dist/models/omit-type-class.d.ts +176 -0
- package/dist/models/omit-type-class.js +32 -0
- package/dist/models/policy-billing-date-class.d.ts +54 -0
- package/dist/models/policy-billing-date-class.js +15 -0
- package/dist/models/policy-dto.d.ts +35 -3
- package/dist/models/policy-dto.js +8 -0
- package/dist/models/policy-object-dto.d.ts +20 -2
- package/dist/models/policy-premium-dto.d.ts +14 -2
- package/dist/models/policy-premium-item-dto.d.ts +14 -2
- package/dist/models/policy-version-dto.d.ts +15 -3
- package/dist/models/premium-formula-dto.d.ts +14 -2
- package/dist/models/timeslice-dto.d.ts +13 -1
- package/models/create-correction-invoices-response-class.ts +31 -0
- package/models/create-custom-estimated-invoice-response-class.ts +30 -0
- package/models/create-estimated-invoice-for-interval-response-class.ts +31 -0
- package/models/create-estimated-invoice-request-dto.ts +7 -1
- package/models/create-estimated-invoice-response-class.ts +43 -0
- package/models/create-invoice-for-policy-request-dto.ts +92 -0
- package/models/create-invoice-payment-request-dto.ts +7 -1
- package/models/create-invoice-request-dto.ts +14 -7
- package/models/create-invoice-response-class.ts +31 -0
- package/models/create-invoice-status-request-dto.ts +46 -0
- package/models/create-item-request-dto.ts +112 -0
- package/models/create-termination-invoice-request-dto.ts +60 -0
- package/models/get-invoice-response-class.ts +31 -0
- package/models/index.ts +19 -0
- package/models/invoice-class.ts +193 -0
- package/models/invoice-item-class.ts +162 -0
- package/models/invoice-payment-class.ts +114 -0
- package/models/invoice-payments-class.ts +31 -0
- package/models/invoice-status-class.ts +70 -0
- package/models/list-invoices-response-class.ts +37 -0
- package/models/list-policies-billing-dates-response-class.ts +37 -0
- package/models/list-request-dto.ts +6 -0
- package/models/omit-type-class.ts +186 -0
- package/models/policy-billing-date-class.ts +60 -0
- package/models/policy-dto.ts +38 -3
- package/models/policy-object-dto.ts +20 -2
- package/models/policy-premium-dto.ts +14 -2
- package/models/policy-premium-item-dto.ts +14 -2
- package/models/policy-version-dto.ts +15 -3
- package/models/premium-formula-dto.ts +14 -2
- package/models/timeslice-dto.ts +13 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -15,16 +15,35 @@ common.ts
|
|
|
15
15
|
configuration.ts
|
|
16
16
|
git_push.sh
|
|
17
17
|
index.ts
|
|
18
|
+
models/create-correction-invoices-response-class.ts
|
|
18
19
|
models/create-custom-estimated-invoice-request-dto.ts
|
|
20
|
+
models/create-custom-estimated-invoice-response-class.ts
|
|
19
21
|
models/create-draft-invoice-request-dto.ts
|
|
20
22
|
models/create-estimated-invoice-for-interval-request-dto.ts
|
|
23
|
+
models/create-estimated-invoice-for-interval-response-class.ts
|
|
21
24
|
models/create-estimated-invoice-request-dto.ts
|
|
25
|
+
models/create-estimated-invoice-response-class.ts
|
|
26
|
+
models/create-invoice-for-policy-request-dto.ts
|
|
22
27
|
models/create-invoice-payment-request-dto.ts
|
|
23
28
|
models/create-invoice-request-dto.ts
|
|
29
|
+
models/create-invoice-response-class.ts
|
|
30
|
+
models/create-invoice-status-request-dto.ts
|
|
31
|
+
models/create-item-request-dto.ts
|
|
32
|
+
models/create-termination-invoice-request-dto.ts
|
|
33
|
+
models/get-invoice-response-class.ts
|
|
24
34
|
models/index.ts
|
|
25
35
|
models/inline-response200.ts
|
|
26
36
|
models/inline-response503.ts
|
|
37
|
+
models/invoice-class.ts
|
|
38
|
+
models/invoice-item-class.ts
|
|
39
|
+
models/invoice-payment-class.ts
|
|
40
|
+
models/invoice-payments-class.ts
|
|
41
|
+
models/invoice-status-class.ts
|
|
42
|
+
models/list-invoices-response-class.ts
|
|
43
|
+
models/list-policies-billing-dates-response-class.ts
|
|
27
44
|
models/list-request-dto.ts
|
|
45
|
+
models/omit-type-class.ts
|
|
46
|
+
models/policy-billing-date-class.ts
|
|
28
47
|
models/policy-dto.ts
|
|
29
48
|
models/policy-object-dto.ts
|
|
30
49
|
models/policy-premium-dto.ts
|
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.28.0 --save
|
|
20
|
+
npm install @emilgroup/billing-sdk-node@1.28.2-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk-node@1.28.0
|
|
24
|
+
yarn add @emilgroup/billing-sdk-node@1.28.2-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `InvoicesApi`.
|
|
@@ -21,7 +21,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import {
|
|
24
|
+
import { CreateCorrectionInvoicesResponseClass } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateInvoiceForPolicyRequestDto } from '../models';
|
|
25
27
|
// URLSearchParams not necessarily used
|
|
26
28
|
// @ts-ignore
|
|
27
29
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -35,15 +37,15 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
35
37
|
/**
|
|
36
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.
|
|
37
39
|
* @summary Create the correction invoice
|
|
38
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
39
41
|
* @param {string} [authorization] Bearer Token
|
|
40
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 (
|
|
45
|
-
// verify required parameter '
|
|
46
|
-
assertParamExists('createCorrectionInvoice', '
|
|
46
|
+
createCorrectionInvoice: async (createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createCorrectionInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto)
|
|
47
49
|
const localVarPath = `/billingservice/v1/correction-invoices`;
|
|
48
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -77,7 +79,7 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
77
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
78
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
79
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
80
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceForPolicyRequestDto, localVarRequestOptions, configuration)
|
|
81
83
|
|
|
82
84
|
return {
|
|
83
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -97,14 +99,14 @@ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
97
99
|
/**
|
|
98
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.
|
|
99
101
|
* @summary Create the correction invoice
|
|
100
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
101
103
|
* @param {string} [authorization] Bearer Token
|
|
102
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
103
105
|
* @param {*} [options] Override http request option.
|
|
104
106
|
* @throws {RequiredError}
|
|
105
107
|
*/
|
|
106
|
-
async createCorrectionInvoice(
|
|
107
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(
|
|
108
|
+
async createCorrectionInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options);
|
|
108
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
109
111
|
},
|
|
110
112
|
}
|
|
@@ -120,14 +122,14 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
120
122
|
/**
|
|
121
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.
|
|
122
124
|
* @summary Create the correction invoice
|
|
123
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
124
126
|
* @param {string} [authorization] Bearer Token
|
|
125
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
126
128
|
* @param {*} [options] Override http request option.
|
|
127
129
|
* @throws {RequiredError}
|
|
128
130
|
*/
|
|
129
|
-
createCorrectionInvoice(
|
|
130
|
-
return localVarFp.createCorrectionInvoice(
|
|
131
|
+
createCorrectionInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
|
|
132
|
+
return localVarFp.createCorrectionInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
131
133
|
},
|
|
132
134
|
};
|
|
133
135
|
};
|
|
@@ -140,10 +142,10 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
140
142
|
export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
141
143
|
/**
|
|
142
144
|
*
|
|
143
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceForPolicyRequestDto}
|
|
144
146
|
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
145
147
|
*/
|
|
146
|
-
readonly
|
|
148
|
+
readonly createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto
|
|
147
149
|
|
|
148
150
|
/**
|
|
149
151
|
* Bearer Token
|
|
@@ -176,6 +178,6 @@ export class CorrectionInvoicesApi extends BaseAPI {
|
|
|
176
178
|
* @memberof CorrectionInvoicesApi
|
|
177
179
|
*/
|
|
178
180
|
public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
|
|
179
|
-
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.
|
|
181
|
+
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
180
182
|
}
|
|
181
183
|
}
|
|
@@ -23,9 +23,15 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreateCustomEstimatedInvoiceRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
|
+
import { CreateCustomEstimatedInvoiceResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
26
28
|
import { CreateEstimatedInvoiceForIntervalRequestDto } from '../models';
|
|
27
29
|
// @ts-ignore
|
|
30
|
+
import { CreateEstimatedInvoiceForIntervalResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
28
32
|
import { CreateEstimatedInvoiceRequestDto } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { CreateEstimatedInvoiceResponseClass } from '../models';
|
|
29
35
|
// URLSearchParams not necessarily used
|
|
30
36
|
// @ts-ignore
|
|
31
37
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -195,7 +201,7 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
195
201
|
* @param {*} [options] Override http request option.
|
|
196
202
|
* @throws {RequiredError}
|
|
197
203
|
*/
|
|
198
|
-
async createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
204
|
+
async createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCustomEstimatedInvoiceResponseClass>> {
|
|
199
205
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options);
|
|
200
206
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
201
207
|
},
|
|
@@ -207,7 +213,7 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
207
213
|
* @param {*} [options] Override http request option.
|
|
208
214
|
* @throws {RequiredError}
|
|
209
215
|
*/
|
|
210
|
-
async createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
216
|
+
async createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEstimatedInvoiceResponseClass>> {
|
|
211
217
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createEstimatedInvoice(createEstimatedInvoiceRequestDto, authorization, options);
|
|
212
218
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
213
219
|
},
|
|
@@ -219,7 +225,7 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
219
225
|
* @param {*} [options] Override http request option.
|
|
220
226
|
* @throws {RequiredError}
|
|
221
227
|
*/
|
|
222
|
-
async createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto: CreateEstimatedInvoiceForIntervalRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
228
|
+
async createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto: CreateEstimatedInvoiceForIntervalRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEstimatedInvoiceForIntervalResponseClass>> {
|
|
223
229
|
const localVarAxiosArgs = await localVarAxiosParamCreator.createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto, authorization, options);
|
|
224
230
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
225
231
|
},
|
|
@@ -241,7 +247,7 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
|
|
|
241
247
|
* @param {*} [options] Override http request option.
|
|
242
248
|
* @throws {RequiredError}
|
|
243
249
|
*/
|
|
244
|
-
createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
250
|
+
createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto: CreateCustomEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCustomEstimatedInvoiceResponseClass> {
|
|
245
251
|
return localVarFp.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
246
252
|
},
|
|
247
253
|
/**
|
|
@@ -252,7 +258,7 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
|
|
|
252
258
|
* @param {*} [options] Override http request option.
|
|
253
259
|
* @throws {RequiredError}
|
|
254
260
|
*/
|
|
255
|
-
createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
261
|
+
createEstimatedInvoice(createEstimatedInvoiceRequestDto: CreateEstimatedInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateEstimatedInvoiceResponseClass> {
|
|
256
262
|
return localVarFp.createEstimatedInvoice(createEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
257
263
|
},
|
|
258
264
|
/**
|
|
@@ -263,7 +269,7 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
|
|
|
263
269
|
* @param {*} [options] Override http request option.
|
|
264
270
|
* @throws {RequiredError}
|
|
265
271
|
*/
|
|
266
|
-
createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto: CreateEstimatedInvoiceForIntervalRequestDto, authorization?: string, options?: any): AxiosPromise<
|
|
272
|
+
createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto: CreateEstimatedInvoiceForIntervalRequestDto, authorization?: string, options?: any): AxiosPromise<CreateEstimatedInvoiceForIntervalResponseClass> {
|
|
267
273
|
return localVarFp.createEstimatedInvoiceFromInterval(createEstimatedInvoiceForIntervalRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
268
274
|
},
|
|
269
275
|
};
|
|
@@ -21,7 +21,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import {
|
|
24
|
+
import { CreateInvoiceForPolicyRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateInvoiceResponseClass } from '../models';
|
|
25
27
|
// URLSearchParams not necessarily used
|
|
26
28
|
// @ts-ignore
|
|
27
29
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -35,15 +37,15 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
35
37
|
/**
|
|
36
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.
|
|
37
39
|
* @summary Create the initial invoice
|
|
38
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
39
41
|
* @param {string} [authorization] Bearer Token
|
|
40
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 (
|
|
45
|
-
// verify required parameter '
|
|
46
|
-
assertParamExists('createInitialInvoice', '
|
|
46
|
+
createInitialInvoice: async (createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createInitialInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto)
|
|
47
49
|
const localVarPath = `/billingservice/v1/initial-invoices`;
|
|
48
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -77,7 +79,7 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
77
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
78
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
79
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
80
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceForPolicyRequestDto, localVarRequestOptions, configuration)
|
|
81
83
|
|
|
82
84
|
return {
|
|
83
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -97,14 +99,14 @@ export const InitialInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
97
99
|
/**
|
|
98
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.
|
|
99
101
|
* @summary Create the initial invoice
|
|
100
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
101
103
|
* @param {string} [authorization] Bearer Token
|
|
102
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
103
105
|
* @param {*} [options] Override http request option.
|
|
104
106
|
* @throws {RequiredError}
|
|
105
107
|
*/
|
|
106
|
-
async createInitialInvoice(
|
|
107
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(
|
|
108
|
+
async createInitialInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options);
|
|
108
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
109
111
|
},
|
|
110
112
|
}
|
|
@@ -120,14 +122,14 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
120
122
|
/**
|
|
121
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.
|
|
122
124
|
* @summary Create the initial invoice
|
|
123
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
124
126
|
* @param {string} [authorization] Bearer Token
|
|
125
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
126
128
|
* @param {*} [options] Override http request option.
|
|
127
129
|
* @throws {RequiredError}
|
|
128
130
|
*/
|
|
129
|
-
createInitialInvoice(
|
|
130
|
-
return localVarFp.createInitialInvoice(
|
|
131
|
+
createInitialInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
132
|
+
return localVarFp.createInitialInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
131
133
|
},
|
|
132
134
|
};
|
|
133
135
|
};
|
|
@@ -140,10 +142,10 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
140
142
|
export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
141
143
|
/**
|
|
142
144
|
*
|
|
143
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceForPolicyRequestDto}
|
|
144
146
|
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
145
147
|
*/
|
|
146
|
-
readonly
|
|
148
|
+
readonly createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto
|
|
147
149
|
|
|
148
150
|
/**
|
|
149
151
|
* Bearer Token
|
|
@@ -176,6 +178,6 @@ export class InitialInvoicesApi extends BaseAPI {
|
|
|
176
178
|
* @memberof InitialInvoicesApi
|
|
177
179
|
*/
|
|
178
180
|
public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
|
|
179
|
-
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.
|
|
181
|
+
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
180
182
|
}
|
|
181
183
|
}
|
package/api/invoices-api.ts
CHANGED
|
@@ -20,6 +20,16 @@ import { Configuration } from '../configuration';
|
|
|
20
20
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { CreateInvoiceRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateInvoiceResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { GetInvoiceResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { ListInvoicesResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { ListPoliciesBillingDatesResponseClass } from '../models';
|
|
23
33
|
// URLSearchParams not necessarily used
|
|
24
34
|
// @ts-ignore
|
|
25
35
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -30,6 +40,58 @@ const FormData = require('form-data');
|
|
|
30
40
|
*/
|
|
31
41
|
export const InvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
42
|
return {
|
|
43
|
+
/**
|
|
44
|
+
* This will create invoice for a policy and save it in the DB.
|
|
45
|
+
* @summary Create the invoice
|
|
46
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
47
|
+
* @param {string} [authorization] Bearer Token
|
|
48
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
*/
|
|
52
|
+
createInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
53
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
54
|
+
assertParamExists('createInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
55
|
+
const localVarPath = `/billingservice/v1/invoices`;
|
|
56
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
57
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
58
|
+
let baseOptions;
|
|
59
|
+
let baseAccessToken;
|
|
60
|
+
if (configuration) {
|
|
61
|
+
baseOptions = configuration.baseOptions;
|
|
62
|
+
baseAccessToken = configuration.accessToken;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
66
|
+
const localVarHeaderParameter = {} as any;
|
|
67
|
+
const localVarQueryParameter = {} as any;
|
|
68
|
+
|
|
69
|
+
// authentication bearer required
|
|
70
|
+
// http bearer authentication required
|
|
71
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
72
|
+
|
|
73
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
74
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
78
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
84
|
+
|
|
85
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
86
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
87
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
88
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
url: toPathString(localVarUrlObj),
|
|
92
|
+
options: localVarRequestOptions,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
33
95
|
/**
|
|
34
96
|
* Gets an invoice.
|
|
35
97
|
* @summary Retrieve the invoice
|
|
@@ -244,6 +306,19 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
244
306
|
export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
245
307
|
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration)
|
|
246
308
|
return {
|
|
309
|
+
/**
|
|
310
|
+
* This will create invoice for a policy and save it in the DB.
|
|
311
|
+
* @summary Create the invoice
|
|
312
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
313
|
+
* @param {string} [authorization] Bearer Token
|
|
314
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
315
|
+
* @param {*} [options] Override http request option.
|
|
316
|
+
* @throws {RequiredError}
|
|
317
|
+
*/
|
|
318
|
+
async createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
319
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
320
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
321
|
+
},
|
|
247
322
|
/**
|
|
248
323
|
* Gets an invoice.
|
|
249
324
|
* @summary Retrieve the invoice
|
|
@@ -253,7 +328,7 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
253
328
|
* @param {*} [options] Override http request option.
|
|
254
329
|
* @throws {RequiredError}
|
|
255
330
|
*/
|
|
256
|
-
async getInvoice(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
331
|
+
async getInvoice(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoiceResponseClass>> {
|
|
257
332
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoice(code, expand, authorization, options);
|
|
258
333
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
259
334
|
},
|
|
@@ -271,7 +346,7 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
271
346
|
* @param {*} [options] Override http request option.
|
|
272
347
|
* @throws {RequiredError}
|
|
273
348
|
*/
|
|
274
|
-
async listInvoices(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
349
|
+
async listInvoices(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInvoicesResponseClass>> {
|
|
275
350
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
276
351
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
277
352
|
},
|
|
@@ -289,7 +364,7 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
289
364
|
* @param {*} [options] Override http request option.
|
|
290
365
|
* @throws {RequiredError}
|
|
291
366
|
*/
|
|
292
|
-
async listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
367
|
+
async listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPoliciesBillingDatesResponseClass>> {
|
|
293
368
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
294
369
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
295
370
|
},
|
|
@@ -303,6 +378,18 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
303
378
|
export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
304
379
|
const localVarFp = InvoicesApiFp(configuration)
|
|
305
380
|
return {
|
|
381
|
+
/**
|
|
382
|
+
* This will create invoice for a policy and save it in the DB.
|
|
383
|
+
* @summary Create the invoice
|
|
384
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
385
|
+
* @param {string} [authorization] Bearer Token
|
|
386
|
+
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
*/
|
|
390
|
+
createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
391
|
+
return localVarFp.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
392
|
+
},
|
|
306
393
|
/**
|
|
307
394
|
* Gets an invoice.
|
|
308
395
|
* @summary Retrieve the invoice
|
|
@@ -312,7 +399,7 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
312
399
|
* @param {*} [options] Override http request option.
|
|
313
400
|
* @throws {RequiredError}
|
|
314
401
|
*/
|
|
315
|
-
getInvoice(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<
|
|
402
|
+
getInvoice(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetInvoiceResponseClass> {
|
|
316
403
|
return localVarFp.getInvoice(code, expand, authorization, options).then((request) => request(axios, basePath));
|
|
317
404
|
},
|
|
318
405
|
/**
|
|
@@ -329,7 +416,7 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
329
416
|
* @param {*} [options] Override http request option.
|
|
330
417
|
* @throws {RequiredError}
|
|
331
418
|
*/
|
|
332
|
-
listInvoices(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<
|
|
419
|
+
listInvoices(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListInvoicesResponseClass> {
|
|
333
420
|
return localVarFp.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
334
421
|
},
|
|
335
422
|
/**
|
|
@@ -346,12 +433,40 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
346
433
|
* @param {*} [options] Override http request option.
|
|
347
434
|
* @throws {RequiredError}
|
|
348
435
|
*/
|
|
349
|
-
listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<
|
|
436
|
+
listPoliciesBillingDates(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPoliciesBillingDatesResponseClass> {
|
|
350
437
|
return localVarFp.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
351
438
|
},
|
|
352
439
|
};
|
|
353
440
|
};
|
|
354
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Request parameters for createInvoice operation in InvoicesApi.
|
|
444
|
+
* @export
|
|
445
|
+
* @interface InvoicesApiCreateInvoiceRequest
|
|
446
|
+
*/
|
|
447
|
+
export interface InvoicesApiCreateInvoiceRequest {
|
|
448
|
+
/**
|
|
449
|
+
*
|
|
450
|
+
* @type {CreateInvoiceRequestDto}
|
|
451
|
+
* @memberof InvoicesApiCreateInvoice
|
|
452
|
+
*/
|
|
453
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Bearer Token
|
|
457
|
+
* @type {string}
|
|
458
|
+
* @memberof InvoicesApiCreateInvoice
|
|
459
|
+
*/
|
|
460
|
+
readonly authorization?: string
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
464
|
+
* @type {string}
|
|
465
|
+
* @memberof InvoicesApiCreateInvoice
|
|
466
|
+
*/
|
|
467
|
+
readonly idempotencyKey?: string
|
|
468
|
+
}
|
|
469
|
+
|
|
355
470
|
/**
|
|
356
471
|
* Request parameters for getInvoice operation in InvoicesApi.
|
|
357
472
|
* @export
|
|
@@ -513,6 +628,18 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
|
|
|
513
628
|
* @extends {BaseAPI}
|
|
514
629
|
*/
|
|
515
630
|
export class InvoicesApi extends BaseAPI {
|
|
631
|
+
/**
|
|
632
|
+
* This will create invoice for a policy and save it in the DB.
|
|
633
|
+
* @summary Create the invoice
|
|
634
|
+
* @param {InvoicesApiCreateInvoiceRequest} requestParameters Request parameters.
|
|
635
|
+
* @param {*} [options] Override http request option.
|
|
636
|
+
* @throws {RequiredError}
|
|
637
|
+
* @memberof InvoicesApi
|
|
638
|
+
*/
|
|
639
|
+
public createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig) {
|
|
640
|
+
return InvoicesApiFp(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
641
|
+
}
|
|
642
|
+
|
|
516
643
|
/**
|
|
517
644
|
* Gets an invoice.
|
|
518
645
|
* @summary Retrieve the invoice
|
|
@@ -21,7 +21,9 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import {
|
|
24
|
+
import { CreateInvoiceForPolicyRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateInvoiceResponseClass } from '../models';
|
|
25
27
|
// URLSearchParams not necessarily used
|
|
26
28
|
// @ts-ignore
|
|
27
29
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -35,15 +37,15 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
35
37
|
/**
|
|
36
38
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
37
39
|
* @summary Create the recurring invoice
|
|
38
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
39
41
|
* @param {string} [authorization] Bearer Token
|
|
40
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
|
-
createRecurringInvoice: async (
|
|
45
|
-
// verify required parameter '
|
|
46
|
-
assertParamExists('createRecurringInvoice', '
|
|
46
|
+
createRecurringInvoice: async (createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceForPolicyRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createRecurringInvoice', 'createInvoiceForPolicyRequestDto', createInvoiceForPolicyRequestDto)
|
|
47
49
|
const localVarPath = `/billingservice/v1/recurring-invoices`;
|
|
48
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -77,7 +79,7 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
77
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
78
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
79
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
80
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceForPolicyRequestDto, localVarRequestOptions, configuration)
|
|
81
83
|
|
|
82
84
|
return {
|
|
83
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -97,14 +99,14 @@ export const RecurringInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
97
99
|
/**
|
|
98
100
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
99
101
|
* @summary Create the recurring invoice
|
|
100
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
101
103
|
* @param {string} [authorization] Bearer Token
|
|
102
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
103
105
|
* @param {*} [options] Override http request option.
|
|
104
106
|
* @throws {RequiredError}
|
|
105
107
|
*/
|
|
106
|
-
async createRecurringInvoice(
|
|
107
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(
|
|
108
|
+
async createRecurringInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options);
|
|
108
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
109
111
|
},
|
|
110
112
|
}
|
|
@@ -120,14 +122,14 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
120
122
|
/**
|
|
121
123
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
122
124
|
* @summary Create the recurring invoice
|
|
123
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceForPolicyRequestDto} createInvoiceForPolicyRequestDto
|
|
124
126
|
* @param {string} [authorization] Bearer Token
|
|
125
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
126
128
|
* @param {*} [options] Override http request option.
|
|
127
129
|
* @throws {RequiredError}
|
|
128
130
|
*/
|
|
129
|
-
createRecurringInvoice(
|
|
130
|
-
return localVarFp.createRecurringInvoice(
|
|
131
|
+
createRecurringInvoice(createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
132
|
+
return localVarFp.createRecurringInvoice(createInvoiceForPolicyRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
131
133
|
},
|
|
132
134
|
};
|
|
133
135
|
};
|
|
@@ -140,10 +142,10 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
140
142
|
export interface RecurringInvoicesApiCreateRecurringInvoiceRequest {
|
|
141
143
|
/**
|
|
142
144
|
*
|
|
143
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceForPolicyRequestDto}
|
|
144
146
|
* @memberof RecurringInvoicesApiCreateRecurringInvoice
|
|
145
147
|
*/
|
|
146
|
-
readonly
|
|
148
|
+
readonly createInvoiceForPolicyRequestDto: CreateInvoiceForPolicyRequestDto
|
|
147
149
|
|
|
148
150
|
/**
|
|
149
151
|
* Bearer Token
|
|
@@ -176,6 +178,6 @@ export class RecurringInvoicesApi extends BaseAPI {
|
|
|
176
178
|
* @memberof RecurringInvoicesApi
|
|
177
179
|
*/
|
|
178
180
|
public createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig) {
|
|
179
|
-
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.
|
|
181
|
+
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.createInvoiceForPolicyRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
180
182
|
}
|
|
181
183
|
}
|