@emilgroup/billing-v2-sdk 0.0.0-stage → 1.0.1-beta.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 (265) hide show
  1. package/.openapi-generator/FILES +93 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +50 -2
  5. package/api/bill-runs-api.ts +468 -0
  6. package/api/bills-api.ts +145 -0
  7. package/api/invoices-api.ts +1530 -0
  8. package/api/jobs-api.ts +756 -0
  9. package/api/policy-billings-api.ts +591 -0
  10. package/api.ts +35 -0
  11. package/base.ts +588 -0
  12. package/common.ts +199 -0
  13. package/configuration.ts +130 -0
  14. package/dist/api/bill-runs-api.d.ts +266 -0
  15. package/dist/api/bill-runs-api.js +466 -0
  16. package/dist/api/bills-api.d.ts +87 -0
  17. package/dist/api/bills-api.js +207 -0
  18. package/dist/api/invoices-api.d.ts +847 -0
  19. package/dist/api/invoices-api.js +1353 -0
  20. package/dist/api/jobs-api.d.ts +426 -0
  21. package/dist/api/jobs-api.js +708 -0
  22. package/dist/api/policy-billings-api.d.ts +332 -0
  23. package/dist/api/policy-billings-api.js +561 -0
  24. package/dist/api.d.ts +16 -0
  25. package/dist/api.js +34 -0
  26. package/dist/base.d.ts +120 -0
  27. package/dist/base.js +604 -0
  28. package/dist/common.d.ts +91 -0
  29. package/dist/common.js +277 -0
  30. package/dist/configuration.d.ts +106 -0
  31. package/dist/configuration.js +54 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +36 -0
  34. package/dist/models/any.d.ts +25 -0
  35. package/dist/models/any.js +15 -0
  36. package/dist/models/bill-item.d.ts +132 -0
  37. package/dist/models/bill-item.js +15 -0
  38. package/dist/models/bill-run.d.ts +145 -0
  39. package/dist/models/bill-run.js +15 -0
  40. package/dist/models/bill.d.ts +194 -0
  41. package/dist/models/bill.js +15 -0
  42. package/dist/models/cancel-job-response.d.ts +25 -0
  43. package/dist/models/cancel-job-response.js +15 -0
  44. package/dist/models/create-correction-invoices-request.d.ts +72 -0
  45. package/dist/models/create-correction-invoices-request.js +15 -0
  46. package/dist/models/create-correction-invoices-response.d.ts +31 -0
  47. package/dist/models/create-correction-invoices-response.js +15 -0
  48. package/dist/models/create-detail-export-job-request.d.ts +56 -0
  49. package/dist/models/create-detail-export-job-request.js +15 -0
  50. package/dist/models/create-detail-export-job-response.d.ts +25 -0
  51. package/dist/models/create-detail-export-job-response.js +15 -0
  52. package/dist/models/create-estimated-invoice-for-interval-request.d.ts +42 -0
  53. package/dist/models/create-estimated-invoice-for-interval-request.js +15 -0
  54. package/dist/models/create-estimated-invoice-for-interval-response.d.ts +25 -0
  55. package/dist/models/create-estimated-invoice-for-interval-response.js +15 -0
  56. package/dist/models/create-estimated-invoice-request.d.ts +36 -0
  57. package/dist/models/create-estimated-invoice-request.js +15 -0
  58. package/dist/models/create-estimated-invoice-response.d.ts +25 -0
  59. package/dist/models/create-estimated-invoice-response.js +15 -0
  60. package/dist/models/create-export-job-request.d.ts +68 -0
  61. package/dist/models/create-export-job-request.js +15 -0
  62. package/dist/models/create-export-job-response.d.ts +25 -0
  63. package/dist/models/create-export-job-response.js +15 -0
  64. package/dist/models/create-initial-invoice-request.d.ts +72 -0
  65. package/dist/models/create-initial-invoice-request.js +15 -0
  66. package/dist/models/create-initial-invoice-response.d.ts +25 -0
  67. package/dist/models/create-initial-invoice-response.js +15 -0
  68. package/dist/models/create-invoice-request.d.ts +67 -0
  69. package/dist/models/create-invoice-request.js +15 -0
  70. package/dist/models/create-invoice-response.d.ts +25 -0
  71. package/dist/models/create-invoice-response.js +15 -0
  72. package/dist/models/create-invoice-status-body.d.ts +24 -0
  73. package/dist/models/create-invoice-status-body.js +15 -0
  74. package/dist/models/create-invoice-status-response.d.ts +25 -0
  75. package/dist/models/create-invoice-status-response.js +15 -0
  76. package/dist/models/create-item-request.d.ts +36 -0
  77. package/dist/models/create-item-request.js +15 -0
  78. package/dist/models/create-policy-billing-request.d.ts +42 -0
  79. package/dist/models/create-policy-billing-request.js +15 -0
  80. package/dist/models/create-policy-billing-response.d.ts +25 -0
  81. package/dist/models/create-policy-billing-response.js +15 -0
  82. package/dist/models/create-recurring-invoice-request.d.ts +72 -0
  83. package/dist/models/create-recurring-invoice-request.js +15 -0
  84. package/dist/models/create-recurring-invoice-response.d.ts +31 -0
  85. package/dist/models/create-recurring-invoice-response.js +15 -0
  86. package/dist/models/create-termination-invoice-request.d.ts +60 -0
  87. package/dist/models/create-termination-invoice-request.js +15 -0
  88. package/dist/models/create-termination-invoice-response.d.ts +25 -0
  89. package/dist/models/create-termination-invoice-response.js +15 -0
  90. package/dist/models/create-withdraw-invoice-request.d.ts +48 -0
  91. package/dist/models/create-withdraw-invoice-request.js +15 -0
  92. package/dist/models/create-withdraw-invoice-response.d.ts +25 -0
  93. package/dist/models/create-withdraw-invoice-response.js +15 -0
  94. package/dist/models/estimate-history-entry.d.ts +36 -0
  95. package/dist/models/estimate-history-entry.js +15 -0
  96. package/dist/models/export-column.d.ts +36 -0
  97. package/dist/models/export-column.js +15 -0
  98. package/dist/models/filter-field.d.ts +110 -0
  99. package/dist/models/filter-field.js +15 -0
  100. package/dist/models/filter-value.d.ts +37 -0
  101. package/dist/models/filter-value.js +15 -0
  102. package/dist/models/get-bill-response.d.ts +25 -0
  103. package/dist/models/get-bill-response.js +15 -0
  104. package/dist/models/get-bill-run-filter-catalog-response.d.ts +31 -0
  105. package/dist/models/get-bill-run-filter-catalog-response.js +15 -0
  106. package/dist/models/get-bill-run-response.d.ts +25 -0
  107. package/dist/models/get-bill-run-response.js +15 -0
  108. package/dist/models/get-invoice-filter-catalog-response.d.ts +31 -0
  109. package/dist/models/get-invoice-filter-catalog-response.js +15 -0
  110. package/dist/models/get-invoice-response.d.ts +25 -0
  111. package/dist/models/get-invoice-response.js +15 -0
  112. package/dist/models/get-job-download-response.d.ts +25 -0
  113. package/dist/models/get-job-download-response.js +15 -0
  114. package/dist/models/get-job-filter-catalog-response.d.ts +31 -0
  115. package/dist/models/get-job-filter-catalog-response.js +15 -0
  116. package/dist/models/get-job-response.d.ts +25 -0
  117. package/dist/models/get-job-response.js +15 -0
  118. package/dist/models/get-policies-billing-date-filter-catalog-response.d.ts +31 -0
  119. package/dist/models/get-policies-billing-date-filter-catalog-response.js +15 -0
  120. package/dist/models/get-policies-billing-filter-catalog-response.d.ts +31 -0
  121. package/dist/models/get-policies-billing-filter-catalog-response.js +15 -0
  122. package/dist/models/get-policy-billing-response.d.ts +25 -0
  123. package/dist/models/get-policy-billing-response.js +15 -0
  124. package/dist/models/highlight.d.ts +30 -0
  125. package/dist/models/highlight.js +15 -0
  126. package/dist/models/index.d.ts +75 -0
  127. package/dist/models/index.js +91 -0
  128. package/dist/models/invoice-item.d.ts +204 -0
  129. package/dist/models/invoice-item.js +15 -0
  130. package/dist/models/invoice-payment.d.ts +108 -0
  131. package/dist/models/invoice-payment.js +15 -0
  132. package/dist/models/invoice-payments.d.ts +25 -0
  133. package/dist/models/invoice-payments.js +15 -0
  134. package/dist/models/invoice-status.d.ts +54 -0
  135. package/dist/models/invoice-status.js +15 -0
  136. package/dist/models/invoice.d.ts +275 -0
  137. package/dist/models/invoice.js +15 -0
  138. package/dist/models/job-download.d.ts +36 -0
  139. package/dist/models/job-download.js +15 -0
  140. package/dist/models/job-error.d.ts +30 -0
  141. package/dist/models/job-error.js +15 -0
  142. package/dist/models/job-progress.d.ts +36 -0
  143. package/dist/models/job-progress.js +15 -0
  144. package/dist/models/job.d.ts +134 -0
  145. package/dist/models/job.js +15 -0
  146. package/dist/models/list-bill-runs-response.d.ts +37 -0
  147. package/dist/models/list-bill-runs-response.js +15 -0
  148. package/dist/models/list-invoices-response.d.ts +37 -0
  149. package/dist/models/list-invoices-response.js +15 -0
  150. package/dist/models/list-jobs-response.d.ts +37 -0
  151. package/dist/models/list-jobs-response.js +15 -0
  152. package/dist/models/list-policies-billing-dates-response.d.ts +37 -0
  153. package/dist/models/list-policies-billing-dates-response.js +15 -0
  154. package/dist/models/list-policies-billings-response.d.ts +37 -0
  155. package/dist/models/list-policies-billings-response.js +15 -0
  156. package/dist/models/list-request.d.ts +60 -0
  157. package/dist/models/list-request.js +15 -0
  158. package/dist/models/localized-text.d.ts +30 -0
  159. package/dist/models/localized-text.js +15 -0
  160. package/dist/models/match.d.ts +69 -0
  161. package/dist/models/match.js +15 -0
  162. package/dist/models/payment-term.d.ts +42 -0
  163. package/dist/models/payment-term.js +15 -0
  164. package/dist/models/policy-billing.d.ts +139 -0
  165. package/dist/models/policy-billing.js +15 -0
  166. package/dist/models/request-bill-run-request.d.ts +30 -0
  167. package/dist/models/request-bill-run-request.js +15 -0
  168. package/dist/models/request-bill-run-response.d.ts +25 -0
  169. package/dist/models/request-bill-run-response.js +15 -0
  170. package/dist/models/resolved-billing-config.d.ts +130 -0
  171. package/dist/models/resolved-billing-config.js +15 -0
  172. package/dist/models/revert-invoice-request.d.ts +24 -0
  173. package/dist/models/revert-invoice-request.js +15 -0
  174. package/dist/models/revert-invoice-response.d.ts +25 -0
  175. package/dist/models/revert-invoice-response.js +15 -0
  176. package/dist/models/slice.d.ts +30 -0
  177. package/dist/models/slice.js +15 -0
  178. package/dist/models/status.d.ts +37 -0
  179. package/dist/models/status.js +15 -0
  180. package/dist/models/tax.d.ts +30 -0
  181. package/dist/models/tax.js +15 -0
  182. package/dist/models/update-policy-billing-body.d.ts +24 -0
  183. package/dist/models/update-policy-billing-body.js +15 -0
  184. package/dist/models/update-policy-billing-response.d.ts +25 -0
  185. package/dist/models/update-policy-billing-response.js +15 -0
  186. package/git_push.sh +57 -0
  187. package/index.ts +19 -0
  188. package/models/any.ts +32 -0
  189. package/models/bill-item.ts +138 -0
  190. package/models/bill-run.ts +151 -0
  191. package/models/bill.ts +200 -0
  192. package/models/cancel-job-response.ts +31 -0
  193. package/models/create-correction-invoices-request.ts +78 -0
  194. package/models/create-correction-invoices-response.ts +37 -0
  195. package/models/create-detail-export-job-request.ts +60 -0
  196. package/models/create-detail-export-job-response.ts +31 -0
  197. package/models/create-estimated-invoice-for-interval-request.ts +48 -0
  198. package/models/create-estimated-invoice-for-interval-response.ts +31 -0
  199. package/models/create-estimated-invoice-request.ts +42 -0
  200. package/models/create-estimated-invoice-response.ts +31 -0
  201. package/models/create-export-job-request.ts +74 -0
  202. package/models/create-export-job-response.ts +31 -0
  203. package/models/create-initial-invoice-request.ts +78 -0
  204. package/models/create-initial-invoice-response.ts +31 -0
  205. package/models/create-invoice-request.ts +73 -0
  206. package/models/create-invoice-response.ts +31 -0
  207. package/models/create-invoice-status-body.ts +30 -0
  208. package/models/create-invoice-status-response.ts +31 -0
  209. package/models/create-item-request.ts +42 -0
  210. package/models/create-policy-billing-request.ts +48 -0
  211. package/models/create-policy-billing-response.ts +31 -0
  212. package/models/create-recurring-invoice-request.ts +78 -0
  213. package/models/create-recurring-invoice-response.ts +37 -0
  214. package/models/create-termination-invoice-request.ts +66 -0
  215. package/models/create-termination-invoice-response.ts +31 -0
  216. package/models/create-withdraw-invoice-request.ts +54 -0
  217. package/models/create-withdraw-invoice-response.ts +31 -0
  218. package/models/estimate-history-entry.ts +42 -0
  219. package/models/export-column.ts +42 -0
  220. package/models/filter-field.ts +116 -0
  221. package/models/filter-value.ts +43 -0
  222. package/models/get-bill-response.ts +31 -0
  223. package/models/get-bill-run-filter-catalog-response.ts +37 -0
  224. package/models/get-bill-run-response.ts +31 -0
  225. package/models/get-invoice-filter-catalog-response.ts +37 -0
  226. package/models/get-invoice-response.ts +31 -0
  227. package/models/get-job-download-response.ts +31 -0
  228. package/models/get-job-filter-catalog-response.ts +37 -0
  229. package/models/get-job-response.ts +31 -0
  230. package/models/get-policies-billing-date-filter-catalog-response.ts +37 -0
  231. package/models/get-policies-billing-filter-catalog-response.ts +37 -0
  232. package/models/get-policy-billing-response.ts +31 -0
  233. package/models/highlight.ts +36 -0
  234. package/models/index.ts +75 -0
  235. package/models/invoice-item.ts +210 -0
  236. package/models/invoice-payment.ts +114 -0
  237. package/models/invoice-payments.ts +31 -0
  238. package/models/invoice-status.ts +60 -0
  239. package/models/invoice.ts +281 -0
  240. package/models/job-download.ts +42 -0
  241. package/models/job-error.ts +36 -0
  242. package/models/job-progress.ts +42 -0
  243. package/models/job.ts +140 -0
  244. package/models/list-bill-runs-response.ts +43 -0
  245. package/models/list-invoices-response.ts +43 -0
  246. package/models/list-jobs-response.ts +43 -0
  247. package/models/list-policies-billing-dates-response.ts +43 -0
  248. package/models/list-policies-billings-response.ts +43 -0
  249. package/models/list-request.ts +66 -0
  250. package/models/localized-text.ts +36 -0
  251. package/models/match.ts +75 -0
  252. package/models/payment-term.ts +48 -0
  253. package/models/policy-billing.ts +145 -0
  254. package/models/request-bill-run-request.ts +36 -0
  255. package/models/request-bill-run-response.ts +31 -0
  256. package/models/resolved-billing-config.ts +134 -0
  257. package/models/revert-invoice-request.ts +30 -0
  258. package/models/revert-invoice-response.ts +31 -0
  259. package/models/slice.ts +36 -0
  260. package/models/status.ts +43 -0
  261. package/models/tax.ts +36 -0
  262. package/models/update-policy-billing-body.ts +30 -0
  263. package/models/update-policy-billing-response.ts +31 -0
  264. package/package.json +25 -4
  265. package/tsconfig.json +23 -0
