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,147 @@
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.LineItem = exports.LineItemMinimumAmount = exports.LineItemMaximumAmount = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var discount_1 = require("./discount");
33
+ var grouping_1 = require("./grouping");
34
+ var sublineitem1_1 = require("./sublineitem1");
35
+ var class_transformer_1 = require("class-transformer");
36
+ var LineItemMaximumAmount = /** @class */ (function (_super) {
37
+ __extends(LineItemMaximumAmount, _super);
38
+ function LineItemMaximumAmount() {
39
+ return _super !== null && _super.apply(this, arguments) || this;
40
+ }
41
+ __decorate([
42
+ (0, utils_1.SpeakeasyMetadata)(),
43
+ (0, class_transformer_1.Expose)({ name: "applies_to_price_ids" }),
44
+ __metadata("design:type", Array)
45
+ ], LineItemMaximumAmount.prototype, "appliesToPriceIds", void 0);
46
+ __decorate([
47
+ (0, utils_1.SpeakeasyMetadata)(),
48
+ (0, class_transformer_1.Expose)({ name: "maximum_amount" }),
49
+ __metadata("design:type", String)
50
+ ], LineItemMaximumAmount.prototype, "maximumAmount", void 0);
51
+ return LineItemMaximumAmount;
52
+ }(utils_1.SpeakeasyBase));
53
+ exports.LineItemMaximumAmount = LineItemMaximumAmount;
54
+ var LineItemMinimumAmount = /** @class */ (function (_super) {
55
+ __extends(LineItemMinimumAmount, _super);
56
+ function LineItemMinimumAmount() {
57
+ return _super !== null && _super.apply(this, arguments) || this;
58
+ }
59
+ __decorate([
60
+ (0, utils_1.SpeakeasyMetadata)(),
61
+ (0, class_transformer_1.Expose)({ name: "applies_to_price_ids" }),
62
+ __metadata("design:type", Array)
63
+ ], LineItemMinimumAmount.prototype, "appliesToPriceIds", void 0);
64
+ __decorate([
65
+ (0, utils_1.SpeakeasyMetadata)(),
66
+ (0, class_transformer_1.Expose)({ name: "minimum_amount" }),
67
+ __metadata("design:type", String)
68
+ ], LineItemMinimumAmount.prototype, "minimumAmount", void 0);
69
+ return LineItemMinimumAmount;
70
+ }(utils_1.SpeakeasyBase));
71
+ exports.LineItemMinimumAmount = LineItemMinimumAmount;
72
+ var LineItem = /** @class */ (function (_super) {
73
+ __extends(LineItem, _super);
74
+ function LineItem() {
75
+ return _super !== null && _super.apply(this, arguments) || this;
76
+ }
77
+ __decorate([
78
+ (0, utils_1.SpeakeasyMetadata)(),
79
+ (0, class_transformer_1.Expose)({ name: "amount" }),
80
+ __metadata("design:type", String)
81
+ ], LineItem.prototype, "amount", void 0);
82
+ __decorate([
83
+ (0, utils_1.SpeakeasyMetadata)(),
84
+ (0, class_transformer_1.Expose)({ name: "discount" }),
85
+ (0, class_transformer_1.Type)(function () { return discount_1.Discount; }),
86
+ __metadata("design:type", discount_1.Discount)
87
+ ], LineItem.prototype, "discount", void 0);
88
+ __decorate([
89
+ (0, utils_1.SpeakeasyMetadata)(),
90
+ (0, class_transformer_1.Expose)({ name: "end_date" }),
91
+ (0, class_transformer_1.Transform)(function (_a) {
92
+ var value = _a.value;
93
+ return new Date(value);
94
+ }, { toClassOnly: true }),
95
+ __metadata("design:type", Date)
96
+ ], LineItem.prototype, "endDate", void 0);
97
+ __decorate([
98
+ (0, utils_1.SpeakeasyMetadata)(),
99
+ (0, class_transformer_1.Expose)({ name: "grouping" }),
100
+ (0, class_transformer_1.Type)(function () { return grouping_1.Grouping; }),
101
+ __metadata("design:type", grouping_1.Grouping)
102
+ ], LineItem.prototype, "grouping", void 0);
103
+ __decorate([
104
+ (0, utils_1.SpeakeasyMetadata)(),
105
+ (0, class_transformer_1.Expose)({ name: "maximum" }),
106
+ (0, class_transformer_1.Type)(function () { return LineItemMaximumAmount; }),
107
+ __metadata("design:type", LineItemMaximumAmount)
108
+ ], LineItem.prototype, "maximum", void 0);
109
+ __decorate([
110
+ (0, utils_1.SpeakeasyMetadata)(),
111
+ (0, class_transformer_1.Expose)({ name: "minimum" }),
112
+ (0, class_transformer_1.Type)(function () { return LineItemMinimumAmount; }),
113
+ __metadata("design:type", LineItemMinimumAmount)
114
+ ], LineItem.prototype, "minimum", void 0);
115
+ __decorate([
116
+ (0, utils_1.SpeakeasyMetadata)(),
117
+ (0, class_transformer_1.Expose)({ name: "name" }),
118
+ __metadata("design:type", String)
119
+ ], LineItem.prototype, "name", void 0);
120
+ __decorate([
121
+ (0, utils_1.SpeakeasyMetadata)(),
122
+ (0, class_transformer_1.Expose)({ name: "quantity" }),
123
+ __metadata("design:type", Number)
124
+ ], LineItem.prototype, "quantity", void 0);
125
+ __decorate([
126
+ (0, utils_1.SpeakeasyMetadata)(),
127
+ (0, class_transformer_1.Expose)({ name: "start_date" }),
128
+ (0, class_transformer_1.Transform)(function (_a) {
129
+ var value = _a.value;
130
+ return new Date(value);
131
+ }, { toClassOnly: true }),
132
+ __metadata("design:type", Date)
133
+ ], LineItem.prototype, "startDate", void 0);
134
+ __decorate([
135
+ (0, utils_1.SpeakeasyMetadata)({ elemType: sublineitem1_1.SubLineItem1 }),
136
+ (0, class_transformer_1.Expose)({ name: "sub_line_items" }),
137
+ (0, class_transformer_1.Type)(function () { return sublineitem1_1.SubLineItem1; }),
138
+ __metadata("design:type", Array)
139
+ ], LineItem.prototype, "subLineItems", void 0);
140
+ __decorate([
141
+ (0, utils_1.SpeakeasyMetadata)(),
142
+ (0, class_transformer_1.Expose)({ name: "subtotal" }),
143
+ __metadata("design:type", String)
144
+ ], LineItem.prototype, "subtotal", void 0);
145
+ return LineItem;
146
+ }(utils_1.SpeakeasyBase));
147
+ exports.LineItem = LineItem;
@@ -0,0 +1,13 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import { MatrixValue } from "./matrixvalue";
3
+ /**
4
+ * Provided when model_type is `matrix`
5
+ */
6
+ export declare class MatrixConfig extends SpeakeasyBase {
7
+ defaultUnitAmount?: string;
8
+ /**
9
+ * First and (optional) second dimension grouping keys
10
+ */
11
+ dimensions: string[];
12
+ matrixValues: MatrixValue[];
13
+ }
@@ -0,0 +1,60 @@
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.MatrixConfig = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var matrixvalue_1 = require("./matrixvalue");
33
+ var class_transformer_1 = require("class-transformer");
34
+ /**
35
+ * Provided when model_type is `matrix`
36
+ */
37
+ var MatrixConfig = /** @class */ (function (_super) {
38
+ __extends(MatrixConfig, _super);
39
+ function MatrixConfig() {
40
+ return _super !== null && _super.apply(this, arguments) || this;
41
+ }
42
+ __decorate([
43
+ (0, utils_1.SpeakeasyMetadata)(),
44
+ (0, class_transformer_1.Expose)({ name: "default_unit_amount" }),
45
+ __metadata("design:type", String)
46
+ ], MatrixConfig.prototype, "defaultUnitAmount", void 0);
47
+ __decorate([
48
+ (0, utils_1.SpeakeasyMetadata)(),
49
+ (0, class_transformer_1.Expose)({ name: "dimensions" }),
50
+ __metadata("design:type", Array)
51
+ ], MatrixConfig.prototype, "dimensions", void 0);
52
+ __decorate([
53
+ (0, utils_1.SpeakeasyMetadata)({ elemType: matrixvalue_1.MatrixValue }),
54
+ (0, class_transformer_1.Expose)({ name: "matrix_values" }),
55
+ (0, class_transformer_1.Type)(function () { return matrixvalue_1.MatrixValue; }),
56
+ __metadata("design:type", Array)
57
+ ], MatrixConfig.prototype, "matrixValues", void 0);
58
+ return MatrixConfig;
59
+ }(utils_1.SpeakeasyBase));
60
+ exports.MatrixConfig = MatrixConfig;
@@ -0,0 +1,10 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ /**
3
+ * Only available if `type` is `matrix`. Contains the values of the matrix that this `sub_line_item` represents.
4
+ */
5
+ export declare class MatrixConfig1 extends SpeakeasyBase {
6
+ /**
7
+ * The ordered dimension values for this line item.
8
+ */
9
+ dimensionValues: string[];
10
+ }
@@ -0,0 +1,48 @@
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.MatrixConfig1 = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ /**
34
+ * Only available if `type` is `matrix`. Contains the values of the matrix that this `sub_line_item` represents.
35
+ */
36
+ var MatrixConfig1 = /** @class */ (function (_super) {
37
+ __extends(MatrixConfig1, _super);
38
+ function MatrixConfig1() {
39
+ return _super !== null && _super.apply(this, arguments) || this;
40
+ }
41
+ __decorate([
42
+ (0, utils_1.SpeakeasyMetadata)(),
43
+ (0, class_transformer_1.Expose)({ name: "dimension_values" }),
44
+ __metadata("design:type", Array)
45
+ ], MatrixConfig1.prototype, "dimensionValues", void 0);
46
+ return MatrixConfig1;
47
+ }(utils_1.SpeakeasyBase));
48
+ exports.MatrixConfig1 = MatrixConfig1;
@@ -0,0 +1,8 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ export declare class MatrixValue extends SpeakeasyBase {
3
+ /**
4
+ * First and (optional) second dimension value
5
+ */
6
+ dimensionValues: string[];
7
+ unitAmount: string;
8
+ }
@@ -0,0 +1,50 @@
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.MatrixValue = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ var MatrixValue = /** @class */ (function (_super) {
34
+ __extends(MatrixValue, _super);
35
+ function MatrixValue() {
36
+ return _super !== null && _super.apply(this, arguments) || this;
37
+ }
38
+ __decorate([
39
+ (0, utils_1.SpeakeasyMetadata)(),
40
+ (0, class_transformer_1.Expose)({ name: "dimension_values" }),
41
+ __metadata("design:type", Array)
42
+ ], MatrixValue.prototype, "dimensionValues", void 0);
43
+ __decorate([
44
+ (0, utils_1.SpeakeasyMetadata)(),
45
+ (0, class_transformer_1.Expose)({ name: "unit_amount" }),
46
+ __metadata("design:type", String)
47
+ ], MatrixValue.prototype, "unitAmount", void 0);
48
+ return MatrixValue;
49
+ }(utils_1.SpeakeasyBase));
50
+ exports.MatrixValue = MatrixValue;
@@ -0,0 +1,10 @@
1
+ export declare enum ModelType {
2
+ Unit = "unit",
3
+ Tiered = "tiered",
4
+ Bulk = "bulk",
5
+ Package = "package",
6
+ Bps = "bps",
7
+ TieredBps = "tiered_bps",
8
+ BulkBps = "bulk_bps",
9
+ Matrix = "matrix"
10
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ModelType = void 0;
7
+ var ModelType;
8
+ (function (ModelType) {
9
+ ModelType["Unit"] = "unit";
10
+ ModelType["Tiered"] = "tiered";
11
+ ModelType["Bulk"] = "bulk";
12
+ ModelType["Package"] = "package";
13
+ ModelType["Bps"] = "bps";
14
+ ModelType["TieredBps"] = "tiered_bps";
15
+ ModelType["BulkBps"] = "bulk_bps";
16
+ ModelType["Matrix"] = "matrix";
17
+ })(ModelType = exports.ModelType || (exports.ModelType = {}));
@@ -0,0 +1,27 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ export declare class NewBackfill extends SpeakeasyBase {
3
+ /**
4
+ * The time at which no more events will be accepted for this backfill. The backfill will automatically begin reflecting throughout Orb at the close time. If not specified, it will default to 1 day after the creation of the backfill.
5
+ */
6
+ closeTime?: Date;
7
+ /**
8
+ * The ID of the customer to which this backfill is scoped.
9
+ */
10
+ customerId?: string;
11
+ /**
12
+ * The external customer ID of the customer to which this backfill is scoped.
13
+ */
14
+ externalCustomerId?: string;
15
+ /**
16
+ * If true, replaces all existing events in the timeframe with the newly ingested events. If false, adds the newly ingested events to the existing events.
17
+ */
18
+ replaceExistingEvents: boolean;
19
+ /**
20
+ * The (exclusive) end of the usage timeframe affected by this backfill.
21
+ */
22
+ timeframeEnd: Date;
23
+ /**
24
+ * The (inclusive) start of the usage timeframe affected by this backfill.
25
+ */
26
+ timeframeStart: Date;
27
+ }
@@ -0,0 +1,82 @@
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.NewBackfill = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var class_transformer_1 = require("class-transformer");
33
+ var NewBackfill = /** @class */ (function (_super) {
34
+ __extends(NewBackfill, _super);
35
+ function NewBackfill() {
36
+ return _super !== null && _super.apply(this, arguments) || this;
37
+ }
38
+ __decorate([
39
+ (0, utils_1.SpeakeasyMetadata)(),
40
+ (0, class_transformer_1.Expose)({ name: "close_time" }),
41
+ (0, class_transformer_1.Transform)(function (_a) {
42
+ var value = _a.value;
43
+ return new Date(value);
44
+ }, { toClassOnly: true }),
45
+ __metadata("design:type", Date)
46
+ ], NewBackfill.prototype, "closeTime", void 0);
47
+ __decorate([
48
+ (0, utils_1.SpeakeasyMetadata)(),
49
+ (0, class_transformer_1.Expose)({ name: "customer_id" }),
50
+ __metadata("design:type", String)
51
+ ], NewBackfill.prototype, "customerId", void 0);
52
+ __decorate([
53
+ (0, utils_1.SpeakeasyMetadata)(),
54
+ (0, class_transformer_1.Expose)({ name: "external_customer_id" }),
55
+ __metadata("design:type", String)
56
+ ], NewBackfill.prototype, "externalCustomerId", void 0);
57
+ __decorate([
58
+ (0, utils_1.SpeakeasyMetadata)(),
59
+ (0, class_transformer_1.Expose)({ name: "replace_existing_events" }),
60
+ __metadata("design:type", Boolean)
61
+ ], NewBackfill.prototype, "replaceExistingEvents", void 0);
62
+ __decorate([
63
+ (0, utils_1.SpeakeasyMetadata)(),
64
+ (0, class_transformer_1.Expose)({ name: "timeframe_end" }),
65
+ (0, class_transformer_1.Transform)(function (_a) {
66
+ var value = _a.value;
67
+ return new Date(value);
68
+ }, { toClassOnly: true }),
69
+ __metadata("design:type", Date)
70
+ ], NewBackfill.prototype, "timeframeEnd", void 0);
71
+ __decorate([
72
+ (0, utils_1.SpeakeasyMetadata)(),
73
+ (0, class_transformer_1.Expose)({ name: "timeframe_start" }),
74
+ (0, class_transformer_1.Transform)(function (_a) {
75
+ var value = _a.value;
76
+ return new Date(value);
77
+ }, { toClassOnly: true }),
78
+ __metadata("design:type", Date)
79
+ ], NewBackfill.prototype, "timeframeStart", void 0);
80
+ return NewBackfill;
81
+ }(utils_1.SpeakeasyBase));
82
+ exports.NewBackfill = NewBackfill;
@@ -0,0 +1,24 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import { Discount } from "./discount";
3
+ /**
4
+ * A coupon represents a reusable discount configuration, and have an attached redemption code that can be issued to your end users. Coupons are most often used in self-serve signup or upgrade flows in your checkout experience or billing portal.
5
+ *
6
+ * @remarks
7
+ *
8
+ * To redeem a coupon, pass the `redemption_code` property in the [create subscription](create-subscription.api.mdx) or [schedule plan change](schedule-plan-change.api.mdx) request.
9
+ */
10
+ export declare class NewCoupon extends SpeakeasyBase {
11
+ discount: Discount;
12
+ /**
13
+ * This allows for a coupon's discount to apply for a limited time (determined in months); a `null` value here means "unlimited time".
14
+ */
15
+ durationInMonths?: number;
16
+ /**
17
+ * The maximum number of redemptions allowed for this coupon before it is exhausted; `null` here means "unlimited".
18
+ */
19
+ maxRedemptions?: number;
20
+ /**
21
+ * This string can be used to redeem this coupon for a given subscription.
22
+ */
23
+ redemptionCode: string;
24
+ }
@@ -0,0 +1,69 @@
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.NewCoupon = void 0;
31
+ var utils_1 = require("../../../internal/utils");
32
+ var discount_1 = require("./discount");
33
+ var class_transformer_1 = require("class-transformer");
34
+ /**
35
+ * A coupon represents a reusable discount configuration, and have an attached redemption code that can be issued to your end users. Coupons are most often used in self-serve signup or upgrade flows in your checkout experience or billing portal.
36
+ *
37
+ * @remarks
38
+ *
39
+ * To redeem a coupon, pass the `redemption_code` property in the [create subscription](create-subscription.api.mdx) or [schedule plan change](schedule-plan-change.api.mdx) request.
40
+ */
41
+ var NewCoupon = /** @class */ (function (_super) {
42
+ __extends(NewCoupon, _super);
43
+ function NewCoupon() {
44
+ return _super !== null && _super.apply(this, arguments) || this;
45
+ }
46
+ __decorate([
47
+ (0, utils_1.SpeakeasyMetadata)(),
48
+ (0, class_transformer_1.Expose)({ name: "discount" }),
49
+ (0, class_transformer_1.Type)(function () { return discount_1.Discount; }),
50
+ __metadata("design:type", discount_1.Discount)
51
+ ], NewCoupon.prototype, "discount", void 0);
52
+ __decorate([
53
+ (0, utils_1.SpeakeasyMetadata)(),
54
+ (0, class_transformer_1.Expose)({ name: "duration_in_months" }),
55
+ __metadata("design:type", Number)
56
+ ], NewCoupon.prototype, "durationInMonths", void 0);
57
+ __decorate([
58
+ (0, utils_1.SpeakeasyMetadata)(),
59
+ (0, class_transformer_1.Expose)({ name: "max_redemptions" }),
60
+ __metadata("design:type", Number)
61
+ ], NewCoupon.prototype, "maxRedemptions", void 0);
62
+ __decorate([
63
+ (0, utils_1.SpeakeasyMetadata)(),
64
+ (0, class_transformer_1.Expose)({ name: "redemption_code" }),
65
+ __metadata("design:type", String)
66
+ ], NewCoupon.prototype, "redemptionCode", void 0);
67
+ return NewCoupon;
68
+ }(utils_1.SpeakeasyBase));
69
+ exports.NewCoupon = NewCoupon;
@@ -0,0 +1,44 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import { RFCDate } from "../../types";
3
+ import { EntryType } from "./entrytype";
4
+ import { InvoiceSettings } from "./invoicesettings";
5
+ /**
6
+ * User-specified key/value pairs for the ledger entry resource.
7
+ */
8
+ export declare class NewCreditLedgerEntryMetadata extends SpeakeasyBase {
9
+ }
10
+ export declare class NewCreditLedgerEntry extends SpeakeasyBase {
11
+ /**
12
+ * The number of credits to effect. Note that this is required for increment or decrement operations.
13
+ */
14
+ amount?: number;
15
+ /**
16
+ * The ID of the block affected by an `expiration_change`
17
+ */
18
+ blockId?: string;
19
+ /**
20
+ * Optional metadata that can be specified when adding ledger results via the API. For example, this can be used to note an increment refers to trial credits, or for noting corrections as a result of an incident, etc.
21
+ */
22
+ description?: string;
23
+ entryType: EntryType;
24
+ /**
25
+ * A future date (specified in YYYY-MM-DD format) that denotes when this credit balance should expire.
26
+ */
27
+ expiryDate?: RFCDate;
28
+ /**
29
+ * Passing `invoice_settings` automatically generates an invoice for the newly added credits. If `invoice_settings` is passed, you must specify `per_unit_cost_basis`, as the calculation of the invoice total is done on that basis.
30
+ */
31
+ invoiceSettings?: InvoiceSettings;
32
+ /**
33
+ * User-specified key/value pairs for the ledger entry resource.
34
+ */
35
+ metadata?: NewCreditLedgerEntryMetadata;
36
+ /**
37
+ * Can only be specified when `entry_type=increment`. How much, in USD, a customer paid for a single credit in this block
38
+ */
39
+ perUnitCostBasis?: string;
40
+ /**
41
+ * A future date (specified in YYYY-MM-DD) used for `expiration_change`
42
+ */
43
+ targetExpiryDate?: RFCDate;
44
+ }