@emilgroup/billing-sdk 1.1.0 → 1.2.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 +5 -4
  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 +5 -4
  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@1.1.0 --save
20
+ npm install @emilgroup/billing-sdk@1.2.1 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/billing-sdk@1.1.0
24
+ yarn add @emilgroup/billing-sdk@1.2.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
@@ -31,13 +31,15 @@ import { CreateInvoiceRequestDto } from '../models';
31
31
  export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
32
32
  return {
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
+ * @summary Create the correction invoice
35
36
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
36
37
  * @param {string} [authorization] Bearer Token
38
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
37
39
  * @param {*} [options] Override http request option.
38
40
  * @throws {RequiredError}
39
41
  */
40
- createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
42
+ createCorrectionInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41
43
  // verify required parameter 'createInvoiceRequestDto' is not null or undefined
42
44
  assertParamExists('createCorrectionInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
43
45
  const localVarPath = `/billingservice/v1/correction-invoices`;
@@ -62,6 +64,10 @@ export const CorrectionInvoicesApiAxiosParamCreator = function (configuration?:
62
64
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
63
65
  }
64
66
 
67
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
68
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
69
+ }
70
+
65
71
 
66
72
 
67
73
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -87,14 +93,16 @@ export const CorrectionInvoicesApiFp = function(configuration?: Configuration) {
87
93
  const localVarAxiosParamCreator = CorrectionInvoicesApiAxiosParamCreator(configuration)
88
94
  return {
89
95
  /**
90
- *
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
+ * @summary Create the correction invoice
91
98
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
92
99
  * @param {string} [authorization] Bearer Token
100
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
93
101
  * @param {*} [options] Override http request option.
94
102
  * @throws {RequiredError}
95
103
  */
96
- async createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCorrectionInvoicesResponseClass>> {
97
- const localVarAxiosArgs = await localVarAxiosParamCreator.createCorrectionInvoice(createInvoiceRequestDto, authorization, options);
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);
98
106
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
99
107
  },
100
108
  }
@@ -108,14 +116,16 @@ export const CorrectionInvoicesApiFactory = function (configuration?: Configurat
108
116
  const localVarFp = CorrectionInvoicesApiFp(configuration)
109
117
  return {
110
118
  /**
111
- *
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
+ * @summary Create the correction invoice
112
121
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
113
122
  * @param {string} [authorization] Bearer Token
123
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
114
124
  * @param {*} [options] Override http request option.
115
125
  * @throws {RequiredError}
116
126
  */
117
- createCorrectionInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCorrectionInvoicesResponseClass> {
118
- return localVarFp.createCorrectionInvoice(createInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
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));
119
129
  },
120
130
  };
121
131
  };
@@ -139,6 +149,13 @@ export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
139
149
  * @memberof CorrectionInvoicesApiCreateCorrectionInvoice
140
150
  */
141
151
  readonly authorization?: string
152
+
153
+ /**
154
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
155
+ * @type {string}
156
+ * @memberof CorrectionInvoicesApiCreateCorrectionInvoice
157
+ */
158
+ readonly idempotencyKey?: string
142
159
  }
143
160
 
144
161
  /**
@@ -149,13 +166,14 @@ export interface CorrectionInvoicesApiCreateCorrectionInvoiceRequest {
149
166
  */
150
167
  export class CorrectionInvoicesApi extends BaseAPI {
151
168
  /**
152
- *
169
+ * 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.
170
+ * @summary Create the correction invoice
153
171
  * @param {CorrectionInvoicesApiCreateCorrectionInvoiceRequest} requestParameters Request parameters.
154
172
  * @param {*} [options] Override http request option.
155
173
  * @throws {RequiredError}
156
174
  * @memberof CorrectionInvoicesApi
157
175
  */
158
176
  public createCorrectionInvoice(requestParameters: CorrectionInvoicesApiCreateCorrectionInvoiceRequest, options?: AxiosRequestConfig) {
159
- return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
177
+ return CorrectionInvoicesApiFp(this.configuration).createCorrectionInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
160
178
  }
161
179
  }