@@ -0,0 +1,210 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Billing Service
5
+ * The billing service: bills, bill runs, invoices and policy billings.
6
+ *
7
+ * The version of the OpenAPI document: 2.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * One line of an invoice: a premium item over one window of the billing period. Money is in minor units as integers (`859` is 8.59 in a currency with two decimals). `quantity`, `pricePerUnit`, `taxRate`, `quantityPerDays` and `pricePerDay` are decimal numbers for display. They are the exact values written as decimals, and no calculation should be done with them: use the amounts.
19
+ * @export
20
+ * @interface InvoiceItem
21
+ */
22
+ export interface InvoiceItem {
23
+ /**
24
+ * For a `GROUP_ADJUSTMENT` line: the key of the adjustment, such as `negotiated_rebate`. Empty otherwise.
25
+ * @type {string}
26
+ * @memberof InvoiceItem
27
+ */
28
+ 'adjustmentKey'?: string;
29
+ /**
30
+ * The ERN (EIS Resource Name) of the bill the line was priced from. Empty on a reversal, a withdrawal and a manual line.
31
+ * @type {string}
32
+ * @memberof InvoiceItem
33
+ */
34
+ 'billErn'?: string;
35
+ /**
36
+ * The first day of the window the line covers, at midnight UTC. The window includes this day.
37
+ * @type {string}
38
+ * @memberof InvoiceItem
39
+ */
40
+ 'billingIntervalFrom'?: string;
41
+ /**
42
+ * The end of the window the line covers, at midnight UTC. The window does not include this day.
43
+ * @type {string}
44
+ * @memberof InvoiceItem
45
+ */
46
+ 'billingIntervalTo'?: string;
47
+ /**
48
+ * Not filled: always empty.
49
+ * @type {string}
50
+ * @memberof InvoiceItem
51
+ */
52
+ 'condition'?: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof InvoiceItem
57
+ */
58
+ 'createdAt'?: string;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof InvoiceItem
63
+ */
64
+ 'createdBy'?: string;
65
+ /**
66
+ * What a negative line owes back, as a gross amount in minor units.
67
+ * @type {number}
68
+ * @memberof InvoiceItem
69
+ */
70
+ 'creditAmount'?: number;
71
+ /**
72
+ * The gross amount of the line, in minor units. On a correction it is the signed difference between `newAmount` and `previousAmount`.
73
+ * @type {number}
74
+ * @memberof InvoiceItem
75
+ */
76
+ 'grossAmount'?: number;
77
+ /**
78
+ * The group of the premium item.
79
+ * @type {string}
80
+ * @memberof InvoiceItem
81
+ */
82
+ 'group'?: string;
83
+ /**
84
+ *
85
+ * @type {string}
86
+ * @memberof InvoiceItem
87
+ */
88
+ 'id'?: string;
89
+ /**
90
+ * The type of the line: `NET` or `TOTAL` on a premium line, `SURCHARGE` or `DISCOUNT` on a group adjustment line, `OTHER` on a line of a manual invoice.
91
+ * @type {string}
92
+ * @memberof InvoiceItem
93
+ */
94
+ 'itemType'?: string;
95
+ /**
96
+ * The name of the premium item.
97
+ * @type {string}
98
+ * @memberof InvoiceItem
99
+ */
100
+ 'name'?: string;
101
+ /**
102
+ * The net amount of the line, in minor units.
103
+ * @type {number}
104
+ * @memberof InvoiceItem
105
+ */
106
+ 'netAmount'?: number;
107
+ /**
108
+ * On a correction: the gross amount that the re-priced bill charges, in minor units. On an initial or recurring invoice it equals `grossAmount`. It is 0 on a reversal or withdrawal.
109
+ * @type {number}
110
+ * @memberof InvoiceItem
111
+ */
112
+ 'newAmount'?: number;
113
+ /**
114
+ * The code of the policy the line bills: on a collective invoice, the member policy.
115
+ * @type {string}
116
+ * @memberof InvoiceItem
117
+ */
118
+ 'policyCode'?: string;
119
+ /**
120
+ * The key of the premium item the line comes from.
121
+ * @type {string}
122
+ * @memberof InvoiceItem
123
+ */
124
+ 'premiumFormulaCode'?: string;
125
+ /**
126
+ * On a correction, `final` or `withdraw` invoice: the gross amount the earlier bill charged for this item in this window, in minor units. On an initial or recurring invoice it is 0.
127
+ * @type {number}
128
+ * @memberof InvoiceItem
129
+ */
130
+ 'previousAmount'?: number;
131
+ /**
132
+ * On a correction, `final` or `withdraw` invoice: the ERN of the bill that the line is compared against.
133
+ * @type {string}
134
+ * @memberof InvoiceItem
135
+ */
136
+ 'previousBillErn'?: string;
137
+ /**
138
+ * The new amount divided by the covered days, in the currency\'s main unit with at most 5 decimals, for display. 0 on a manual line.
139
+ * @type {number}
140
+ * @memberof InvoiceItem
141
+ */
142
+ 'pricePerDay'?: number;
143
+ /**
144
+ * The gross premium per period that the line is priced from, such as `8.59`. The quantity times this price is the line\'s gross amount before rounding (the new amount on a correction).
145
+ * @type {number}
146
+ * @memberof InvoiceItem
147
+ */
148
+ 'pricePerUnit'?: number;
149
+ /**
150
+ * How many units the line bills: the covered fraction of the period for a monthly or yearly premium, the days for a daily one, `1` for a one-time one, as sent on a manual line.
151
+ * @type {number}
152
+ * @memberof InvoiceItem
153
+ */
154
+ 'quantity'?: number;
155
+ /**
156
+ * The covered days, for display.
157
+ * @type {number}
158
+ * @memberof InvoiceItem
159
+ */
160
+ 'quantityPerDays'?: number;
161
+ /**
162
+ * What the line bills: `MEMBER_PREMIUM` (the premium of a policy, the member\'s on a collective invoice) or `GROUP_ADJUSTMENT` (one adjustment of a group policy at one tax code, on its collective invoice, with `policyCode` set to the group policy).
163
+ * @type {string}
164
+ * @memberof InvoiceItem
165
+ */
166
+ 'source'?: string;
167
+ /**
168
+ * The tax amount of the line, in minor units. The net amount plus the tax amount is the gross amount.
169
+ * @type {number}
170
+ * @memberof InvoiceItem
171
+ */
172
+ 'taxAmount'?: number;
173
+ /**
174
+ * The tax code of the premium. A line issued before the tax was stated carries the code of the billing configuration, and so does a manual line.
175
+ * @type {string}
176
+ * @memberof InvoiceItem
177
+ */
178
+ 'taxCode'?: string;
179
+ /**
180
+ * The tax rate of the premium as a decimal (`0.19` is 19 %). A line issued before the tax was stated has rate 0. A manual line has rate 0: it is not taxed.
181
+ * @type {number}
182
+ * @memberof InvoiceItem
183
+ */
184
+ 'taxRate'?: number;
185
+ /**
186
+ * The unit the line counts: `day`, `month`, `quarter`, `halfYear`, `year` or `oneTimePayment`. A manual line is `oneTimePayment`.
187
+ * @type {string}
188
+ * @memberof InvoiceItem
189
+ */
190
+ 'unit'?: string;
191
+ /**
192
+ *
193
+ * @type {string}
194
+ * @memberof InvoiceItem
195
+ */
196
+ 'updatedAt'?: string;
197
+ /**
198
+ *
199
+ * @type {string}
200
+ * @memberof InvoiceItem
201
+ */
202
+ 'updatedBy'?: string;
203
+ /**
204
+ * The visibility of the line. Always `VISIBLE`.
205
+ * @type {string}
206
+ * @memberof InvoiceItem
207
+ */
208
+ 'visibility'?: string;
209
+ }
210
+
@@ -0,0 +1,114 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Billing Service
5
+ * The billing service: bills, bill runs, invoices and policy billings.
6
+ *
7
+ * The version of the OpenAPI document: 2.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * A payment recorded against an invoice. No payment is recorded against an invoice yet: `Invoice.payments` is always empty and the paid amount of an invoice is always 0.
19
+ * @export
20
+ * @interface InvoicePayment
21
+ */
22
+ export interface InvoicePayment {
23
+ /**
24
+ * A comment on the payment.
25
+ * @type {string}
26
+ * @memberof InvoicePayment
27
+ */
28
+ 'comment'?: string;
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof InvoicePayment
33
+ */
34
+ 'createdAt'?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof InvoicePayment
39
+ */
40
+ 'createdBy'?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof InvoicePayment
45
+ */
46
+ 'id'?: string;
47
+ /**
48
+ * The gross amount of the invoice, in minor units.
49
+ * @type {number}
50
+ * @memberof InvoicePayment
51
+ */
52
+ 'invoiceGrossAmount'?: number;
53
+ /**
54
+ * The amount of the invoice that is paid after this payment, in minor units.
55
+ * @type {number}
56
+ * @memberof InvoicePayment
57
+ */
58
+ 'newInvoicePaidAmount'?: number;
59
+ /**
60
+ * The status of the invoice after this payment.
61
+ * @type {string}
62
+ * @memberof InvoicePayment
63
+ */
64
+ 'newInvoiceStatus'?: string;
65
+ /**
66
+ * The amount of the invoice that was paid before this payment, in minor units.
67
+ * @type {number}
68
+ * @memberof InvoicePayment
69
+ */
70
+ 'oldInvoicePaidAmount'?: number;
71
+ /**
72
+ * The status of the invoice before this payment.
73
+ * @type {string}
74
+ * @memberof InvoicePayment
75
+ */
76
+ 'oldInvoiceStatus'?: string;
77
+ /**
78
+ * The id of the payment in the payment service, kept as a string.
79
+ * @type {string}
80
+ * @memberof InvoicePayment
81
+ */
82
+ 'paymentId'?: string;
83
+ /**
84
+ * The amount of the payment, in minor units.
85
+ * @type {number}
86
+ * @memberof InvoicePayment
87
+ */
88
+ 'transactionAmount'?: number;
89
+ /**
90
+ * When the payment was made.
91
+ * @type {string}
92
+ * @memberof InvoicePayment
93
+ */
94
+ 'transactionDate'?: string;
95
+ /**
96
+ * The reference of the payment.
97
+ * @type {string}
98
+ * @memberof InvoicePayment
99
+ */
100
+ 'transactionReference'?: string;
101
+ /**
102
+ *
103
+ * @type {string}
104
+ * @memberof InvoicePayment
105
+ */
106
+ 'updatedAt'?: string;
107
+ /**
108
+ *
109
+ * @type {string}
110
+ * @memberof InvoicePayment
111
+ */
112
+ 'updatedBy'?: string;
113
+ }
114
+
@@ -0,0 +1,31 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Billing Service
5
+ * The billing service: bills, bill runs, invoices and policy billings.
6
+ *
7
+ * The version of the OpenAPI document: 2.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { InvoicePayment } from './invoice-payment';
17
+
18
+ /**
19
+ * The payments of an invoice.
20
+ * @export
21
+ * @interface InvoicePayments
22
+ */
23
+ export interface InvoicePayments {
24
+ /**
25
+ * The payments. Always empty for now.
26
+ * @type {Array<InvoicePayment>}
27
+ * @memberof InvoicePayments
28
+ */
29
+ 'payments'?: Array<InvoicePayment>;
30
+ }
31
+
@@ -0,0 +1,60 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Billing Service
5
+ * The billing service: bills, bill runs, invoices and policy billings.
6
+ *
7
+ * The version of the OpenAPI document: 2.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ * One status row of an invoice.
19
+ * @export
20
+ * @interface InvoiceStatus
21
+ */
22
+ export interface InvoiceStatus {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof InvoiceStatus
27
+ */
28
+ 'createdAt'?: string;
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof InvoiceStatus
33
+ */
34
+ 'createdBy'?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof InvoiceStatus
39
+ */
40
+ 'id'?: string;
41
+ /**
42
+ * The status: `open`, `paid`, `partially-paid`, `refunded` or `estimated`.
43
+ * @type {string}
44
+ * @memberof InvoiceStatus
45
+ */
46
+ 'status'?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof InvoiceStatus
51
+ */
52
+ 'updatedAt'?: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof InvoiceStatus
57
+ */
58
+ 'updatedBy'?: string;
59
+ }
60
+
@@ -0,0 +1,281 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Billing Service
5
+ * The billing service: bills, bill runs, invoices and policy billings.
6
+ *
7
+ * The version of the OpenAPI document: 2.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { EstimateHistoryEntry } from './estimate-history-entry';
17
+ import { InvoiceItem } from './invoice-item';
18
+ import { InvoicePayments } from './invoice-payments';
19
+ import { InvoiceStatus } from './invoice-status';
20
+ import { Match } from './match';
21
+
22
+ /**
23
+ * An invoice: the statement sent to a policyholder for one billing period of a policy. An invoice\'s amounts and lines never change once it is issued; only its status moves. A change of amounts produces a new invoice, a correction or a reversal. Money is in minor units as integers (`859` is 8.59 in a currency with two decimals). The day-precision timestamps (`dueDate`, `billingIntervalFrom`, `billingIntervalTo`) are always midnight UTC of the calendar date. `type` is one of `initial`, `recurring`, `correction`, `estimated`, `final`, `withdraw` and `other`. `penalty` is accepted as a filter value only: no invoice has it. `status` is one of `open`, `paid`, `partially-paid`, `refunded` and `estimated`. Both are strings.
24
+ * @export
25
+ * @interface Invoice
26
+ */
27
+ export interface Invoice {
28
+ /**
29
+ * Not filled: always empty.
30
+ * @type {string}
31
+ * @memberof Invoice
32
+ */
33
+ 'accountNumber'?: string;
34
+ /**
35
+ * The ERN of the bill the invoice shows. Empty on a collective invoice, whose lines each name the bill of their member.
36
+ * @type {string}
37
+ * @memberof Invoice
38
+ */
39
+ 'billErn'?: string;
40
+ /**
41
+ * The ERN of the billing configuration the invoice was priced under: the one of the group tariff when the policy has one, otherwise the one of the tariff. Empty when the platform default applied.
42
+ * @type {string}
43
+ * @memberof Invoice
44
+ */
45
+ 'billingConfigErn'?: string;
46
+ /**
47
+ * The first day of the billing period the invoice covers, at midnight UTC. The period includes this day. On a `withdraw` invoice: the start of the earliest invoice it reverses.
48
+ * @type {string}
49
+ * @memberof Invoice
50
+ */
51
+ 'billingIntervalFrom'?: string;
52
+ /**
53
+ * The end of the billing period the invoice covers, at midnight UTC. The period does not include this day. On a `withdraw` invoice: the end of the latest invoice it reverses.
54
+ * @type {string}
55
+ * @memberof Invoice
56
+ */
57
+ 'billingIntervalTo'?: string;
58
+ /**
59
+ * Unique identifier for the object.
60
+ * @type {string}
61
+ * @memberof Invoice
62
+ */
63
+ 'code'?: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof Invoice
68
+ */
69
+ 'createdAt'?: string;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof Invoice
74
+ */
75
+ 'createdBy'?: string;
76
+ /**
77
+ * What the invoice owes back, as a gross amount in minor units. It is set when the total is negative.
78
+ * @type {number}
79
+ * @memberof Invoice
80
+ */
81
+ 'creditAmount'?: number;
82
+ /**
83
+ * The currency of the amounts, as a three-letter code such as `EUR`.
84
+ * @type {string}
85
+ * @memberof Invoice
86
+ */
87
+ 'currency'?: string;
88
+ /**
89
+ * The day the invoice is due, at midnight UTC. Not set on an `estimated` invoice.
90
+ * @type {string}
91
+ * @memberof Invoice
92
+ */
93
+ 'dueDate'?: string;
94
+ /**
95
+ * The dunning fees, in minor units. Always 0.
96
+ * @type {number}
97
+ * @memberof Invoice
98
+ */
99
+ 'dunningFees'?: number;
100
+ /**
101
+ * The invoice\'s ERN (EIS Resource Name).
102
+ * @type {string}
103
+ * @memberof Invoice
104
+ */
105
+ 'ern'?: string;
106
+ /**
107
+ * On an `estimated` invoice read or listed with `expand=estimateHistory`: the earlier estimates of the same period that were replaced, newest first.
108
+ * @type {Array<EstimateHistoryEntry>}
109
+ * @memberof Invoice
110
+ */
111
+ 'estimateHistory'?: Array<EstimateHistoryEntry>;
112
+ /**
113
+ * On an `estimated` invoice: the run date of the estimate, as an RFC 3339 full-date.
114
+ * @type {string}
115
+ * @memberof Invoice
116
+ */
117
+ 'estimatedAt'?: string;
118
+ /**
119
+ * The gross amount of the invoice, in minor units.
120
+ * @type {number}
121
+ * @memberof Invoice
122
+ */
123
+ 'grossAmount'?: number;
124
+ /**
125
+ * The group policy the invoice belongs to. On a collective invoice and on the invoice of a direct member policy, it is the code of the group policy. Empty for a standalone policy.
126
+ * @type {string}
127
+ * @memberof Invoice
128
+ */
129
+ 'groupPolicyCode'?: string;
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof Invoice
134
+ */
135
+ 'id'?: string;
136
+ /**
137
+ * The lines of the invoice. `GetInvoice` returns them; a list returns them when `expand` asks for `items`.
138
+ * @type {Array<InvoiceItem>}
139
+ * @memberof Invoice
140
+ */
141
+ 'invoiceItems'?: Array<InvoiceItem>;
142
+ /**
143
+ * The invoice number.
144
+ * @type {string}
145
+ * @memberof Invoice
146
+ */
147
+ 'invoiceNumber'?: string;
148
+ /**
149
+ *
150
+ * @type {Match}
151
+ * @memberof Invoice
152
+ */
153
+ 'match'?: Match;
154
+ /**
155
+ * Key-value data sent with the request that created the invoice, plus the service\'s own keys: `correctedInvoiceErn`, `terminatedFrom`, `revertedInvoiceErn` (on a reversal) and `reconciled`. Every value is a string.
156
+ * @type {object}
157
+ * @memberof Invoice
158
+ */
159
+ 'metadata'?: object;
160
+ /**
161
+ * The net amount of the invoice, in minor units.
162
+ * @type {number}
163
+ * @memberof Invoice
164
+ */
165
+ 'netAmount'?: number;
166
+ /**
167
+ * The amount still open, in minor units: the gross amount, negative on a credit, 0 on an estimate. A status change does not change it.
168
+ * @type {number}
169
+ * @memberof Invoice
170
+ */
171
+ 'openAmount'?: number;
172
+ /**
173
+ * The paid amount, in minor units. Always 0.
174
+ * @type {number}
175
+ * @memberof Invoice
176
+ */
177
+ 'paidAmount'?: number;
178
+ /**
179
+ * Not filled: always empty.
180
+ * @type {string}
181
+ * @memberof Invoice
182
+ */
183
+ 'paymentMethodCode'?: string;
184
+ /**
185
+ * Not filled: always empty.
186
+ * @type {string}
187
+ * @memberof Invoice
188
+ */
189
+ 'paymentMethodPsp'?: string;
190
+ /**
191
+ * Not filled: always empty.
192
+ * @type {string}
193
+ * @memberof Invoice
194
+ */
195
+ 'paymentMethodType'?: string;
196
+ /**
197
+ *
198
+ * @type {InvoicePayments}
199
+ * @memberof Invoice
200
+ */
201
+ 'payments'?: InvoicePayments;
202
+ /**
203
+ * The code of the policy the invoice is for.
204
+ * @type {string}
205
+ * @memberof Invoice
206
+ */
207
+ 'policyCode'?: string;
208
+ /**
209
+ * The policy\'s number. On an invoice that bills a member through its group, it is the group policy\'s number.
210
+ * @type {string}
211
+ * @memberof Invoice
212
+ */
213
+ 'policyNumber'?: string;
214
+ /**
215
+ * On a correction or a termination invoice: the ERN of the bill it was compared against.
216
+ * @type {string}
217
+ * @memberof Invoice
218
+ */
219
+ 'previousBillErn'?: string;
220
+ /**
221
+ * The code of the partner who receives the invoice. A name or an address is not part of the invoice.
222
+ * @type {string}
223
+ * @memberof Invoice
224
+ */
225
+ 'recipientPartnerId'?: string;
226
+ /**
227
+ * The version of the recipient partner at the time the invoice was issued.
228
+ * @type {number}
229
+ * @memberof Invoice
230
+ */
231
+ 'recipientPartnerVersion'?: number;
232
+ /**
233
+ * On a reversal: the ERN of the invoice it reverts.
234
+ * @type {string}
235
+ * @memberof Invoice
236
+ */
237
+ 'revertsInvoiceErn'?: string;
238
+ /**
239
+ * The current status of the invoice.
240
+ * @type {string}
241
+ * @memberof Invoice
242
+ */
243
+ 'status'?: string;
244
+ /**
245
+ * The status rows of the invoice: `open` when it is issued, `refunded` when a full reversal is issued, and the rows added with `CreateInvoiceStatus`, oldest first. Empty on an `estimated` invoice. `GetInvoice` returns them; a list returns them when `expand` asks for `statuses`.
246
+ * @type {Array<InvoiceStatus>}
247
+ * @memberof Invoice
248
+ */
249
+ 'statuses'?: Array<InvoiceStatus>;
250
+ /**
251
+ * The tax amount of the invoice, in minor units.
252
+ * @type {number}
253
+ * @memberof Invoice
254
+ */
255
+ 'taxAmount'?: number;
256
+ /**
257
+ * The total amount, in minor units: always equal to `grossAmount`, also on an estimate and a credit.
258
+ * @type {number}
259
+ * @memberof Invoice
260
+ */
261
+ 'totalAmount'?: number;
262
+ /**
263
+ * The type of the invoice.
264
+ * @type {string}
265
+ * @memberof Invoice
266
+ */
267
+ 'type'?: string;
268
+ /**
269
+ *
270
+ * @type {string}
271
+ * @memberof Invoice
272
+ */
273
+ 'updatedAt'?: string;
274
+ /**
275
+ *
276
+ * @type {string}
277
+ * @memberof Invoice
278
+ */
279
+ 'updatedBy'?: string;
280
+ }
281
+