orb-billing 1.0.1

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 (413) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +169 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +20 -0
  5. package/dist/internal/utils/contenttype.d.ts +1 -0
  6. package/dist/internal/utils/contenttype.js +33 -0
  7. package/dist/internal/utils/headers.d.ts +4 -0
  8. package/dist/internal/utils/headers.js +92 -0
  9. package/dist/internal/utils/index.d.ts +8 -0
  10. package/dist/internal/utils/index.js +27 -0
  11. package/dist/internal/utils/pathparams.d.ts +2 -0
  12. package/dist/internal/utils/pathparams.js +53 -0
  13. package/dist/internal/utils/queryparams.d.ts +2 -0
  14. package/dist/internal/utils/queryparams.js +178 -0
  15. package/dist/internal/utils/requestbody.d.ts +2 -0
  16. package/dist/internal/utils/requestbody.js +318 -0
  17. package/dist/internal/utils/retries.d.ts +20 -0
  18. package/dist/internal/utils/retries.js +250 -0
  19. package/dist/internal/utils/security.d.ts +2 -0
  20. package/dist/internal/utils/security.js +188 -0
  21. package/dist/internal/utils/utils.d.ts +37 -0
  22. package/dist/internal/utils/utils.js +370 -0
  23. package/dist/sdk/availability.d.ts +19 -0
  24. package/dist/sdk/availability.js +135 -0
  25. package/dist/sdk/coupon.d.ts +53 -0
  26. package/dist/sdk/coupon.js +358 -0
  27. package/dist/sdk/credit.d.ts +142 -0
  28. package/dist/sdk/credit.js +501 -0
  29. package/dist/sdk/creditnote.d.ts +26 -0
  30. package/dist/sdk/creditnote.js +186 -0
  31. package/dist/sdk/customer.d.ts +264 -0
  32. package/dist/sdk/customer.js +958 -0
  33. package/dist/sdk/event.d.ts +258 -0
  34. package/dist/sdk/event.js +732 -0
  35. package/dist/sdk/index.d.ts +1 -0
  36. package/dist/sdk/index.js +20 -0
  37. package/dist/sdk/invoice.d.ts +60 -0
  38. package/dist/sdk/invoice.js +416 -0
  39. package/dist/sdk/models/operations/addledgerentryexternalid.d.ts +16 -0
  40. package/dist/sdk/models/operations/addledgerentryexternalid.js +95 -0
  41. package/dist/sdk/models/operations/amendevent.d.ts +23 -0
  42. package/dist/sdk/models/operations/amendevent.js +99 -0
  43. package/dist/sdk/models/operations/amendusage.d.ts +34 -0
  44. package/dist/sdk/models/operations/amendusage.js +122 -0
  45. package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +34 -0
  46. package/dist/sdk/models/operations/amendusageexternalcustomerid.js +122 -0
  47. package/dist/sdk/models/operations/archivecoupon.d.ts +15 -0
  48. package/dist/sdk/models/operations/archivecoupon.js +91 -0
  49. package/dist/sdk/models/operations/cancelsubscription.d.ts +16 -0
  50. package/dist/sdk/models/operations/cancelsubscription.js +95 -0
  51. package/dist/sdk/models/operations/closebackfill.d.ts +15 -0
  52. package/dist/sdk/models/operations/closebackfill.js +91 -0
  53. package/dist/sdk/models/operations/createbackfill.d.ts +12 -0
  54. package/dist/sdk/models/operations/createbackfill.js +79 -0
  55. package/dist/sdk/models/operations/createcoupon.d.ts +12 -0
  56. package/dist/sdk/models/operations/createcoupon.js +79 -0
  57. package/dist/sdk/models/operations/createcustomer.d.ts +12 -0
  58. package/dist/sdk/models/operations/createcustomer.js +79 -0
  59. package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +16 -0
  60. package/dist/sdk/models/operations/createcustomerbalancetransaction.js +95 -0
  61. package/dist/sdk/models/operations/createinvoicelineitem.d.ts +12 -0
  62. package/dist/sdk/models/operations/createinvoicelineitem.js +79 -0
  63. package/dist/sdk/models/operations/createledgerentry.d.ts +16 -0
  64. package/dist/sdk/models/operations/createledgerentry.js +95 -0
  65. package/dist/sdk/models/operations/createsubscription.d.ts +12 -0
  66. package/dist/sdk/models/operations/createsubscription.js +79 -0
  67. package/dist/sdk/models/operations/deletecustomer.d.ts +22 -0
  68. package/dist/sdk/models/operations/deletecustomer.js +78 -0
  69. package/dist/sdk/models/operations/deprecateevent.d.ts +22 -0
  70. package/dist/sdk/models/operations/deprecateevent.js +95 -0
  71. package/dist/sdk/models/operations/fetchcoupon.d.ts +15 -0
  72. package/dist/sdk/models/operations/fetchcoupon.js +91 -0
  73. package/dist/sdk/models/operations/fetchcreditnote.d.ts +18 -0
  74. package/dist/sdk/models/operations/fetchcreditnote.js +91 -0
  75. package/dist/sdk/models/operations/fetchcustomer.d.ts +18 -0
  76. package/dist/sdk/models/operations/fetchcustomer.js +91 -0
  77. package/dist/sdk/models/operations/fetchcustomercosts.d.ts +34 -0
  78. package/dist/sdk/models/operations/fetchcustomercosts.js +107 -0
  79. package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +31 -0
  80. package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +107 -0
  81. package/dist/sdk/models/operations/fetchcustomercredits.d.ts +26 -0
  82. package/dist/sdk/models/operations/fetchcustomercredits.js +99 -0
  83. package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +23 -0
  84. package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +99 -0
  85. package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +35 -0
  86. package/dist/sdk/models/operations/fetchcustomercreditsledger.js +111 -0
  87. package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +35 -0
  88. package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +111 -0
  89. package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +15 -0
  90. package/dist/sdk/models/operations/fetchcustomerexternalid.js +91 -0
  91. package/dist/sdk/models/operations/fetchinvoice.d.ts +15 -0
  92. package/dist/sdk/models/operations/fetchinvoice.js +91 -0
  93. package/dist/sdk/models/operations/fetchplan.d.ts +15 -0
  94. package/dist/sdk/models/operations/fetchplan.js +91 -0
  95. package/dist/sdk/models/operations/fetchplanexternalid.d.ts +15 -0
  96. package/dist/sdk/models/operations/fetchplanexternalid.js +91 -0
  97. package/dist/sdk/models/operations/fetchsubscription.d.ts +15 -0
  98. package/dist/sdk/models/operations/fetchsubscription.js +91 -0
  99. package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +31 -0
  100. package/dist/sdk/models/operations/fetchsubscriptioncosts.js +107 -0
  101. package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +23 -0
  102. package/dist/sdk/models/operations/fetchsubscriptionschedule.js +99 -0
  103. package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +39 -0
  104. package/dist/sdk/models/operations/fetchsubscriptionusage.js +115 -0
  105. package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +15 -0
  106. package/dist/sdk/models/operations/fetchupcominginvoice.js +91 -0
  107. package/dist/sdk/models/operations/index.d.ts +55 -0
  108. package/dist/sdk/models/operations/index.js +74 -0
  109. package/dist/sdk/models/operations/ingest.d.ts +30 -0
  110. package/dist/sdk/models/operations/ingest.js +118 -0
  111. package/dist/sdk/models/operations/issueinvoice.d.ts +19 -0
  112. package/dist/sdk/models/operations/issueinvoice.js +95 -0
  113. package/dist/sdk/models/operations/listbackfills.d.ts +22 -0
  114. package/dist/sdk/models/operations/listbackfills.js +95 -0
  115. package/dist/sdk/models/operations/listbalancetransactions.d.ts +23 -0
  116. package/dist/sdk/models/operations/listbalancetransactions.js +99 -0
  117. package/dist/sdk/models/operations/listcoupons.d.ts +30 -0
  118. package/dist/sdk/models/operations/listcoupons.js +103 -0
  119. package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +15 -0
  120. package/dist/sdk/models/operations/listcouponsubscriptions.js +91 -0
  121. package/dist/sdk/models/operations/listcreditnote.d.ts +34 -0
  122. package/dist/sdk/models/operations/listcreditnote.js +107 -0
  123. package/dist/sdk/models/operations/listcustomers.d.ts +22 -0
  124. package/dist/sdk/models/operations/listcustomers.js +95 -0
  125. package/dist/sdk/models/operations/listinvoices.d.ts +38 -0
  126. package/dist/sdk/models/operations/listinvoices.js +111 -0
  127. package/dist/sdk/models/operations/listplans.d.ts +22 -0
  128. package/dist/sdk/models/operations/listplans.js +95 -0
  129. package/dist/sdk/models/operations/listsubscriptions.d.ts +24 -0
  130. package/dist/sdk/models/operations/listsubscriptions.js +103 -0
  131. package/dist/sdk/models/operations/ping.d.ts +12 -0
  132. package/dist/sdk/models/operations/ping.js +79 -0
  133. package/dist/sdk/models/operations/revertbackfill.d.ts +15 -0
  134. package/dist/sdk/models/operations/revertbackfill.js +91 -0
  135. package/dist/sdk/models/operations/scheduleplanchange.d.ts +16 -0
  136. package/dist/sdk/models/operations/scheduleplanchange.js +95 -0
  137. package/dist/sdk/models/operations/searchevents.d.ts +23 -0
  138. package/dist/sdk/models/operations/searchevents.js +99 -0
  139. package/dist/sdk/models/operations/unschedulecancellation.d.ts +15 -0
  140. package/dist/sdk/models/operations/unschedulecancellation.js +91 -0
  141. package/dist/sdk/models/operations/unscheduleplanchange.d.ts +15 -0
  142. package/dist/sdk/models/operations/unscheduleplanchange.js +91 -0
  143. package/dist/sdk/models/operations/updatecustomer.d.ts +19 -0
  144. package/dist/sdk/models/operations/updatecustomer.js +95 -0
  145. package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +16 -0
  146. package/dist/sdk/models/operations/updatecustomerexternalid.js +95 -0
  147. package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +16 -0
  148. package/dist/sdk/models/operations/updatefixedfeequantity.js +95 -0
  149. package/dist/sdk/models/operations/voidinvoice.d.ts +19 -0
  150. package/dist/sdk/models/operations/voidinvoice.js +95 -0
  151. package/dist/sdk/models/shared/action.d.ts +8 -0
  152. package/dist/sdk/models/shared/action.js +15 -0
  153. package/dist/sdk/models/shared/amendedevent.d.ts +28 -0
  154. package/dist/sdk/models/shared/amendedevent.js +81 -0
  155. package/dist/sdk/models/shared/amendedusage.d.ts +16 -0
  156. package/dist/sdk/models/shared/amendedusage.js +62 -0
  157. package/dist/sdk/models/shared/amendeventresult.d.ts +10 -0
  158. package/dist/sdk/models/shared/amendeventresult.js +48 -0
  159. package/dist/sdk/models/shared/autocollection.d.ts +18 -0
  160. package/dist/sdk/models/shared/autocollection.js +66 -0
  161. package/dist/sdk/models/shared/availability.d.ts +7 -0
  162. package/dist/sdk/models/shared/availability.js +48 -0
  163. package/dist/sdk/models/shared/backfill.d.ts +27 -0
  164. package/dist/sdk/models/shared/backfill.js +104 -0
  165. package/dist/sdk/models/shared/backfills.d.ts +10 -0
  166. package/dist/sdk/models/shared/backfills.js +57 -0
  167. package/dist/sdk/models/shared/backfillstatus.d.ts +9 -0
  168. package/dist/sdk/models/shared/backfillstatus.js +16 -0
  169. package/dist/sdk/models/shared/billablemetric.d.ts +4 -0
  170. package/dist/sdk/models/shared/billablemetric.js +45 -0
  171. package/dist/sdk/models/shared/billablemetricminified.d.ts +5 -0
  172. package/dist/sdk/models/shared/billablemetricminified.js +50 -0
  173. package/dist/sdk/models/shared/bpsconfig.d.ts +8 -0
  174. package/dist/sdk/models/shared/bpsconfig.js +53 -0
  175. package/dist/sdk/models/shared/bpspriceoverride.d.ts +24 -0
  176. package/dist/sdk/models/shared/bpspriceoverride.js +74 -0
  177. package/dist/sdk/models/shared/bpstier.d.ts +7 -0
  178. package/dist/sdk/models/shared/bpstier.js +60 -0
  179. package/dist/sdk/models/shared/bulkbpsconfig.d.ts +8 -0
  180. package/dist/sdk/models/shared/bulkbpsconfig.js +50 -0
  181. package/dist/sdk/models/shared/bulkbpspriceoverride.d.ts +24 -0
  182. package/dist/sdk/models/shared/bulkbpspriceoverride.js +74 -0
  183. package/dist/sdk/models/shared/bulkbpstier.d.ts +6 -0
  184. package/dist/sdk/models/shared/bulkbpstier.js +55 -0
  185. package/dist/sdk/models/shared/bulkconfig.d.ts +8 -0
  186. package/dist/sdk/models/shared/bulkconfig.js +50 -0
  187. package/dist/sdk/models/shared/bulkpriceoverride.d.ts +24 -0
  188. package/dist/sdk/models/shared/bulkpriceoverride.js +74 -0
  189. package/dist/sdk/models/shared/bulktier.d.ts +5 -0
  190. package/dist/sdk/models/shared/bulktier.js +50 -0
  191. package/dist/sdk/models/shared/cadence.d.ts +5 -0
  192. package/dist/sdk/models/shared/cadence.js +12 -0
  193. package/dist/sdk/models/shared/canceloption.d.ts +8 -0
  194. package/dist/sdk/models/shared/canceloption.js +15 -0
  195. package/dist/sdk/models/shared/changeoption.d.ts +8 -0
  196. package/dist/sdk/models/shared/changeoption.js +15 -0
  197. package/dist/sdk/models/shared/changeoption1.d.ts +8 -0
  198. package/dist/sdk/models/shared/changeoption1.js +15 -0
  199. package/dist/sdk/models/shared/coupon.d.ts +36 -0
  200. package/dist/sdk/models/shared/coupon.js +88 -0
  201. package/dist/sdk/models/shared/coupons.d.ts +10 -0
  202. package/dist/sdk/models/shared/coupons.js +57 -0
  203. package/dist/sdk/models/shared/credit.d.ts +16 -0
  204. package/dist/sdk/models/shared/credit.js +64 -0
  205. package/dist/sdk/models/shared/creditblock.d.ts +15 -0
  206. package/dist/sdk/models/shared/creditblock.js +58 -0
  207. package/dist/sdk/models/shared/creditledgerentries.d.ts +10 -0
  208. package/dist/sdk/models/shared/creditledgerentries.js +57 -0
  209. package/dist/sdk/models/shared/creditledgerentry.d.ts +58 -0
  210. package/dist/sdk/models/shared/creditledgerentry.js +144 -0
  211. package/dist/sdk/models/shared/creditnote.d.ts +71 -0
  212. package/dist/sdk/models/shared/creditnote.js +134 -0
  213. package/dist/sdk/models/shared/creditnotelineitem.d.ts +38 -0
  214. package/dist/sdk/models/shared/creditnotelineitem.js +86 -0
  215. package/dist/sdk/models/shared/creditnotes.d.ts +10 -0
  216. package/dist/sdk/models/shared/creditnotes.js +57 -0
  217. package/dist/sdk/models/shared/creditnotesummary.d.ts +9 -0
  218. package/dist/sdk/models/shared/creditnotesummary.js +74 -0
  219. package/dist/sdk/models/shared/creditnotetype.d.ts +7 -0
  220. package/dist/sdk/models/shared/creditnotetype.js +14 -0
  221. package/dist/sdk/models/shared/credits.d.ts +10 -0
  222. package/dist/sdk/models/shared/credits.js +57 -0
  223. package/dist/sdk/models/shared/customer.d.ts +227 -0
  224. package/dist/sdk/models/shared/customer.js +364 -0
  225. package/dist/sdk/models/shared/customerbalancetransaction.d.ts +57 -0
  226. package/dist/sdk/models/shared/customerbalancetransaction.js +133 -0
  227. package/dist/sdk/models/shared/customercost.d.ts +15 -0
  228. package/dist/sdk/models/shared/customercost.js +75 -0
  229. package/dist/sdk/models/shared/customercosts.d.ts +8 -0
  230. package/dist/sdk/models/shared/customercosts.js +50 -0
  231. package/dist/sdk/models/shared/customerminified.d.ts +8 -0
  232. package/dist/sdk/models/shared/customerminified.js +53 -0
  233. package/dist/sdk/models/shared/customers.d.ts +10 -0
  234. package/dist/sdk/models/shared/customers.js +57 -0
  235. package/dist/sdk/models/shared/debug.d.ts +8 -0
  236. package/dist/sdk/models/shared/debug.js +53 -0
  237. package/dist/sdk/models/shared/deprecatedeventresult.d.ts +10 -0
  238. package/dist/sdk/models/shared/deprecatedeventresult.js +48 -0
  239. package/dist/sdk/models/shared/discount.d.ts +25 -0
  240. package/dist/sdk/models/shared/discount.js +71 -0
  241. package/dist/sdk/models/shared/discounttype.d.ts +6 -0
  242. package/dist/sdk/models/shared/discounttype.js +13 -0
  243. package/dist/sdk/models/shared/durationunit.d.ts +8 -0
  244. package/dist/sdk/models/shared/durationunit.js +15 -0
  245. package/dist/sdk/models/shared/entrystatus.d.ts +7 -0
  246. package/dist/sdk/models/shared/entrystatus.js +14 -0
  247. package/dist/sdk/models/shared/entrytype.d.ts +9 -0
  248. package/dist/sdk/models/shared/entrytype.js +16 -0
  249. package/dist/sdk/models/shared/event.d.ts +32 -0
  250. package/dist/sdk/models/shared/event.js +82 -0
  251. package/dist/sdk/models/shared/eventsearchcriteria.d.ts +11 -0
  252. package/dist/sdk/models/shared/eventsearchcriteria.js +50 -0
  253. package/dist/sdk/models/shared/eventsearchresults.d.ts +10 -0
  254. package/dist/sdk/models/shared/eventsearchresults.js +57 -0
  255. package/dist/sdk/models/shared/externalmarketplace.d.ts +8 -0
  256. package/dist/sdk/models/shared/externalmarketplace.js +15 -0
  257. package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +18 -0
  258. package/dist/sdk/models/shared/fixedfeequantitychange.js +66 -0
  259. package/dist/sdk/models/shared/fixedfeequantityschedule.d.ts +7 -0
  260. package/dist/sdk/models/shared/fixedfeequantityschedule.js +68 -0
  261. package/dist/sdk/models/shared/granularity.d.ts +6 -0
  262. package/dist/sdk/models/shared/granularity.js +13 -0
  263. package/dist/sdk/models/shared/grouping.d.ts +8 -0
  264. package/dist/sdk/models/shared/grouping.js +53 -0
  265. package/dist/sdk/models/shared/index.d.ts +125 -0
  266. package/dist/sdk/models/shared/index.js +144 -0
  267. package/dist/sdk/models/shared/ingestionresponse.d.ts +13 -0
  268. package/dist/sdk/models/shared/ingestionresponse.js +57 -0
  269. package/dist/sdk/models/shared/invoice.d.ts +274 -0
  270. package/dist/sdk/models/shared/invoice.js +460 -0
  271. package/dist/sdk/models/shared/invoicelineitem.d.ts +207 -0
  272. package/dist/sdk/models/shared/invoicelineitem.js +416 -0
  273. package/dist/sdk/models/shared/invoices.d.ts +10 -0
  274. package/dist/sdk/models/shared/invoices.js +57 -0
  275. package/dist/sdk/models/shared/invoicesettings.d.ts +18 -0
  276. package/dist/sdk/models/shared/invoicesettings.js +58 -0
  277. package/dist/sdk/models/shared/invoicestatus.d.ts +10 -0
  278. package/dist/sdk/models/shared/invoicestatus.js +17 -0
  279. package/dist/sdk/models/shared/lineitem.d.ts +58 -0
  280. package/dist/sdk/models/shared/lineitem.js +147 -0
  281. package/dist/sdk/models/shared/matrixconfig.d.ts +13 -0
  282. package/dist/sdk/models/shared/matrixconfig.js +60 -0
  283. package/dist/sdk/models/shared/matrixconfig1.d.ts +10 -0
  284. package/dist/sdk/models/shared/matrixconfig1.js +48 -0
  285. package/dist/sdk/models/shared/matrixvalue.d.ts +8 -0
  286. package/dist/sdk/models/shared/matrixvalue.js +50 -0
  287. package/dist/sdk/models/shared/modeltype.d.ts +10 -0
  288. package/dist/sdk/models/shared/modeltype.js +17 -0
  289. package/dist/sdk/models/shared/newbackfill.d.ts +27 -0
  290. package/dist/sdk/models/shared/newbackfill.js +82 -0
  291. package/dist/sdk/models/shared/newcoupon.d.ts +24 -0
  292. package/dist/sdk/models/shared/newcoupon.js +69 -0
  293. package/dist/sdk/models/shared/newcreditledgerentry.d.ts +44 -0
  294. package/dist/sdk/models/shared/newcreditledgerentry.js +109 -0
  295. package/dist/sdk/models/shared/newcustomer.d.ts +202 -0
  296. package/dist/sdk/models/shared/newcustomer.js +324 -0
  297. package/dist/sdk/models/shared/newinvoicelineitem.d.ts +28 -0
  298. package/dist/sdk/models/shared/newinvoicelineitem.js +79 -0
  299. package/dist/sdk/models/shared/newsubscription.d.ts +79 -0
  300. package/dist/sdk/models/shared/newsubscription.js +145 -0
  301. package/dist/sdk/models/shared/newtransaction.d.ts +10 -0
  302. package/dist/sdk/models/shared/newtransaction.js +56 -0
  303. package/dist/sdk/models/shared/packageconfig.d.ts +8 -0
  304. package/dist/sdk/models/shared/packageconfig.js +53 -0
  305. package/dist/sdk/models/shared/packagepriceoverride.d.ts +24 -0
  306. package/dist/sdk/models/shared/packagepriceoverride.js +74 -0
  307. package/dist/sdk/models/shared/paginationmetadata.d.ts +5 -0
  308. package/dist/sdk/models/shared/paginationmetadata.js +50 -0
  309. package/dist/sdk/models/shared/perpricecost.d.ts +24 -0
  310. package/dist/sdk/models/shared/perpricecost.js +67 -0
  311. package/dist/sdk/models/shared/phaseoverride.d.ts +40 -0
  312. package/dist/sdk/models/shared/phaseoverride.js +100 -0
  313. package/dist/sdk/models/shared/plan.d.ts +101 -0
  314. package/dist/sdk/models/shared/plan.js +250 -0
  315. package/dist/sdk/models/shared/planminified.d.ts +5 -0
  316. package/dist/sdk/models/shared/planminified.js +50 -0
  317. package/dist/sdk/models/shared/planphase.d.ts +68 -0
  318. package/dist/sdk/models/shared/planphase.js +162 -0
  319. package/dist/sdk/models/shared/plans.d.ts +10 -0
  320. package/dist/sdk/models/shared/plans.js +57 -0
  321. package/dist/sdk/models/shared/price.d.ts +114 -0
  322. package/dist/sdk/models/shared/price.js +245 -0
  323. package/dist/sdk/models/shared/pricegroup.d.ts +17 -0
  324. package/dist/sdk/models/shared/pricegroup.js +65 -0
  325. package/dist/sdk/models/shared/product.d.ts +6 -0
  326. package/dist/sdk/models/shared/product.js +59 -0
  327. package/dist/sdk/models/shared/reason.d.ts +9 -0
  328. package/dist/sdk/models/shared/reason.js +16 -0
  329. package/dist/sdk/models/shared/requestvalidationerror.d.ts +20 -0
  330. package/dist/sdk/models/shared/requestvalidationerror.js +65 -0
  331. package/dist/sdk/models/shared/security.d.ts +4 -0
  332. package/dist/sdk/models/shared/security.js +45 -0
  333. package/dist/sdk/models/shared/sublineitem.d.ts +32 -0
  334. package/dist/sdk/models/shared/sublineitem.js +102 -0
  335. package/dist/sdk/models/shared/sublineitem1.d.ts +24 -0
  336. package/dist/sdk/models/shared/sublineitem1.js +75 -0
  337. package/dist/sdk/models/shared/sublineitem2.d.ts +6 -0
  338. package/dist/sdk/models/shared/sublineitem2.js +55 -0
  339. package/dist/sdk/models/shared/subscription.d.ts +95 -0
  340. package/dist/sdk/models/shared/subscription.js +207 -0
  341. package/dist/sdk/models/shared/subscriptioncancellation.d.ts +12 -0
  342. package/dist/sdk/models/shared/subscriptioncancellation.js +55 -0
  343. package/dist/sdk/models/shared/subscriptioncost.d.ts +15 -0
  344. package/dist/sdk/models/shared/subscriptioncost.js +75 -0
  345. package/dist/sdk/models/shared/subscriptioncosts.d.ts +8 -0
  346. package/dist/sdk/models/shared/subscriptioncosts.js +50 -0
  347. package/dist/sdk/models/shared/subscriptionminified.d.ts +7 -0
  348. package/dist/sdk/models/shared/subscriptionminified.js +48 -0
  349. package/dist/sdk/models/shared/subscriptionplanchange.d.ts +54 -0
  350. package/dist/sdk/models/shared/subscriptionplanchange.js +104 -0
  351. package/dist/sdk/models/shared/subscriptions.d.ts +10 -0
  352. package/dist/sdk/models/shared/subscriptions.js +57 -0
  353. package/dist/sdk/models/shared/subscriptionschedule.d.ts +10 -0
  354. package/dist/sdk/models/shared/subscriptionschedule.js +57 -0
  355. package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +7 -0
  356. package/dist/sdk/models/shared/subscriptionscheduleitem.js +65 -0
  357. package/dist/sdk/models/shared/subscriptionstatus.d.ts +5 -0
  358. package/dist/sdk/models/shared/subscriptionstatus.js +12 -0
  359. package/dist/sdk/models/shared/subscriptionusage.d.ts +8 -0
  360. package/dist/sdk/models/shared/subscriptionusage.js +50 -0
  361. package/dist/sdk/models/shared/taxamount.d.ts +15 -0
  362. package/dist/sdk/models/shared/taxamount.js +55 -0
  363. package/dist/sdk/models/shared/tier.d.ts +6 -0
  364. package/dist/sdk/models/shared/tier.js +55 -0
  365. package/dist/sdk/models/shared/tier7.d.ts +7 -0
  366. package/dist/sdk/models/shared/tier7.js +60 -0
  367. package/dist/sdk/models/shared/tierconfig.d.ts +9 -0
  368. package/dist/sdk/models/shared/tierconfig.js +58 -0
  369. package/dist/sdk/models/shared/tieredbpsconfig.d.ts +8 -0
  370. package/dist/sdk/models/shared/tieredbpsconfig.js +50 -0
  371. package/dist/sdk/models/shared/tieredbpsconfig1.d.ts +5 -0
  372. package/dist/sdk/models/shared/tieredbpsconfig1.js +47 -0
  373. package/dist/sdk/models/shared/tieredbpspriceoverride.d.ts +21 -0
  374. package/dist/sdk/models/shared/tieredbpspriceoverride.js +74 -0
  375. package/dist/sdk/models/shared/tieredconfig.d.ts +8 -0
  376. package/dist/sdk/models/shared/tieredconfig.js +50 -0
  377. package/dist/sdk/models/shared/tieredpriceoverride.d.ts +27 -0
  378. package/dist/sdk/models/shared/tieredpriceoverride.js +74 -0
  379. package/dist/sdk/models/shared/transactions.d.ts +10 -0
  380. package/dist/sdk/models/shared/transactions.js +57 -0
  381. package/dist/sdk/models/shared/transactiontype.d.ts +4 -0
  382. package/dist/sdk/models/shared/transactiontype.js +11 -0
  383. package/dist/sdk/models/shared/trialconfig.d.ts +8 -0
  384. package/dist/sdk/models/shared/trialconfig.js +54 -0
  385. package/dist/sdk/models/shared/type.d.ts +7 -0
  386. package/dist/sdk/models/shared/type.js +14 -0
  387. package/dist/sdk/models/shared/unitconfig.d.ts +7 -0
  388. package/dist/sdk/models/shared/unitconfig.js +48 -0
  389. package/dist/sdk/models/shared/unitpriceoverride.d.ts +24 -0
  390. package/dist/sdk/models/shared/unitpriceoverride.js +74 -0
  391. package/dist/sdk/models/shared/upcominginvoice.d.ts +95 -0
  392. package/dist/sdk/models/shared/upcominginvoice.js +193 -0
  393. package/dist/sdk/models/shared/updateevent.d.ts +28 -0
  394. package/dist/sdk/models/shared/updateevent.js +77 -0
  395. package/dist/sdk/models/shared/usage.d.ts +13 -0
  396. package/dist/sdk/models/shared/usage.js +69 -0
  397. package/dist/sdk/models/shared/usageitem.d.ts +6 -0
  398. package/dist/sdk/models/shared/usageitem.js +63 -0
  399. package/dist/sdk/models/shared/validationerrors.d.ts +13 -0
  400. package/dist/sdk/models/shared/validationerrors.js +59 -0
  401. package/dist/sdk/models/shared/viewmode.d.ts +7 -0
  402. package/dist/sdk/models/shared/viewmode.js +14 -0
  403. package/dist/sdk/plan.d.ts +222 -0
  404. package/dist/sdk/plan.js +422 -0
  405. package/dist/sdk/sdk.d.ts +298 -0
  406. package/dist/sdk/sdk.js +110 -0
  407. package/dist/sdk/subscription.d.ts +614 -0
  408. package/dist/sdk/subscription.js +1192 -0
  409. package/dist/sdk/types/index.d.ts +1 -0
  410. package/dist/sdk/types/index.js +20 -0
  411. package/dist/sdk/types/rfcdate.d.ts +9 -0
  412. package/dist/sdk/types/rfcdate.js +59 -0
  413. package/package.json +33 -0
