@emilgroup/billing-sdk 1.9.0 → 1.14.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 (64) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +2 -2
  3. package/api/draft-invoice-api.ts +342 -0
  4. package/api/estimated-invoices-api.ts +111 -4
  5. package/api/invoices-api.ts +108 -80
  6. package/api.ts +2 -0
  7. package/base.ts +1 -0
  8. package/dist/api/draft-invoice-api.d.ts +185 -0
  9. package/dist/api/draft-invoice-api.js +392 -0
  10. package/dist/api/estimated-invoices-api.d.ts +61 -4
  11. package/dist/api/estimated-invoices-api.js +97 -4
  12. package/dist/api/invoices-api.d.ts +92 -74
  13. package/dist/api/invoices-api.js +70 -58
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/base.js +1 -0
  17. package/dist/models/create-draft-invoice-request-dto.d.ts +89 -0
  18. package/dist/models/create-draft-invoice-request-dto.js +26 -0
  19. package/dist/models/create-estimated-invoice-for-interval-request-dto.d.ts +49 -0
  20. package/dist/models/create-estimated-invoice-for-interval-request-dto.js +15 -0
  21. package/dist/models/create-estimated-invoice-for-interval-response-class.d.ts +25 -0
  22. package/dist/models/create-estimated-invoice-for-interval-response-class.js +15 -0
  23. package/dist/models/create-estimated-invoice-request-dto.d.ts +7 -1
  24. package/dist/models/create-invoice-payment-request-dto.d.ts +1 -1
  25. package/dist/models/create-invoice-request-dto.d.ts +3 -3
  26. package/dist/models/create-invoice-status-request-dto.d.ts +1 -0
  27. package/dist/models/create-invoice-status-request-dto.js +2 -1
  28. package/dist/models/index.d.ts +3 -0
  29. package/dist/models/index.js +3 -0
  30. package/dist/models/inline-response200.d.ts +6 -6
  31. package/dist/models/inline-response503.d.ts +6 -6
  32. package/dist/models/invoice-class.d.ts +1 -0
  33. package/dist/models/invoice-class.js +2 -1
  34. package/dist/models/invoice-item-class.d.ts +12 -0
  35. package/dist/models/invoice-payment-class.d.ts +7 -1
  36. package/dist/models/invoice-status-class.d.ts +1 -0
  37. package/dist/models/invoice-status-class.js +2 -1
  38. package/dist/models/omit-type-class.d.ts +1 -0
  39. package/dist/models/omit-type-class.js +2 -1
  40. package/dist/models/policy-dto.d.ts +9 -2
  41. package/dist/models/policy-dto.js +3 -2
  42. package/dist/models/policy-object-dto.d.ts +24 -0
  43. package/dist/models/policy-version-dto.d.ts +9 -3
  44. package/dist/models/timeslice-dto.d.ts +1 -1
  45. package/models/create-draft-invoice-request-dto.ts +98 -0
  46. package/models/create-estimated-invoice-for-interval-request-dto.ts +55 -0
  47. package/models/create-estimated-invoice-for-interval-response-class.ts +31 -0
  48. package/models/create-estimated-invoice-request-dto.ts +7 -1
  49. package/models/create-invoice-payment-request-dto.ts +1 -1
  50. package/models/create-invoice-request-dto.ts +3 -3
  51. package/models/create-invoice-status-request-dto.ts +2 -1
  52. package/models/index.ts +3 -0
  53. package/models/inline-response200.ts +6 -6
  54. package/models/inline-response503.ts +6 -6
  55. package/models/invoice-class.ts +2 -1
  56. package/models/invoice-item-class.ts +12 -0
  57. package/models/invoice-payment-class.ts +7 -1
  58. package/models/invoice-status-class.ts +2 -1
  59. package/models/omit-type-class.ts +2 -1
  60. package/models/policy-dto.ts +10 -3
  61. package/models/policy-object-dto.ts +24 -0
  62. package/models/policy-version-dto.ts +9 -3
  63. package/models/timeslice-dto.ts +1 -1
  64. package/package.json +1 -2
@@ -93,8 +93,8 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
97
- * @summary List invoices
96
+ * Gets an invoice.
97
+ * @summary Retrieve the invoice
98
98
  * @param {string} code
99
99
  * @param {string} expand
100
100
  * @param {string} [authorization] Bearer Token
@@ -147,19 +147,20 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
147
147
  });
148
148
  },
