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 @@
|
|
|
1
|
+
export * from "./sdk";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./sdk"), exports);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as operations from "./models/operations";
|
|
2
|
+
import * as shared from "./models/shared";
|
|
3
|
+
import { SDKConfiguration } from "./sdk";
|
|
4
|
+
import { AxiosRequestConfig } from "axios";
|
|
5
|
+
/**
|
|
6
|
+
* An [`Invoice`](../guides/concepts#invoice) is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Invoice {
|
|
9
|
+
private sdkConfiguration;
|
|
10
|
+
constructor(sdkConfig: SDKConfiguration);
|
|
11
|
+
/**
|
|
12
|
+
* Create invoice line item
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* This creates a one-off fixed fee invoice line item on an [Invoice](../guides/concepts#invoice). This can only be done for invoices that are in a `draft` status.
|
|
16
|
+
*/
|
|
17
|
+
create(req: shared.NewInvoiceLineItem, config?: AxiosRequestConfig): Promise<operations.CreateInvoiceLineItemResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Fetch invoice
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This endpoint is used to fetch an [`Invoice`](../guides/concepts#invoice) given an identifier.
|
|
23
|
+
*/
|
|
24
|
+
fetch(req: operations.FetchInvoiceRequest, config?: AxiosRequestConfig): Promise<operations.FetchInvoiceResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetch upcoming invoice
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This endpoint can be used to fetch the upcoming [invoice](../guides/concepts#invoice) for the current billing period given a subscription.
|
|
30
|
+
*/
|
|
31
|
+
fetchUpcoming(req: operations.FetchUpcomingInvoiceRequest, config?: AxiosRequestConfig): Promise<operations.FetchUpcomingInvoiceResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Issue an invoice
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This endpoint allows an eligible invoice to be issued manually. This is only possible with invoices where `status` is `draft`, `will_auto_issue` is true, and an `eligible_to_issue_at` is a time in the past.
|
|
37
|
+
* Issuing an invoice could possibly trigger side effects, some of which could be customer-visible (e.g. sending emails, auto-collecting payment, syncing the invoice to external providers, etc).
|
|
38
|
+
*/
|
|
39
|
+
issue(req: operations.IssueInvoiceRequest, config?: AxiosRequestConfig): Promise<operations.IssueInvoiceResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* List invoices
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* This endpoint returns a list of all [`Invoice`](../guides/concepts#invoice)s for an account in a list format.
|
|
45
|
+
*
|
|
46
|
+
* The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
|
|
47
|
+
*
|
|
48
|
+
* By default, this only returns invoices that are `issued`, `paid`, or `synced`.
|
|
49
|
+
*/
|
|
50
|
+
list(req: operations.ListInvoicesRequest, config?: AxiosRequestConfig): Promise<operations.ListInvoicesResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Void invoice
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This endpoint allows an invoice's status to be set the `void` status. This can only be done to invoices that are in the `issued` status.
|
|
56
|
+
*
|
|
57
|
+
* If the associated invoice has used the customer balance to change the amount due, the customer balance operation will be reverted. For example, if the invoice used $10 of customer balance, that amount will be added back to the customer balance upon voiding.
|
|
58
|
+
*/
|
|
59
|
+
void(req: operations.VoidInvoiceRequest, config?: AxiosRequestConfig): Promise<operations.VoidInvoiceResponse>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
|
+
function step(op) {
|
|
53
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
|
+
switch (op[0]) {
|
|
58
|
+
case 0: case 1: t = op; break;
|
|
59
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
60
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
62
|
+
default:
|
|
63
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
64
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
65
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
67
|
+
if (t[2]) _.ops.pop();
|
|
68
|
+
_.trys.pop(); continue;
|
|
69
|
+
}
|
|
70
|
+
op = body.call(thisArg, _);
|
|
71
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
72
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
76
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
77
|
+
if (!m) return o;
|
|
78
|
+
var i = m.call(o), r, ar = [], e;
|
|
79
|
+
try {
|
|
80
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
81
|
+
}
|
|
82
|
+
catch (error) { e = { error: error }; }
|
|
83
|
+
finally {
|
|
84
|
+
try {
|
|
85
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
86
|
+
}
|
|
87
|
+
finally { if (e) throw e.error; }
|
|
88
|
+
}
|
|
89
|
+
return ar;
|
|
90
|
+
};
|
|
91
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
92
|
+
exports.Invoice = void 0;
|
|
93
|
+
var utils = __importStar(require("../internal/utils"));
|
|
94
|
+
var operations = __importStar(require("./models/operations"));
|
|
95
|
+
var shared = __importStar(require("./models/shared"));
|
|
96
|
+
/**
|
|
97
|
+
* An [`Invoice`](../guides/concepts#invoice) is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.
|
|
98
|
+
*/
|
|
99
|
+
var Invoice = /** @class */ (function () {
|
|
100
|
+
function Invoice(sdkConfig) {
|
|
101
|
+
this.sdkConfiguration = sdkConfig;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Create invoice line item
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* This creates a one-off fixed fee invoice line item on an [Invoice](../guides/concepts#invoice). This can only be done for invoices that are in a `draft` status.
|
|
108
|
+
*/
|
|
109
|
+
Invoice.prototype.create = function (req, config) {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, headers, httpRes, contentType, res, decodedRes;
|
|
113
|
+
var _d;
|
|
114
|
+
return __generator(this, function (_e) {
|
|
115
|
+
switch (_e.label) {
|
|
116
|
+
case 0:
|
|
117
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
118
|
+
req = new shared.NewInvoiceLineItem(req);
|
|
119
|
+
}
|
|
120
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
121
|
+
url = baseURL.replace(/\/$/, "") + "/invoice_line_items";
|
|
122
|
+
_c = __read([{}, {}], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
123
|
+
try {
|
|
124
|
+
_d = __read(utils.serializeRequestBody(req, "request", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
125
|
+
}
|
|
126
|
+
catch (e) {
|
|
127
|
+
if (e instanceof Error) {
|
|
128
|
+
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
132
|
+
headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
133
|
+
headers["Accept"] = "application/json";
|
|
134
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
135
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
136
|
+
case 1:
|
|
137
|
+
httpRes = _e.sent();
|
|
138
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
139
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
140
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
141
|
+
}
|
|
142
|
+
res = new operations.CreateInvoiceLineItemResponse({
|
|
143
|
+
statusCode: httpRes.status,
|
|
144
|
+
contentType: contentType,
|
|
145
|
+
rawResponse: httpRes,
|
|
146
|
+
});
|
|
147
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
148
|
+
switch (true) {
|
|
149
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 201:
|
|
150
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
151
|
+
res.invoiceLineItem = utils.objectToClass(JSON.parse(decodedRes), shared.InvoiceLineItem);
|
|
152
|
+
}
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
return [2 /*return*/, res];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Fetch invoice
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* This endpoint is used to fetch an [`Invoice`](../guides/concepts#invoice) given an identifier.
|
|
165
|
+
*/
|
|
166
|
+
Invoice.prototype.fetch = function (req, config) {
|
|
167
|
+
var _a, _b;
|
|
168
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
169
|
+
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
170
|
+
return __generator(this, function (_c) {
|
|
171
|
+
switch (_c.label) {
|
|
172
|
+
case 0:
|
|
173
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
174
|
+
req = new operations.FetchInvoiceRequest(req);
|
|
175
|
+
}
|
|
176
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
177
|
+
url = utils.generateURL(baseURL, "/invoices/{invoice_id}", req);
|
|
178
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
179
|
+
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
180
|
+
headers["Accept"] = "application/json";
|
|
181
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
182
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
183
|
+
case 1:
|
|
184
|
+
httpRes = _c.sent();
|
|
185
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
186
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
187
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
188
|
+
}
|
|
189
|
+
res = new operations.FetchInvoiceResponse({
|
|
190
|
+
statusCode: httpRes.status,
|
|
191
|
+
contentType: contentType,
|
|
192
|
+
rawResponse: httpRes,
|
|
193
|
+
});
|
|
194
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
195
|
+
switch (true) {
|
|
196
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
197
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
198
|
+
res.invoice = utils.objectToClass(JSON.parse(decodedRes), shared.Invoice);
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
return [2 /*return*/, res];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Fetch upcoming invoice
|
|
209
|
+
*
|
|
210
|
+
* @remarks
|
|
211
|
+
* This endpoint can be used to fetch the upcoming [invoice](../guides/concepts#invoice) for the current billing period given a subscription.
|
|
212
|
+
*/
|
|
213
|
+
Invoice.prototype.fetchUpcoming = function (req, config) {
|
|
214
|
+
var _a, _b;
|
|
215
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
216
|
+
var baseURL, url, client, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
217
|
+
return __generator(this, function (_c) {
|
|
218
|
+
switch (_c.label) {
|
|
219
|
+
case 0:
|
|
220
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
221
|
+
req = new operations.FetchUpcomingInvoiceRequest(req);
|
|
222
|
+
}
|
|
223
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
224
|
+
url = baseURL.replace(/\/$/, "") + "/invoices/upcoming";
|
|
225
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
226
|
+
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
227
|
+
queryParams = utils.serializeQueryParams(req);
|
|
228
|
+
headers["Accept"] = "application/json";
|
|
229
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
230
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
231
|
+
case 1:
|
|
232
|
+
httpRes = _c.sent();
|
|
233
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
234
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
235
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
236
|
+
}
|
|
237
|
+
res = new operations.FetchUpcomingInvoiceResponse({
|
|
238
|
+
statusCode: httpRes.status,
|
|
239
|
+
contentType: contentType,
|
|
240
|
+
rawResponse: httpRes,
|
|
241
|
+
});
|
|
242
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
243
|
+
switch (true) {
|
|
244
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
245
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
246
|
+
res.upcomingInvoice = utils.objectToClass(JSON.parse(decodedRes), shared.UpcomingInvoice);
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
return [2 /*return*/, res];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Issue an invoice
|
|
257
|
+
*
|
|
258
|
+
* @remarks
|
|
259
|
+
* This endpoint allows an eligible invoice to be issued manually. This is only possible with invoices where `status` is `draft`, `will_auto_issue` is true, and an `eligible_to_issue_at` is a time in the past.
|
|
260
|
+
* Issuing an invoice could possibly trigger side effects, some of which could be customer-visible (e.g. sending emails, auto-collecting payment, syncing the invoice to external providers, etc).
|
|
261
|
+
*/
|
|
262
|
+
Invoice.prototype.issue = function (req, config) {
|
|
263
|
+
var _a, _b;
|
|
264
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
265
|
+
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
266
|
+
return __generator(this, function (_c) {
|
|
267
|
+
switch (_c.label) {
|
|
268
|
+
case 0:
|
|
269
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
270
|
+
req = new operations.IssueInvoiceRequest(req);
|
|
271
|
+
}
|
|
272
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
273
|
+
url = utils.generateURL(baseURL, "/invoices/{invoice_id}/issue", req);
|
|
274
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
275
|
+
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
276
|
+
headers["Accept"] = "application/json;q=1, application/json;q=0";
|
|
277
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
278
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
|
|
279
|
+
case 1:
|
|
280
|
+
httpRes = _c.sent();
|
|
281
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
282
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
283
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
284
|
+
}
|
|
285
|
+
res = new operations.IssueInvoiceResponse({
|
|
286
|
+
statusCode: httpRes.status,
|
|
287
|
+
contentType: contentType,
|
|
288
|
+
rawResponse: httpRes,
|
|
289
|
+
});
|
|
290
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
291
|
+
switch (true) {
|
|
292
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
293
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
294
|
+
res.invoice = utils.objectToClass(JSON.parse(decodedRes), shared.Invoice);
|
|
295
|
+
}
|
|
296
|
+
break;
|
|
297
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
298
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
299
|
+
res.requestValidationError = utils.objectToClass(JSON.parse(decodedRes), shared.RequestValidationError);
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
return [2 /*return*/, res];
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* List invoices
|
|
310
|
+
*
|
|
311
|
+
* @remarks
|
|
312
|
+
* This endpoint returns a list of all [`Invoice`](../guides/concepts#invoice)s for an account in a list format.
|
|
313
|
+
*
|
|
314
|
+
* The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
|
|
315
|
+
*
|
|
316
|
+
* By default, this only returns invoices that are `issued`, `paid`, or `synced`.
|
|
317
|
+
*/
|
|
318
|
+
Invoice.prototype.list = function (req, config) {
|
|
319
|
+
var _a, _b;
|
|
320
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
321
|
+
var baseURL, url, client, headers, queryParams, httpRes, contentType, res, decodedRes;
|
|
322
|
+
return __generator(this, function (_c) {
|
|
323
|
+
switch (_c.label) {
|
|
324
|
+
case 0:
|
|
325
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
326
|
+
req = new operations.ListInvoicesRequest(req);
|
|
327
|
+
}
|
|
328
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
329
|
+
url = baseURL.replace(/\/$/, "") + "/invoices";
|
|
330
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
331
|
+
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
332
|
+
queryParams = utils.serializeQueryParams(req);
|
|
333
|
+
headers["Accept"] = "application/json";
|
|
334
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
335
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
336
|
+
case 1:
|
|
337
|
+
httpRes = _c.sent();
|
|
338
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
339
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
340
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
341
|
+
}
|
|
342
|
+
res = new operations.ListInvoicesResponse({
|
|
343
|
+
statusCode: httpRes.status,
|
|
344
|
+
contentType: contentType,
|
|
345
|
+
rawResponse: httpRes,
|
|
346
|
+
});
|
|
347
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
348
|
+
switch (true) {
|
|
349
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
350
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
351
|
+
res.invoices = utils.objectToClass(JSON.parse(decodedRes), shared.Invoices);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
return [2 /*return*/, res];
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Void invoice
|
|
362
|
+
*
|
|
363
|
+
* @remarks
|
|
364
|
+
* This endpoint allows an invoice's status to be set the `void` status. This can only be done to invoices that are in the `issued` status.
|
|
365
|
+
*
|
|
366
|
+
* If the associated invoice has used the customer balance to change the amount due, the customer balance operation will be reverted. For example, if the invoice used $10 of customer balance, that amount will be added back to the customer balance upon voiding.
|
|
367
|
+
*/
|
|
368
|
+
Invoice.prototype.void = function (req, config) {
|
|
369
|
+
var _a, _b;
|
|
370
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
371
|
+
var baseURL, url, client, headers, httpRes, contentType, res, decodedRes;
|
|
372
|
+
return __generator(this, function (_c) {
|
|
373
|
+
switch (_c.label) {
|
|
374
|
+
case 0:
|
|
375
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
376
|
+
req = new operations.VoidInvoiceRequest(req);
|
|
377
|
+
}
|
|
378
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
379
|
+
url = utils.generateURL(baseURL, "/invoices/{invoice_id}/void", req);
|
|
380
|
+
client = this.sdkConfiguration.securityClient || this.sdkConfiguration.defaultClient;
|
|
381
|
+
headers = __assign({}, config === null || config === void 0 ? void 0 : config.headers);
|
|
382
|
+
headers["Accept"] = "application/json;q=1, application/json;q=0";
|
|
383
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
384
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer" }, config))];
|
|
385
|
+
case 1:
|
|
386
|
+
httpRes = _c.sent();
|
|
387
|
+
contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
388
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
389
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
390
|
+
}
|
|
391
|
+
res = new operations.VoidInvoiceResponse({
|
|
392
|
+
statusCode: httpRes.status,
|
|
393
|
+
contentType: contentType,
|
|
394
|
+
rawResponse: httpRes,
|
|
395
|
+
});
|
|
396
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
397
|
+
switch (true) {
|
|
398
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 201:
|
|
399
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
400
|
+
res.invoice = utils.objectToClass(JSON.parse(decodedRes), shared.Invoice);
|
|
401
|
+
}
|
|
402
|
+
break;
|
|
403
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 400:
|
|
404
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
405
|
+
res.requestValidationError = utils.objectToClass(JSON.parse(decodedRes), shared.RequestValidationError);
|
|
406
|
+
}
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
return [2 /*return*/, res];
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
return Invoice;
|
|
415
|
+
}());
|
|
416
|
+
exports.Invoice = Invoice;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class AddLedgerEntryExternalIdRequest extends SpeakeasyBase {
|
|
5
|
+
newCreditLedgerEntry?: shared.NewCreditLedgerEntry;
|
|
6
|
+
externalCustomerId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class AddLedgerEntryExternalIdResponse extends SpeakeasyBase {
|
|
9
|
+
contentType: string;
|
|
10
|
+
/**
|
|
11
|
+
* OK
|
|
12
|
+
*/
|
|
13
|
+
creditLedgerEntry?: shared.CreditLedgerEntry;
|
|
14
|
+
statusCode: number;
|
|
15
|
+
rawResponse?: AxiosResponse;
|
|
16
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
+
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;
|
|
40
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
+
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.AddLedgerEntryExternalIdResponse = exports.AddLedgerEntryExternalIdRequest = void 0;
|
|
54
|
+
var utils_1 = require("../../../internal/utils");
|
|
55
|
+
var shared = __importStar(require("../shared"));
|
|
56
|
+
var AddLedgerEntryExternalIdRequest = /** @class */ (function (_super) {
|
|
57
|
+
__extends(AddLedgerEntryExternalIdRequest, _super);
|
|
58
|
+
function AddLedgerEntryExternalIdRequest() {
|
|
59
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=application/json" }),
|
|
63
|
+
__metadata("design:type", shared.NewCreditLedgerEntry)
|
|
64
|
+
], AddLedgerEntryExternalIdRequest.prototype, "newCreditLedgerEntry", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=external_customer_id" }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], AddLedgerEntryExternalIdRequest.prototype, "externalCustomerId", void 0);
|
|
69
|
+
return AddLedgerEntryExternalIdRequest;
|
|
70
|
+
}(utils_1.SpeakeasyBase));
|
|
71
|
+
exports.AddLedgerEntryExternalIdRequest = AddLedgerEntryExternalIdRequest;
|
|
72
|
+
var AddLedgerEntryExternalIdResponse = /** @class */ (function (_super) {
|
|
73
|
+
__extends(AddLedgerEntryExternalIdResponse, _super);
|
|
74
|
+
function AddLedgerEntryExternalIdResponse() {
|
|
75
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
|
+
}
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], AddLedgerEntryExternalIdResponse.prototype, "contentType", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
83
|
+
__metadata("design:type", shared.CreditLedgerEntry)
|
|
84
|
+
], AddLedgerEntryExternalIdResponse.prototype, "creditLedgerEntry", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], AddLedgerEntryExternalIdResponse.prototype, "statusCode", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], AddLedgerEntryExternalIdResponse.prototype, "rawResponse", void 0);
|
|
93
|
+
return AddLedgerEntryExternalIdResponse;
|
|
94
|
+
}(utils_1.SpeakeasyBase));
|
|
95
|
+
exports.AddLedgerEntryExternalIdResponse = AddLedgerEntryExternalIdResponse;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class AmendEventRequest extends SpeakeasyBase {
|
|
5
|
+
amendedEvent?: shared.AmendedEvent;
|
|
6
|
+
/**
|
|
7
|
+
* Identical to the `idempotency_key` provided on event ingestion. Uniquely identifies an event in the system.
|
|
8
|
+
*/
|
|
9
|
+
eventId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class AmendEventResponse extends SpeakeasyBase {
|
|
12
|
+
/**
|
|
13
|
+
* OK
|
|
14
|
+
*/
|
|
15
|
+
amendEventResult?: shared.AmendEventResult;
|
|
16
|
+
contentType: string;
|
|
17
|
+
/**
|
|
18
|
+
* Bad Request
|
|
19
|
+
*/
|
|
20
|
+
requestValidationError?: shared.RequestValidationError;
|
|
21
|
+
statusCode: number;
|
|
22
|
+
rawResponse?: AxiosResponse;
|
|
23
|
+
}
|