@@ -0,0 +1,460 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ var __extends = (this && this.__extends) || (function () {
6
+ var extendStatics = function (d, b) {
7
+ extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
+ return extendStatics(d, b);
11
+ };
12
+ return function (d, b) {
13
+ if (typeof b !== "function" && b !== null)
14
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
+ extendStatics(d, b);
16
+ function __() { this.constructor = d; }
17
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
+ };
19
+ })();
20
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
21
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
25
+ };
26
+ var __metadata = (this && this.__metadata) || function (k, v) {
27
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.Invoice = exports.InvoiceMinimumAmount = exports.InvoiceMaximumAmount = exports.InvoiceDiscount = exports.InvoiceCustomerTaxID = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var autocollection_1 = require("./autocollection");
33
+ var creditnotesummary_1 = require("./creditnotesummary");
34
+ var customerminified_1 = require("./customerminified");
35
+ var discounttype_1 = require("./discounttype");
36
+ var invoicelineitem_1 = require("./invoicelineitem");
37
+ var invoicestatus_1 = require("./invoicestatus");
38
+ var subscriptionminified_1 = require("./subscriptionminified");
39
+ var transactions_1 = require("./transactions");
40
+ var class_transformer_1 = require("class-transformer");
41
+ /**
42
+ * Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.
43
+ *
44
+ * @remarks
45
+ *
46
+ *
47
+ * ### Supported Tax ID Countries and Types
48
+ *
49
+ *
50
+ * | Country | Type | Description |
51
+ * |----------------|--------------|---------------------------------------------|
52
+ * | Australia | `au_abn` | Australian Business Number (AU ABN) |
53
+ * | Australia | `au_arn` | Australian Taxation Office Reference Number |
54
+ * | Austria | `eu_vat` | European VAT number |
55
+ * | Belgium | `eu_vat` | European VAT number |
56
+ * | Brazil | `br_cnpj` | Brazilian CNPJ number |
57
+ * | Brazil | `br_cpf` | Brazilian CPF number |
58
+ * | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
59
+ * | Bulgaria | `eu_vat` | European VAT number |
60
+ * | Canada | `ca_bn` | Canadian BN |
61
+ * | Canada | `ca_gst_hst` | Canadian GST/HST number |
62
+ * | Canada | `ca_pst_bc` | Canadian PST number (British Columbia) |
63
+ * | Canada | `ca_pst_mb` | Canadian PST number (Manitoba) |
64
+ * | Canada | `ca_pst_sk` | Canadian PST number (Saskatchewan) |
65
+ * | Canada | `ca_qst` | Canadian QST number (Québec) |
66
+ * | Chile | `cl_tin` | Chilean TIN |
67
+ * | Croatia | `eu_vat` | European VAT number |
68
+ * | Cyprus | `eu_vat` | European VAT number |
69
+ * | Czech Republic | `eu_vat` | European VAT number |
70
+ * | Denmark | `eu_vat` | European VAT number |
71
+ * | Egypt | `eg_tin` | Egyptian Tax Identification Number |
72
+ * | Estonia | `eu_vat` | European VAT number |
73
+ * | EU | `eu_oss_vat` | European One Stop Shop VAT number for non-Union scheme |
74
+ * | Finland | `eu_vat` | European VAT number |
75
+ * | France | `eu_vat` | European VAT number |
76
+ * | Georgia | `ge_vat` | Georgian VAT |
77
+ * | Germany | `eu_vat` | European VAT number |
78
+ * | Greece | `eu_vat` | European VAT number |
79
+ * | Hong Kong | `hk_br` | Hong Kong BR number |
80
+ * | Hungary | `eu_vat` | European VAT number |
81
+ * | Hungary | `hu_tin` | Hungary tax number (adószám) |
82
+ * | Iceland | `is_vat` | Icelandic VAT |
83
+ * | India | `in_gst` | Indian GST number |
84
+ * | Indonesia | `id_npwp` | Indonesian NPWP number |
85
+ * | Ireland | `eu_vat` | European VAT number |
86
+ * | Israel | `il_vat` | Israel VAT |
87
+ * | Italy | `eu_vat` | European VAT number |
88
+ * | Japan | `jp_cn` | Japanese Corporate Number (*Hōjin Bangō*) |
89
+ * | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (*Tōroku Kokugai Jigyōsha no Tōroku Bangō*) |
90
+ * | Japan | `jp_trn` | Japanese Tax Registration Number (*Tōroku Bangō*) |
91
+ * | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
92
+ * | Latvia | `eu_vat` | European VAT number |
93
+ * | Liechtenstein | `li_uid` | Liechtensteinian UID number |
94
+ * | Lithuania | `eu_vat` | European VAT number |
95
+ * | Luxembourg | `eu_vat` | European VAT number |
96
+ * | Malaysia | `my_frp` | Malaysian FRP number |
97
+ * | Malaysia | `my_itn` | Malaysian ITN |
98
+ * | Malaysia | `my_sst` | Malaysian SST number |
99
+ * | Malta | `eu_vat ` | European VAT number |
100
+ * | Mexico | `mx_rfc` | Mexican RFC number |
101
+ * | Netherlands | `eu_vat` | European VAT number |
102
+ * | New Zealand | `nz_gst` | New Zealand GST number |
103
+ * | Norway | `no_vat` | Norwegian VAT number |
104
+ * | Philippines | `ph_tin ` | Philippines Tax Identification Number |
105
+ * | Poland | `eu_vat` | European VAT number |
106
+ * | Portugal | `eu_vat` | European VAT number |
107
+ * | Romania | `eu_vat` | European VAT number |
108
+ * | Russia | `ru_inn` | Russian INN |
109
+ * | Russia | `ru_kpp` | Russian KPP |
110
+ * | Saudi Arabia | `sg_gst` | Singaporean GST |
111
+ * | Singapore | `sg_uen` | Singaporean UEN |
112
+ * | Slovakia | `eu_vat` | European VAT number |
113
+ * | Slovenia | `eu_vat` | European VAT number |
114
+ * | Slovenia | `si_tin` | Slovenia tax number (davčna številka) |
115
+ * | South Africa | `za_vat` | South African VAT number |
116
+ * | South Korea | `kr_brn` | Korean BRN |
117
+ * | Spain | `es_cif` | Spanish NIF number (previously Spanish CIF number) |
118
+ * | Spain | `eu_vat` | European VAT number |
119
+ * | Sweden | `eu_vat` | European VAT number |
120
+ * | Switzerland | `ch_vat` | Switzerland VAT number |
121
+ * | Taiwan | `tw_vat` | Taiwanese VAT |
122
+ * | Thailand | `th_vat` | Thai VAT |
123
+ * | Turkey | `tr_tin` | Turkish Tax Identification Number |
124
+ * | Ukraine | `ua_vat` | Ukrainian VAT |
125
+ * | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
126
+ * | United Kingdom | `eu_vat` | Northern Ireland VAT number |
127
+ * | United Kingdom | `gb_vat` | United Kingdom VAT number |
128
+ * | United States | `us_ein` | United States EIN |
129
+ */
130
+ var InvoiceCustomerTaxID = /** @class */ (function (_super) {
131
+ __extends(InvoiceCustomerTaxID, _super);
132
+ function InvoiceCustomerTaxID() {
133
+ return _super !== null && _super.apply(this, arguments) || this;
134
+ }
135
+ __decorate([
136
+ (0, utils_1.SpeakeasyMetadata)(),
137
+ (0, class_transformer_1.Expose)({ name: "country" }),
138
+ __metadata("design:type", String)
139
+ ], InvoiceCustomerTaxID.prototype, "country", void 0);
140
+ __decorate([
141
+ (0, utils_1.SpeakeasyMetadata)(),
142
+ (0, class_transformer_1.Expose)({ name: "type" }),
143
+ __metadata("design:type", String)
144
+ ], InvoiceCustomerTaxID.prototype, "type", void 0);
145
+ __decorate([
146
+ (0, utils_1.SpeakeasyMetadata)(),
147
+ (0, class_transformer_1.Expose)({ name: "value" }),
148
+ __metadata("design:type", String)
149
+ ], InvoiceCustomerTaxID.prototype, "value", void 0);
150
+ return InvoiceCustomerTaxID;
151
+ }(utils_1.SpeakeasyBase));
152
+ exports.InvoiceCustomerTaxID = InvoiceCustomerTaxID;
153
+ var InvoiceDiscount = /** @class */ (function (_super) {
154
+ __extends(InvoiceDiscount, _super);
155
+ function InvoiceDiscount() {
156
+ return _super !== null && _super.apply(this, arguments) || this;
157
+ }
158
+ __decorate([
159
+ (0, utils_1.SpeakeasyMetadata)(),
160
+ (0, class_transformer_1.Expose)({ name: "amount_discount" }),
161
+ __metadata("design:type", String)
162
+ ], InvoiceDiscount.prototype, "amountDiscount", void 0);
163
+ __decorate([
164
+ (0, utils_1.SpeakeasyMetadata)(),
165
+ (0, class_transformer_1.Expose)({ name: "applies_to_price_ids" }),
166
+ __metadata("design:type", Array)
167
+ ], InvoiceDiscount.prototype, "appliesToPriceIds", void 0);
168
+ __decorate([
169
+ (0, utils_1.SpeakeasyMetadata)(),
170
+ (0, class_transformer_1.Expose)({ name: "discount_type" }),
171
+ __metadata("design:type", String)
172
+ ], InvoiceDiscount.prototype, "discountType", void 0);
173
+ __decorate([
174
+ (0, utils_1.SpeakeasyMetadata)(),
175
+ (0, class_transformer_1.Expose)({ name: "percentage_discount" }),
176
+ __metadata("design:type", Number)
177
+ ], InvoiceDiscount.prototype, "percentageDiscount", void 0);
178
+ __decorate([
179
+ (0, utils_1.SpeakeasyMetadata)(),
180
+ (0, class_transformer_1.Expose)({ name: "trial_amount_discount" }),
181
+ __metadata("design:type", String)
182
+ ], InvoiceDiscount.prototype, "trialAmountDiscount", void 0);
183
+ __decorate([
184
+ (0, utils_1.SpeakeasyMetadata)(),
185
+ (0, class_transformer_1.Expose)({ name: "usage_discount" }),
186
+ __metadata("design:type", Number)
187
+ ], InvoiceDiscount.prototype, "usageDiscount", void 0);
188
+ return InvoiceDiscount;
189
+ }(utils_1.SpeakeasyBase));
190
+ exports.InvoiceDiscount = InvoiceDiscount;
191
+ var InvoiceMaximumAmount = /** @class */ (function (_super) {
192
+ __extends(InvoiceMaximumAmount, _super);
193
+ function InvoiceMaximumAmount() {
194
+ return _super !== null && _super.apply(this, arguments) || this;
195
+ }
196
+ __decorate([
197
+ (0, utils_1.SpeakeasyMetadata)(),
198
+ (0, class_transformer_1.Expose)({ name: "applies_to_price_ids" }),
199
+ __metadata("design:type", Array)
200
+ ], InvoiceMaximumAmount.prototype, "appliesToPriceIds", void 0);
201
+ __decorate([
202
+ (0, utils_1.SpeakeasyMetadata)(),
203
+ (0, class_transformer_1.Expose)({ name: "maximum_amount" }),
204
+ __metadata("design:type", String)
205
+ ], InvoiceMaximumAmount.prototype, "maximumAmount", void 0);
206
+ return InvoiceMaximumAmount;
207
+ }(utils_1.SpeakeasyBase));
208
+ exports.InvoiceMaximumAmount = InvoiceMaximumAmount;
209
+ var InvoiceMinimumAmount = /** @class */ (function (_super) {
210
+ __extends(InvoiceMinimumAmount, _super);
211
+ function InvoiceMinimumAmount() {
212
+ return _super !== null && _super.apply(this, arguments) || this;
213
+ }
214
+ __decorate([
215
+ (0, utils_1.SpeakeasyMetadata)(),
216
+ (0, class_transformer_1.Expose)({ name: "applies_to_price_ids" }),
217
+ __metadata("design:type", Array)
218
+ ], InvoiceMinimumAmount.prototype, "appliesToPriceIds", void 0);
219
+ __decorate([
220
+ (0, utils_1.SpeakeasyMetadata)(),
221
+ (0, class_transformer_1.Expose)({ name: "minimum_amount" }),
222
+ __metadata("design:type", String)
223
+ ], InvoiceMinimumAmount.prototype, "minimumAmount", void 0);
224
+ return InvoiceMinimumAmount;
225
+ }(utils_1.SpeakeasyBase));
226
+ exports.InvoiceMinimumAmount = InvoiceMinimumAmount;
227
+ /**
228
+ * An [`Invoice`](../guides/concepts#invoice) is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.
229
+ */
230
+ var Invoice = /** @class */ (function (_super) {
231
+ __extends(Invoice, _super);
232
+ function Invoice() {
233
+ return _super !== null && _super.apply(this, arguments) || this;
234
+ }
235
+ __decorate([
236
+ (0, utils_1.SpeakeasyMetadata)(),
237
+ (0, class_transformer_1.Expose)({ name: "amount_due" }),
238
+ __metadata("design:type", String)
239
+ ], Invoice.prototype, "amountDue", void 0);
240
+ __decorate([
241
+ (0, utils_1.SpeakeasyMetadata)(),
242
+ (0, class_transformer_1.Expose)({ name: "auto_collection" }),
243
+ (0, class_transformer_1.Type)(function () { return autocollection_1.AutoCollection; }),
244
+ __metadata("design:type", autocollection_1.AutoCollection)
245
+ ], Invoice.prototype, "autoCollection", void 0);
246
+ __decorate([
247
+ (0, utils_1.SpeakeasyMetadata)(),
248
+ (0, class_transformer_1.Expose)({ name: "created_at" }),
249
+ (0, class_transformer_1.Transform)(function (_a) {
250
+ var value = _a.value;
251
+ return new Date(value);
252
+ }, { toClassOnly: true }),
253
+ __metadata("design:type", Date)
254
+ ], Invoice.prototype, "createdAt", void 0);
255
+ __decorate([
256
+ (0, utils_1.SpeakeasyMetadata)({ elemType: creditnotesummary_1.CreditNoteSummary }),
257
+ (0, class_transformer_1.Expose)({ name: "credit_notes" }),
258
+ (0, class_transformer_1.Type)(function () { return creditnotesummary_1.CreditNoteSummary; }),
259
+ __metadata("design:type", Array)
260
+ ], Invoice.prototype, "creditNotes", void 0);
261
+ __decorate([
262
+ (0, utils_1.SpeakeasyMetadata)(),
263
+ (0, class_transformer_1.Expose)({ name: "currency" }),
264
+ __metadata("design:type", String)
265
+ ], Invoice.prototype, "currency", void 0);
266
+ __decorate([
267
+ (0, utils_1.SpeakeasyMetadata)(),
268
+ (0, class_transformer_1.Expose)({ name: "customer" }),
269
+ (0, class_transformer_1.Type)(function () { return customerminified_1.CustomerMinified; }),
270
+ __metadata("design:type", customerminified_1.CustomerMinified)
271
+ ], Invoice.prototype, "customer", void 0);
272
+ __decorate([
273
+ (0, utils_1.SpeakeasyMetadata)(),
274
+ (0, class_transformer_1.Expose)({ name: "customer_balance_transactions" }),
275
+ (0, class_transformer_1.Type)(function () { return transactions_1.Transactions; }),
276
+ __metadata("design:type", transactions_1.Transactions)
277
+ ], Invoice.prototype, "customerBalanceTransactions", void 0);
278
+ __decorate([
279
+ (0, utils_1.SpeakeasyMetadata)(),
280
+ (0, class_transformer_1.Expose)({ name: "customer_tax_id" }),
281
+ (0, class_transformer_1.Type)(function () { return InvoiceCustomerTaxID; }),
282
+ __metadata("design:type", InvoiceCustomerTaxID)
283
+ ], Invoice.prototype, "customerTaxId", void 0);
284
+ __decorate([
285
+ (0, utils_1.SpeakeasyMetadata)(),
286
+ (0, class_transformer_1.Expose)({ name: "discount" }),
287
+ (0, class_transformer_1.Type)(function () { return InvoiceDiscount; }),
288
+ __metadata("design:type", InvoiceDiscount)
289
+ ], Invoice.prototype, "discount", void 0);
290
+ __decorate([
291
+ (0, utils_1.SpeakeasyMetadata)(),
292
+ (0, class_transformer_1.Expose)({ name: "due_date" }),
293
+ (0, class_transformer_1.Transform)(function (_a) {
294
+ var value = _a.value;
295
+ return new Date(value);
296
+ }, { toClassOnly: true }),
297
+ __metadata("design:type", Date)
298
+ ], Invoice.prototype, "dueDate", void 0);
299
+ __decorate([
300
+ (0, utils_1.SpeakeasyMetadata)(),
301
+ (0, class_transformer_1.Expose)({ name: "eligible_for_issue_at" }),
302
+ (0, class_transformer_1.Transform)(function (_a) {
303
+ var value = _a.value;
304
+ return new Date(value);
305
+ }, { toClassOnly: true }),
306
+ __metadata("design:type", Date)
307
+ ], Invoice.prototype, "eligibleForIssueAt", void 0);
308
+ __decorate([
309
+ (0, utils_1.SpeakeasyMetadata)(),
310
+ (0, class_transformer_1.Expose)({ name: "hosted_invoice_url" }),
311
+ __metadata("design:type", String)
312
+ ], Invoice.prototype, "hostedInvoiceUrl", void 0);
313
+ __decorate([
314
+ (0, utils_1.SpeakeasyMetadata)(),
315
+ (0, class_transformer_1.Expose)({ name: "id" }),
316
+ __metadata("design:type", String)
317
+ ], Invoice.prototype, "id", void 0);
318
+ __decorate([
319
+ (0, utils_1.SpeakeasyMetadata)(),
320
+ (0, class_transformer_1.Expose)({ name: "invoice_date" }),
321
+ (0, class_transformer_1.Transform)(function (_a) {
322
+ var value = _a.value;
323
+ return new Date(value);
324
+ }, { toClassOnly: true }),
325
+ __metadata("design:type", Date)
326
+ ], Invoice.prototype, "invoiceDate", void 0);
327
+ __decorate([
328
+ (0, utils_1.SpeakeasyMetadata)(),
329
+ (0, class_transformer_1.Expose)({ name: "invoice_number" }),
330
+ __metadata("design:type", String)
331
+ ], Invoice.prototype, "invoiceNumber", void 0);
332
+ __decorate([
333
+ (0, utils_1.SpeakeasyMetadata)(),
334
+ (0, class_transformer_1.Expose)({ name: "invoice_pdf" }),
335
+ __metadata("design:type", String)
336
+ ], Invoice.prototype, "invoicePdf", void 0);
337
+ __decorate([
338
+ (0, utils_1.SpeakeasyMetadata)(),
339
+ (0, class_transformer_1.Expose)({ name: "issue_failed_at" }),
340
+ (0, class_transformer_1.Transform)(function (_a) {
341
+ var value = _a.value;
342
+ return new Date(value);
343
+ }, { toClassOnly: true }),
344
+ __metadata("design:type", Date)
345
+ ], Invoice.prototype, "issueFailedAt", void 0);
346
+ __decorate([
347
+ (0, utils_1.SpeakeasyMetadata)(),
348
+ (0, class_transformer_1.Expose)({ name: "issued_at" }),
349
+ (0, class_transformer_1.Transform)(function (_a) {
350
+ var value = _a.value;
351
+ return new Date(value);
352
+ }, { toClassOnly: true }),
353
+ __metadata("design:type", Date)
354
+ ], Invoice.prototype, "issuedAt", void 0);
355
+ __decorate([
356
+ (0, utils_1.SpeakeasyMetadata)({ elemType: invoicelineitem_1.InvoiceLineItem }),
357
+ (0, class_transformer_1.Expose)({ name: "line_items" }),
358
+ (0, class_transformer_1.Type)(function () { return invoicelineitem_1.InvoiceLineItem; }),
359
+ __metadata("design:type", Array)
360
+ ], Invoice.prototype, "lineItems", void 0);
361
+ __decorate([
362
+ (0, utils_1.SpeakeasyMetadata)(),
363
+ (0, class_transformer_1.Expose)({ name: "maximum" }),
364
+ (0, class_transformer_1.Type)(function () { return InvoiceMaximumAmount; }),
365
+ __metadata("design:type", InvoiceMaximumAmount)
366
+ ], Invoice.prototype, "maximum", void 0);
367
+ __decorate([
368
+ (0, utils_1.SpeakeasyMetadata)(),
369
+ (0, class_transformer_1.Expose)({ name: "memo" }),
370
+ __metadata("design:type", String)
371
+ ], Invoice.prototype, "memo", void 0);
372
+ __decorate([
373
+ (0, utils_1.SpeakeasyMetadata)(),
374
+ (0, class_transformer_1.Expose)({ name: "minimum" }),
375
+ (0, class_transformer_1.Type)(function () { return InvoiceMinimumAmount; }),
376
+ __metadata("design:type", InvoiceMinimumAmount)
377
+ ], Invoice.prototype, "minimum", void 0);
378
+ __decorate([
379
+ (0, utils_1.SpeakeasyMetadata)(),
380
+ (0, class_transformer_1.Expose)({ name: "paid_at" }),
381
+ (0, class_transformer_1.Transform)(function (_a) {
382
+ var value = _a.value;
383
+ return new Date(value);
384
+ }, { toClassOnly: true }),
385
+ __metadata("design:type", Date)
386
+ ], Invoice.prototype, "paidAt", void 0);
387
+ __decorate([
388
+ (0, utils_1.SpeakeasyMetadata)(),
389
+ (0, class_transformer_1.Expose)({ name: "payment_failed_at" }),
390
+ (0, class_transformer_1.Transform)(function (_a) {
391
+ var value = _a.value;
392
+ return new Date(value);
393
+ }, { toClassOnly: true }),
394
+ __metadata("design:type", Date)
395
+ ], Invoice.prototype, "paymentFailedAt", void 0);
396
+ __decorate([
397
+ (0, utils_1.SpeakeasyMetadata)(),
398
+ (0, class_transformer_1.Expose)({ name: "payment_started_at" }),
399
+ (0, class_transformer_1.Transform)(function (_a) {
400
+ var value = _a.value;
401
+ return new Date(value);
402
+ }, { toClassOnly: true }),
403
+ __metadata("design:type", Date)
404
+ ], Invoice.prototype, "paymentStartedAt", void 0);
405
+ __decorate([
406
+ (0, utils_1.SpeakeasyMetadata)(),
407
+ (0, class_transformer_1.Expose)({ name: "scheduled_issue_at" }),
408
+ (0, class_transformer_1.Transform)(function (_a) {
409
+ var value = _a.value;
410
+ return new Date(value);
411
+ }, { toClassOnly: true }),
412
+ __metadata("design:type", Date)
413
+ ], Invoice.prototype, "scheduledIssueAt", void 0);
414
+ __decorate([
415
+ (0, utils_1.SpeakeasyMetadata)(),
416
+ (0, class_transformer_1.Expose)({ name: "status" }),
417
+ __metadata("design:type", String)
418
+ ], Invoice.prototype, "status", void 0);
419
+ __decorate([
420
+ (0, utils_1.SpeakeasyMetadata)(),
421
+ (0, class_transformer_1.Expose)({ name: "subscription" }),
422
+ (0, class_transformer_1.Type)(function () { return subscriptionminified_1.SubscriptionMinified; }),
423
+ __metadata("design:type", subscriptionminified_1.SubscriptionMinified)
424
+ ], Invoice.prototype, "subscription", void 0);
425
+ __decorate([
426
+ (0, utils_1.SpeakeasyMetadata)(),
427
+ (0, class_transformer_1.Expose)({ name: "subtotal" }),
428
+ __metadata("design:type", String)
429
+ ], Invoice.prototype, "subtotal", void 0);
430
+ __decorate([
431
+ (0, utils_1.SpeakeasyMetadata)(),
432
+ (0, class_transformer_1.Expose)({ name: "sync_failed_at" }),
433
+ (0, class_transformer_1.Transform)(function (_a) {
434
+ var value = _a.value;
435
+ return new Date(value);
436
+ }, { toClassOnly: true }),
437
+ __metadata("design:type", Date)
438
+ ], Invoice.prototype, "syncFailedAt", void 0);
439
+ __decorate([
440
+ (0, utils_1.SpeakeasyMetadata)(),
441
+ (0, class_transformer_1.Expose)({ name: "total" }),
442
+ __metadata("design:type", String)
443
+ ], Invoice.prototype, "total", void 0);
444
+ __decorate([
445
+ (0, utils_1.SpeakeasyMetadata)(),
446
+ (0, class_transformer_1.Expose)({ name: "voided_at" }),
447
+ (0, class_transformer_1.Transform)(function (_a) {
448
+ var value = _a.value;
449
+ return new Date(value);
450
+ }, { toClassOnly: true }),
451
+ __metadata("design:type", Date)
452
+ ], Invoice.prototype, "voidedAt", void 0);
453
+ __decorate([
454
+ (0, utils_1.SpeakeasyMetadata)(),
455
+ (0, class_transformer_1.Expose)({ name: "will_auto_issue" }),
456
+ __metadata("design:type", Boolean)
457
+ ], Invoice.prototype, "willAutoIssue", void 0);
458
+ return Invoice;
459
+ }(utils_1.SpeakeasyBase));
460
+ exports.Invoice = Invoice;
@@ -0,0 +1,207 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import { BillableMetric } from "./billablemetric";
3
+ import { BpsConfig } from "./bpsconfig";
4
+ import { BulkBpsConfig } from "./bulkbpsconfig";
5
+ import { BulkConfig } from "./bulkconfig";
6
+ import { Cadence } from "./cadence";
7
+ import { DiscountType } from "./discounttype";
8
+ import { MatrixConfig } from "./matrixconfig";
9
+ import { ModelType } from "./modeltype";
10
+ import { PackageConfig } from "./packageconfig";
11
+ import { SubLineItem } from "./sublineitem";
12
+ import { TaxAmount } from "./taxamount";
13
+ import { TieredBpsConfig } from "./tieredbpsconfig";
14
+ import { TieredConfig } from "./tieredconfig";
15
+ import { UnitConfig } from "./unitconfig";
16
+ export declare class InvoiceLineItemDiscount extends SpeakeasyBase {
17
+ /**
18
+ * Only available if discount_type is `amount`.
19
+ */
20
+ amountDiscount?: string;
21
+ /**
22
+ * List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
23
+ */
24
+ appliesToPriceIds?: string[];
25
+ discountType: DiscountType;
26
+ /**
27
+ * Only available if discount_type is `percentage`.This is a number between 0 and 1.
28
+ */
29
+ percentageDiscount?: number;
30
+ /**
31
+ * Only available if discount_type is `trial`
32
+ */
33
+ trialAmountDiscount?: string;
34
+ /**
35
+ * Only available if discount_type is `usage`. Number of usage units that this discount is for
36
+ */
37
+ usageDiscount?: number;
38
+ }
39
+ export declare class InvoiceLineItemMaximumAmount extends SpeakeasyBase {
40
+ /**
41
+ * List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
42
+ */
43
+ appliesToPriceIds: string[];
44
+ /**
45
+ * Maximum amount applied
46
+ */
47
+ maximumAmount: string;
48
+ }
49
+ export declare class InvoiceLineItemMinimumAmount extends SpeakeasyBase {
50
+ /**
51
+ * List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
52
+ */
53
+ appliesToPriceIds: string[];
54
+ /**
55
+ * Minimum amount applied
56
+ */
57
+ minimumAmount: string;
58
+ }
59
+ export declare class InvoiceLineItemPriceDiscount extends SpeakeasyBase {
60
+ /**
61
+ * Only available if discount_type is `amount`.
62
+ */
63
+ amountDiscount?: string;
64
+ /**
65
+ * List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
66
+ */
67
+ appliesToPriceIds?: string[];
68
+ discountType: DiscountType;
69
+ /**
70
+ * Only available if discount_type is `percentage`.This is a number between 0 and 1.
71
+ */
72
+ percentageDiscount?: number;
73
+ /**
74
+ * Only available if discount_type is `trial`
75
+ */
76
+ trialAmountDiscount?: string;
77
+ /**
78
+ * Only available if discount_type is `usage`. Number of usage units that this discount is for
79
+ */
80
+ usageDiscount?: number;
81
+ }
82
+ export declare class InvoiceLineItemPriceMaximumAmount extends SpeakeasyBase {
83
+ /**
84
+ * List of price_ids that this maximum amount applies to. For plan/plan phase maximums, this can be a subset of prices.
85
+ */
86
+ appliesToPriceIds: string[];
87
+ /**
88
+ * Maximum amount applied
89
+ */
90
+ maximumAmount: string;
91
+ }
92
+ export declare class InvoiceLineItemPriceMinimumAmount extends SpeakeasyBase {
93
+ /**
94
+ * List of price_ids that this minimum amount applies to. For plan/plan phase minimums, this can be a subset of prices.
95
+ */
96
+ appliesToPriceIds: string[];
97
+ /**
98
+ * Minimum amount applied
99
+ */
100
+ minimumAmount: string;
101
+ }
102
+ /**
103
+ * See the [plan reference](plan.tag.mdx) for a detailed discussion of different pricing models
104
+ */
105
+ export declare class InvoiceLineItemPrice extends SpeakeasyBase {
106
+ billableMetric?: BillableMetric;
107
+ /**
108
+ * Provided when model_type is `bps`
109
+ */
110
+ bpsConfig?: BpsConfig;
111
+ /**
112
+ * Provided when model_type is `bulk_bps`
113
+ */
114
+ bulkBpsConfig?: BulkBpsConfig;
115
+ /**
116
+ * Provided when model_type is `bulk`
117
+ */
118
+ bulkConfig?: BulkConfig;
119
+ cadence?: Cadence;
120
+ createdAt?: Date;
121
+ /**
122
+ * An ISO 4217 currency string for this plan's prices.
123
+ */
124
+ currency: string;
125
+ discount: InvoiceLineItemPriceDiscount;
126
+ /**
127
+ * If the Price represents a fixed cost, this represents the quantity of units applied. Mutually exclusive with billable_metric.
128
+ */
129
+ fixedPriceQuantity?: number;
130
+ id?: string;
131
+ /**
132
+ * Provided when model_type is `matrix`
133
+ */
134
+ matrixConfig?: MatrixConfig;
135
+ maximum?: InvoiceLineItemPriceMaximumAmount;
136
+ minimum: InvoiceLineItemPriceMinimumAmount;
137
+ modelType?: ModelType;
138
+ name?: string;
139
+ /**
140
+ * Provided when model_type is `package`
141
+ */
142
+ packageConfig?: PackageConfig;
143
+ /**
144
+ * The phase order which includes this price, only applicable to a plan with phases.
145
+ */
146
+ planPhaseOrder: number;
147
+ /**
148
+ * Provided when model_type is `tiered_bps`
149
+ */
150
+ tieredBpsConfig?: TieredBpsConfig;
151
+ /**
152
+ * Provided when model_type is`tiered`
153
+ */
154
+ tieredConfig?: TieredConfig;
155
+ /**
156
+ * Provided when model_type is `unit`
157
+ */
158
+ unitConfig?: UnitConfig;
159
+ }
160
+ /**
161
+ * The component line of an [Invoice](../guides/concepts#invoice)
162
+ */
163
+ export declare class InvoiceLineItem extends SpeakeasyBase {
164
+ /**
165
+ * The final amount after any discounts or minimums.
166
+ */
167
+ amount: string;
168
+ discount: InvoiceLineItemDiscount;
169
+ /**
170
+ * The end date of the range of time applied for this line item's price.
171
+ */
172
+ endDate: Date;
173
+ /**
174
+ * [DEPRECATED] For configured prices that are split by a grouping key, this will be populated with the key and a value. The `amount` and `subtotal` will be the values for this particular grouping.
175
+ *
176
+ * @deprecated this field will be removed in a future release, please migrate away from it as soon as possible
177
+ */
178
+ grouping: string;
179
+ /**
180
+ * A unique ID for this line item.
181
+ */
182
+ id: string;
183
+ maximum?: InvoiceLineItemMaximumAmount;
184
+ minimum: InvoiceLineItemMinimumAmount;
185
+ /**
186
+ * The name of the price associated with this line item.
187
+ */
188
+ name: string;
189
+ price: InvoiceLineItemPrice;
190
+ quantity: number;
191
+ /**
192
+ * The start date of the range of time applied for this line item's price.
193
+ */
194
+ startDate: Date;
195
+ /**
196
+ * For complex pricing structures, the line item can be broken down further in `sub_line_items`.
197
+ */
198
+ subLineItems: SubLineItem[];
199
+ /**
200
+ * The line amount before any line item-specific discounts or minimums.
201
+ */
202
+ subtotal: string;
203
+ /**
204
+ * An array of tax rates and their incurred tax amounts. Empty if no tax integration is configured.
205
+ */
206
+ taxAmounts: TaxAmount[];
207
+ }