@emilgroup/billing-sdk 1.8.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.openapi-generator/FILES +3 -16
  2. package/README.md +2 -2
  3. package/api/correction-invoices-api.ts +2 -4
  4. package/api/draft-invoice-api.ts +342 -0
  5. package/api/estimated-invoices-api.ts +112 -11
  6. package/api/initial-invoices-api.ts +2 -4
  7. package/api/invoices-api.ts +110 -88
  8. package/api/recurring-invoices-api.ts +2 -4
  9. package/api.ts +2 -0
  10. package/base.ts +1 -0
  11. package/dist/api/correction-invoices-api.d.ts +105 -0
  12. package/dist/api/correction-invoices-api.js +230 -0
  13. package/dist/api/default-api.d.ts +66 -0
  14. package/dist/api/default-api.js +196 -0
  15. package/dist/api/draft-invoice-api.d.ts +185 -0
  16. package/dist/api/draft-invoice-api.js +392 -0
  17. package/dist/api/estimated-invoices-api.d.ts +208 -0
  18. package/dist/api/estimated-invoices-api.js +410 -0
  19. package/dist/api/initial-invoices-api.d.ts +105 -0
  20. package/dist/api/initial-invoices-api.js +230 -0
  21. package/dist/api/invoices-api.d.ts +322 -0
  22. package/dist/api/invoices-api.js +489 -0
  23. package/dist/api/recurring-invoices-api.d.ts +105 -0
  24. package/dist/api/recurring-invoices-api.js +230 -0
  25. package/dist/api.d.ts +18 -0
  26. package/dist/api.js +36 -0
  27. package/dist/base.d.ts +74 -0
  28. package/dist/base.js +299 -0
  29. package/dist/common.d.ts +91 -0
  30. package/dist/common.js +276 -0
  31. package/dist/configuration.d.ts +83 -0
  32. package/dist/configuration.js +44 -0
  33. package/dist/index.d.ts +15 -0
  34. package/dist/index.js +36 -0
  35. package/dist/models/create-custom-estimated-invoice-request-dto.d.ts +35 -0
  36. package/{models/create-custom-estimated-invoice-response-class.ts → dist/models/create-custom-estimated-invoice-request-dto.js} +7 -17
  37. package/dist/models/create-draft-invoice-request-dto.d.ts +89 -0
  38. package/dist/models/create-draft-invoice-request-dto.js +26 -0
  39. package/dist/models/create-estimated-invoice-for-interval-request-dto.d.ts +49 -0
  40. package/{models/get-invoice-response-class.ts → dist/models/create-estimated-invoice-for-interval-request-dto.js} +2 -18
  41. package/dist/models/create-estimated-invoice-request-dto.d.ts +31 -0
  42. package/{models/create-invoice-response-class.ts → dist/models/create-estimated-invoice-request-dto.js} +2 -18
  43. package/dist/models/create-invoice-payment-request-dto.d.ts +48 -0
  44. package/{models/invoice-payments-class.ts → dist/models/create-invoice-payment-request-dto.js} +2 -18
  45. package/dist/models/create-invoice-request-dto.d.ts +83 -0
  46. package/dist/models/create-invoice-request-dto.js +26 -0
  47. package/dist/models/index.d.ts +17 -0
  48. package/dist/models/index.js +33 -0
  49. package/dist/models/inline-response200.d.ts +54 -0
  50. package/dist/models/inline-response200.js +15 -0
  51. package/dist/models/inline-response503.d.ts +54 -0
  52. package/dist/models/inline-response503.js +15 -0
  53. package/dist/models/list-request-dto.d.ts +54 -0
  54. package/dist/models/list-request-dto.js +15 -0
  55. package/dist/models/policy-dto.d.ts +109 -0
  56. package/dist/models/policy-dto.js +15 -0
  57. package/dist/models/policy-object-dto.d.ts +66 -0
  58. package/dist/models/policy-object-dto.js +15 -0
  59. package/dist/models/policy-premium-dto.d.ts +49 -0
  60. package/dist/models/policy-premium-dto.js +15 -0
  61. package/dist/models/policy-premium-item-dto.d.ts +55 -0
  62. package/dist/models/policy-premium-item-dto.js +15 -0
  63. package/dist/models/policy-version-dto.d.ts +61 -0
  64. package/dist/models/policy-version-dto.js +15 -0
  65. package/dist/models/premium-formula-dto.d.ts +72 -0
  66. package/dist/models/premium-formula-dto.js +15 -0
  67. package/dist/models/revert-invoice-request-dto.d.ts +24 -0
  68. package/dist/models/revert-invoice-request-dto.js +15 -0
  69. package/dist/models/timeslice-dto.d.ts +62 -0
  70. package/dist/models/timeslice-dto.js +15 -0
  71. package/models/create-draft-invoice-request-dto.ts +98 -0
  72. package/models/create-estimated-invoice-for-interval-request-dto.ts +55 -0
  73. package/models/create-invoice-payment-request-dto.ts +2 -8
  74. package/models/create-invoice-request-dto.ts +11 -5
  75. package/models/index.ts +2 -16
  76. package/models/inline-response200.ts +6 -6
  77. package/models/inline-response503.ts +6 -6
  78. package/models/policy-dto.ts +5 -21
  79. package/models/policy-object-dto.ts +20 -2
  80. package/models/policy-premium-dto.ts +2 -2
  81. package/models/policy-premium-item-dto.ts +2 -2
  82. package/models/policy-version-dto.ts +6 -0
  83. package/models/premium-formula-dto.ts +2 -2
  84. package/package.json +1 -1
  85. package/models/create-correction-invoices-response-class.ts +0 -31
  86. package/models/create-estimated-invoice-response-class.ts +0 -37
  87. package/models/create-invoice-status-request-dto.ts +0 -45
  88. package/models/create-termination-invoice-request-dto.ts +0 -54
  89. package/models/invoice-class.ts +0 -174
  90. package/models/invoice-item-class.ts +0 -138
  91. package/models/invoice-payment-class.ts +0 -102
  92. package/models/invoice-status-class.ts +0 -57
  93. package/models/list-invoices-response-class.ts +0 -37
  94. package/models/list-policies-billing-dates-response-class.ts +0 -37
  95. package/models/omit-type-class.ts +0 -167
  96. package/models/policy-billing-date-class.ts +0 -48
