@emilgroup/billing-sdk-node 1.3.0 → 1.4.1

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