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.
- package/LICENSE.md +21 -0
- package/README.md +169 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -0
- package/dist/internal/utils/contenttype.d.ts +1 -0
- package/dist/internal/utils/contenttype.js +33 -0
- package/dist/internal/utils/headers.d.ts +4 -0
- package/dist/internal/utils/headers.js +92 -0
- package/dist/internal/utils/index.d.ts +8 -0
- package/dist/internal/utils/index.js +27 -0
- package/dist/internal/utils/pathparams.d.ts +2 -0
- package/dist/internal/utils/pathparams.js +53 -0
- package/dist/internal/utils/queryparams.d.ts +2 -0
- package/dist/internal/utils/queryparams.js +178 -0
- package/dist/internal/utils/requestbody.d.ts +2 -0
- package/dist/internal/utils/requestbody.js +318 -0
- package/dist/internal/utils/retries.d.ts +20 -0
- package/dist/internal/utils/retries.js +250 -0
- package/dist/internal/utils/security.d.ts +2 -0
- package/dist/internal/utils/security.js +188 -0
- package/dist/internal/utils/utils.d.ts +37 -0
- package/dist/internal/utils/utils.js +370 -0
- package/dist/sdk/availability.d.ts +19 -0
- package/dist/sdk/availability.js +135 -0
- package/dist/sdk/coupon.d.ts +53 -0
- package/dist/sdk/coupon.js +358 -0
- package/dist/sdk/credit.d.ts +142 -0
- package/dist/sdk/credit.js +501 -0
- package/dist/sdk/creditnote.d.ts +26 -0
- package/dist/sdk/creditnote.js +186 -0
- package/dist/sdk/customer.d.ts +264 -0
- package/dist/sdk/customer.js +958 -0
- package/dist/sdk/event.d.ts +258 -0
- package/dist/sdk/event.js +732 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +20 -0
- package/dist/sdk/invoice.d.ts +60 -0
- package/dist/sdk/invoice.js +416 -0
- package/dist/sdk/models/operations/addledgerentryexternalid.d.ts +16 -0
- package/dist/sdk/models/operations/addledgerentryexternalid.js +95 -0
- package/dist/sdk/models/operations/amendevent.d.ts +23 -0
- package/dist/sdk/models/operations/amendevent.js +99 -0
- package/dist/sdk/models/operations/amendusage.d.ts +34 -0
- package/dist/sdk/models/operations/amendusage.js +122 -0
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +34 -0
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +122 -0
- package/dist/sdk/models/operations/archivecoupon.d.ts +15 -0
- package/dist/sdk/models/operations/archivecoupon.js +91 -0
- package/dist/sdk/models/operations/cancelsubscription.d.ts +16 -0
- package/dist/sdk/models/operations/cancelsubscription.js +95 -0
- package/dist/sdk/models/operations/closebackfill.d.ts +15 -0
- package/dist/sdk/models/operations/closebackfill.js +91 -0
- package/dist/sdk/models/operations/createbackfill.d.ts +12 -0
- package/dist/sdk/models/operations/createbackfill.js +79 -0
- package/dist/sdk/models/operations/createcoupon.d.ts +12 -0
- package/dist/sdk/models/operations/createcoupon.js +79 -0
- package/dist/sdk/models/operations/createcustomer.d.ts +12 -0
- package/dist/sdk/models/operations/createcustomer.js +79 -0
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +16 -0
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +95 -0
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +12 -0
- package/dist/sdk/models/operations/createinvoicelineitem.js +79 -0
- package/dist/sdk/models/operations/createledgerentry.d.ts +16 -0
- package/dist/sdk/models/operations/createledgerentry.js +95 -0
- package/dist/sdk/models/operations/createsubscription.d.ts +12 -0
- package/dist/sdk/models/operations/createsubscription.js +79 -0
- package/dist/sdk/models/operations/deletecustomer.d.ts +22 -0
- package/dist/sdk/models/operations/deletecustomer.js +78 -0
- package/dist/sdk/models/operations/deprecateevent.d.ts +22 -0
- package/dist/sdk/models/operations/deprecateevent.js +95 -0
- package/dist/sdk/models/operations/fetchcoupon.d.ts +15 -0
- package/dist/sdk/models/operations/fetchcoupon.js +91 -0
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +18 -0
- package/dist/sdk/models/operations/fetchcreditnote.js +91 -0
- package/dist/sdk/models/operations/fetchcustomer.d.ts +18 -0
- package/dist/sdk/models/operations/fetchcustomer.js +91 -0
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +34 -0
- package/dist/sdk/models/operations/fetchcustomercosts.js +107 -0
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +31 -0
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +107 -0
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +26 -0
- package/dist/sdk/models/operations/fetchcustomercredits.js +99 -0
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +23 -0
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +99 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +35 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +111 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +35 -0
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +111 -0
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +15 -0
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +91 -0
- package/dist/sdk/models/operations/fetchinvoice.d.ts +15 -0
- package/dist/sdk/models/operations/fetchinvoice.js +91 -0
- package/dist/sdk/models/operations/fetchplan.d.ts +15 -0
- package/dist/sdk/models/operations/fetchplan.js +91 -0
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +15 -0
- package/dist/sdk/models/operations/fetchplanexternalid.js +91 -0
- package/dist/sdk/models/operations/fetchsubscription.d.ts +15 -0
- package/dist/sdk/models/operations/fetchsubscription.js +91 -0
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +31 -0
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +107 -0
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +23 -0
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +99 -0
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +39 -0
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +115 -0
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +15 -0
- package/dist/sdk/models/operations/fetchupcominginvoice.js +91 -0
- package/dist/sdk/models/operations/index.d.ts +55 -0
- package/dist/sdk/models/operations/index.js +74 -0
- package/dist/sdk/models/operations/ingest.d.ts +30 -0
- package/dist/sdk/models/operations/ingest.js +118 -0
- package/dist/sdk/models/operations/issueinvoice.d.ts +19 -0
- package/dist/sdk/models/operations/issueinvoice.js +95 -0
- package/dist/sdk/models/operations/listbackfills.d.ts +22 -0
- package/dist/sdk/models/operations/listbackfills.js +95 -0
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +23 -0
- package/dist/sdk/models/operations/listbalancetransactions.js +99 -0
- package/dist/sdk/models/operations/listcoupons.d.ts +30 -0
- package/dist/sdk/models/operations/listcoupons.js +103 -0
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +15 -0
- package/dist/sdk/models/operations/listcouponsubscriptions.js +91 -0
- package/dist/sdk/models/operations/listcreditnote.d.ts +34 -0
- package/dist/sdk/models/operations/listcreditnote.js +107 -0
- package/dist/sdk/models/operations/listcustomers.d.ts +22 -0
- package/dist/sdk/models/operations/listcustomers.js +95 -0
- package/dist/sdk/models/operations/listinvoices.d.ts +38 -0
- package/dist/sdk/models/operations/listinvoices.js +111 -0
- package/dist/sdk/models/operations/listplans.d.ts +22 -0
- package/dist/sdk/models/operations/listplans.js +95 -0
- package/dist/sdk/models/operations/listsubscriptions.d.ts +24 -0
- package/dist/sdk/models/operations/listsubscriptions.js +103 -0
- package/dist/sdk/models/operations/ping.d.ts +12 -0
- package/dist/sdk/models/operations/ping.js +79 -0
- package/dist/sdk/models/operations/revertbackfill.d.ts +15 -0
- package/dist/sdk/models/operations/revertbackfill.js +91 -0
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +16 -0
- package/dist/sdk/models/operations/scheduleplanchange.js +95 -0
- package/dist/sdk/models/operations/searchevents.d.ts +23 -0
- package/dist/sdk/models/operations/searchevents.js +99 -0
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +15 -0
- package/dist/sdk/models/operations/unschedulecancellation.js +91 -0
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +15 -0
- package/dist/sdk/models/operations/unscheduleplanchange.js +91 -0
- package/dist/sdk/models/operations/updatecustomer.d.ts +19 -0
- package/dist/sdk/models/operations/updatecustomer.js +95 -0
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +16 -0
- package/dist/sdk/models/operations/updatecustomerexternalid.js +95 -0
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +16 -0
- package/dist/sdk/models/operations/updatefixedfeequantity.js +95 -0
- package/dist/sdk/models/operations/voidinvoice.d.ts +19 -0
- package/dist/sdk/models/operations/voidinvoice.js +95 -0
- package/dist/sdk/models/shared/action.d.ts +8 -0
- package/dist/sdk/models/shared/action.js +15 -0
- package/dist/sdk/models/shared/amendedevent.d.ts +28 -0
- package/dist/sdk/models/shared/amendedevent.js +81 -0
- package/dist/sdk/models/shared/amendedusage.d.ts +16 -0
- package/dist/sdk/models/shared/amendedusage.js +62 -0
- package/dist/sdk/models/shared/amendeventresult.d.ts +10 -0
- package/dist/sdk/models/shared/amendeventresult.js +48 -0
- package/dist/sdk/models/shared/autocollection.d.ts +18 -0
- package/dist/sdk/models/shared/autocollection.js +66 -0
- package/dist/sdk/models/shared/availability.d.ts +7 -0
- package/dist/sdk/models/shared/availability.js +48 -0
- package/dist/sdk/models/shared/backfill.d.ts +27 -0
- package/dist/sdk/models/shared/backfill.js +104 -0
- package/dist/sdk/models/shared/backfills.d.ts +10 -0
- package/dist/sdk/models/shared/backfills.js +57 -0
- package/dist/sdk/models/shared/backfillstatus.d.ts +9 -0
- package/dist/sdk/models/shared/backfillstatus.js +16 -0
- package/dist/sdk/models/shared/billablemetric.d.ts +4 -0
- package/dist/sdk/models/shared/billablemetric.js +45 -0
- package/dist/sdk/models/shared/billablemetricminified.d.ts +5 -0
- package/dist/sdk/models/shared/billablemetricminified.js +50 -0
- package/dist/sdk/models/shared/bpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bpsconfig.js +53 -0
- package/dist/sdk/models/shared/bpspriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/bpstier.d.ts +7 -0
- package/dist/sdk/models/shared/bpstier.js +60 -0
- package/dist/sdk/models/shared/bulkbpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bulkbpsconfig.js +50 -0
- package/dist/sdk/models/shared/bulkbpspriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bulkbpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/bulkbpstier.d.ts +6 -0
- package/dist/sdk/models/shared/bulkbpstier.js +55 -0
- package/dist/sdk/models/shared/bulkconfig.d.ts +8 -0
- package/dist/sdk/models/shared/bulkconfig.js +50 -0
- package/dist/sdk/models/shared/bulkpriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/bulkpriceoverride.js +74 -0
- package/dist/sdk/models/shared/bulktier.d.ts +5 -0
- package/dist/sdk/models/shared/bulktier.js +50 -0
- package/dist/sdk/models/shared/cadence.d.ts +5 -0
- package/dist/sdk/models/shared/cadence.js +12 -0
- package/dist/sdk/models/shared/canceloption.d.ts +8 -0
- package/dist/sdk/models/shared/canceloption.js +15 -0
- package/dist/sdk/models/shared/changeoption.d.ts +8 -0
- package/dist/sdk/models/shared/changeoption.js +15 -0
- package/dist/sdk/models/shared/changeoption1.d.ts +8 -0
- package/dist/sdk/models/shared/changeoption1.js +15 -0
- package/dist/sdk/models/shared/coupon.d.ts +36 -0
- package/dist/sdk/models/shared/coupon.js +88 -0
- package/dist/sdk/models/shared/coupons.d.ts +10 -0
- package/dist/sdk/models/shared/coupons.js +57 -0
- package/dist/sdk/models/shared/credit.d.ts +16 -0
- package/dist/sdk/models/shared/credit.js +64 -0
- package/dist/sdk/models/shared/creditblock.d.ts +15 -0
- package/dist/sdk/models/shared/creditblock.js +58 -0
- package/dist/sdk/models/shared/creditledgerentries.d.ts +10 -0
- package/dist/sdk/models/shared/creditledgerentries.js +57 -0
- package/dist/sdk/models/shared/creditledgerentry.d.ts +58 -0
- package/dist/sdk/models/shared/creditledgerentry.js +144 -0
- package/dist/sdk/models/shared/creditnote.d.ts +71 -0
- package/dist/sdk/models/shared/creditnote.js +134 -0
- package/dist/sdk/models/shared/creditnotelineitem.d.ts +38 -0
- package/dist/sdk/models/shared/creditnotelineitem.js +86 -0
- package/dist/sdk/models/shared/creditnotes.d.ts +10 -0
- package/dist/sdk/models/shared/creditnotes.js +57 -0
- package/dist/sdk/models/shared/creditnotesummary.d.ts +9 -0
- package/dist/sdk/models/shared/creditnotesummary.js +74 -0
- package/dist/sdk/models/shared/creditnotetype.d.ts +7 -0
- package/dist/sdk/models/shared/creditnotetype.js +14 -0
- package/dist/sdk/models/shared/credits.d.ts +10 -0
- package/dist/sdk/models/shared/credits.js +57 -0
- package/dist/sdk/models/shared/customer.d.ts +227 -0
- package/dist/sdk/models/shared/customer.js +364 -0
- package/dist/sdk/models/shared/customerbalancetransaction.d.ts +57 -0
- package/dist/sdk/models/shared/customerbalancetransaction.js +133 -0
- package/dist/sdk/models/shared/customercost.d.ts +15 -0
- package/dist/sdk/models/shared/customercost.js +75 -0
- package/dist/sdk/models/shared/customercosts.d.ts +8 -0
- package/dist/sdk/models/shared/customercosts.js +50 -0
- package/dist/sdk/models/shared/customerminified.d.ts +8 -0
- package/dist/sdk/models/shared/customerminified.js +53 -0
- package/dist/sdk/models/shared/customers.d.ts +10 -0
- package/dist/sdk/models/shared/customers.js +57 -0
- package/dist/sdk/models/shared/debug.d.ts +8 -0
- package/dist/sdk/models/shared/debug.js +53 -0
- package/dist/sdk/models/shared/deprecatedeventresult.d.ts +10 -0
- package/dist/sdk/models/shared/deprecatedeventresult.js +48 -0
- package/dist/sdk/models/shared/discount.d.ts +25 -0
- package/dist/sdk/models/shared/discount.js +71 -0
- package/dist/sdk/models/shared/discounttype.d.ts +6 -0
- package/dist/sdk/models/shared/discounttype.js +13 -0
- package/dist/sdk/models/shared/durationunit.d.ts +8 -0
- package/dist/sdk/models/shared/durationunit.js +15 -0
- package/dist/sdk/models/shared/entrystatus.d.ts +7 -0
- package/dist/sdk/models/shared/entrystatus.js +14 -0
- package/dist/sdk/models/shared/entrytype.d.ts +9 -0
- package/dist/sdk/models/shared/entrytype.js +16 -0
- package/dist/sdk/models/shared/event.d.ts +32 -0
- package/dist/sdk/models/shared/event.js +82 -0
- package/dist/sdk/models/shared/eventsearchcriteria.d.ts +11 -0
- package/dist/sdk/models/shared/eventsearchcriteria.js +50 -0
- package/dist/sdk/models/shared/eventsearchresults.d.ts +10 -0
- package/dist/sdk/models/shared/eventsearchresults.js +57 -0
- package/dist/sdk/models/shared/externalmarketplace.d.ts +8 -0
- package/dist/sdk/models/shared/externalmarketplace.js +15 -0
- package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +18 -0
- package/dist/sdk/models/shared/fixedfeequantitychange.js +66 -0
- package/dist/sdk/models/shared/fixedfeequantityschedule.d.ts +7 -0
- package/dist/sdk/models/shared/fixedfeequantityschedule.js +68 -0
- package/dist/sdk/models/shared/granularity.d.ts +6 -0
- package/dist/sdk/models/shared/granularity.js +13 -0
- package/dist/sdk/models/shared/grouping.d.ts +8 -0
- package/dist/sdk/models/shared/grouping.js +53 -0
- package/dist/sdk/models/shared/index.d.ts +125 -0
- package/dist/sdk/models/shared/index.js +144 -0
- package/dist/sdk/models/shared/ingestionresponse.d.ts +13 -0
- package/dist/sdk/models/shared/ingestionresponse.js +57 -0
- package/dist/sdk/models/shared/invoice.d.ts +274 -0
- package/dist/sdk/models/shared/invoice.js +460 -0
- package/dist/sdk/models/shared/invoicelineitem.d.ts +207 -0
- package/dist/sdk/models/shared/invoicelineitem.js +416 -0
- package/dist/sdk/models/shared/invoices.d.ts +10 -0
- package/dist/sdk/models/shared/invoices.js +57 -0
- package/dist/sdk/models/shared/invoicesettings.d.ts +18 -0
- package/dist/sdk/models/shared/invoicesettings.js +58 -0
- package/dist/sdk/models/shared/invoicestatus.d.ts +10 -0
- package/dist/sdk/models/shared/invoicestatus.js +17 -0
- package/dist/sdk/models/shared/lineitem.d.ts +58 -0
- package/dist/sdk/models/shared/lineitem.js +147 -0
- package/dist/sdk/models/shared/matrixconfig.d.ts +13 -0
- package/dist/sdk/models/shared/matrixconfig.js +60 -0
- package/dist/sdk/models/shared/matrixconfig1.d.ts +10 -0
- package/dist/sdk/models/shared/matrixconfig1.js +48 -0
- package/dist/sdk/models/shared/matrixvalue.d.ts +8 -0
- package/dist/sdk/models/shared/matrixvalue.js +50 -0
- package/dist/sdk/models/shared/modeltype.d.ts +10 -0
- package/dist/sdk/models/shared/modeltype.js +17 -0
- package/dist/sdk/models/shared/newbackfill.d.ts +27 -0
- package/dist/sdk/models/shared/newbackfill.js +82 -0
- package/dist/sdk/models/shared/newcoupon.d.ts +24 -0
- package/dist/sdk/models/shared/newcoupon.js +69 -0
- package/dist/sdk/models/shared/newcreditledgerentry.d.ts +44 -0
- package/dist/sdk/models/shared/newcreditledgerentry.js +109 -0
- package/dist/sdk/models/shared/newcustomer.d.ts +202 -0
- package/dist/sdk/models/shared/newcustomer.js +324 -0
- package/dist/sdk/models/shared/newinvoicelineitem.d.ts +28 -0
- package/dist/sdk/models/shared/newinvoicelineitem.js +79 -0
- package/dist/sdk/models/shared/newsubscription.d.ts +79 -0
- package/dist/sdk/models/shared/newsubscription.js +145 -0
- package/dist/sdk/models/shared/newtransaction.d.ts +10 -0
- package/dist/sdk/models/shared/newtransaction.js +56 -0
- package/dist/sdk/models/shared/packageconfig.d.ts +8 -0
- package/dist/sdk/models/shared/packageconfig.js +53 -0
- package/dist/sdk/models/shared/packagepriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/packagepriceoverride.js +74 -0
- package/dist/sdk/models/shared/paginationmetadata.d.ts +5 -0
- package/dist/sdk/models/shared/paginationmetadata.js +50 -0
- package/dist/sdk/models/shared/perpricecost.d.ts +24 -0
- package/dist/sdk/models/shared/perpricecost.js +67 -0
- package/dist/sdk/models/shared/phaseoverride.d.ts +40 -0
- package/dist/sdk/models/shared/phaseoverride.js +100 -0
- package/dist/sdk/models/shared/plan.d.ts +101 -0
- package/dist/sdk/models/shared/plan.js +250 -0
- package/dist/sdk/models/shared/planminified.d.ts +5 -0
- package/dist/sdk/models/shared/planminified.js +50 -0
- package/dist/sdk/models/shared/planphase.d.ts +68 -0
- package/dist/sdk/models/shared/planphase.js +162 -0
- package/dist/sdk/models/shared/plans.d.ts +10 -0
- package/dist/sdk/models/shared/plans.js +57 -0
- package/dist/sdk/models/shared/price.d.ts +114 -0
- package/dist/sdk/models/shared/price.js +245 -0
- package/dist/sdk/models/shared/pricegroup.d.ts +17 -0
- package/dist/sdk/models/shared/pricegroup.js +65 -0
- package/dist/sdk/models/shared/product.d.ts +6 -0
- package/dist/sdk/models/shared/product.js +59 -0
- package/dist/sdk/models/shared/reason.d.ts +9 -0
- package/dist/sdk/models/shared/reason.js +16 -0
- package/dist/sdk/models/shared/requestvalidationerror.d.ts +20 -0
- package/dist/sdk/models/shared/requestvalidationerror.js +65 -0
- package/dist/sdk/models/shared/security.d.ts +4 -0
- package/dist/sdk/models/shared/security.js +45 -0
- package/dist/sdk/models/shared/sublineitem.d.ts +32 -0
- package/dist/sdk/models/shared/sublineitem.js +102 -0
- package/dist/sdk/models/shared/sublineitem1.d.ts +24 -0
- package/dist/sdk/models/shared/sublineitem1.js +75 -0
- package/dist/sdk/models/shared/sublineitem2.d.ts +6 -0
- package/dist/sdk/models/shared/sublineitem2.js +55 -0
- package/dist/sdk/models/shared/subscription.d.ts +95 -0
- package/dist/sdk/models/shared/subscription.js +207 -0
- package/dist/sdk/models/shared/subscriptioncancellation.d.ts +12 -0
- package/dist/sdk/models/shared/subscriptioncancellation.js +55 -0
- package/dist/sdk/models/shared/subscriptioncost.d.ts +15 -0
- package/dist/sdk/models/shared/subscriptioncost.js +75 -0
- package/dist/sdk/models/shared/subscriptioncosts.d.ts +8 -0
- package/dist/sdk/models/shared/subscriptioncosts.js +50 -0
- package/dist/sdk/models/shared/subscriptionminified.d.ts +7 -0
- package/dist/sdk/models/shared/subscriptionminified.js +48 -0
- package/dist/sdk/models/shared/subscriptionplanchange.d.ts +54 -0
- package/dist/sdk/models/shared/subscriptionplanchange.js +104 -0
- package/dist/sdk/models/shared/subscriptions.d.ts +10 -0
- package/dist/sdk/models/shared/subscriptions.js +57 -0
- package/dist/sdk/models/shared/subscriptionschedule.d.ts +10 -0
- package/dist/sdk/models/shared/subscriptionschedule.js +57 -0
- package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +7 -0
- package/dist/sdk/models/shared/subscriptionscheduleitem.js +65 -0
- package/dist/sdk/models/shared/subscriptionstatus.d.ts +5 -0
- package/dist/sdk/models/shared/subscriptionstatus.js +12 -0
- package/dist/sdk/models/shared/subscriptionusage.d.ts +8 -0
- package/dist/sdk/models/shared/subscriptionusage.js +50 -0
- package/dist/sdk/models/shared/taxamount.d.ts +15 -0
- package/dist/sdk/models/shared/taxamount.js +55 -0
- package/dist/sdk/models/shared/tier.d.ts +6 -0
- package/dist/sdk/models/shared/tier.js +55 -0
- package/dist/sdk/models/shared/tier7.d.ts +7 -0
- package/dist/sdk/models/shared/tier7.js +60 -0
- package/dist/sdk/models/shared/tierconfig.d.ts +9 -0
- package/dist/sdk/models/shared/tierconfig.js +58 -0
- package/dist/sdk/models/shared/tieredbpsconfig.d.ts +8 -0
- package/dist/sdk/models/shared/tieredbpsconfig.js +50 -0
- package/dist/sdk/models/shared/tieredbpsconfig1.d.ts +5 -0
- package/dist/sdk/models/shared/tieredbpsconfig1.js +47 -0
- package/dist/sdk/models/shared/tieredbpspriceoverride.d.ts +21 -0
- package/dist/sdk/models/shared/tieredbpspriceoverride.js +74 -0
- package/dist/sdk/models/shared/tieredconfig.d.ts +8 -0
- package/dist/sdk/models/shared/tieredconfig.js +50 -0
- package/dist/sdk/models/shared/tieredpriceoverride.d.ts +27 -0
- package/dist/sdk/models/shared/tieredpriceoverride.js +74 -0
- package/dist/sdk/models/shared/transactions.d.ts +10 -0
- package/dist/sdk/models/shared/transactions.js +57 -0
- package/dist/sdk/models/shared/transactiontype.d.ts +4 -0
- package/dist/sdk/models/shared/transactiontype.js +11 -0
- package/dist/sdk/models/shared/trialconfig.d.ts +8 -0
- package/dist/sdk/models/shared/trialconfig.js +54 -0
- package/dist/sdk/models/shared/type.d.ts +7 -0
- package/dist/sdk/models/shared/type.js +14 -0
- package/dist/sdk/models/shared/unitconfig.d.ts +7 -0
- package/dist/sdk/models/shared/unitconfig.js +48 -0
- package/dist/sdk/models/shared/unitpriceoverride.d.ts +24 -0
- package/dist/sdk/models/shared/unitpriceoverride.js +74 -0
- package/dist/sdk/models/shared/upcominginvoice.d.ts +95 -0
- package/dist/sdk/models/shared/upcominginvoice.js +193 -0
- package/dist/sdk/models/shared/updateevent.d.ts +28 -0
- package/dist/sdk/models/shared/updateevent.js +77 -0
- package/dist/sdk/models/shared/usage.d.ts +13 -0
- package/dist/sdk/models/shared/usage.js +69 -0
- package/dist/sdk/models/shared/usageitem.d.ts +6 -0
- package/dist/sdk/models/shared/usageitem.js +63 -0
- package/dist/sdk/models/shared/validationerrors.d.ts +13 -0
- package/dist/sdk/models/shared/validationerrors.js +59 -0
- package/dist/sdk/models/shared/viewmode.d.ts +7 -0
- package/dist/sdk/models/shared/viewmode.js +14 -0
- package/dist/sdk/plan.d.ts +222 -0
- package/dist/sdk/plan.js +422 -0
- package/dist/sdk/sdk.d.ts +298 -0
- package/dist/sdk/sdk.js +110 -0
- package/dist/sdk/subscription.d.ts +614 -0
- package/dist/sdk/subscription.js +1192 -0
- package/dist/sdk/types/index.d.ts +1 -0
- package/dist/sdk/types/index.js +20 -0
- package/dist/sdk/types/rfcdate.d.ts +9 -0
- package/dist/sdk/types/rfcdate.js +59 -0
- package/package.json +33 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import { Customer } from "./customer";
|
|
3
|
+
import { FixedFeeQuantitySchedule } from "./fixedfeequantityschedule";
|
|
4
|
+
import { Plan } from "./plan";
|
|
5
|
+
import { SubscriptionStatus } from "./subscriptionstatus";
|
|
6
|
+
/**
|
|
7
|
+
* User specified key-value pairs. If no metadata was specified at subscription creation time, this defaults to an empty dictionary.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SubscriptionMetadata extends SpeakeasyBase {
|
|
10
|
+
}
|
|
11
|
+
export declare class SubscriptionRedeemedCoupon extends SpeakeasyBase {
|
|
12
|
+
couponId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The effective end time for the coupon, after which point it'll no longer apply to invoices for this subscription.
|
|
15
|
+
*/
|
|
16
|
+
endDate?: Date;
|
|
17
|
+
/**
|
|
18
|
+
* The effective start time of this coupon - that is, when its corresponding discount starts applying.
|
|
19
|
+
*/
|
|
20
|
+
startDate?: Date;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A subscription represents a customer's recurring relationship with your business.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
*
|
|
27
|
+
* By default, subscriptions begin on the day that they're created and renew automatically for each billing cycle at the cadence that's configured in the plan definition.
|
|
28
|
+
*
|
|
29
|
+
* Subscriptions also default to **beginning of month alignment**, which means the first invoice issued for the subscription will have pro-rated charges between the `start_date` and the first of the following month. Subsequent billing periods will always start and end on a month boundary (e.g. subsequent month starts for monthly billing).
|
|
30
|
+
*
|
|
31
|
+
* Depending on the plan configuration, any _flat_ recurring fees will be billed either at the beginning (in-advance) or end (in-arrears) of each billing cycle. Plans default to **in-advance billing**. Usage-based fees are billed in arrears as usage is accumulated. In the normal course of events, you can expect an invoice to contain usage-based charges for the previous period, and a recurring fee for the following period.
|
|
32
|
+
*/
|
|
33
|
+
export declare class Subscription extends SpeakeasyBase {
|
|
34
|
+
/**
|
|
35
|
+
* The current plan phase that is active, only if the subscription's plan has phases.
|
|
36
|
+
*/
|
|
37
|
+
activePlanPhaseOrder?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. This property defaults to the plan's behavior.
|
|
40
|
+
*/
|
|
41
|
+
autoCollection?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The day of the month on which the billing cycle is anchored. If the maximum number of days in a month is greater than this value, the last day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing period begins on the 30th.
|
|
44
|
+
*/
|
|
45
|
+
billingCycleDay: number;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
/**
|
|
48
|
+
* The end of the current billing period. This is an exclusive timestamp, such that the instant returned is not part of the billing period. Set to null for subscriptions that are not currently active.
|
|
49
|
+
*/
|
|
50
|
+
currentBillingPeriodEndDate?: Date;
|
|
51
|
+
/**
|
|
52
|
+
* The start of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if the subscription is not currently active.
|
|
53
|
+
*/
|
|
54
|
+
currentBillingPeriodStartDate?: Date;
|
|
55
|
+
/**
|
|
56
|
+
* A customer is a buyer of your products, and the other party to the billing relationship.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
*
|
|
60
|
+
* In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an `external_customer_id` with your own identifier. See [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further information about how these aliases work in Orb.
|
|
61
|
+
*
|
|
62
|
+
* In addition to having an identifier in your system, a customer may exist in a payment provider solution like Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.
|
|
63
|
+
*
|
|
64
|
+
* A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which defaults to your account's timezone. See [Timezone localization](../guides/product-catalog/timezones.md) for information on what this timezone parameter influences within Orb.
|
|
65
|
+
*/
|
|
66
|
+
customer: Customer;
|
|
67
|
+
/**
|
|
68
|
+
* Determines the default memo on this subscriptions' invoices. Note that if this is not provided, it is determined by the plan configuration.
|
|
69
|
+
*/
|
|
70
|
+
defaultInvoiceMemo?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The date Orb stops billing for this subscription.
|
|
73
|
+
*/
|
|
74
|
+
endDate: Date;
|
|
75
|
+
/**
|
|
76
|
+
* List of all fixed fee quantities associated with this subscription, with their start and end dates. This list contains the initial quantity along with quantity changes.
|
|
77
|
+
*/
|
|
78
|
+
fixedFeeQuantitySchedule: FixedFeeQuantitySchedule[];
|
|
79
|
+
id: string;
|
|
80
|
+
/**
|
|
81
|
+
* User specified key-value pairs. If no metadata was specified at subscription creation time, this defaults to an empty dictionary.
|
|
82
|
+
*/
|
|
83
|
+
metadata: SubscriptionMetadata;
|
|
84
|
+
/**
|
|
85
|
+
* Determines the difference between the invoice issue date for subscription invoices as the date that they are due. A value of "0" here represents that the invoice is due on issue, whereas a value of 30 represents that the customer has a month to pay the invoice.
|
|
86
|
+
*/
|
|
87
|
+
netTerms?: number;
|
|
88
|
+
plan: Plan;
|
|
89
|
+
redeemedCoupon?: SubscriptionRedeemedCoupon;
|
|
90
|
+
/**
|
|
91
|
+
* The date Orb starts billing for this subscription.
|
|
92
|
+
*/
|
|
93
|
+
startDate: Date;
|
|
94
|
+
status: SubscriptionStatus;
|
|
95
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
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.Subscription = exports.SubscriptionRedeemedCoupon = exports.SubscriptionMetadata = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var customer_1 = require("./customer");
|
|
33
|
+
var fixedfeequantityschedule_1 = require("./fixedfeequantityschedule");
|
|
34
|
+
var plan_1 = require("./plan");
|
|
35
|
+
var subscriptionstatus_1 = require("./subscriptionstatus");
|
|
36
|
+
var class_transformer_1 = require("class-transformer");
|
|
37
|
+
/**
|
|
38
|
+
* User specified key-value pairs. If no metadata was specified at subscription creation time, this defaults to an empty dictionary.
|
|
39
|
+
*/
|
|
40
|
+
var SubscriptionMetadata = /** @class */ (function (_super) {
|
|
41
|
+
__extends(SubscriptionMetadata, _super);
|
|
42
|
+
function SubscriptionMetadata() {
|
|
43
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
44
|
+
}
|
|
45
|
+
return SubscriptionMetadata;
|
|
46
|
+
}(utils_1.SpeakeasyBase));
|
|
47
|
+
exports.SubscriptionMetadata = SubscriptionMetadata;
|
|
48
|
+
var SubscriptionRedeemedCoupon = /** @class */ (function (_super) {
|
|
49
|
+
__extends(SubscriptionRedeemedCoupon, _super);
|
|
50
|
+
function SubscriptionRedeemedCoupon() {
|
|
51
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
}
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
55
|
+
(0, class_transformer_1.Expose)({ name: "coupon_id" }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], SubscriptionRedeemedCoupon.prototype, "couponId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
60
|
+
(0, class_transformer_1.Expose)({ name: "end_date" }),
|
|
61
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
62
|
+
var value = _a.value;
|
|
63
|
+
return new Date(value);
|
|
64
|
+
}, { toClassOnly: true }),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], SubscriptionRedeemedCoupon.prototype, "endDate", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
69
|
+
(0, class_transformer_1.Expose)({ name: "start_date" }),
|
|
70
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
71
|
+
var value = _a.value;
|
|
72
|
+
return new Date(value);
|
|
73
|
+
}, { toClassOnly: true }),
|
|
74
|
+
__metadata("design:type", Date)
|
|
75
|
+
], SubscriptionRedeemedCoupon.prototype, "startDate", void 0);
|
|
76
|
+
return SubscriptionRedeemedCoupon;
|
|
77
|
+
}(utils_1.SpeakeasyBase));
|
|
78
|
+
exports.SubscriptionRedeemedCoupon = SubscriptionRedeemedCoupon;
|
|
79
|
+
/**
|
|
80
|
+
* A subscription represents a customer's recurring relationship with your business.
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
*
|
|
84
|
+
* By default, subscriptions begin on the day that they're created and renew automatically for each billing cycle at the cadence that's configured in the plan definition.
|
|
85
|
+
*
|
|
86
|
+
* Subscriptions also default to **beginning of month alignment**, which means the first invoice issued for the subscription will have pro-rated charges between the `start_date` and the first of the following month. Subsequent billing periods will always start and end on a month boundary (e.g. subsequent month starts for monthly billing).
|
|
87
|
+
*
|
|
88
|
+
* Depending on the plan configuration, any _flat_ recurring fees will be billed either at the beginning (in-advance) or end (in-arrears) of each billing cycle. Plans default to **in-advance billing**. Usage-based fees are billed in arrears as usage is accumulated. In the normal course of events, you can expect an invoice to contain usage-based charges for the previous period, and a recurring fee for the following period.
|
|
89
|
+
*/
|
|
90
|
+
var Subscription = /** @class */ (function (_super) {
|
|
91
|
+
__extends(Subscription, _super);
|
|
92
|
+
function Subscription() {
|
|
93
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
94
|
+
}
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
97
|
+
(0, class_transformer_1.Expose)({ name: "active_plan_phase_order" }),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], Subscription.prototype, "activePlanPhaseOrder", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
102
|
+
(0, class_transformer_1.Expose)({ name: "auto_collection" }),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], Subscription.prototype, "autoCollection", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
107
|
+
(0, class_transformer_1.Expose)({ name: "billing_cycle_day" }),
|
|
108
|
+
__metadata("design:type", Number)
|
|
109
|
+
], Subscription.prototype, "billingCycleDay", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
112
|
+
(0, class_transformer_1.Expose)({ name: "created_at" }),
|
|
113
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
114
|
+
var value = _a.value;
|
|
115
|
+
return new Date(value);
|
|
116
|
+
}, { toClassOnly: true }),
|
|
117
|
+
__metadata("design:type", Date)
|
|
118
|
+
], Subscription.prototype, "createdAt", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
121
|
+
(0, class_transformer_1.Expose)({ name: "current_billing_period_end_date" }),
|
|
122
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
123
|
+
var value = _a.value;
|
|
124
|
+
return new Date(value);
|
|
125
|
+
}, { toClassOnly: true }),
|
|
126
|
+
__metadata("design:type", Date)
|
|
127
|
+
], Subscription.prototype, "currentBillingPeriodEndDate", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
130
|
+
(0, class_transformer_1.Expose)({ name: "current_billing_period_start_date" }),
|
|
131
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
132
|
+
var value = _a.value;
|
|
133
|
+
return new Date(value);
|
|
134
|
+
}, { toClassOnly: true }),
|
|
135
|
+
__metadata("design:type", Date)
|
|
136
|
+
], Subscription.prototype, "currentBillingPeriodStartDate", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
139
|
+
(0, class_transformer_1.Expose)({ name: "customer" }),
|
|
140
|
+
(0, class_transformer_1.Type)(function () { return customer_1.Customer; }),
|
|
141
|
+
__metadata("design:type", customer_1.Customer)
|
|
142
|
+
], Subscription.prototype, "customer", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
145
|
+
(0, class_transformer_1.Expose)({ name: "default_invoice_memo" }),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], Subscription.prototype, "defaultInvoiceMemo", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
150
|
+
(0, class_transformer_1.Expose)({ name: "end_date" }),
|
|
151
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
152
|
+
var value = _a.value;
|
|
153
|
+
return new Date(value);
|
|
154
|
+
}, { toClassOnly: true }),
|
|
155
|
+
__metadata("design:type", Date)
|
|
156
|
+
], Subscription.prototype, "endDate", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, utils_1.SpeakeasyMetadata)({ elemType: fixedfeequantityschedule_1.FixedFeeQuantitySchedule }),
|
|
159
|
+
(0, class_transformer_1.Expose)({ name: "fixed_fee_quantity_schedule" }),
|
|
160
|
+
(0, class_transformer_1.Type)(function () { return fixedfeequantityschedule_1.FixedFeeQuantitySchedule; }),
|
|
161
|
+
__metadata("design:type", Array)
|
|
162
|
+
], Subscription.prototype, "fixedFeeQuantitySchedule", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
165
|
+
(0, class_transformer_1.Expose)({ name: "id" }),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], Subscription.prototype, "id", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
170
|
+
(0, class_transformer_1.Expose)({ name: "metadata" }),
|
|
171
|
+
(0, class_transformer_1.Type)(function () { return SubscriptionMetadata; }),
|
|
172
|
+
__metadata("design:type", SubscriptionMetadata)
|
|
173
|
+
], Subscription.prototype, "metadata", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
176
|
+
(0, class_transformer_1.Expose)({ name: "net_terms" }),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], Subscription.prototype, "netTerms", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
181
|
+
(0, class_transformer_1.Expose)({ name: "plan" }),
|
|
182
|
+
(0, class_transformer_1.Type)(function () { return plan_1.Plan; }),
|
|
183
|
+
__metadata("design:type", plan_1.Plan)
|
|
184
|
+
], Subscription.prototype, "plan", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
187
|
+
(0, class_transformer_1.Expose)({ name: "redeemed_coupon" }),
|
|
188
|
+
(0, class_transformer_1.Type)(function () { return SubscriptionRedeemedCoupon; }),
|
|
189
|
+
__metadata("design:type", SubscriptionRedeemedCoupon)
|
|
190
|
+
], Subscription.prototype, "redeemedCoupon", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
193
|
+
(0, class_transformer_1.Expose)({ name: "start_date" }),
|
|
194
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
195
|
+
var value = _a.value;
|
|
196
|
+
return new Date(value);
|
|
197
|
+
}, { toClassOnly: true }),
|
|
198
|
+
__metadata("design:type", Date)
|
|
199
|
+
], Subscription.prototype, "startDate", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
202
|
+
(0, class_transformer_1.Expose)({ name: "status" }),
|
|
203
|
+
__metadata("design:type", String)
|
|
204
|
+
], Subscription.prototype, "status", void 0);
|
|
205
|
+
return Subscription;
|
|
206
|
+
}(utils_1.SpeakeasyBase));
|
|
207
|
+
exports.Subscription = Subscription;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import { CancelOption } from "./canceloption";
|
|
3
|
+
export declare class SubscriptionCancellation extends SpeakeasyBase {
|
|
4
|
+
/**
|
|
5
|
+
* Determines the timing of subscription cancellation
|
|
6
|
+
*/
|
|
7
|
+
cancelOption: CancelOption;
|
|
8
|
+
/**
|
|
9
|
+
* The date that the cancellation should take effect. This parameter can only be passed if the `cancel_option` is `requested_date`.
|
|
10
|
+
*/
|
|
11
|
+
cancellationDate?: Date;
|
|
12
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.SubscriptionCancellation = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var canceloption_1 = require("./canceloption");
|
|
33
|
+
var class_transformer_1 = require("class-transformer");
|
|
34
|
+
var SubscriptionCancellation = /** @class */ (function (_super) {
|
|
35
|
+
__extends(SubscriptionCancellation, _super);
|
|
36
|
+
function SubscriptionCancellation() {
|
|
37
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
41
|
+
(0, class_transformer_1.Expose)({ name: "cancel_option" }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], SubscriptionCancellation.prototype, "cancelOption", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
46
|
+
(0, class_transformer_1.Expose)({ name: "cancellation_date" }),
|
|
47
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
48
|
+
var value = _a.value;
|
|
49
|
+
return new Date(value);
|
|
50
|
+
}, { toClassOnly: true }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], SubscriptionCancellation.prototype, "cancellationDate", void 0);
|
|
53
|
+
return SubscriptionCancellation;
|
|
54
|
+
}(utils_1.SpeakeasyBase));
|
|
55
|
+
exports.SubscriptionCancellation = SubscriptionCancellation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import { PerPriceCost } from "./perpricecost";
|
|
3
|
+
export declare class SubscriptionCost extends SpeakeasyBase {
|
|
4
|
+
perPriceCosts: PerPriceCost[];
|
|
5
|
+
/**
|
|
6
|
+
* Total costs for the timeframe, excluding any minimums and discounts.
|
|
7
|
+
*/
|
|
8
|
+
subtotal: string;
|
|
9
|
+
timeframeEnd: Date;
|
|
10
|
+
timeframeStart: Date;
|
|
11
|
+
/**
|
|
12
|
+
* Total costs for the timeframe, including any minimums and discounts.
|
|
13
|
+
*/
|
|
14
|
+
total: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.SubscriptionCost = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var perpricecost_1 = require("./perpricecost");
|
|
33
|
+
var class_transformer_1 = require("class-transformer");
|
|
34
|
+
var SubscriptionCost = /** @class */ (function (_super) {
|
|
35
|
+
__extends(SubscriptionCost, _super);
|
|
36
|
+
function SubscriptionCost() {
|
|
37
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, utils_1.SpeakeasyMetadata)({ elemType: perpricecost_1.PerPriceCost }),
|
|
41
|
+
(0, class_transformer_1.Expose)({ name: "per_price_costs" }),
|
|
42
|
+
(0, class_transformer_1.Type)(function () { return perpricecost_1.PerPriceCost; }),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], SubscriptionCost.prototype, "perPriceCosts", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
47
|
+
(0, class_transformer_1.Expose)({ name: "subtotal" }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], SubscriptionCost.prototype, "subtotal", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
52
|
+
(0, class_transformer_1.Expose)({ name: "timeframe_end" }),
|
|
53
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
54
|
+
var value = _a.value;
|
|
55
|
+
return new Date(value);
|
|
56
|
+
}, { toClassOnly: true }),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], SubscriptionCost.prototype, "timeframeEnd", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
61
|
+
(0, class_transformer_1.Expose)({ name: "timeframe_start" }),
|
|
62
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
63
|
+
var value = _a.value;
|
|
64
|
+
return new Date(value);
|
|
65
|
+
}, { toClassOnly: true }),
|
|
66
|
+
__metadata("design:type", Date)
|
|
67
|
+
], SubscriptionCost.prototype, "timeframeStart", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
70
|
+
(0, class_transformer_1.Expose)({ name: "total" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], SubscriptionCost.prototype, "total", void 0);
|
|
73
|
+
return SubscriptionCost;
|
|
74
|
+
}(utils_1.SpeakeasyBase));
|
|
75
|
+
exports.SubscriptionCost = SubscriptionCost;
|
|
@@ -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.SubscriptionCosts = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var subscriptioncost_1 = require("./subscriptioncost");
|
|
33
|
+
var class_transformer_1 = require("class-transformer");
|
|
34
|
+
/**
|
|
35
|
+
* OK
|
|
36
|
+
*/
|
|
37
|
+
var SubscriptionCosts = /** @class */ (function (_super) {
|
|
38
|
+
__extends(SubscriptionCosts, _super);
|
|
39
|
+
function SubscriptionCosts() {
|
|
40
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
41
|
+
}
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, utils_1.SpeakeasyMetadata)({ elemType: subscriptioncost_1.SubscriptionCost }),
|
|
44
|
+
(0, class_transformer_1.Expose)({ name: "data" }),
|
|
45
|
+
(0, class_transformer_1.Type)(function () { return subscriptioncost_1.SubscriptionCost; }),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], SubscriptionCosts.prototype, "data", void 0);
|
|
48
|
+
return SubscriptionCosts;
|
|
49
|
+
}(utils_1.SpeakeasyBase));
|
|
50
|
+
exports.SubscriptionCosts = SubscriptionCosts;
|
|
@@ -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.SubscriptionMinified = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var class_transformer_1 = require("class-transformer");
|
|
33
|
+
/**
|
|
34
|
+
* The associated subscription for this invoice.
|
|
35
|
+
*/
|
|
36
|
+
var SubscriptionMinified = /** @class */ (function (_super) {
|
|
37
|
+
__extends(SubscriptionMinified, _super);
|
|
38
|
+
function SubscriptionMinified() {
|
|
39
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
40
|
+
}
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
43
|
+
(0, class_transformer_1.Expose)({ name: "id" }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SubscriptionMinified.prototype, "id", void 0);
|
|
46
|
+
return SubscriptionMinified;
|
|
47
|
+
}(utils_1.SpeakeasyBase));
|
|
48
|
+
exports.SubscriptionMinified = SubscriptionMinified;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import { ChangeOption } from "./changeoption";
|
|
3
|
+
/**
|
|
4
|
+
* Reset billing periods to be aligned with the plan change’s effective date or start of the month. Defaults to `unchanged` which keeps subscription's existing billing cycle alignment.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum SubscriptionPlanChangeBillingCycleAlignment {
|
|
7
|
+
Unchanged = "unchanged",
|
|
8
|
+
PlanChangeDate = "plan_change_date",
|
|
9
|
+
StartOfMonth = "start_of_month"
|
|
10
|
+
}
|
|
11
|
+
export declare class SubscriptionPlanChange extends SpeakeasyBase {
|
|
12
|
+
/**
|
|
13
|
+
* [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be aligned with the plan change’s effective date.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated this field will be removed in a future release, please migrate away from it as soon as possible
|
|
16
|
+
*/
|
|
17
|
+
alignBillingWithPlanChangeDate?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Reset billing periods to be aligned with the plan change’s effective date or start of the month. Defaults to `unchanged` which keeps subscription's existing billing cycle alignment.
|
|
20
|
+
*/
|
|
21
|
+
billingCycleAlignment?: SubscriptionPlanChangeBillingCycleAlignment;
|
|
22
|
+
/**
|
|
23
|
+
* The date that the plan change should take effect. This parameter can only be passed if the `change_option` is `requested_date`.
|
|
24
|
+
*/
|
|
25
|
+
changeDate?: Date;
|
|
26
|
+
/**
|
|
27
|
+
* Determines the timing of the plan change
|
|
28
|
+
*/
|
|
29
|
+
changeOption: ChangeOption;
|
|
30
|
+
/**
|
|
31
|
+
* Redemption code to be used for this subscription. If the coupon cannot be found by its redemption code, or cannot be redeemed, an error response will be returned and the plan change will not be scheduled.
|
|
32
|
+
*/
|
|
33
|
+
couponRedemptionCode?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The external_plan_id of the plan that the given subscription should be switched to. Note that either this property or `plan_id` must be specified.
|
|
36
|
+
*/
|
|
37
|
+
externalPlanId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The subscription's override maximum amount for the plan.
|
|
40
|
+
*/
|
|
41
|
+
maximumAmount?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The subscription's override minimum amount for the plan.
|
|
44
|
+
*/
|
|
45
|
+
minimumAmount?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The plan that the given subscription should be switched to. Note that either this property or `external_plan_id` must be specified.
|
|
48
|
+
*/
|
|
49
|
+
planId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Optionally provide a list of overrides for prices on the plan
|
|
52
|
+
*/
|
|
53
|
+
priceOverrides?: any[];
|
|
54
|
+
}
|