@@ -0,0 +1,489 @@
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
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * InvoicesApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var InvoicesApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * Gets an invoice.
97
+ * @summary Retrieve the invoice
98
+ * @param {string} code
99
+ * @param {string} expand
100
+ * @param {string} [authorization] Bearer Token
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ getInvoice: function (code, expand, authorization, options) {
105
+ if (options === void 0) { options = {}; }
106
+ return __awaiter(_this, void 0, void 0, function () {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0:
111
+ // verify required parameter 'code' is not null or undefined
112
+ (0, common_1.assertParamExists)('getInvoice', 'code', code);
113
+ // verify required parameter 'expand' is not null or undefined
114
+ (0, common_1.assertParamExists)('getInvoice', 'expand', expand);
115
+ localVarPath = "/billingservice/v1/invoices/{code}"
116
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
117
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (expand !== undefined) {
133
+ localVarQueryParameter['expand'] = expand;
134
+ }
135
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
136
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
137
+ }
138
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
139
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
140
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
141
+ return [2 /*return*/, {
142
+ url: (0, common_1.toPathString)(localVarUrlObj),
143
+ options: localVarRequestOptions,
144
+ }];
145
+ }
146
+ });
147
+ });
148
+ },
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.
151
+ * @summary List invoices
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 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
155
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
156
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments.&lt;i&gt;
159
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ */
163
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
164
+ if (options === void 0) { options = {}; }
165
+ return __awaiter(_this, void 0, void 0, function () {
166
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
167
+ return __generator(this, function (_a) {
168
+ switch (_a.label) {
169
+ case 0:
170
+ localVarPath = "/billingservice/v1/invoices";
171
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ baseAccessToken = configuration.accessToken;
175
+ }
176
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
177
+ localVarHeaderParameter = {};
178
+ localVarQueryParameter = {};
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
182
+ case 1:
183
+ // authentication bearer required
184
+ // http bearer authentication required
185
+ _a.sent();
186
+ if (pageSize !== undefined) {
187
+ localVarQueryParameter['pageSize'] = pageSize;
188
+ }
189
+ if (pageToken !== undefined) {
190
+ localVarQueryParameter['pageToken'] = pageToken;
191
+ }
192
+ if (filter !== undefined) {
193
+ localVarQueryParameter['filter'] = filter;
194
+ }
195
+ if (search !== undefined) {
196
+ localVarQueryParameter['search'] = search;
197
+ }
198
+ if (order !== undefined) {
199
+ localVarQueryParameter['order'] = order;
200
+ }
201
+ if (expand !== undefined) {
202
+ localVarQueryParameter['expand'] = expand;
203
+ }
204
+ if (filters !== undefined) {
205
+ localVarQueryParameter['filters'] = filters;
206
+ }
207
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
208
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
209
+ }
210
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
211
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
212
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
213
+ return [2 /*return*/, {
214
+ url: (0, common_1.toPathString)(localVarUrlObj),
215
+ options: localVarRequestOptions,
216
+ }];
217
+ }
218
+ });
219
+ });
220
+ },
221
+ /**
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.
223
+ * @summary List policies billing dates
224
+ * @param {string} [authorization] Bearer Token
225
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
227
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
228
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
231
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
236
+ if (options === void 0) { options = {}; }
237
+ return __awaiter(_this, void 0, void 0, function () {
238
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
239
+ return __generator(this, function (_a) {
240
+ switch (_a.label) {
241
+ case 0:
242
+ localVarPath = "/billingservice/v1/invoices/policies-billing-dates";
243
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
244
+ if (configuration) {
245
+ baseOptions = configuration.baseOptions;
246
+ baseAccessToken = configuration.accessToken;
247
+ }
248
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
249
+ localVarHeaderParameter = {};
250
+ localVarQueryParameter = {};
251
+ // authentication bearer required
252
+ // http bearer authentication required
253
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
254
+ case 1:
255
+ // authentication bearer required
256
+ // http bearer authentication required
257
+ _a.sent();
258
+ if (pageSize !== undefined) {
259
+ localVarQueryParameter['pageSize'] = pageSize;
260
+ }
261
+ if (pageToken !== undefined) {
262
+ localVarQueryParameter['pageToken'] = pageToken;
263
+ }
264
+ if (filter !== undefined) {
265
+ localVarQueryParameter['filter'] = filter;
266
+ }
267
+ if (search !== undefined) {
268
+ localVarQueryParameter['search'] = search;
269
+ }
270
+ if (order !== undefined) {
271
+ localVarQueryParameter['order'] = order;
272
+ }
273
+ if (expand !== undefined) {
274
+ localVarQueryParameter['expand'] = expand;
275
+ }
276
+ if (filters !== undefined) {
277
+ localVarQueryParameter['filters'] = filters;
278
+ }
279
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ }
282
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
283
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
284
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
285
+ return [2 /*return*/, {
286
+ url: (0, common_1.toPathString)(localVarUrlObj),
287
+ options: localVarRequestOptions,
288
+ }];
289
+ }
290
+ });
291
+ });
292
+ },
293
+ };
294
+ };
295
+ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
296
+ /**
297
+ * InvoicesApi - functional programming interface
298
+ * @export
299
+ */
300
+ var InvoicesApiFp = function (configuration) {
301
+ var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
302
+ return {
303
+ /**
304
+ * Gets an invoice.
305
+ * @summary Retrieve the invoice
306
+ * @param {string} code
307
+ * @param {string} expand
308
+ * @param {string} [authorization] Bearer Token
309
+ * @param {*} [options] Override http request option.
310
+ * @throws {RequiredError}
311
+ */
312
+ getInvoice: function (code, expand, authorization, options) {
313
+ return __awaiter(this, void 0, void 0, function () {
314
+ var localVarAxiosArgs;
315
+ return __generator(this, function (_a) {
316
+ switch (_a.label) {
317
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getInvoice(code, expand, authorization, options)];
318
+ case 1:
319
+ localVarAxiosArgs = _a.sent();
320
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
321
+ }
322
+ });
323
+ });
324
+ },
325
+ /**
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.
327
+ * @summary List invoices
328
+ * @param {string} [authorization] Bearer Token
329
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
331
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
332
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments.&lt;i&gt;
335
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
340
+ return __awaiter(this, void 0, void 0, function () {
341
+ var localVarAxiosArgs;
342
+ return __generator(this, function (_a) {
343
+ switch (_a.label) {
344
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
345
+ case 1:
346
+ localVarAxiosArgs = _a.sent();
347
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
348
+ }
349
+ });
350
+ });
351
+ },
352
+ /**
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.
354
+ * @summary List policies billing dates
355
+ * @param {string} [authorization] Bearer Token
356
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
358
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
359
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
362
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
367
+ return __awaiter(this, void 0, void 0, function () {
368
+ var localVarAxiosArgs;
369
+ return __generator(this, function (_a) {
370
+ switch (_a.label) {
371
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
372
+ case 1:
373
+ localVarAxiosArgs = _a.sent();
374
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
375
+ }
376
+ });
377
+ });
378
+ },
379
+ };
380
+ };
381
+ exports.InvoicesApiFp = InvoicesApiFp;
382
+ /**
383
+ * InvoicesApi - factory interface
384
+ * @export
385
+ */
386
+ var InvoicesApiFactory = function (configuration, basePath, axios) {
387
+ var localVarFp = (0, exports.InvoicesApiFp)(configuration);
388
+ return {
389
+ /**
390
+ * Gets an invoice.
391
+ * @summary Retrieve the invoice
392
+ * @param {string} code
393
+ * @param {string} expand
394
+ * @param {string} [authorization] Bearer Token
395
+ * @param {*} [options] Override http request option.
396
+ * @throws {RequiredError}
397
+ */
398
+ getInvoice: function (code, expand, authorization, options) {
399
+ return localVarFp.getInvoice(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
400
+ },
401
+ /**
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.
403
+ * @summary List invoices
404
+ * @param {string} [authorization] Bearer Token
405
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
407
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
408
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: invoiceNumber, status, netAmount, grossAmount, createdAt, dueDate, id&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: statuses, payments.&lt;i&gt;
411
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, policyCode, id, type, accountNumber, status, billingIntervalFrom, billingIntervalTo, createdAt&lt;/i&gt;
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
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); });
417
+ },
418
+ /**
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.
420
+ * @summary List policies billing dates
421
+ * @param {string} [authorization] Bearer Token
422
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
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&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
424
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
425
+ * @param {any} [search] To search the list by any field, pass search&#x3D;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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: createdAt&lt;/i&gt;
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.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
428
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: policyCode, isInvoiced, nextBillingDate, accountNumber, status, billingIntervalFrom, billingIntervalTo&lt;/i&gt;
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ */
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); });
434
+ },
435
+ };
436
+ };
437
+ exports.InvoicesApiFactory = InvoicesApiFactory;
438
+ /**
439
+ * InvoicesApi - object-oriented interface
440
+ * @export
441
+ * @class InvoicesApi
442
+ * @extends {BaseAPI}
443
+ */
444
+ var InvoicesApi = /** @class */ (function (_super) {
445
+ __extends(InvoicesApi, _super);
446
+ function InvoicesApi() {
447
+ return _super !== null && _super.apply(this, arguments) || this;
448
+ }
449
+ /**
450
+ * Gets an invoice.
451
+ * @summary Retrieve the invoice
452
+ * @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ * @memberof InvoicesApi
456
+ */
457
+ InvoicesApi.prototype.getInvoice = function (requestParameters, options) {
458
+ var _this = this;
459
+ return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
460
+ };
461
+ /**
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.
463
+ * @summary List invoices
464
+ * @param {InvoicesApiListInvoicesRequest} requestParameters Request parameters.
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ * @memberof InvoicesApi
468
+ */
469
+ InvoicesApi.prototype.listInvoices = function (requestParameters, options) {
470
+ var _this = this;
471
+ if (requestParameters === void 0) { requestParameters = {}; }
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); });
473
+ };
474
+ /**
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.
476
+ * @summary List policies billing dates
477
+ * @param {InvoicesApiListPoliciesBillingDatesRequest} requestParameters Request parameters.
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ * @memberof InvoicesApi
481
+ */
482
+ InvoicesApi.prototype.listPoliciesBillingDates = function (requestParameters, options) {
483
+ var _this = this;
484
+ if (requestParameters === void 0) { requestParameters = {}; }
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); });
486
+ };
487
+ return InvoicesApi;
488
+ }(base_1.BaseAPI));
489
+ exports.InvoicesApi = InvoicesApi;
@@ -0,0 +1,105 @@
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateInvoiceRequestDto } from '../models';
16
+ /**
17
+ * RecurringInvoicesApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const RecurringInvoicesApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ * This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
23
+ * @summary Create the recurring invoice
24
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
25
+ * @param {string} [authorization] Bearer Token
26
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
27
+ * @param {*} [options] Override http request option.
28
+ * @throws {RequiredError}
29
+ */
30
+ createRecurringInvoice: (createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ };
32
+ /**
33
+ * RecurringInvoicesApi - functional programming interface
34
+ * @export
35
+ */
36
+ export declare const RecurringInvoicesApiFp: (configuration?: Configuration) => {
37
+ /**
38
+ * This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
39
+ * @summary Create the recurring invoice
40
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
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.
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ */
46
+ createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
47
+ };
48
+ /**
49
+ * RecurringInvoicesApi - factory interface
50
+ * @export
51
+ */
52
+ export declare const RecurringInvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
53
+ /**
54
+ * This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
55
+ * @summary Create the recurring invoice
56
+ * @param {CreateInvoiceRequestDto} createInvoiceRequestDto
57
+ * @param {string} [authorization] Bearer Token
58
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ createRecurringInvoice(createInvoiceRequestDto: CreateInvoiceRequestDto, authorization?: string, idempotencyKey?: string, options?: any): AxiosPromise<void>;
63
+ };
64
+ /**
65
+ * Request parameters for createRecurringInvoice operation in RecurringInvoicesApi.
66
+ * @export
67
+ * @interface RecurringInvoicesApiCreateRecurringInvoiceRequest
68
+ */
69
+ export interface RecurringInvoicesApiCreateRecurringInvoiceRequest {
70
+ /**
71
+ *
72
+ * @type {CreateInvoiceRequestDto}
73
+ * @memberof RecurringInvoicesApiCreateRecurringInvoice
74
+ */
75
+ readonly createInvoiceRequestDto: CreateInvoiceRequestDto;
76
+ /**
77
+ * Bearer Token
78
+ * @type {string}
79
+ * @memberof RecurringInvoicesApiCreateRecurringInvoice
80
+ */
81
+ readonly authorization?: string;
82
+ /**
83
+ * Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
84
+ * @type {string}
85
+ * @memberof RecurringInvoicesApiCreateRecurringInvoice
86
+ */
87
+ readonly idempotencyKey?: string;
88
+ }
89
+ /**
90
+ * RecurringInvoicesApi - object-oriented interface
91
+ * @export
92
+ * @class RecurringInvoicesApi
93
+ * @extends {BaseAPI}
94
+ */
95
+ export declare class RecurringInvoicesApi extends BaseAPI {
96
+ /**
97
+ * This will create recurring invoice. It will be generated on a cyclical basis during the lifetime of a policy.
98
+ * @summary Create the recurring invoice
99
+ * @param {RecurringInvoicesApiCreateRecurringInvoiceRequest} requestParameters Request parameters.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ * @memberof RecurringInvoicesApi
103
+ */
104
+ createRecurringInvoice(requestParameters: RecurringInvoicesApiCreateRecurringInvoiceRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
105
+ }