149
149
  /**
150
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
150
+ * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
151
151
  * @summary List invoices
152
152
  * @param {string} [authorization] Bearer Token
153
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
153
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
154
154
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
155
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
156
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
157
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
158
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
155
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
156
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
157
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id</i>
158
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments.<i>
159
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
159
160
  * @param {*} [options] Override http request option.
160
161
  * @throws {RequiredError}
161
162
  */
162
- listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
163
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
163
164
  if (options === void 0) { options = {}; }
164
165
  return __awaiter(_this, void 0, void 0, function () {
165
166
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -200,6 +201,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
200
201
  if (expand !== undefined) {
201
202
  localVarQueryParameter['expand'] = expand;
202
203
  }
204
+ if (filters !== undefined) {
205
+ localVarQueryParameter['filters'] = filters;
206
+ }
203
207
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
204
208
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
205
209
  }
@@ -215,19 +219,20 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
215
219
  });
216
220
  },
217
221
  /**
218
- * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
222
+ * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
219
223
  * @summary List policies billing dates
220
224
  * @param {string} [authorization] Bearer Token
221
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
225
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
222
226
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
223
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
224
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
225
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
226
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
227
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
228
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
229
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
230
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: .<i>
231
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
227
232
  * @param {*} [options] Override http request option.
228
233
  * @throws {RequiredError}
229
234
  */
230
- listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
235
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
231
236
  if (options === void 0) { options = {}; }
