@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,145 @@
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 { Match } from './match';
17
+
18
+ /**
19
+ * The billing schedule of a policy or group policy: when its next invoice is created. The date of the next invoice moves on whenever an invoice is created or the policy changes. `status` is one of `pending`, `invoiced`, `paused`, `terminated` and `withdrawn`, or `via_master` for a member policy that is billed through its group policy: it has no invoice date of its own, and the row of the group policy drives it. `UpdatePolicyBilling` takes the row\'s `etag` back in the `If-Match` header.
20
+ * @export
21
+ * @interface PolicyBilling
22
+ */
23
+ export interface PolicyBilling {
24
+ /**
25
+ * The ERN of the billing configuration the schedule was computed from: the group tariff\'s when it has one, else the tariff\'s. Empty when the platform default applied.
26
+ * @type {string}
27
+ * @memberof PolicyBilling
28
+ */
29
+ 'billingConfigErn'?: string;
30
+ /**
31
+ * How the policy is billed: `AGGREGATE_CHILD_PREMIUMS` for a group policy that collects its members\' premiums and for those members, otherwise `DIRECT` (its own invoices).
32
+ * @type {string}
33
+ * @memberof PolicyBilling
34
+ */
35
+ 'billingMode'?: string;
36
+ /**
37
+ * Unique identifier for the object.
38
+ * @type {string}
39
+ * @memberof PolicyBilling
40
+ */
41
+ 'code'?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof PolicyBilling
46
+ */
47
+ 'createdAt'?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof PolicyBilling
52
+ */
53
+ 'createdBy'?: string;
54
+ /**
55
+ * The row\'s ERN (EIS Resource Name).
56
+ * @type {string}
57
+ * @memberof PolicyBilling
58
+ */
59
+ 'ern'?: string;
60
+ /**
61
+ * The row\'s entity tag, which changes with every write. Send it back unchanged in the `If-Match` header of a write.
62
+ * @type {string}
63
+ * @memberof PolicyBilling
64
+ */
65
+ 'etag'?: string;
66
+ /**
67
+ * The code of the group policy the policy belongs to. Empty for a standalone policy.
68
+ * @type {string}
69
+ * @memberof PolicyBilling
70
+ */
71
+ 'groupPolicyCode'?: string;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof PolicyBilling
76
+ */
77
+ 'id'?: string;
78
+ /**
79
+ * Whether at least one period of the row has been invoiced: true when `lastInvoicedPeriodTo` is set.
80
+ * @type {boolean}
81
+ * @memberof PolicyBilling
82
+ */
83
+ 'isInvoiced'?: boolean;
84
+ /**
85
+ * The end of the last period that was invoiced, as an RFC 3339 full-date.
86
+ * @type {string}
87
+ * @memberof PolicyBilling
88
+ */
89
+ 'lastInvoicedPeriodTo'?: string;
90
+ /**
91
+ *
92
+ * @type {Match}
93
+ * @memberof PolicyBilling
94
+ */
95
+ 'match'?: Match;
96
+ /**
97
+ * The day the next invoice is created: the start of the next period minus the invoice lead days of the billing configuration, at midnight UTC. On a first period that starts before the policy, never before the policy starts. Not set when the status is `via_master`, `invoiced`, `terminated` or `withdrawn`.
98
+ * @type {string}
99
+ * @memberof PolicyBilling
100
+ */
101
+ 'nextBillingDate'?: string;
102
+ /**
103
+ * The first day of the next period to bill, as an RFC 3339 full-date. The period includes this day.
104
+ * @type {string}
105
+ * @memberof PolicyBilling
106
+ */
107
+ 'nextPeriodFrom'?: string;
108
+ /**
109
+ * The end of the next period to bill, as an RFC 3339 full-date. The period does not include this day.
110
+ * @type {string}
111
+ * @memberof PolicyBilling
112
+ */
113
+ 'nextPeriodTo'?: string;
114
+ /**
115
+ * The code of the policy or group policy the row belongs to.
116
+ * @type {string}
117
+ * @memberof PolicyBilling
118
+ */
119
+ 'policyCode'?: string;
120
+ /**
121
+ * The status of the row.
122
+ * @type {string}
123
+ * @memberof PolicyBilling
124
+ */
125
+ 'status'?: string;
126
+ /**
127
+ *
128
+ * @type {string}
129
+ * @memberof PolicyBilling
130
+ */
131
+ 'updatedAt'?: string;
132
+ /**
133
+ *
134
+ * @type {string}
135
+ * @memberof PolicyBilling
136
+ */
137
+ 'updatedBy'?: string;
138
+ /**
139
+ * The row\'s version counter. A write sends the row\'s `etag`, not this number, in the `If-Match` header.
140
+ * @type {string}
141
+ * @memberof PolicyBilling
142
+ */
143
+ 'version'?: string;
144
+ }
145
+
@@ -0,0 +1,36 @@
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
+ * The request of `RequestBillRun`.
19
+ * @export
20
+ * @interface RequestBillRunRequest
21
+ */
22
+ export interface RequestBillRunRequest {
23
+ /**
24
+ * The kind of run to start: `INVOICE`, `ESTIMATE` or `RECONCILE`.
25
+ * @type {string}
26
+ * @memberof RequestBillRunRequest
27
+ */
28
+ 'kind'?: string;
29
+ /**
30
+ * The date the run is for, as an RFC 3339 full-date. Empty means today.
31
+ * @type {string}
32
+ * @memberof RequestBillRunRequest
33
+ */
34
+ 'runDate'?: string;
35
+ }
36
+
@@ -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 { BillRun } from './bill-run';
17
+
18
+ /**
19
+ * The response of `RequestBillRun`.
20
+ * @export
21
+ * @interface RequestBillRunResponse
22
+ */
23
+ export interface RequestBillRunResponse {
24
+ /**
25
+ *
26
+ * @type {BillRun}
27
+ * @memberof RequestBillRunResponse
28
+ */
29
+ 'billRun'?: BillRun;
30
+ }
31
+
@@ -0,0 +1,134 @@
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 { PaymentTerm } from './payment-term';
17
+ import { Tax } from './tax';
18
+
19
+ /**
20
+ * The billing configuration as it was resolved for one bill. Each value comes from the group tariff\'s configuration, else the tariff\'s, else the platform default. `sources` says which one it came from.
21
+ * @export
22
+ * @interface ResolvedBillingConfig
23
+ */
24
+ export interface ResolvedBillingConfig {
25
+ /**
26
+ * Where the first billing period starts: `POLICY_START` (the day the policy starts), `FIRST_OF_NEXT_MONTH` (the days up to the first of the next month are billed as a short first line on the initial invoice) or `ONE_TIME` (one period until the end of the policy).
27
+ * @type {string}
28
+ * @memberof ResolvedBillingConfig
29
+ */
30
+ 'billingAnchor'?: string;
31
+ /**
32
+ * The unit of the billing frequency: `MONTH`, `QUARTER`, `HALF_YEAR` or `YEAR`.
33
+ * @type {string}
34
+ * @memberof ResolvedBillingConfig
35
+ */
36
+ 'billingFrequencyUnit'?: string;
37
+ /**
38
+ * How many units one billing period has, from 1 to 12.
39
+ * @type {number}
40
+ * @memberof ResolvedBillingConfig
41
+ */
42
+ 'billingFrequencyValue'?: number;
43
+ /**
44
+ * The currency of the amounts, as a three-letter code such as `EUR`.
45
+ * @type {string}
46
+ * @memberof ResolvedBillingConfig
47
+ */
48
+ 'currency'?: string;
49
+ /**
50
+ * How a part of a period is prorated: `CALENDAR_DAYS` (covered calendar days over the days of the period) or `COMMERCIAL_30_360` (months of 30 days, years of 360 days).
51
+ * @type {string}
52
+ * @memberof ResolvedBillingConfig
53
+ */
54
+ 'dayCountBasis'?: string;
55
+ /**
56
+ * Whether estimates are created for the policy.
57
+ * @type {boolean}
58
+ * @memberof ResolvedBillingConfig
59
+ */
60
+ 'estimationEnabled'?: boolean;
61
+ /**
62
+ * How the first period is aligned when `billingAnchor` is `POLICY_START`: `NONE` (periods run from the start day) or `CALENDAR` (the first period is the calendar unit that holds the start day, prorated).
63
+ * @type {string}
64
+ * @memberof ResolvedBillingConfig
65
+ */
66
+ 'firstPeriodAlignment'?: string;
67
+ /**
68
+ * The ERN of the group tariff\'s billing configuration that was read. Empty when the group tariff version has none.
69
+ * @type {string}
70
+ * @memberof ResolvedBillingConfig
71
+ */
72
+ 'groupAssetErn'?: string;
73
+ /**
74
+ * How many days before a period starts its invoice is created, from 0 to 28.
75
+ * @type {number}
76
+ * @memberof ResolvedBillingConfig
77
+ */
78
+ 'invoiceLeadDays'?: number;
79
+ /**
80
+ * How a premium change inside an invoiced period is settled: `PRO_RATA_DAILY` (a correction invoice for the covered days), `NEXT_PERIOD` (no correction invoice is created; the new premium is billed from the next recurring invoice on) or `FULL_PERIOD` (the new premium applies to the whole period).
81
+ * @type {string}
82
+ * @memberof ResolvedBillingConfig
83
+ */
84
+ 'midTermChange'?: string;
85
+ /**
86
+ * The smallest correction amount, in minor units, for which a correction invoice is created.
87
+ * @type {number}
88
+ * @memberof ResolvedBillingConfig
89
+ */
90
+ 'minCorrectionAmount'?: number;
91
+ /**
92
+ *
93
+ * @type {PaymentTerm}
94
+ * @memberof ResolvedBillingConfig
95
+ */
96
+ 'paymentTerm'?: PaymentTerm;
97
+ /**
98
+ * How amounts are rounded: `HALF_UP` (to the minor unit, half away from zero) or `NEAREST_0_05` (to the nearest five minor units; only for a currency with two decimals).
99
+ * @type {string}
100
+ * @memberof ResolvedBillingConfig
101
+ */
102
+ 'roundingMode'?: string;
103
+ /**
104
+ * What is rounded: `PER_LINE` (every line once, the total is their sum) or `PER_INVOICE` (the exact sum, with the difference carried on one line).
105
+ * @type {string}
106
+ * @memberof ResolvedBillingConfig
107
+ */
108
+ 'roundingScope'?: string;
109
+ /**
110
+ * Where each value came from: `TARIF`, `GROUP_TARIF` or `PLATFORM_DEFAULT`, keyed by the configuration\'s field name (`billingAnchor`, `paymentTerm`, `tax`, `estimation`).
111
+ * @type {{ [key: string]: string; }}
112
+ * @memberof ResolvedBillingConfig
113
+ */
114
+ 'sources'?: { [key: string]: string; };
115
+ /**
116
+ * The ERN of the tariff\'s billing configuration that was read. Empty when the tariff version has none.
117
+ * @type {string}
118
+ * @memberof ResolvedBillingConfig
119
+ */
120
+ 'tariffAssetErn'?: string;
121
+ /**
122
+ *
123
+ * @type {Tax}
124
+ * @memberof ResolvedBillingConfig
125
+ */
126
+ 'tax'?: Tax;
127
+ /**
128
+ * What a termination inside an invoiced period refunds: `PRO_RATA` (the uncovered days, in a `final` invoice with a negative total) or `NONE`.
129
+ * @type {string}
130
+ * @memberof ResolvedBillingConfig
131
+ */
132
+ 'terminationRefund'?: string;
133
+ }
134
+
@@ -0,0 +1,30 @@
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
+ * The request of `RevertInvoice`.
19
+ * @export
20
+ * @interface RevertInvoiceRequest
21
+ */
22
+ export interface RevertInvoiceRequest {
23
+ /**
24
+ * The code of the invoice to reverse.
25
+ * @type {string}
26
+ * @memberof RevertInvoiceRequest
27
+ */
28
+ 'invoiceCode'?: string;
29
+ }
30
+
@@ -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 { Invoice } from './invoice';
17
+
18
+ /**
19
+ * The response of `RevertInvoice`.
20
+ * @export
21
+ * @interface RevertInvoiceResponse
22
+ */
23
+ export interface RevertInvoiceResponse {
24
+ /**
25
+ *
26
+ * @type {Invoice}
27
+ * @memberof RevertInvoiceResponse
28
+ */
29
+ 'invoice'?: Invoice;
30
+ }
31
+
@@ -0,0 +1,36 @@
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 business-time range: `YYYY-MM-DD`, `validTo` exclusive and empty when open-ended.
19
+ * @export
20
+ * @interface Slice
21
+ */
22
+ export interface Slice {
23
+ /**
24
+ * The first day of the range, as `YYYY-MM-DD`.
25
+ * @type {string}
26
+ * @memberof Slice
27
+ */
28
+ 'validFrom'?: string;
29
+ /**
30
+ * The day the range ends, as `YYYY-MM-DD`. It is not part of the range. Empty when open-ended.
31
+ * @type {string}
32
+ * @memberof Slice
33
+ */
34
+ 'validTo'?: string;
35
+ }
36
+
@@ -0,0 +1,43 @@
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 { Any } from './any';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface Status
22
+ */
23
+ export interface Status {
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof Status
28
+ */
29
+ 'code'?: number;
30
+ /**
31
+ *
32
+ * @type {Array<Any>}
33
+ * @memberof Status
34
+ */
35
+ 'details'?: Array<Any>;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Status
40
+ */
41
+ 'message'?: string;
42
+ }
43
+
package/models/tax.ts ADDED
@@ -0,0 +1,36 @@
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
+ * The tax rule of a billing configuration.
19
+ * @export
20
+ * @interface Tax
21
+ */
22
+ export interface Tax {
23
+ /**
24
+ * The tax code.
25
+ * @type {string}
26
+ * @memberof Tax
27
+ */
28
+ 'code'?: string;
29
+ /**
30
+ * The tax rate as a decimal string: `0.19` is 19 %.
31
+ * @type {string}
32
+ * @memberof Tax
33
+ */
34
+ 'rate'?: string;
35
+ }
36
+
@@ -0,0 +1,30 @@
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
+ * The request of `UpdatePolicyBilling`.
19
+ * @export
20
+ * @interface UpdatePolicyBillingBody
21
+ */
22
+ export interface UpdatePolicyBillingBody {
23
+ /**
24
+ * The new status: `paused` (invoice runs leave the row alone) or `pending` (it is invoiced again).
25
+ * @type {string}
26
+ * @memberof UpdatePolicyBillingBody
27
+ */
28
+ 'status'?: string;
29
+ }
30
+
@@ -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 { PolicyBilling } from './policy-billing';
17
+
18
+ /**
19
+ * The response of `UpdatePolicyBilling`.
20
+ * @export
21
+ * @interface UpdatePolicyBillingResponse
22
+ */
23
+ export interface UpdatePolicyBillingResponse {
24
+ /**
25
+ *
26
+ * @type {PolicyBilling}
27
+ * @memberof UpdatePolicyBillingResponse
28
+ */
29
+ 'policyBilling'?: PolicyBilling;
30
+ }
31
+
package/package.json CHANGED
@@ -1,6 +1,27 @@
1
1
  {
2
2
  "name": "@emilgroup/billing-v2-sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1-beta.0",
4
+ "description": "OpenAPI client for @emilgroup/billing-v2-sdk",
5
+ "author": "OpenAPI-Generator Contributors",
6
+ "keywords": [
7
+ "axios",
8
+ "typescript",
9
+ "openapi-client",
10
+ "openapi-generator",
11
+ "@emilgroup/billing-v2-sdk"
12
+ ],
13
+ "license": "Unlicense",
14
+ "main": "./dist/index.js",
15
+ "typings": "./dist/index.d.ts",
16
+ "scripts": {
17
+ "build": "tsc --outDir dist/",
18
+ "prepare": "npm run build"
19
+ },
20
+ "dependencies": {
21
+ "axios": "1.21.1"
22
+ },
23
+ "devDependencies": {
24
+
25
+ "typescript": "^4.0"
26
+ }
27
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": true,
4
+ "target": "ES5",
5
+ "module": "CommonJS",
6
+ "noImplicitAny": true,
7
+ "esModuleInterop": true,
8
+ "noImplicitOverride": true,
9
+ "outDir": "dist",
10
+ "rootDir": ".",
11
+ "lib": [
12
+ "es6",
13
+ "dom"
14
+ ],
15
+ "typeRoots": [
16
+ "node_modules/@types"
17
+ ]
18
+ },
19
+ "exclude": [
20
+ "dist",
21
+ "node_modules"
22
+ ]
23
+ }