@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,93 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/bill-runs-api.ts
7
+ api/bills-api.ts
8
+ api/invoices-api.ts
9
+ api/jobs-api.ts
10
+ api/policy-billings-api.ts
11
+ base.ts
12
+ common.ts
13
+ configuration.ts
14
+ git_push.sh
15
+ index.ts
16
+ models/any.ts
17
+ models/bill-item.ts
18
+ models/bill-run.ts
19
+ models/bill.ts
20
+ models/cancel-job-response.ts
21
+ models/create-correction-invoices-request.ts
22
+ models/create-correction-invoices-response.ts
23
+ models/create-detail-export-job-request.ts
24
+ models/create-detail-export-job-response.ts
25
+ models/create-estimated-invoice-for-interval-request.ts
26
+ models/create-estimated-invoice-for-interval-response.ts
27
+ models/create-estimated-invoice-request.ts
28
+ models/create-estimated-invoice-response.ts
29
+ models/create-export-job-request.ts
30
+ models/create-export-job-response.ts
31
+ models/create-initial-invoice-request.ts
32
+ models/create-initial-invoice-response.ts
33
+ models/create-invoice-request.ts
34
+ models/create-invoice-response.ts
35
+ models/create-invoice-status-body.ts
36
+ models/create-invoice-status-response.ts
37
+ models/create-item-request.ts
38
+ models/create-policy-billing-request.ts
39
+ models/create-policy-billing-response.ts
40
+ models/create-recurring-invoice-request.ts
41
+ models/create-recurring-invoice-response.ts
42
+ models/create-termination-invoice-request.ts
43
+ models/create-termination-invoice-response.ts
44
+ models/create-withdraw-invoice-request.ts
45
+ models/create-withdraw-invoice-response.ts
46
+ models/estimate-history-entry.ts
47
+ models/export-column.ts
48
+ models/filter-field.ts
49
+ models/filter-value.ts
50
+ models/get-bill-response.ts
51
+ models/get-bill-run-filter-catalog-response.ts
52
+ models/get-bill-run-response.ts
53
+ models/get-invoice-filter-catalog-response.ts
54
+ models/get-invoice-response.ts
55
+ models/get-job-download-response.ts
56
+ models/get-job-filter-catalog-response.ts
57
+ models/get-job-response.ts
58
+ models/get-policies-billing-date-filter-catalog-response.ts
59
+ models/get-policies-billing-filter-catalog-response.ts
60
+ models/get-policy-billing-response.ts
61
+ models/highlight.ts
62
+ models/index.ts
63
+ models/invoice-item.ts
64
+ models/invoice-payment.ts
65
+ models/invoice-payments.ts
66
+ models/invoice-status.ts
67
+ models/invoice.ts
68
+ models/job-download.ts
69
+ models/job-error.ts
70
+ models/job-progress.ts
71
+ models/job.ts
72
+ models/list-bill-runs-response.ts
73
+ models/list-invoices-response.ts
74
+ models/list-jobs-response.ts
75
+ models/list-policies-billing-dates-response.ts
76
+ models/list-policies-billings-response.ts
77
+ models/list-request.ts
78
+ models/localized-text.ts
79
+ models/match.ts
80
+ models/payment-term.ts
81
+ models/policy-billing.ts
82
+ models/request-bill-run-request.ts
83
+ models/request-bill-run-response.ts
84
+ models/resolved-billing-config.ts
85
+ models/revert-invoice-request.ts
86
+ models/revert-invoice-response.ts
87
+ models/slice.ts
88
+ models/status.ts
89
+ models/tax.ts
90
+ models/update-policy-billing-body.ts
91
+ models/update-policy-billing-response.ts
92
+ package.json
93
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 5.4.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md CHANGED
@@ -1,3 +1,51 @@
1
- # Temporary Holding Version
1
+ # Emil Billing V2 SDK
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
4
+
5
+ Language level
6
+ * ES5 - you must have a Promises/A+ library installed
7
+ * ES6
8
+
9
+ Module system
10
+ * CommonJS
11
+ * ES6 module system
12
+
13
+ Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
14
+
15
+ ## Consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of the following commands:
18
+
19
+ ```
20
+ npm install @emilgroup/billing-v2-sdk@1.0.1-beta.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/billing-v2-sdk@1.0.1-beta.0
25
+ ```
26
+
27
+ And then you can import `InvoicesApi`.
28
+
29
+ ```ts
30
+ import { InvoicesApi } from '@emilgroup/billing-v2-sdk'
31
+
32
+ const invoicesApi = new InvoicesApi();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in `InvoicesApi`:
36
+
37
+ ```ts
38
+ async function listInvoices(): Promise<Void> {
39
+ try {
40
+ const invoicesApi = new InvoicesApi();
41
+
42
+ await invoicesApi.authorize('username', 'password');
43
+
44
+ const { data: { items } } = await invoicesApi.listInvoices();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,468 @@
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 globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { GetBillRunFilterCatalogResponse } from '../models';
25
+ // @ts-ignore
26
+ import { GetBillRunResponse } from '../models';
27
+ // @ts-ignore
28
+ import { ListBillRunsResponse } from '../models';
29
+ // @ts-ignore
30
+ import { RequestBillRunRequest } from '../models';
31
+ // @ts-ignore
32
+ import { RequestBillRunResponse } from '../models';
33
+ // @ts-ignore
34
+ import { Status } from '../models';
35
+ /**
36
+ * BillRunsApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const BillRunsApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ *
43
+ * @summary Returns one bill run.
44
+ * @param {string} code The run\&#39;s code.
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ billingServiceGetBillRun: async (code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'code' is not null or undefined
50
+ assertParamExists('billingServiceGetBillRun', 'code', code)
51
+ const localVarPath = `/billingservice/v2/bill-runs/{code}`
52
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ let baseAccessToken;
57
+ if (configuration) {
58
+ baseOptions = configuration.baseOptions;
59
+ baseAccessToken = configuration.accessToken;
60
+ }
61
+
62
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
63
+ const localVarHeaderParameter = {} as any;
64
+ const localVarQueryParameter = {} as any;
65
+
66
+
67
+
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+
72
+ return {
73
+ url: toPathString(localVarUrlObj),
74
+ options: localVarRequestOptions,
75
+ };
76
+ },
77
+ /**
78
+ *
79
+ * @summary Returns the filter catalog of the bill run list.
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ */
83
+ billingServiceGetBillRunFilterCatalog: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
84
+ const localVarPath = `/billingservice/v2/bill-runs:filterCatalog`;
85
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
86
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
87
+ let baseOptions;
88
+ let baseAccessToken;
89
+ if (configuration) {
90
+ baseOptions = configuration.baseOptions;
91
+ baseAccessToken = configuration.accessToken;
92
+ }
93
+
94
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
95
+ const localVarHeaderParameter = {} as any;
96
+ const localVarQueryParameter = {} as any;
97
+
98
+
99
+
100
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
101
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
102
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
103
+
104
+ return {
105
+ url: toPathString(localVarUrlObj),
106
+ options: localVarRequestOptions,
107
+ };
108
+ },
109
+ /**
110
+ *
111
+ * @summary Lists bill runs.
112
+ * @param {number} [pageSize]
113
+ * @param {string} [pageToken]
114
+ * @param {string} [filter]
115
+ * @param {string} [search]
116
+ * @param {string} [order]
117
+ * @param {string} [expand]
118
+ * @param {string} [filters]
119
+ * @param {*} [options] Override http request option.
120
+ * @throws {RequiredError}
121
+ */
122
+ billingServiceListBillRuns: async (pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
123
+ const localVarPath = `/billingservice/v2/bill-runs`;
124
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
125
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
126
+ let baseOptions;
127
+ let baseAccessToken;
128
+ if (configuration) {
129
+ baseOptions = configuration.baseOptions;
130
+ baseAccessToken = configuration.accessToken;
131
+ }
132
+
133
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
134
+ const localVarHeaderParameter = {} as any;
135
+ const localVarQueryParameter = {} as any;
136
+
137
+ if (pageSize !== undefined) {
138
+ localVarQueryParameter['pageSize'] = pageSize;
139
+ }
140
+
141
+ if (pageToken !== undefined) {
142
+ localVarQueryParameter['pageToken'] = pageToken;
143
+ }
144
+
145
+ if (filter !== undefined) {
146
+ localVarQueryParameter['filter'] = filter;
147
+ }
148
+
149
+ if (search !== undefined) {
150
+ localVarQueryParameter['search'] = search;
151
+ }
152
+
153
+ if (order !== undefined) {
154
+ localVarQueryParameter['order'] = order;
155
+ }
156
+
157
+ if (expand !== undefined) {
158
+ localVarQueryParameter['expand'] = expand;
159
+ }
160
+
161
+ if (filters !== undefined) {
162
+ localVarQueryParameter['filters'] = filters;
163
+ }
164
+
165
+
166
+
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
170
+
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ },
176
+ /**
177
+ * It runs `kind` for `runDate` (today when empty). The run is finished when the call returns, and the response is the finished run. `kind` is `INVOICE`, `ESTIMATE` or `RECONCILE`. Only one run of a kind can run at a time.
178
+ * @summary Runs a bill run now.
179
+ * @param {RequestBillRunRequest} body The request of &#x60;RequestBillRun&#x60;.
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ billingServiceRequestBillRun: async (body: RequestBillRunRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
184
+ // verify required parameter 'body' is not null or undefined
185
+ assertParamExists('billingServiceRequestBillRun', 'body', body)
186
+ const localVarPath = `/billingservice/v2/bill-runs`;
187
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
188
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
189
+ let baseOptions;
190
+ let baseAccessToken;
191
+ if (configuration) {
192
+ baseOptions = configuration.baseOptions;
193
+ baseAccessToken = configuration.accessToken;
194
+ }
195
+
196
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
197
+ const localVarHeaderParameter = {} as any;
198
+ const localVarQueryParameter = {} as any;
199
+
200
+
201
+
202
+ localVarHeaderParameter['Content-Type'] = 'application/json';
203
+
204
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
205
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
207
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
208
+
209
+ return {
210
+ url: toPathString(localVarUrlObj),
211
+ options: localVarRequestOptions,
212
+ };
213
+ },
214
+ }
215
+ };
216
+
217
+ /**
218
+ * BillRunsApi - functional programming interface
219
+ * @export
220
+ */
221
+ export const BillRunsApiFp = function(configuration?: Configuration) {
222
+ const localVarAxiosParamCreator = BillRunsApiAxiosParamCreator(configuration)
223
+ return {
224
+ /**
225
+ *
226
+ * @summary Returns one bill run.
227
+ * @param {string} code The run\&#39;s code.
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ async billingServiceGetBillRun(code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBillRunResponse>> {
232
+ const localVarAxiosArgs = await localVarAxiosParamCreator.billingServiceGetBillRun(code, options);
233
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
234
+ },
235
+ /**
236
+ *
237
+ * @summary Returns the filter catalog of the bill run list.
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ async billingServiceGetBillRunFilterCatalog(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBillRunFilterCatalogResponse>> {
242
+ const localVarAxiosArgs = await localVarAxiosParamCreator.billingServiceGetBillRunFilterCatalog(options);
243
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
244
+ },
245
+ /**
246
+ *
247
+ * @summary Lists bill runs.
248
+ * @param {number} [pageSize]
249
+ * @param {string} [pageToken]
250
+ * @param {string} [filter]
251
+ * @param {string} [search]
252
+ * @param {string} [order]
253
+ * @param {string} [expand]
254
+ * @param {string} [filters]
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ async billingServiceListBillRuns(pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBillRunsResponse>> {
259
+ const localVarAxiosArgs = await localVarAxiosParamCreator.billingServiceListBillRuns(pageSize, pageToken, filter, search, order, expand, filters, options);
260
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
261
+ },
262
+ /**
263
+ * It runs `kind` for `runDate` (today when empty). The run is finished when the call returns, and the response is the finished run. `kind` is `INVOICE`, `ESTIMATE` or `RECONCILE`. Only one run of a kind can run at a time.
264
+ * @summary Runs a bill run now.
265
+ * @param {RequestBillRunRequest} body The request of &#x60;RequestBillRun&#x60;.
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ async billingServiceRequestBillRun(body: RequestBillRunRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RequestBillRunResponse>> {
270
+ const localVarAxiosArgs = await localVarAxiosParamCreator.billingServiceRequestBillRun(body, options);
271
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
272
+ },
273
+ }
274
+ };
275
+
276
+ /**
277
+ * BillRunsApi - factory interface
278
+ * @export
279
+ */
280
+ export const BillRunsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
281
+ const localVarFp = BillRunsApiFp(configuration)
282
+ return {
283
+ /**
284
+ *
285
+ * @summary Returns one bill run.
286
+ * @param {string} code The run\&#39;s code.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ billingServiceGetBillRun(code: string, options?: any): AxiosPromise<GetBillRunResponse> {
291
+ return localVarFp.billingServiceGetBillRun(code, options).then((request) => request(axios, basePath));
292
+ },
293
+ /**
294
+ *
295
+ * @summary Returns the filter catalog of the bill run list.
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ billingServiceGetBillRunFilterCatalog(options?: any): AxiosPromise<GetBillRunFilterCatalogResponse> {
300
+ return localVarFp.billingServiceGetBillRunFilterCatalog(options).then((request) => request(axios, basePath));
301
+ },
302
+ /**
303
+ *
304
+ * @summary Lists bill runs.
305
+ * @param {number} [pageSize]
306
+ * @param {string} [pageToken]
307
+ * @param {string} [filter]
308
+ * @param {string} [search]
309
+ * @param {string} [order]
310
+ * @param {string} [expand]
311
+ * @param {string} [filters]
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ billingServiceListBillRuns(pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListBillRunsResponse> {
316
+ return localVarFp.billingServiceListBillRuns(pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
317
+ },
318
+ /**
319
+ * It runs `kind` for `runDate` (today when empty). The run is finished when the call returns, and the response is the finished run. `kind` is `INVOICE`, `ESTIMATE` or `RECONCILE`. Only one run of a kind can run at a time.
320
+ * @summary Runs a bill run now.
321
+ * @param {RequestBillRunRequest} body The request of &#x60;RequestBillRun&#x60;.
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ */
325
+ billingServiceRequestBillRun(body: RequestBillRunRequest, options?: any): AxiosPromise<RequestBillRunResponse> {
326
+ return localVarFp.billingServiceRequestBillRun(body, options).then((request) => request(axios, basePath));
327
+ },
328
+ };
329
+ };
330
+
331
+ /**
332
+ * Request parameters for billingServiceGetBillRun operation in BillRunsApi.
333
+ * @export
334
+ * @interface BillRunsApiBillingServiceGetBillRunRequest
335
+ */
336
+ export interface BillRunsApiBillingServiceGetBillRunRequest {
337
+ /**
338
+ * The run\&#39;s code.
339
+ * @type {string}
340
+ * @memberof BillRunsApiBillingServiceGetBillRun
341
+ */
342
+ readonly code: string
343
+ }
344
+
345
+ /**
346
+ * Request parameters for billingServiceListBillRuns operation in BillRunsApi.
347
+ * @export
348
+ * @interface BillRunsApiBillingServiceListBillRunsRequest
349
+ */
350
+ export interface BillRunsApiBillingServiceListBillRunsRequest {
351
+ /**
352
+ *
353
+ * @type {number}
354
+ * @memberof BillRunsApiBillingServiceListBillRuns
355
+ */
356
+ readonly pageSize?: number
357
+
358
+ /**
359
+ *
360
+ * @type {string}
361
+ * @memberof BillRunsApiBillingServiceListBillRuns
362
+ */
363
+ readonly pageToken?: string
364
+
365
+ /**
366
+ *
367
+ * @type {string}
368
+ * @memberof BillRunsApiBillingServiceListBillRuns
369
+ */
370
+ readonly filter?: string
371
+
372
+ /**
373
+ *
374
+ * @type {string}
375
+ * @memberof BillRunsApiBillingServiceListBillRuns
376
+ */
377
+ readonly search?: string
378
+
379
+ /**
380
+ *
381
+ * @type {string}
382
+ * @memberof BillRunsApiBillingServiceListBillRuns
383
+ */
384
+ readonly order?: string
385
+
386
+ /**
387
+ *
388
+ * @type {string}
389
+ * @memberof BillRunsApiBillingServiceListBillRuns
390
+ */
391
+ readonly expand?: string
392
+
393
+ /**
394
+ *
395
+ * @type {string}
396
+ * @memberof BillRunsApiBillingServiceListBillRuns
397
+ */
398
+ readonly filters?: string
399
+ }
400
+
401
+ /**
402
+ * Request parameters for billingServiceRequestBillRun operation in BillRunsApi.
403
+ * @export
404
+ * @interface BillRunsApiBillingServiceRequestBillRunRequest
405
+ */
406
+ export interface BillRunsApiBillingServiceRequestBillRunRequest {
407
+ /**
408
+ * The request of &#x60;RequestBillRun&#x60;.
409
+ * @type {RequestBillRunRequest}
410
+ * @memberof BillRunsApiBillingServiceRequestBillRun
411
+ */
412
+ readonly body: RequestBillRunRequest
413
+ }
414
+
415
+ /**
416
+ * BillRunsApi - object-oriented interface
417
+ * @export
418
+ * @class BillRunsApi
419
+ * @extends {BaseAPI}
420
+ */
421
+ export class BillRunsApi extends BaseAPI {
422
+ /**
423
+ *
424
+ * @summary Returns one bill run.
425
+ * @param {BillRunsApiBillingServiceGetBillRunRequest} requestParameters Request parameters.
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ * @memberof BillRunsApi
429
+ */
430
+ public billingServiceGetBillRun(requestParameters: BillRunsApiBillingServiceGetBillRunRequest, options?: AxiosRequestConfig) {
431
+ return BillRunsApiFp(this.configuration).billingServiceGetBillRun(requestParameters.code, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
432
+ }
433
+
434
+ /**
435
+ *
436
+ * @summary Returns the filter catalog of the bill run list.
437
+ * @param {*} [options] Override http request option.
438
+ * @throws {RequiredError}
439
+ * @memberof BillRunsApi
440
+ */
441
+ public billingServiceGetBillRunFilterCatalog(options?: AxiosRequestConfig) {
442
+ return BillRunsApiFp(this.configuration).billingServiceGetBillRunFilterCatalog(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
443
+ }
444
+
445
+ /**
446
+ *
447
+ * @summary Lists bill runs.
448
+ * @param {BillRunsApiBillingServiceListBillRunsRequest} requestParameters Request parameters.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ * @memberof BillRunsApi
452
+ */
453
+ public billingServiceListBillRuns(requestParameters: BillRunsApiBillingServiceListBillRunsRequest = {}, options?: AxiosRequestConfig) {
454
+ return BillRunsApiFp(this.configuration).billingServiceListBillRuns(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
455
+ }
456
+
457
+ /**
458
+ * It runs `kind` for `runDate` (today when empty). The run is finished when the call returns, and the response is the finished run. `kind` is `INVOICE`, `ESTIMATE` or `RECONCILE`. Only one run of a kind can run at a time.
459
+ * @summary Runs a bill run now.
460
+ * @param {BillRunsApiBillingServiceRequestBillRunRequest} requestParameters Request parameters.
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ * @memberof BillRunsApi
464
+ */
465
+ public billingServiceRequestBillRun(requestParameters: BillRunsApiBillingServiceRequestBillRunRequest, options?: AxiosRequestConfig) {
466
+ return BillRunsApiFp(this.configuration).billingServiceRequestBillRun(requestParameters.body, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
467
+ }
468
+ }