232
237
  return __awaiter(_this, void 0, void 0, function () {
233
238
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -268,6 +273,9 @@ var InvoicesApiAxiosParamCreator = function (configuration) {
268
273
  if (expand !== undefined) {
269
274
  localVarQueryParameter['expand'] = expand;
270
275
  }
276
+ if (filters !== undefined) {
277
+ localVarQueryParameter['filters'] = filters;
278
+ }
271
279
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
272
280
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
273
281
  }
@@ -293,8 +301,8 @@ var InvoicesApiFp = function (configuration) {
293
301
  var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
294
302
  return {
295
303
  /**
296
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
297
- * @summary List invoices
304
+ * Gets an invoice.
305
+ * @summary Retrieve the invoice
298
306
  * @param {string} code
299
307
  * @param {string} expand
300
308
  * @param {string} [authorization] Bearer Token
@@ -315,24 +323,25 @@ var InvoicesApiFp = function (configuration) {
315
323
  });
316
324
  },
317
325
  /**
318
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
326
+ * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
319
327
  * @summary List invoices
320
328
  * @param {string} [authorization] Bearer Token
321
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
329
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
322
330
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
323
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
324
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
325
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
326
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
331
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
332
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
333
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id</i>
334
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments.<i>
335
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
327
336
  * @param {*} [options] Override http request option.
328
337
  * @throws {RequiredError}
329
338
  */
330
- listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
339
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
331
340
  return __awaiter(this, void 0, void 0, function () {
332
341
  var localVarAxiosArgs;
333
342
  return __generator(this, function (_a) {
334
343
  switch (_a.label) {
335
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, options)];
344
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
336
345
  case 1:
337
346
  localVarAxiosArgs = _a.sent();
338
347
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -341,24 +350,25 @@ var InvoicesApiFp = function (configuration) {
341
350
  });
342
351
  },
343
352
  /**
344
- * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
353
+ * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
345
354
  * @summary List policies billing dates
346
355
  * @param {string} [authorization] Bearer Token
347
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
356
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
348
357
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
349
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
350
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
351
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
352
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
358
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
359
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
360
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
361
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: .<i>
362
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
353
363
  * @param {*} [options] Override http request option.
354
364
  * @throws {RequiredError}
355
365
  */
356
- listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
366
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
357
367
  return __awaiter(this, void 0, void 0, function () {
358
368
  var localVarAxiosArgs;
359
369
  return __generator(this, function (_a) {
360
370
  switch (_a.label) {
361
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, options)];
371
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
362
372
  case 1:
363
373
  localVarAxiosArgs = _a.sent();
364
374
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -377,8 +387,8 @@ var InvoicesApiFactory = function (configuration, basePath, axios) {
377
387
  var localVarFp = (0, exports.InvoicesApiFp)(configuration);
378
388
  return {
379
389
  /**
380
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
381
- * @summary List invoices
390
+ * Gets an invoice.
391
+ * @summary Retrieve the invoice
382
392
  * @param {string} code
383
393
  * @param {string} expand
384
394
  * @param {string} [authorization] Bearer Token
@@ -389,36 +399,38 @@ var InvoicesApiFactory = function (configuration, basePath, axios) {
389
399
  return localVarFp.getInvoice(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
390
400
  },
391
401
  /**
392
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
402
+ * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
393
403
  * @summary List invoices
394
404
  * @param {string} [authorization] Bearer Token
395
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
405
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
396
406
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
397
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
398
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
399
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
400
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
407
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
408
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
409
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id</i>
410
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: statuses, payments.<i>
411
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt</i>
401
412
  * @param {*} [options] Override http request option.
402
413
  * @throws {RequiredError}
403
414
  */
404
- listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
405
- return localVarFp.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
415
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
416
+ return localVarFp.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
406
417
  },
407
418
  /**
408
- * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
419
+ * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
409
420
  * @summary List policies billing dates
410
421
  * @param {string} [authorization] Bearer Token
411
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
422
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
412
423
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
413
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
414
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
415
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
416
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
424
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
425
+ * @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
426
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
427
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/> <i>Allowed values: .<i>
428
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo</i>
417
429
  * @param {*} [options] Override http request option.
418
430
  * @throws {RequiredError}
419
431
  */
420
- listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
421
- return localVarFp.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
432
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
433
+ return localVarFp.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
422
434
  },
423
435
  };
424
436
  };
@@ -435,8 +447,8 @@ var InvoicesApi = /** @class */ (function (_super) {
435
447
  return _super !== null && _super.apply(this, arguments) || this;
436
448
  }
437
449
  /**
438
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
439
- * @summary List invoices
450
+ * Gets an invoice.
451
+ * @summary Retrieve the invoice
440
452
  * @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
441
453
  * @param {*} [options] Override http request option.
442
454
  * @throws {RequiredError}
@@ -447,7 +459,7 @@ var InvoicesApi = /** @class */ (function (_super) {
447
459
  return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
448
460
  };
449
461
  /**
450
- * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
462
+ * Returns a list of invoices you have previously created. The invoices are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
451
463
  * @summary List invoices
452
464
  * @param {InvoicesApiListInvoicesRequest} requestParameters Request parameters.
453
465
  * @param {*} [options] Override http request option.
@@ -457,10 +469,10 @@ var InvoicesApi = /** @class */ (function (_super) {
457
469
  InvoicesApi.prototype.listInvoices = function (requestParameters, options) {
458
470
  var _this = this;
459
471
  if (requestParameters === void 0) { requestParameters = {}; }
460
- return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
472
+ return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
461
473
  };
462
474
  /**
463
- * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
475
+ * Returns a list of policies billing dates you have previously created. The policies billing dates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
464
476
  * @summary List policies billing dates
465
477
  * @param {InvoicesApiListPoliciesBillingDatesRequest} requestParameters Request parameters.
466
478
  * @param {*} [options] Override http request option.
@@ -470,7 +482,7 @@ var InvoicesApi = /** @class */ (function (_super) {
470
482
  InvoicesApi.prototype.listPoliciesBillingDates = function (requestParameters, options) {
471
483
  var _this = this;
472
484
  if (requestParameters === void 0) { requestParameters = {}; }
473
- return (0, exports.InvoicesApiFp)(this.configuration).listPoliciesBillingDates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
485
+ return (0, exports.InvoicesApiFp)(this.configuration).listPoliciesBillingDates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
474
486
  };
475
487
  return InvoicesApi;
476
488
  }(base_1.BaseAPI));
package/dist/api.d.ts CHANGED
@@ -11,6 +11,7 @@
11
11
  */
12
12
  export * from './api/correction-invoices-api';
13
13
  export * from './api/default-api';
14
+ export * from './api/draft-invoice-api';
14
15
  export * from './api/estimated-invoices-api';
15
16
  export * from './api/initial-invoices-api';
16
17
  export * from './api/invoices-api';
package/dist/api.js CHANGED
@@ -29,6 +29,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./api/correction-invoices-api"), exports);
31
31
  __exportStar(require("./api/default-api"), exports);
32
+ __exportStar(require("./api/draft-invoice-api"), exports);
32
33
  __exportStar(require("./api/estimated-invoices-api"), exports);
33
34
  __exportStar(require("./api/initial-invoices-api"), exports);
34
35
  __exportStar(require("./api/invoices-api"), exports);
package/dist/base.js CHANGED
@@ -125,6 +125,7 @@ var BaseAPI = /** @class */ (function () {
125
125
  if (configuration) {
126
126
  this.configuration = configuration;
127
127
  this.basePath = configuration.basePath || this.basePath;
128
+ this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
128
129
  }
129
130
  else {
130
131
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * EMIL BillingService
3
+ * The EMIL BillingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateDraftInvoiceRequestDto
16
+ */
17
+ export interface CreateDraftInvoiceRequestDto {
18
+ /**
19
+ * Invoice type.
20
+ * @type {string}
21
+ * @memberof CreateDraftInvoiceRequestDto
22
+ */
23
+ 'type': CreateDraftInvoiceRequestDtoTypeEnum;
24
+ /**
25
+ * Unique number for the invoice. If not set, the system will automatically assign a value.
26
+ * @type {string}
27
+ * @memberof CreateDraftInvoiceRequestDto
28
+ */
29
+ 'invoiceNumber'?: string;
30
+ /**
31
+ * Unique identifier of the policy that this object belongs to.
32
+ * @type {string}
33
+ * @memberof CreateDraftInvoiceRequestDto
34
+ */
35
+ 'policyCode': string;
36
+ /**
37
+ * Account number.
38
+ * @type {string}
39
+ * @memberof CreateDraftInvoiceRequestDto
40
+ */
41
+ 'accountNumber': string;
42
+ /**
43
+ * Metadata contains extra information that the object would need for specific cases.
44
+ * @type {object}
45
+ * @memberof CreateDraftInvoiceRequestDto
46
+ */
47
+ 'metadata': object;
48
+ /**
49
+ * This is the date from which the invoice interval starts.
50
+ * @type {string}
51
+ * @memberof CreateDraftInvoiceRequestDto
52
+ */
53
+ 'billingIntervalFrom'?: string;
54
+ /**
55
+ * This is the date that the invoice interval ends.
56
+ * @type {string}
57
+ * @memberof CreateDraftInvoiceRequestDto
58
+ */
59
+ 'billingIntervalTo'?: string;
60
+ /**
61
+ * Invoice due date.
62
+ * @type {string}
63
+ * @memberof CreateDraftInvoiceRequestDto
64
+ */
65
+ 'dueDate'?: string;
66
+ /**
67
+ * Policy number.
68
+ * @type {string}
69
+ * @memberof CreateDraftInvoiceRequestDto
70
+ */
71
+ 'policyNumber'?: string;
72
+ /**
73
+ * A boolean flag indicating whether the invoice should be calculated on a pro rata basis. When true, the invoice amount is adjusted proportionally based on the duration of service.
74
+ * @type {object}
75
+ * @memberof CreateDraftInvoiceRequestDto
76
+ */
77
+ 'calculateProRata'?: object;
78
+ }
79
+ export declare const CreateDraftInvoiceRequestDtoTypeEnum: {
80
+ readonly Initial: "initial";
81
+ readonly Recurring: "recurring";
82
+ readonly Correction: "correction";
83
+ readonly Estimated: "estimated";
84
+ readonly Penalty: "penalty";
85
+ readonly Other: "other";
86
+ readonly Withdraw: "withdraw";
87
+ readonly Final: "final";
88
+ };
89
+ export type CreateDraftInvoiceRequestDtoTypeEnum = typeof CreateDraftInvoiceRequestDtoTypeEnum[keyof typeof CreateDraftInvoiceRequestDtoTypeEnum];
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL BillingService
6
+ * The EMIL BillingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CreateDraftInvoiceRequestDtoTypeEnum = void 0;
17
+ exports.CreateDraftInvoiceRequestDtoTypeEnum = {
18
+ Initial: 'initial',
19
+ Recurring: 'recurring',
20
+ Correction: 'correction',
21
+ Estimated: 'estimated',
22
+ Penalty: 'penalty',
23
+ Other: 'other',
24
+ Withdraw: 'withdraw',
25
+ Final: 'final'
26
+ };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * EMIL BillingService
3
+ * The EMIL BillingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { PolicyDto } from './policy-dto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateEstimatedInvoiceForIntervalRequestDto
17
+ */
18
+ export interface CreateEstimatedInvoiceForIntervalRequestDto {
19
+ /**
20
+ * The policy object that the invoice is attached to. This contains all relevant policy details associated with this invoice.
21
+ * @type {PolicyDto}
22
+ * @memberof CreateEstimatedInvoiceForIntervalRequestDto
23
+ */
24
+ 'policy': PolicyDto;
25
+ /**
26
+ * Metadata contains extra information that the object would need for specific cases.
27
+ * @type {object}
28
+ * @memberof CreateEstimatedInvoiceForIntervalRequestDto
29
+ */
30
+ 'metadata'?: object;
31
+ /**
32
+ * A boolean flag indicating whether the invoice should be calculated on a pro rata basis. When true, the invoice amount is adjusted proportionally based on the duration of service.
33
+ * @type {boolean}
34
+ * @memberof CreateEstimatedInvoiceForIntervalRequestDto
35
+ */
36
+ 'calculateProRata'?: boolean;
37
+ /**
38
+ * The start date of the billing interval. This is the date from which the invoice period begins.
39
+ * @type {string}
40
+ * @memberof CreateEstimatedInvoiceForIntervalRequestDto
41
+ */
42
+ 'billingIntervalFrom': string;
43
+ /**
44
+ * The end date of the billing interval. This is the date until which the invoice period runs. Together with billingIntervalFrom, it defines the time period for which the invoice is issued.
45
+ * @type {string}
46
+ * @memberof CreateEstimatedInvoiceForIntervalRequestDto
47
+ */
48
+ 'billingIntervalTo': string;
49
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL BillingService
6
+ * The EMIL BillingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL BillingService
3
+ * The EMIL BillingService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { InvoiceClass } from './invoice-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CreateEstimatedInvoiceForIntervalResponseClass
17
+ */
18
+ export interface CreateEstimatedInvoiceForIntervalResponseClass {
19
+ /**
20
+ * Estimated invoice response
21
+ * @type {InvoiceClass}
22
+ * @memberof CreateEstimatedInvoiceForIntervalResponseClass
23
+ */
24
+ 'invoice': InvoiceClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL BillingService
6
+ * The EMIL BillingService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -27,5 +27,11 @@ export interface CreateEstimatedInvoiceRequestDto {
27
27
  * @type {object}
28
28
  * @memberof CreateEstimatedInvoiceRequestDto
29
29
  */
30
- 'metadata': object;
30
+ 'metadata'?: object;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof CreateEstimatedInvoiceRequestDto
35
+ */
36
+ 'calculateProRata'?: boolean;
31
37
  }
@@ -40,7 +40,7 @@ export interface CreateInvoicePaymentRequestDto {
40
40
  */
41
41
  'comment'?: string;
42
42
  /**
43
- * Payment id.
43
+ * Unique identifier referencing the payment.
44
44
  * @type {number}
45
45
  * @memberof CreateInvoicePaymentRequestDto
46
46
  */
@@ -44,7 +44,7 @@ export interface CreateInvoiceRequestDto {
44
44
  * @type {string}
45
45
  * @memberof CreateInvoiceRequestDto
46
46
  */
47
- 'type': CreateInvoiceRequestDtoTypeEnum;
47
+ 'type'?: CreateInvoiceRequestDtoTypeEnum;
48
48
  /**
49
49
  * Metadata contains extra information that the object would need for specific cases.
50
50
  * @type {object}
@@ -52,13 +52,13 @@ export interface CreateInvoiceRequestDto {
52
52
  */
53
53
  'metadata'?: object;
54
54
  /**
55
- * This is the date from which the invoice item interval starts.
55
+ * This is the date from which the invoice interval starts.
56
56
  * @type {string}
57
57
  * @memberof CreateInvoiceRequestDto
58
58
  */
59
59
  'billingIntervalFrom': string;
60
60
  /**
61
- * This is the date that the invoice item interval ends.
61
+ * This is the date that the invoice interval ends.
62
62
  * @type {string}
63
63
  * @memberof CreateInvoiceRequestDto
64
64
  */
@@ -32,5 +32,6 @@ export declare const CreateInvoiceStatusRequestDtoStatusEnum: {
32
32
  readonly Open: "open";
33
33
  readonly Paid: "paid";
34
34
  readonly PartiallyPaid: "partially-paid";
35
+ readonly Refunded: "refunded";
35
36
  };
36
37
  export type CreateInvoiceStatusRequestDtoStatusEnum = typeof CreateInvoiceStatusRequestDtoStatusEnum[keyof typeof CreateInvoiceStatusRequestDtoStatusEnum];
@@ -17,5 +17,6 @@ exports.CreateInvoiceStatusRequestDtoStatusEnum = void 0;
17
17
  exports.CreateInvoiceStatusRequestDtoStatusEnum = {
18
18
  Open: 'open',
19
19
  Paid: 'paid',
20
- PartiallyPaid: 'partially-paid'
20
+ PartiallyPaid: 'partially-paid',
21
+ Refunded: 'refunded'
21
22
  };