@emilgroup/billing-sdk-node 1.28.2-beta.0 → 1.29.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-node@1.
|
|
20
|
+
npm install @emilgroup/billing-sdk-node@1.29.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/billing-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/billing-sdk-node@1.29.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
|
// URLSearchParams not necessarily used
|
|
28
28
|
// @ts-ignore
|
|
29
29
|
import { URL, URLSearchParams } from 'url';
|
|
@@ -37,15 +37,15 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
37
37
|
/**
|
|
38
38
|
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
39
39
|
* @summary Create the correction invoice
|
|
40
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
41
41
|
* @param {string} [authorization] Bearer Token
|
|
42
42
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
43
43
|
* @param {*} [options] Override http request option.
|
|
44
44
|
* @throws {RequiredError}
|
|
45
45
|
*/
|
|
46
|
-
createCorrectionInvoice: async (
|
|
47
|
-
// verify required parameter '
|
|
48
|
-
assertParamExists('createCorrectionInvoice', '
|
|
46
|
+
createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
49
49
|
const localVarPath = `/billingservice/v1/correction-invoices`;
|
|
50
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -79,7 +79,7 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
|
|
|
79
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
80
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
82
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
83
83
|
|
|
84
84
|
return {
|
|
85
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -99,14 +99,14 @@ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
101
101
|
* @summary Create the correction invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
105
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
async createCorrectionInvoice(
|
|
109
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(
|
|
108
|
+
async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
110
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
111
111
|
},
|
|
112
112
|
}
|
|
@@ -122,14 +122,14 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
122
122
|
/**
|
|
123
123
|
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
124
124
|
* @summary Create the correction invoice
|
|
125
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
126
126
|
* @param {string} [authorization] Bearer Token
|
|
127
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
128
128
|
* @param {*} [options] Override http request option.
|
|
129
129
|
* @throws {RequiredError}
|
|
130
130
|
*/
|
|
131
|
-
createCorrectionInvoice(
|
|
132
|
-
return localVarFp.createCorrectionInvoice(
|
|
131
|
+
createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
|
|
132
|
+
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
135
|
};
|
|
@@ -142,10 +142,10 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
|
|
|
142
142
|
export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
|
|
143
143
|
/**
|
|
144
144
|
*
|
|
145
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceRequestDto}
|
|
146
146
|
* @memberof CorrectionInvoicesApiCreateCorrectionInvoice
|
|
147
147
|
*/
|
|
148
|
-
readonly
|
|
148
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Bearer Token
|
|
@@ -178,6 +178,6 @@ export class CorrectionInvoicesApi extends BaseAPI {
|
|
|
178
178
|
* @memberof CorrectionInvoicesApi
|
|
179
179
|
*/
|
|
180
180
|
public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
|
|
181
|
-
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.
|
|
181
|
+
return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -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
|
// URLSearchParams not necessarily used
|
|
@@ -37,15 +37,15 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
37
37
|
/**
|
|
38
38
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
39
39
|
* @summary Create the initial invoice
|
|
40
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
41
41
|
* @param {string} [authorization] Bearer Token
|
|
42
42
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
43
43
|
* @param {*} [options] Override http request option.
|
|
44
44
|
* @throws {RequiredError}
|
|
45
45
|
*/
|
|
46
|
-
createInitialInvoice: async (
|
|
47
|
-
// verify required parameter '
|
|
48
|
-
assertParamExists('createInitialInvoice', '
|
|
46
|
+
createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createInitialInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
49
49
|
const localVarPath = `/billingservice/v1/initial-invoices`;
|
|
50
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -79,7 +79,7 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
|
|
|
79
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
80
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
82
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
83
83
|
|
|
84
84
|
return {
|
|
85
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -99,14 +99,14 @@ export const InitialInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
101
101
|
* @summary Create the initial invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
105
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
async createInitialInvoice(
|
|
109
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(
|
|
108
|
+
async createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
110
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
111
111
|
},
|
|
112
112
|
}
|
|
@@ -122,14 +122,14 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
122
122
|
/**
|
|
123
123
|
* This will create an initial invoice. It will be created once a policy is approved and it will cover a partial until the issuing of the regular invoice.
|
|
124
124
|
* @summary Create the initial invoice
|
|
125
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
126
126
|
* @param {string} [authorization] Bearer Token
|
|
127
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
128
128
|
* @param {*} [options] Override http request option.
|
|
129
129
|
* @throws {RequiredError}
|
|
130
130
|
*/
|
|
131
|
-
createInitialInvoice(
|
|
132
|
-
return localVarFp.createInitialInvoice(
|
|
131
|
+
createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
132
|
+
return localVarFp.createInitialInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
135
|
};
|
|
@@ -142,10 +142,10 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
|
|
|
142
142
|
export interface InitialInvoicesApiCreateInitialInvoiceRequest {
|
|
143
143
|
/**
|
|
144
144
|
*
|
|
145
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceRequestDto}
|
|
146
146
|
* @memberof InitialInvoicesApiCreateInitialInvoice
|
|
147
147
|
*/
|
|
148
|
-
readonly
|
|
148
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Bearer Token
|
|
@@ -178,6 +178,6 @@ export class InitialInvoicesApi extends BaseAPI {
|
|
|
178
178
|
* @memberof InitialInvoicesApi
|
|
179
179
|
*/
|
|
180
180
|
public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
|
|
181
|
-
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.
|
|
181
|
+
return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
182
182
|
}
|
|
183
183
|
}
|
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';
|
|
@@ -40,58 +36,6 @@ const FormData = require('form-data');
|
|
|
40
36
|
*/
|
|
41
37
|
export const InvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
42
38
|
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
|
-
},
|
|
95
39
|
/**
|
|
96
40
|
* Gets an invoice.
|
|
97
41
|
* @summary Retrieve the invoice
|
|
@@ -306,19 +250,6 @@ export const InvoicesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
306
250
|
export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
307
251
|
const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration)
|
|
308
252
|
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
|
-
},
|
|
322
253
|
/**
|
|
323
254
|
* Gets an invoice.
|
|
324
255
|
* @summary Retrieve the invoice
|
|
@@ -378,18 +309,6 @@ export const InvoicesApiFp = function(configuration?: Configuration) {
|
|
|
378
309
|
export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
379
310
|
const localVarFp = InvoicesApiFp(configuration)
|
|
380
311
|
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
|
-
},
|
|
393
312
|
/**
|
|
394
313
|
* Gets an invoice.
|
|
395
314
|
* @summary Retrieve the invoice
|
|
@@ -439,34 +358,6 @@ export const InvoicesApiFactory = function (configuration?: Configuration, baseP
|
|
|
439
358
|
};
|
|
440
359
|
};
|
|
441
360
|
|
|
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
|
-
|
|
470
361
|
/**
|
|
471
362
|
* Request parameters for getInvoice operation in InvoicesApi.
|
|
472
363
|
* @export
|
|
@@ -628,18 +519,6 @@ export interface InvoicesApiListPoliciesBillingDatesRequest {
|
|
|
628
519
|
* @extends {BaseAPI}
|
|
629
520
|
*/
|
|
630
521
|
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
|
-
|
|
643
522
|
/**
|
|
644
523
|
* Gets an invoice.
|
|
645
524
|
* @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
|
// URLSearchParams not necessarily used
|
|
@@ -37,15 +37,15 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
37
37
|
/**
|
|
38
38
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
39
39
|
* @summary Create the recurring invoice
|
|
40
|
-
* @param {
|
|
40
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
41
41
|
* @param {string} [authorization] Bearer Token
|
|
42
42
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
43
43
|
* @param {*} [options] Override http request option.
|
|
44
44
|
* @throws {RequiredError}
|
|
45
45
|
*/
|
|
46
|
-
createRecurringInvoice: async (
|
|
47
|
-
// verify required parameter '
|
|
48
|
-
assertParamExists('createRecurringInvoice', '
|
|
46
|
+
createRecurringInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
47
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
48
|
+
assertParamExists('createRecurringInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
|
|
49
49
|
const localVarPath = `/billingservice/v1/recurring-invoices`;
|
|
50
50
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
51
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -79,7 +79,7 @@ export const RecurringInvoicesApiAxiosParamCreator = function (configuration?: C
|
|
|
79
79
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
80
80
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
81
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
82
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
82
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequestDto, localVarRequestOptions, configuration)
|
|
83
83
|
|
|
84
84
|
return {
|
|
85
85
|
url: toPathString(localVarUrlObj),
|
|
@@ -99,14 +99,14 @@ export const RecurringInvoicesApiFp = function(configuration?: Configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
101
101
|
* @summary Create the recurring invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
105
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
async createRecurringInvoice(
|
|
109
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(
|
|
108
|
+
async createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
|
|
109
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRecurringInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options);
|
|
110
110
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
111
111
|
},
|
|
112
112
|
}
|
|
@@ -122,14 +122,14 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
122
122
|
/**
|
|
123
123
|
* This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
|
|
124
124
|
* @summary Create the recurring invoice
|
|
125
|
-
* @param {
|
|
125
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
126
126
|
* @param {string} [authorization] Bearer Token
|
|
127
127
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
128
128
|
* @param {*} [options] Override http request option.
|
|
129
129
|
* @throws {RequiredError}
|
|
130
130
|
*/
|
|
131
|
-
createRecurringInvoice(
|
|
132
|
-
return localVarFp.createRecurringInvoice(
|
|
131
|
+
createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
|
|
132
|
+
return localVarFp.createRecurringInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
135
|
};
|
|
@@ -142,10 +142,10 @@ export const RecurringInvoicesApiFactory = function (configuration?: Configurati
|
|
|
142
142
|
export interface RecurringInvoicesApiCreateRecurringInvoiceRequest {
|
|
143
143
|
/**
|
|
144
144
|
*
|
|
145
|
-
* @type {
|
|
145
|
+
* @type {CreateInvoiceRequestDto}
|
|
146
146
|
* @memberof RecurringInvoicesApiCreateRecurringInvoice
|
|
147
147
|
*/
|
|
148
|
-
readonly
|
|
148
|
+
readonly createInvoiceRequestDto: CreateInvoiceRequestDto
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Bearer Token
|
|
@@ -178,6 +178,6 @@ export class RecurringInvoicesApi extends BaseAPI {
|
|
|
178
178
|
* @memberof RecurringInvoicesApi
|
|
179
179
|
*/
|
|
180
180
|
public createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig) {
|
|
181
|
-
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.
|
|
181
|
+
return RecurringInvoicesApiFp(this.configuration).createRecurringInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -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}
|
|
@@ -99,21 +99,21 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
99
99
|
/**
|
|
100
100
|
* This will create a correction invoice. That will be generated on policy update which affects the price, These invoices usually are positive or negative value. The main purpose of this invoices is to recalculate the customer invoices and be created if any price difference.
|
|
101
101
|
* @summary Create the correction invoice
|
|
102
|
-
* @param {
|
|
102
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token
|
|
104
104
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
105
105
|
* @param {*} [options] Override http request option.
|
|
106
106
|
* @throws {RequiredError}
|
|
107
107
|
*/
|
|
108
|
-
createCorrectionInvoice: function (
|
|
108
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
109
109
|
if (options === void 0) { options = {}; }
|
|
110
110
|
return __awaiter(_this, void 0, void 0, function () {
|
|
111
111
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
112
|
return __generator(this, function (_a) {
|
|
113
113
|
switch (_a.label) {
|
|
114
114
|
case 0:
|
|
115
|
-
// verify required parameter '
|
|
116
|
-
(0, common_1.assertParamExists)('createCorrectionInvoice', '
|
|
115
|
+
// verify required parameter 'createInvoiceRequestDto' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto);
|
|
117
117
|
localVarPath = "/billingservice/v1/correction-invoices";
|
|
118
118
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
119
119
|
if (configuration) {
|
|
@@ -140,7 +140,7 @@ var CorrectionInvoicesApiAxiosParamCreator = function (configuration) {
|
|
|
140
140
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
141
141
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
142
142
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
143
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
143
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceRequestDto, localVarRequestOptions, configuration);
|
|
144
144
|
return [2 /*return*/, {
|
|
145
145
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
146
146
|
options: localVarRequestOptions,
|
|
@@ -162,18 +162,18 @@ var CorrectionInvoicesApiFp = function (configuration) {
|
|
|
162
162
|
/**
|
|
163
163
|
* 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.
|
|
164
164
|
* @summary Create the correction invoice
|
|
165
|
-
* @param {
|
|
165
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
166
166
|
* @param {string} [authorization] Bearer Token
|
|
167
167
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
168
168
|
* @param {*} [options] Override http request option.
|
|
169
169
|
* @throws {RequiredError}
|
|
170
170
|
*/
|
|
171
|
-
createCorrectionInvoice: function (
|
|
171
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
172
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
173
|
var localVarAxiosArgs;
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCorrectionInvoice(
|
|
176
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options)];
|
|
177
177
|
case 1:
|
|
178
178
|
localVarAxiosArgs = _a.sent();
|
|
179
179
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -194,14 +194,14 @@ var CorrectionInvoicesApiFactory = function (configuration, basePath, axios) {
|
|
|
194
194
|
/**
|
|
195
195
|
* 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.
|
|
196
196
|
* @summary Create the correction invoice
|
|
197
|
-
* @param {
|
|
197
|
+
* @param {CreateInvoiceRequestDto} createInvoiceRequestDto
|
|
198
198
|
* @param {string} [authorization] Bearer Token
|
|
199
199
|
* @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
|
|
200
200
|
* @param {*} [options] Override http request option.
|
|
201
201
|
* @throws {RequiredError}
|
|
202
202
|
*/
|
|
203
|
-
createCorrectionInvoice: function (
|
|
204
|
-
return localVarFp.createCorrectionInvoice(
|
|
203
|
+
createCorrectionInvoice: function (createInvoiceRequestDto, authorization, idempotencyKey, options) {
|
|
204
|
+
return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
|
|
205
205
|
},
|
|
206
206
|
};
|
|
207
207
|
};
|
|
@@ -227,7 +227,7 @@ var CorrectionInvoicesApi = /** @class */ (function (_super) {
|
|
|
227
227
|
*/
|
|
228
228
|
CorrectionInvoicesApi.prototype.createCorrectionInvoice = function (requestParameters, options) {
|
|
229
229
|
var _this = this;
|
|
230
|
-
return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.
|
|
230
|
+
return (0, exports.CorrectionInvoicesApiFp)(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
231
|
};
|
|
232
232
|
return CorrectionInvoicesApi;
|
|
233
233
|
}(base_1.BaseAPI));
|