@emilgroup/billing-sdk 1.25.2-beta.0 → 1.26.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 +0 -2
- 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 +0 -121
- 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 +0 -66
- package/dist/api/invoices-api.js +0 -99
- package/dist/api/recurring-invoices-api.d.ts +9 -9
- package/dist/api/recurring-invoices-api.js +12 -12
- package/dist/models/create-invoice-request-dto.d.ts +9 -16
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +0 -2
- package/dist/models/list-request-dto.d.ts +0 -6
- package/dist/models/policy-dto.d.ts +0 -12
- package/dist/models/policy-object-dto.d.ts +0 -12
- package/dist/models/policy-premium-dto.d.ts +0 -12
- package/dist/models/policy-premium-item-dto.d.ts +0 -12
- package/dist/models/policy-version-dto.d.ts +0 -12
- package/dist/models/premium-formula-dto.d.ts +0 -12
- package/dist/models/timeslice-dto.d.ts +0 -12
- package/models/create-invoice-request-dto.ts +9 -16
- package/models/index.ts +0 -2
- package/models/list-request-dto.ts +0 -6
- package/models/policy-dto.ts +0 -12
- package/models/policy-object-dto.ts +0 -12
- package/models/policy-premium-dto.ts +0 -12
- package/models/policy-premium-item-dto.ts +0 -12
- package/models/policy-version-dto.ts +0 -12
- package/models/premium-formula-dto.ts +0 -12
- package/models/timeslice-dto.ts +0 -12
- package/package.json +1 -1
- package/dist/models/create-invoice-for-policy-request-dto.d.ts +0 -83
- package/dist/models/create-invoice-for-policy-request-dto.js +0 -26
- package/dist/models/create-item-request-dto.d.ts +0 -101
- package/dist/models/create-item-request-dto.js +0 -36
- package/models/create-invoice-for-policy-request-dto.ts +0 -92
- package/models/create-item-request-dto.ts +0 -112
package/.openapi-generator/FILES
CHANGED
|
@@ -23,12 +23,10 @@ models/create-estimated-invoice-for-interval-request-dto.ts
|
|
|
23
23
|
models/create-estimated-invoice-for-interval-response-class.ts
|
|
24
24
|
models/create-estimated-invoice-request-dto.ts
|
|
25
25
|
models/create-estimated-invoice-response-class.ts
|
|
26
|
-
models/create-invoice-for-policy-request-dto.ts
|
|
27
26
|
models/create-invoice-payment-request-dto.ts
|
|
28
27
|
models/create-invoice-request-dto.ts
|
|
29
28
|
models/create-invoice-response-class.ts
|
|
30
29
|
models/create-invoice-status-request-dto.ts
|
|
31
|
-
models/create-item-request-dto.ts
|
|
32
30
|
models/create-termination-invoice-request-dto.ts
|
|
33
31
|
models/get-invoice-response-class.ts
|
|
34
32
|
models/index.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@1.
|
|
20
|
+
npm install @emilgroup/billing-sdk@1.26.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk@1.
|
|
24
|
+
yarn add @emilgroup/billing-sdk@1.26.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `InvoicesApi`.
|
|
@@ -23,7 +23,7 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreateCorrectionInvoicesResponseClass } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
|
-
import {
|
|
26
|
+
import { CreateInvoiceRequestDto } from '../models';
|
|
27
27
|
/**
|
|
28
28
|
* CorrectionInvoicesApi - axios parameter creator
|
|
29
29
|
* @export
|
|
@@ -33,15 +33,15 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
33
33
|
/**
|
|
34
34
|
* 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.
|
|
35
35
|
* @summary Create the correction invoice
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
37
37
|
* @param {string} [authorization] Bearer Token
|
|
38
38
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
39
39
|
* @param {*} [options] Override http request option.
|
|
40
40
|
* @throws {RequiredError}
|
|
41
41
|
*/
|
|
42
|
-
createCorrectionInvoice: async (
|
|
43
|
-
// verify required parameter '
|
|
44
|
-
assertParamExists('createCorrectionInvoice', '
|
|
42
|
+
createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
44
|
+
assertParamExists('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
45
45
|
const localVarPath = `/billingservice/v1/correction-invoices`;
|
|
46
46
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
47
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -75,7 +75,7 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
75
75
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
76
76
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
77
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
78
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
81
|
url: toPathString(localVarUrlObj),
|
|
@@ -95,14 +95,14 @@ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
95
95
|
/**
|
|
96
96
|
* 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.
|
|
97
97
|
* @summary Create the correction invoice
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
99
99
|
* @param {string} [authorization] Bearer Token
|
|
100
100
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
101
101
|
* @param {*} [options] Override http request option.
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
*/
|
|
104
|
-
async createCorrectionInvoice(
|
|
105
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(
|
|
104
|
+
async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
|
|
105
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
106
106
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
107
107
|
},
|
|
108
108
|
}
|
|
@@ -118,14 +118,14 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
118
118
|
/**
|
|
119
119
|
* 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.
|
|
120
120
|
* @summary Create the correction invoice
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
122
122
|
* @param {string} [authorization] Bearer Token
|
|
123
123
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
124
124
|
* @param {*} [options] Override http request option.
|
|
125
125
|
* @throws {RequiredError}
|
|
126
126
|
*/
|
|
127
|
-
createCorrectionInvoice(
|
|
128
|
-
return localVarFp.createCorrectionInvoice(
|
|
127
|
+
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
|
|
128
|
+
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
129
129
|
},
|
|
130
130
|
};
|
|
131
131
|
};
|
|
@@ -138,10 +138,10 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
138
138
|
export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
139
139
|
/**
|
|
140
140
|
*
|
|
141
|
-
* @type {
|
|
141
|
+
* @type {CreateInvoiceRequestDto}
|
|
142
142
|
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
143
143
|
*/
|
|
144
|
-
readonly
|
|
144
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Bearer Token
|
|
@@ -174,6 +174,6 @@ export class CorrectionInvoicesApi extends BaseAPI {
|
|
|
174
174
|
* @memberof CorrectionInvoicesApi
|
|
175
175
|
*/
|
|
176
176
|
public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
|
|
177
|
-
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.
|
|
177
|
+
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -21,7 +21,7 @@ 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 { CreateInvoiceRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CreateInvoiceResponseClass } from '../models';
|
|
27
27
|
/**
|
|
@@ -33,15 +33,15 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
33
33
|
/**
|
|
34
34
|
* 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.
|
|
35
35
|
* @summary Create the initial invoice
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
37
37
|
* @param {string} [authorization] Bearer Token
|
|
38
38
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
39
39
|
* @param {*} [options] Override http request option.
|
|
40
40
|
* @throws {RequiredError}
|
|
41
41
|
*/
|
|
42
|
-
createInitialInvoice: async (
|
|
43
|
-
// verify required parameter '
|
|
44
|
-
assertParamExists('createInitialInvoice', '
|
|
42
|
+
createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
44
|
+
assertParamExists('createInitialInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
45
45
|
const localVarPath = `/billingservice/v1/initial-invoices`;
|
|
46
46
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
47
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -75,7 +75,7 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
75
75
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
76
76
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
77
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
78
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
81
|
url: toPathString(localVarUrlObj),
|
|
@@ -95,14 +95,14 @@ export const InitialInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
95
95
|
/**
|
|
96
96
|
* 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.
|
|
97
97
|
* @summary Create the initial invoice
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
99
99
|
* @param {string} [authorization] Bearer Token
|
|
100
100
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
101
101
|
* @param {*} [options] Override http request option.
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
*/
|
|
104
|
-
async createInitialInvoice(
|
|
105
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(
|
|
104
|
+
async createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
105
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
106
106
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
107
107
|
},
|
|
108
108
|
}
|
|
@@ -118,14 +118,14 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
118
118
|
/**
|
|
119
119
|
* 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.
|
|
120
120
|
* @summary Create the initial invoice
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
122
122
|
* @param {string} [authorization] Bearer Token
|
|
123
123
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
124
124
|
* @param {*} [options] Override http request option.
|
|
125
125
|
* @throws {RequiredError}
|
|
126
126
|
*/
|
|
127
|
-
createInitialInvoice(
|
|
128
|
-
return localVarFp.createInitialInvoice(
|
|
127
|
+
createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
128
|
+
return localVarFp.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
129
129
|
},
|
|
130
130
|
};
|
|
131
131
|
};
|
|
@@ -138,10 +138,10 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
138
138
|
export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
139
139
|
/**
|
|
140
140
|
*
|
|
141
|
-
* @type {
|
|
141
|
+
* @type {CreateInvoiceRequestDto}
|
|
142
142
|
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
143
143
|
*/
|
|
144
|
-
readonly
|
|
144
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Bearer Token
|
|
@@ -174,6 +174,6 @@ export class InitialInvoicesApi extends BaseAPI {
|
|
|
174
174
|
* @memberof InitialInvoicesApi
|
|
175
175
|
*/
|
|
176
176
|
public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
|
|
177
|
-
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.
|
|
177
|
+
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
178
178
|
}
|
|
179
179
|
}
|
package/api/invoices-api.ts
CHANGED
|
@@ -21,10 +21,6 @@ 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 { CreateInvoiceRequestDto } from '../models';
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
import { CreateInvoiceResponseClass } from '../models';
|
|
27
|
-
// @ts-ignore
|
|
28
24
|
import { GetInvoiceResponseClass } from '../models';
|
|
29
25
|
// @ts-ignore
|
|
30
26
|
import { ListInvoicesResponseClass } from '../models';
|
|
@@ -36,58 +32,6 @@ import { ListPoliciesBillingDatesResponseClass } from '../models';
|
|
|
36
32
|
*/
|
|
37
33
|
export const InvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
38
34
|
return {
|
|
39
|
-
/**
|
|
40
|
-
* This will create invoice for a policy and save it in the DB.
|
|
41
|
-
* @summary Create the invoice
|
|
42
|
-
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
43
|
-
* @param {string} [authorization] Bearer Token
|
|
44
|
-
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
45
|
-
* @param {*} [options] Override http request option.
|
|
46
|
-
* @throws {RequiredError}
|
|
47
|
-
*/
|
|
48
|
-
createInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
49
|
-
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
50
|
-
assertParamExists('createInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
51
|
-
const localVarPath = `/billingservice/v1/invoices`;
|
|
52
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54
|
-
let baseOptions;
|
|
55
|
-
let baseAccessToken;
|
|
56
|
-
if (configuration) {
|
|
57
|
-
baseOptions = configuration.baseOptions;
|
|
58
|
-
baseAccessToken = configuration.accessToken;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
62
|
-
const localVarHeaderParameter = {} as any;
|
|
63
|
-
const localVarQueryParameter = {} as any;
|
|
64
|
-
|
|
65
|
-
// authentication bearer required
|
|
66
|
-
// http bearer authentication required
|
|
67
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
68
|
-
|
|
69
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
70
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
74
|
-
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
80
|
-
|
|
81
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
82
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
83
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
84
|
-
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
url: toPathString(localVarUrlObj),
|
|
88
|
-
options: localVarRequestOptions,
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
35
|
/**
|
|
92
36
|
* Gets an invoice.
|
|
93
37
|
* @summary Retrieve the invoice
|
|
@@ -302,19 +246,6 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
302
246
|
export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
303
247
|
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration)
|
|
304
248
|
return {
|
|
305
|
-
/**
|
|
306
|
-
* This will create invoice for a policy and save it in the DB.
|
|
307
|
-
* @summary Create the invoice
|
|
308
|
-
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
309
|
-
* @param {string} [authorization] Bearer Token
|
|
310
|
-
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
311
|
-
* @param {*} [options] Override http request option.
|
|
312
|
-
* @throws {RequiredError}
|
|
313
|
-
*/
|
|
314
|
-
async createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
315
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
316
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
317
|
-
},
|
|
318
249
|
/**
|
|
319
250
|
* Gets an invoice.
|
|
320
251
|
* @summary Retrieve the invoice
|
|
@@ -374,18 +305,6 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
374
305
|
export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
375
306
|
const localVarFp = InvoicesApiFp(configuration)
|
|
376
307
|
return {
|
|
377
|
-
/**
|
|
378
|
-
* This will create invoice for a policy and save it in the DB.
|
|
379
|
-
* @summary Create the invoice
|
|
380
|
-
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
381
|
-
* @param {string} [authorization] Bearer Token
|
|
382
|
-
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
383
|
-
* @param {*} [options] Override http request option.
|
|
384
|
-
* @throws {RequiredError}
|
|
385
|
-
*/
|
|
386
|
-
createInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
387
|
-
return localVarFp.createInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
388
|
-
},
|
|
389
308
|
/**
|
|
390
309
|
* Gets an invoice.
|
|
391
310
|
* @summary Retrieve the invoice
|
|
@@ -435,34 +354,6 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
435
354
|
};
|
|
436
355
|
};
|
|
437
356
|
|
|
438
|
-
/**
|
|
439
|
-
* Request parameters for createInvoice operation in InvoicesApi.
|
|
440
|
-
* @export
|
|
441
|
-
* @interface InvoicesApiCreateInvoiceRequest
|
|
442
|
-
*/
|
|
443
|
-
export interface InvoicesApiCreateInvoiceRequest {
|
|
444
|
-
/**
|
|
445
|
-
*
|
|
446
|
-
* @type {CreateInvoiceRequestDto}
|
|
447
|
-
* @memberof InvoicesApiCreateInvoice
|
|
448
|
-
*/
|
|
449
|
-
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Bearer Token
|
|
453
|
-
* @type {string}
|
|
454
|
-
* @memberof InvoicesApiCreateInvoice
|
|
455
|
-
*/
|
|
456
|
-
readonly authorization?: string
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
460
|
-
* @type {string}
|
|
461
|
-
* @memberof InvoicesApiCreateInvoice
|
|
462
|
-
*/
|
|
463
|
-
readonly idempotencyKey?: string
|
|
464
|
-
}
|
|
465
|
-
|
|
466
357
|
/**
|
|
467
358
|
* Request parameters for getInvoice operation in InvoicesApi.
|
|
468
359
|
* @export
|
|
@@ -624,18 +515,6 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
|
|
|
624
515
|
* @extends {BaseAPI}
|
|
625
516
|
*/
|
|
626
517
|
export class InvoicesApi extends BaseAPI {
|
|
627
|
-
/**
|
|
628
|
-
* This will create invoice for a policy and save it in the DB.
|
|
629
|
-
* @summary Create the invoice
|
|
630
|
-
* @param {InvoicesApiCreateInvoiceRequest} requestParameters Request parameters.
|
|
631
|
-
* @param {*} [options] Override http request option.
|
|
632
|
-
* @throws {RequiredError}
|
|
633
|
-
* @memberof InvoicesApi
|
|
634
|
-
*/
|
|
635
|
-
public createInvoice(requestParameters: InvoicesApiCreateInvoiceRequest, options?: AxiosRequestConfig) {
|
|
636
|
-
return InvoicesApiFp(this.configuration).createInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
637
|
-
}
|
|
638
|
-
|
|
639
518
|
/**
|
|
640
519
|
* Gets an invoice.
|
|
641
520
|
* @summary Retrieve the invoice
|
|
@@ -21,7 +21,7 @@ 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 { CreateInvoiceRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CreateInvoiceResponseClass } from '../models';
|
|
27
27
|
/**
|
|
@@ -33,15 +33,15 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
33
33
|
/**
|
|
34
34
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
35
35
|
* @summary Create the recurring invoice
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
37
37
|
* @param {string} [authorization] Bearer Token
|
|
38
38
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
39
39
|
* @param {*} [options] Override http request option.
|
|
40
40
|
* @throws {RequiredError}
|
|
41
41
|
*/
|
|
42
|
-
createRecurringInvoice: async (
|
|
43
|
-
// verify required parameter '
|
|
44
|
-
assertParamExists('createRecurringInvoice', '
|
|
42
|
+
createRecurringInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
44
|
+
assertParamExists('createRecurringInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
45
45
|
const localVarPath = `/billingservice/v1/recurring-invoices`;
|
|
46
46
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
47
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -75,7 +75,7 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
75
75
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
76
76
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
77
77
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
78
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
78
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
79
79
|
|
|
80
80
|
return {
|
|
81
81
|
url: toPathString(localVarUrlObj),
|
|
@@ -95,14 +95,14 @@ export const RecurringInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
95
95
|
/**
|
|
96
96
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
97
97
|
* @summary Create the recurring invoice
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
99
99
|
* @param {string} [authorization] Bearer Token
|
|
100
100
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
101
101
|
* @param {*} [options] Override http request option.
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
*/
|
|
104
|
-
async createRecurringInvoice(
|
|
105
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(
|
|
104
|
+
async createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
105
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
106
106
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
107
107
|
},
|
|
108
108
|
}
|
|
@@ -118,14 +118,14 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
118
118
|
/**
|
|
119
119
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
120
120
|
* @summary Create the recurring invoice
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
122
122
|
* @param {string} [authorization] Bearer Token
|
|
123
123
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
124
124
|
* @param {*} [options] Override http request option.
|
|
125
125
|
* @throws {RequiredError}
|
|
126
126
|
*/
|
|
127
|
-
createRecurringInvoice(
|
|
128
|
-
return localVarFp.createRecurringInvoice(
|
|
127
|
+
createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
128
|
+
return localVarFp.createRecurringInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
129
129
|
},
|
|
130
130
|
};
|
|
131
131
|
};
|
|
@@ -138,10 +138,10 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
138
138
|
export interface RecurringInvoicesApiCreateRecurringInvoiceRequest {
|
|
139
139
|
/**
|
|
140
140
|
*
|
|
141
|
-
* @type {
|
|
141
|
+
* @type {CreateInvoiceRequestDto}
|
|
142
142
|
* @memberof RecurringInvoicesApiCreateRecurringInvoice
|
|
143
143
|
*/
|
|
144
|
-
readonly
|
|
144
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Bearer Token
|
|
@@ -174,6 +174,6 @@ export class RecurringInvoicesApi extends BaseAPI {
|
|
|
174
174
|
* @memberof RecurringInvoicesApi
|
|
175
175
|
*/
|
|
176
176
|
public createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig) {
|
|
177
|
-
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.
|
|
177
|
+
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -13,7 +13,7 @@ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
15
|
import { CreateCorrectionInvoicesResponseClass } from '../models';
|
|
16
|
-
import {
|
|
16
|
+
import { CreateInvoiceRequestDto } from '../models';
|
|
17
17
|
/**
|
|
18
18
|
* CorrectionInvoicesApi - axios parameter creator
|
|
19
19
|
* @export
|
|
@@ -22,13 +22,13 @@ export declare const CorrectionInvoicesApiAxiosParamCreator: (configuration?: Co
|
|
|
22
22
|
/**
|
|
23
23
|
* 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.
|
|
24
24
|
* @summary Create the correction invoice
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
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
|
-
createCorrectionInvoice: (
|
|
31
|
+
createCorrectionInvoice: (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* CorrectionInvoicesApi - functional programming interface
|
|
@@ -38,13 +38,13 @@ export declare const CorrectionInvoicesApiFp: (configuration?: Configuration) =>
|
|
|
38
38
|
/**
|
|
39
39
|
* 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.
|
|
40
40
|
* @summary Create the correction invoice
|
|
41
|
-
* @param {
|
|
41
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
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
|
-
createCorrectionInvoice(
|
|
47
|
+
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>>;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* CorrectionInvoicesApi - factory interface
|
|
@@ -54,13 +54,13 @@ export declare const CorrectionInvoicesApiFactory: (configuration?: Configuratio
|
|
|
54
54
|
/**
|
|
55
55
|
* 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.
|
|
56
56
|
* @summary Create the correction invoice
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
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
|
-
createCorrectionInvoice(
|
|
63
|
+
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Request parameters for createCorrectionInvoice operation in CorrectionInvoicesApi.
|
|
@@ -70,10 +70,10 @@ export declare const CorrectionInvoicesApiFactory: (configuration?: Configuratio
|
|
|
70
70
|
export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
|
-
* @type {
|
|
73
|
+
* @type {CreateInvoiceRequestDto}
|
|
74
74
|
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
75
75
|
*/
|
|
76
|
-
readonly
|
|
76
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto;
|
|
77
77
|
/**
|
|
78
78
|
* Bearer Token
|
|
79
79
|
* @type {string}
|
|
@@ -95,21 +95,21 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
95
95
|
/**
|
|
96
96
|
* 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.
|
|
97
97
|
* @summary Create the correction invoice
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
99
99
|
* @param {string} [authorization] Bearer Token
|
|
100
100
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
101
101
|
* @param {*} [options] Override http request option.
|
|
102
102
|
* @throws {RequiredError}
|
|
103
103
|
*/
|
|
104
|
-
createCorrectionInvoice: function (
|
|
104
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
105
105
|
if (options === void 0) { options = {}; }
|
|
106
106
|
return __awaiter(_this, void 0, void 0, function () {
|
|
107
107
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
108
108
|
return __generator(this, function (_a) {
|
|
109
109
|
switch (_a.label) {
|
|
110
110
|
case 0:
|
|
111
|
-
// verify required parameter '
|
|
112
|
-
(0, common_1.assertParamExists)('createCorrectionInvoice', '
|
|
111
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
112
|
+
(0, common_1.assertParamExists)('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto);
|
|
113
113
|
localVarPath = "/billingservice/v1/correction-invoices";
|
|
114
114
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
115
115
|
if (configuration) {
|
|
@@ -136,7 +136,7 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
136
136
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
137
137
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
138
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
139
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceRequestDto, localVarRequestOptions, configuration);
|
|
140
140
|
return [2 /*return*/, {
|
|
141
141
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
142
142
|
options: localVarRequestOptions,
|
|
@@ -158,18 +158,18 @@ var CorrectionInvoicesApiFp = function (configuration) {
|
|
|
158
158
|
/**
|
|
159
159
|
* 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.
|
|
160
160
|
* @summary Create the correction invoice
|
|
161
|
-
* @param {
|
|
161
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
162
162
|
* @param {string} [authorization] Bearer Token
|
|
163
163
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
164
164
|
* @param {*} [options] Override http request option.
|
|
165
165
|
* @throws {RequiredError}
|
|
166
166
|
*/
|
|
167
|
-
createCorrectionInvoice: function (
|
|
167
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
168
168
|
return __awaiter(this, void 0, void 0, function () {
|
|
169
169
|
var localVarAxiosArgs;
|
|
170
170
|
return __generator(this, function (_a) {
|
|
171
171
|
switch (_a.label) {
|
|
172
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCorrectionInvoice(
|
|
172
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options)];
|
|
173
173
|
case 1:
|
|
174
174
|
localVarAxiosArgs = _a.sent();
|
|
175
175
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -190,14 +190,14 @@ var CorrectionInvoicesApiFactory = function (configuration, basePath, axios) {
|
|
|
190
190
|
/**
|
|
191
191
|
* 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.
|
|
192
192
|
* @summary Create the correction invoice
|
|
193
|
-
* @param {
|
|
193
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
194
194
|
* @param {string} [authorization] Bearer Token
|
|
195
195
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
196
196
|
* @param {*} [options] Override http request option.
|
|
197
197
|
* @throws {RequiredError}
|
|
198
198
|
*/
|
|
199
|
-
createCorrectionInvoice: function (
|
|
200
|
-
return localVarFp.createCorrectionInvoice(
|
|
199
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
200
|
+
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
201
201
|
},
|
|
202
202
|
};
|
|
203
203
|
};
|
|
@@ -223,7 +223,7 @@ var CorrectionInvoicesApi = /** @class */ (function (_super) {
|
|
|
223
223
|
*/
|
|
224
224
|
CorrectionInvoicesApi.prototype.createCorrectionInvoice = function (requestParameters, options) {
|
|
225
225
|
var _this = this;
|
|
226
|
-
return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.
|
|
226
|
+
return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
227
227
|
};
|
|
228
228
|
return CorrectionInvoicesApi;
|
|
229
229
|
}(base_1.BaseAPI));
|