@emilgroup/billing-sdk-node 1.10.0 → 1.17.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 (105) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/README.md +2 -2
  3. package/api/invoices-api.ts +134 -0
  4. package/dist/api/correction-invoices-api.d.ts +106 -0
  5. package/dist/api/correction-invoices-api.js +234 -0
  6. package/dist/api/default-api.d.ts +66 -0
  7. package/dist/api/default-api.js +200 -0
  8. package/dist/api/estimated-invoices-api.d.ts +154 -0
  9. package/dist/api/estimated-invoices-api.js +321 -0
  10. package/dist/api/initial-invoices-api.d.ts +106 -0
  11. package/dist/api/initial-invoices-api.js +234 -0
  12. package/dist/api/invoices-api.d.ts +382 -0
  13. package/dist/api/invoices-api.js +586 -0
  14. package/dist/api/recurring-invoices-api.d.ts +106 -0
  15. package/dist/api/recurring-invoices-api.js +234 -0
  16. package/dist/api.d.ts +17 -0
  17. package/dist/api.js +35 -0
  18. package/dist/base.d.ts +78 -0
  19. package/dist/base.js +394 -0
  20. package/dist/common.d.ts +92 -0
  21. package/dist/common.js +277 -0
  22. package/dist/configuration.d.ts +90 -0
  23. package/dist/configuration.js +44 -0
  24. package/dist/index.d.ts +15 -0
  25. package/dist/index.js +36 -0
  26. package/dist/models/create-correction-invoices-response-class.d.ts +25 -0
  27. package/dist/models/create-correction-invoices-response-class.js +15 -0
  28. package/dist/models/create-custom-estimated-invoice-request-dto.d.ts +35 -0
  29. package/dist/models/create-custom-estimated-invoice-request-dto.js +20 -0
  30. package/dist/models/create-custom-estimated-invoice-response-class.d.ts +24 -0
  31. package/dist/models/create-custom-estimated-invoice-response-class.js +15 -0
  32. package/dist/models/create-estimated-invoice-request-dto.d.ts +37 -0
  33. package/dist/models/create-estimated-invoice-request-dto.js +15 -0
  34. package/dist/models/create-estimated-invoice-response-class.d.ts +31 -0
  35. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  36. package/dist/models/create-invoice-payment-request-dto.d.ts +48 -0
  37. package/dist/models/create-invoice-payment-request-dto.js +15 -0
  38. package/dist/models/create-invoice-payment-response-class.d.ts +25 -0
  39. package/dist/models/create-invoice-payment-response-class.js +15 -0
  40. package/dist/models/create-invoice-request-dto.d.ts +83 -0
  41. package/dist/models/create-invoice-request-dto.js +26 -0
  42. package/dist/models/create-invoice-response-class.d.ts +25 -0
  43. package/dist/models/create-invoice-response-class.js +15 -0
  44. package/dist/models/create-invoice-status-request-dto.d.ts +36 -0
  45. package/dist/models/create-invoice-status-request-dto.js +21 -0
  46. package/dist/models/create-termination-invoice-request-dto.d.ts +54 -0
  47. package/dist/models/create-termination-invoice-request-dto.js +15 -0
  48. package/dist/models/get-invoice-response-class.d.ts +25 -0
  49. package/dist/models/get-invoice-response-class.js +15 -0
  50. package/dist/models/index.d.ts +32 -0
  51. package/dist/models/index.js +48 -0
  52. package/dist/models/inline-response200.d.ts +54 -0
  53. package/dist/models/inline-response200.js +15 -0
  54. package/dist/models/inline-response503.d.ts +54 -0
  55. package/dist/models/inline-response503.js +15 -0
  56. package/dist/models/invoice-class.d.ts +170 -0
  57. package/dist/models/invoice-class.js +31 -0
  58. package/dist/models/invoice-item-class.d.ts +129 -0
  59. package/dist/models/invoice-item-class.js +24 -0
  60. package/dist/models/invoice-payment-class.d.ts +102 -0
  61. package/dist/models/invoice-payment-class.js +15 -0
  62. package/dist/models/invoice-payments-class.d.ts +25 -0
  63. package/dist/models/invoice-payments-class.js +15 -0
  64. package/dist/models/invoice-status-class.d.ts +48 -0
  65. package/dist/models/invoice-status-class.js +21 -0
  66. package/dist/models/list-invoices-response-class.d.ts +31 -0
  67. package/dist/models/list-invoices-response-class.js +15 -0
  68. package/dist/models/list-policies-billing-dates-response-class.d.ts +31 -0
  69. package/dist/models/list-policies-billing-dates-response-class.js +15 -0
  70. package/dist/models/list-request-dto.d.ts +54 -0
  71. package/dist/models/list-request-dto.js +15 -0
  72. package/dist/models/omit-type-class.d.ts +156 -0
  73. package/dist/models/omit-type-class.js +31 -0
  74. package/dist/models/policy-billing-date-class.d.ts +42 -0
  75. package/dist/models/policy-billing-date-class.js +15 -0
  76. package/dist/models/policy-dto.d.ts +123 -0
  77. package/dist/models/policy-dto.js +23 -0
  78. package/dist/models/policy-object-dto.d.ts +72 -0
  79. package/dist/models/policy-object-dto.js +15 -0
  80. package/dist/models/policy-premium-dto.d.ts +49 -0
  81. package/dist/models/policy-premium-dto.js +15 -0
  82. package/dist/models/policy-premium-item-dto.d.ts +55 -0
  83. package/dist/models/policy-premium-item-dto.js +15 -0
  84. package/dist/models/policy-version-dto.d.ts +55 -0
  85. package/dist/models/policy-version-dto.js +15 -0
  86. package/dist/models/premium-formula-dto.d.ts +72 -0
  87. package/dist/models/premium-formula-dto.js +15 -0
  88. package/dist/models/revert-invoice-request-dto.d.ts +24 -0
  89. package/dist/models/revert-invoice-request-dto.js +15 -0
  90. package/dist/models/timeslice-dto.d.ts +62 -0
  91. package/dist/models/timeslice-dto.js +15 -0
  92. package/models/create-estimated-invoice-request-dto.ts +7 -1
  93. package/models/create-invoice-payment-request-dto.ts +0 -6
  94. package/models/create-invoice-payment-response-class.ts +31 -0
  95. package/models/create-invoice-request-dto.ts +6 -0
  96. package/models/create-termination-invoice-request-dto.ts +6 -0
  97. package/models/index.ts +1 -0
  98. package/models/invoice-class.ts +6 -0
  99. package/models/invoice-payment-class.ts +7 -1
  100. package/models/omit-type-class.ts +6 -7
  101. package/models/policy-dto.ts +3 -2
  102. package/models/policy-object-dto.ts +24 -0
  103. package/models/policy-version-dto.ts +3 -3
  104. package/models/timeslice-dto.ts +1 -1
  105. package/package.json +1 -1