@@ -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,7 +35,8 @@ import { CreateEstimatedInvoiceResponseClass } from '../models';
35
35
  export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
36
36
  return {
37
37
  /**
38
- *
38
+ * This will create a custom estimated invoice.
39
+ * @summary Create the custom estimated invoice
39
40
  * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
40
41
  * @param {string} [authorization] Bearer Token
41
42
  * @param {*} [options] Override http request option.
@@ -81,7 +82,8 @@ export const EstimatedInvoicesApiAxiosParamCreator = function (configuration?: C
81
82
  };
82
83
  },
83
84
  /**
84
- *
85
+ * This will create an estimated invoice. It will not be saved in the database.
86
+ * @summary Create the estimated invoice
85
87
  * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
86
88
  * @param {string} [authorization] Bearer Token
87
89
  * @param {*} [options] Override http request option.
@@ -137,7 +139,8 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
137
139
  const localVarAxiosParamCreator = EstimatedInvoicesApiAxiosParamCreator(configuration)
138
140
  return {
139
141
  /**
140
- *
142
+ * This will create a custom estimated invoice.
143
+ * @summary Create the custom estimated invoice
141
144
  * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
142
145
  * @param {string} [authorization] Bearer Token
143
146
  * @param {*} [options] Override http request option.
@@ -148,7 +151,8 @@ export const EstimatedInvoicesApiFp = function(configuration?: Configuration) {
148
151
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
149
152
  },
150
153
  /**
151
- *
154
+ * This will create an estimated invoice. It will not be saved in the database.
155
+ * @summary Create the estimated invoice
152
156
  * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
153
157
  * @param {string} [authorization] Bearer Token
154
158
  * @param {*} [options] Override http request option.
@@ -169,7 +173,8 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
169
173
  const localVarFp = EstimatedInvoicesApiFp(configuration)
170
174
  return {
171
175
  /**
172
- *
176
+ * This will create a custom estimated invoice.
177
+ * @summary Create the custom estimated invoice
173
178
  * @param {CreateCustomEstimatedInvoiceRequestDto} createCustomEstimatedInvoiceRequestDto
174
179
  * @param {string} [authorization] Bearer Token
175
180
  * @param {*} [options] Override http request option.
@@ -179,7 +184,8 @@ export const EstimatedInvoicesApiFactory = function (configuration?: Configurati
179
184
  return localVarFp.createCustomEstimatedInvoice(createCustomEstimatedInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
180
185
  },
181
186
  /**
182
- *
187
+ * This will create an estimated invoice. It will not be saved in the database.
188
+ * @summary Create the estimated invoice
183
189
  * @param {CreateEstimatedInvoiceRequestDto} createEstimatedInvoiceRequestDto
184
190
  * @param {string} [authorization] Bearer Token
185
191
  * @param {*} [options] Override http request option.
@@ -241,7 +247,8 @@ export interface EstimatedInvoicesApiCreateEstimatedInvoiceRequest {
241
247
  */
242
248
  export class EstimatedInvoicesApi extends BaseAPI {
243
249
  /**
244
- *
250
+ * This will create a custom estimated invoice.
251
+ * @summary Create the custom estimated invoice
245
252
  * @param {EstimatedInvoicesApiCreateCustomEstimatedInvoiceRequest} requestParameters Request parameters.
246
253
  * @param {*} [options] Override http request option.
247
254
  * @throws {RequiredError}
@@ -252,7 +259,8 @@ export class EstimatedInvoicesApi extends BaseAPI {
252
259
  }
253
260
 
254
261
  /**
255
- *
262
+ * This will create an estimated invoice. It will not be saved in the database.
263
+ * @summary Create the estimated invoice
256
264
  * @param {EstimatedInvoicesApiCreateEstimatedInvoiceRequest} requestParameters Request parameters.
257
265
  * @param {*} [options] Override http request option.
258
266
  * @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
@@ -31,13 +31,15 @@ import { CreateInvoiceResponseClass } from '../models';
31
31
  export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Configuration) {
32
32
  return {
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
+ * @summary Create the initial invoice
35
36
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
36
37
  * @param {string} [authorization] Bearer Token
38
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
37
39
  * @param {*} [options] Override http request option.
38
40
  * @throws {RequiredError}
39
41
  */
40
- createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
42
+ createInitialInvoice: async (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
41
43
  // verify required parameter 'createInvoiceRequestDto' is not null or undefined
42
44
  assertParamExists('createInitialInvoice', 'createInvoiceRequestDto', createInvoiceRequestDto)
43
45
  const localVarPath = `/billingservice/v1/initial-invoices`;
@@ -62,6 +64,10 @@ export const InitialInvoicesApiAxiosParamCreator = function (configuration?: Con
62
64
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
63
65
  }
64
66
 
67
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
68
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
69
+ }
70
+
65
71
 
66
72
 
67
73
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -87,14 +93,16 @@ export const InitialInvoicesApiFp = function(configuration?: Configuration) {
87
93
  const localVarAxiosParamCreator = InitialInvoicesApiAxiosParamCreator(configuration)
88
94
  return {
89
95
  /**
90
- *
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
+ * @summary Create the initial invoice
91
98
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
92
99
  * @param {string} [authorization] Bearer Token
100
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
93
101
  * @param {*} [options] Override http request option.
94
102
  * @throws {RequiredError}
95
103
  */
96
- async createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInvoiceResponseClass>> {
97
- const localVarAxiosArgs = await localVarAxiosParamCreator.createInitialInvoice(createInvoiceRequestDto, authorization, options);
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);
98
106
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
99
107
  },
100
108
  }
@@ -108,14 +116,16 @@ export const InitialInvoicesApiFactory = function (configuration?: Configuration
108
116
  const localVarFp = InitialInvoicesApiFp(configuration)
109
117
  return {
110
118
  /**
111
- *
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
+ * @summary Create the initial invoice
112
121
  * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
113
122
  * @param {string} [authorization] Bearer Token
123
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
114
124
  * @param {*} [options] Override http request option.
115
125
  * @throws {RequiredError}
116
126
  */
117
- createInitialInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInvoiceResponseClass> {
118
- return localVarFp.createInitialInvoice(createInvoiceRequestDto, authorization, options).then((request) => request(axios, basePath));
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));
119
129
  },
120
130
  };
121
131
  };
@@ -139,6 +149,13 @@ export interface InitialInvoicesApiCreateInitialInvoiceRequest {
139
149
  * @memberof InitialInvoicesApiCreateInitialInvoice
140
150
  */
141
151
  readonly authorization?: string
152
+
153
+ /**
154
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
155
+ * @type {string}
156
+ * @memberof InitialInvoicesApiCreateInitialInvoice
157
+ */
158
+ readonly idempotencyKey?: string
142
159
  }
143
160
 
144
161
  /**
@@ -149,13 +166,14 @@ export interface InitialInvoicesApiCreateInitialInvoiceRequest {
149
166
  */
150
167
  export class InitialInvoicesApi extends BaseAPI {
151
168
  /**
152
- *
169
+ * 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.
170
+ * @summary Create the initial invoice
153
171
  * @param {InitialInvoicesApiCreateInitialInvoiceRequest} requestParameters Request parameters.
154
172
  * @param {*} [options] Override http request option.
155
173
  * @throws {RequiredError}
156
174
  * @memberof InitialInvoicesApi
157
175
  */
158
176
  public createInitialInvoice(requestParameters: InitialInvoicesApiCreateInitialInvoiceRequest, options?: AxiosRequestConfig) {
159
- return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
177
+ return InitialInvoicesApiFp(this.configuration).createInitialInvoice(requestParameters.createInvoiceRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then((request) => request(this.axios, this.basePath));
160
178
  }
161
179
  }