@@ -0,0 +1,586 @@
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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * InvoicesApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var InvoicesApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create an invoice payment.
101
+ * @summary Create the invoice payment
102
+ * @param {number} id
103
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
104
+ * @param {string} [authorization] Bearer Token
105
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options) {
110
+ if (options === void 0) { options = {}; }
111
+ return __awaiter(_this, void 0, void 0, function () {
112
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
113
+ return __generator(this, function (_a) {
114
+ switch (_a.label) {
115
+ case 0:
116
+ // verify required parameter 'id' is not null or undefined
117
+ (0, common_1.assertParamExists)('createInvoicePayment', 'id', id);
118
+ // verify required parameter 'createInvoicePaymentRequestDto' is not null or undefined
119
+ (0, common_1.assertParamExists)('createInvoicePayment', 'createInvoicePaymentRequestDto', createInvoicePaymentRequestDto);
120
+ localVarPath = "/billingservice/v1/invoices/{id}/payments"
121
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
122
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ baseAccessToken = configuration.accessToken;
126
+ }
127
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
128
+ localVarHeaderParameter = {};
129
+ localVarQueryParameter = {};
130
+ // authentication bearer required
131
+ // http bearer authentication required
132
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
133
+ case 1:
134
+ // authentication bearer required
135
+ // http bearer authentication required
136
+ _a.sent();
137
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
138
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
139
+ }
140
+ if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
141
+ localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
142
+ }
143
+ localVarHeaderParameter['Content-Type'] = 'application/json';
144
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
145
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
146
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
147
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoicePaymentRequestDto, localVarRequestOptions, configuration);
148
+ return [2 /*return*/, {
149
+ url: (0, common_1.toPathString)(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ }];
152
+ }
153
+ });
154
+ });
155
+ },
156
+ /**
157
+ * 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.
158
+ * @summary List invoices
159
+ * @param {string} code
160
+ * @param {string} expand
161
+ * @param {string} [authorization] Bearer Token
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ */
165
+ getInvoice: function (code, expand, authorization, options) {
166
+ if (options === void 0) { options = {}; }
167
+ return __awaiter(_this, void 0, void 0, function () {
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
169
+ return __generator(this, function (_a) {
170
+ switch (_a.label) {
171
+ case 0:
172
+ // verify required parameter 'code' is not null or undefined
173
+ (0, common_1.assertParamExists)('getInvoice', 'code', code);
174
+ // verify required parameter 'expand' is not null or undefined
175
+ (0, common_1.assertParamExists)('getInvoice', 'expand', expand);
176
+ localVarPath = "/billingservice/v1/invoices/{code}"
177
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
178
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
179
+ if (configuration) {
180
+ baseOptions = configuration.baseOptions;
181
+ baseAccessToken = configuration.accessToken;
182
+ }
183
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
184
+ localVarHeaderParameter = {};
185
+ localVarQueryParameter = {};
186
+ // authentication bearer required
187
+ // http bearer authentication required
188
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
189
+ case 1:
190
+ // authentication bearer required
191
+ // http bearer authentication required
192
+ _a.sent();
193
+ if (expand !== undefined) {
194
+ localVarQueryParameter['expand'] = expand;
195
+ }
196
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
197
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
198
+ }
199
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
200
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
201
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
202
+ return [2 /*return*/, {
203
+ url: (0, common_1.toPathString)(localVarUrlObj),
204
+ options: localVarRequestOptions,
205
+ }];
206
+ }
207
+ });
208
+ });
209
+ },
210
+ /**
211
+ * 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.
212
+ * @summary List invoices
213
+ * @param {string} [authorization] Bearer Token
214
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
215
+ * @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.
216
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
217
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
218
+ * @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.
219
+ * @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.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
224
+ if (options === void 0) { options = {}; }
225
+ return __awaiter(_this, void 0, void 0, function () {
226
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
227
+ return __generator(this, function (_a) {
228
+ switch (_a.label) {
229
+ case 0:
230
+ localVarPath = "/billingservice/v1/invoices";
231
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ baseAccessToken = configuration.accessToken;
235
+ }
236
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
237
+ localVarHeaderParameter = {};
238
+ localVarQueryParameter = {};
239
+ // authentication bearer required
240
+ // http bearer authentication required
241
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
242
+ case 1:
243
+ // authentication bearer required
244
+ // http bearer authentication required
245
+ _a.sent();
246
+ if (pageSize !== undefined) {
247
+ localVarQueryParameter['pageSize'] = pageSize;
248
+ }
249
+ if (pageToken !== undefined) {
250
+ localVarQueryParameter['pageToken'] = pageToken;
251
+ }
252
+ if (filter !== undefined) {
253
+ localVarQueryParameter['filter'] = filter;
254
+ }
255
+ if (search !== undefined) {
256
+ localVarQueryParameter['search'] = search;
257
+ }
258
+ if (order !== undefined) {
259
+ localVarQueryParameter['order'] = order;
260
+ }
261
+ if (expand !== undefined) {
262
+ localVarQueryParameter['expand'] = expand;
263
+ }
264
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
265
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
266
+ }
267
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
268
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
269
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
270
+ return [2 /*return*/, {
271
+ url: (0, common_1.toPathString)(localVarUrlObj),
272
+ options: localVarRequestOptions,
273
+ }];
274
+ }
275
+ });
276
+ });
277
+ },
278
+ /**
279
+ * 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.
280
+ * @summary List policies billing dates
281
+ * @param {string} [authorization] Bearer Token
282
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
283
+ * @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.
284
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
285
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
286
+ * @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.
287
+ * @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.
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
292
+ if (options === void 0) { options = {}; }
293
+ return __awaiter(_this, void 0, void 0, function () {
294
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
295
+ return __generator(this, function (_a) {
296
+ switch (_a.label) {
297
+ case 0:
298
+ localVarPath = "/billingservice/v1/invoices/policies-billing-dates";
299
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
300
+ if (configuration) {
301
+ baseOptions = configuration.baseOptions;
302
+ baseAccessToken = configuration.accessToken;
303
+ }
304
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
305
+ localVarHeaderParameter = {};
306
+ localVarQueryParameter = {};
307
+ // authentication bearer required
308
+ // http bearer authentication required
309
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
310
+ case 1:
311
+ // authentication bearer required
312
+ // http bearer authentication required
313
+ _a.sent();
314
+ if (pageSize !== undefined) {
315
+ localVarQueryParameter['pageSize'] = pageSize;
316
+ }
317
+ if (pageToken !== undefined) {
318
+ localVarQueryParameter['pageToken'] = pageToken;
319
+ }
320
+ if (filter !== undefined) {
321
+ localVarQueryParameter['filter'] = filter;
322
+ }
323
+ if (search !== undefined) {
324
+ localVarQueryParameter['search'] = search;
325
+ }
326
+ if (order !== undefined) {
327
+ localVarQueryParameter['order'] = order;
328
+ }
329
+ if (expand !== undefined) {
330
+ localVarQueryParameter['expand'] = expand;
331
+ }
332
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
333
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
334
+ }
335
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
336
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ return [2 /*return*/, {
339
+ url: (0, common_1.toPathString)(localVarUrlObj),
340
+ options: localVarRequestOptions,
341
+ }];
342
+ }
343
+ });
344
+ });
345
+ },
346
+ };
347
+ };
348
+ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
349
+ /**
350
+ * InvoicesApi - functional programming interface
351
+ * @export
352
+ */
353
+ var InvoicesApiFp = function (configuration) {
354
+ var localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
355
+ return {
356
+ /**
357
+ * This will create an invoice payment.
358
+ * @summary Create the invoice payment
359
+ * @param {number} id
360
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
361
+ * @param {string} [authorization] Bearer Token
362
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, 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.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, 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
+ * 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
382
+ * @param {string} code
383
+ * @param {string} expand
384
+ * @param {string} [authorization] Bearer Token
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ getInvoice: function (code, expand, authorization, options) {
389
+ return __awaiter(this, void 0, void 0, function () {
390
+ var localVarAxiosArgs;
391
+ return __generator(this, function (_a) {
392
+ switch (_a.label) {
393
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getInvoice(code, expand, authorization, options)];
394
+ case 1:
395
+ localVarAxiosArgs = _a.sent();
396
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
397
+ }
398
+ });
399
+ });
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 100. 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 {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
408
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
409
+ * @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.
410
+ * @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.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
415
+ return __awaiter(this, void 0, void 0, function () {
416
+ var localVarAxiosArgs;
417
+ return __generator(this, function (_a) {
418
+ switch (_a.label) {
419
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, options)];
420
+ case 1:
421
+ localVarAxiosArgs = _a.sent();
422
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
423
+ }
424
+ });
425
+ });
426
+ },
427
+ /**
428
+ * 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.
429
+ * @summary List policies billing dates
430
+ * @param {string} [authorization] Bearer Token
431
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
432
+ * @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.
433
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
434
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
435
+ * @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.
436
+ * @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.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ */
440
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
441
+ return __awaiter(this, void 0, void 0, function () {
442
+ var localVarAxiosArgs;
443
+ return __generator(this, function (_a) {
444
+ switch (_a.label) {
445
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, options)];
446
+ case 1:
447
+ localVarAxiosArgs = _a.sent();
448
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
449
+ }
450
+ });
451
+ });
452
+ },
453
+ };
454
+ };
455
+ exports.InvoicesApiFp = InvoicesApiFp;
456
+ /**
457
+ * InvoicesApi - factory interface
458
+ * @export
459
+ */
460
+ var InvoicesApiFactory = function (configuration, basePath, axios) {
461
+ var localVarFp = (0, exports.InvoicesApiFp)(configuration);
462
+ return {
463
+ /**
464
+ * This will create an invoice payment.
465
+ * @summary Create the invoice payment
466
+ * @param {number} id
467
+ * @param {CreateInvoicePaymentRequestDto} createInvoicePaymentRequestDto
468
+ * @param {string} [authorization] Bearer Token
469
+ * @param {string} [idempotencyKey] Idempotency Key used to make the request idempotent. The key should be unique. Usually, a generated v4 UUID is enough.
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ */
473
+ createInvoicePayment: function (id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options) {
474
+ return localVarFp.createInvoicePayment(id, createInvoicePaymentRequestDto, authorization, idempotencyKey, options).then(function (request) { return request(axios, basePath); });
475
+ },
476
+ /**
477
+ * 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.
478
+ * @summary List invoices
479
+ * @param {string} code
480
+ * @param {string} expand
481
+ * @param {string} [authorization] Bearer Token
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ getInvoice: function (code, expand, authorization, options) {
486
+ return localVarFp.getInvoice(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
487
+ },
488
+ /**
489
+ * 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.
490
+ * @summary List invoices
491
+ * @param {string} [authorization] Bearer Token
492
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
493
+ * @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.
494
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
495
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
496
+ * @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.
497
+ * @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.
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ listInvoices: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
502
+ return localVarFp.listInvoices(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
503
+ },
504
+ /**
505
+ * 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.
506
+ * @summary List policies billing dates
507
+ * @param {string} [authorization] Bearer Token
508
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
509
+ * @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.
510
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
511
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
512
+ * @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.
513
+ * @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.
514
+ * @param {*} [options] Override http request option.
515
+ * @throws {RequiredError}
516
+ */
517
+ listPoliciesBillingDates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
518
+ return localVarFp.listPoliciesBillingDates(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
519
+ },
520
+ };
521
+ };
522
+ exports.InvoicesApiFactory = InvoicesApiFactory;
523
+ /**
524
+ * InvoicesApi - object-oriented interface
525
+ * @export
526
+ * @class InvoicesApi
527
+ * @extends {BaseAPI}
528
+ */
529
+ var InvoicesApi = /** @class */ (function (_super) {
530
+ __extends(InvoicesApi, _super);
531
+ function InvoicesApi() {
532
+ return _super !== null && _super.apply(this, arguments) || this;
533
+ }
534
+ /**
535
+ * This will create an invoice payment.
536
+ * @summary Create the invoice payment
537
+ * @param {InvoicesApiCreateInvoicePaymentRequest} requestParameters Request parameters.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ * @memberof InvoicesApi
541
+ */
542
+ InvoicesApi.prototype.createInvoicePayment = function (requestParameters, options) {
543
+ var _this = this;
544
+ return (0, exports.InvoicesApiFp)(this.configuration).createInvoicePayment(requestParameters.id, requestParameters.createInvoicePaymentRequestDto, requestParameters.authorization, requestParameters.idempotencyKey, options).then(function (request) { return request(_this.axios, _this.basePath); });
545
+ };
546
+ /**
547
+ * 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.
548
+ * @summary List invoices
549
+ * @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ * @memberof InvoicesApi
553
+ */
554
+ InvoicesApi.prototype.getInvoice = function (requestParameters, options) {
555
+ var _this = this;
556
+ return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
557
+ };
558
+ /**
559
+ * 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.
560
+ * @summary List invoices
561
+ * @param {InvoicesApiListInvoicesRequest} requestParameters Request parameters.
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ * @memberof InvoicesApi
565
+ */
566
+ InvoicesApi.prototype.listInvoices = function (requestParameters, options) {
567
+ var _this = this;
568
+ if (requestParameters === void 0) { requestParameters = {}; }
569
+ 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); });
570
+ };
571
+ /**
572
+ * 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.
573
+ * @summary List policies billing dates
574
+ * @param {InvoicesApiListPoliciesBillingDatesRequest} requestParameters Request parameters.
575
+ * @param {*} [options] Override http request option.
576
+ * @throws {RequiredError}
577
+ * @memberof InvoicesApi
578
+ */
579
+ InvoicesApi.prototype.listPoliciesBillingDates = function (requestParameters, options) {
580
+ var _this = this;
581
+ if (requestParameters === void 0) { requestParameters = {}; }
582
+ 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); });
583
+ };
584
+ return InvoicesApi;
585
+ }(base_1.BaseAPI));
586
+ exports.InvoicesApi = InvoicesApi;