orb-billing 1.20.2 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/LICENSE +201 -0
- package/README.md +190 -178
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +90 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +239 -0
- package/core.d.ts.map +1 -0
- package/core.js +832 -0
- package/core.js.map +1 -0
- package/core.mjs +801 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +131 -0
- package/error.d.ts.map +1 -0
- package/error.js +298 -0
- package/error.js.map +1 -0
- package/error.mjs +271 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +210 -0
- package/index.d.ts +210 -0
- package/index.d.ts.map +1 -0
- package/index.js +153 -0
- package/index.js.map +1 -0
- package/index.mjs +125 -0
- package/index.mjs.map +1 -0
- package/package.json +90 -27
- package/pagination.d.ts +31 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +34 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +30 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +12 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +17 -0
- package/resource.js.map +1 -0
- package/resource.mjs +13 -0
- package/resource.mjs.map +1 -0
- package/resources/coupons/coupons.d.ts +114 -0
- package/resources/coupons/coupons.d.ts.map +1 -0
- package/resources/coupons/coupons.js +76 -0
- package/resources/coupons/coupons.js.map +1 -0
- package/resources/coupons/coupons.mjs +48 -0
- package/resources/coupons/coupons.mjs.map +1 -0
- package/resources/coupons/index.d.ts +3 -0
- package/resources/coupons/index.d.ts.map +1 -0
- package/resources/coupons/index.js +10 -0
- package/resources/coupons/index.js.map +1 -0
- package/resources/coupons/index.mjs +4 -0
- package/resources/coupons/index.mjs.map +1 -0
- package/resources/coupons/subscriptions.d.ts +23 -0
- package/resources/coupons/subscriptions.d.ts.map +1 -0
- package/resources/coupons/subscriptions.js +20 -0
- package/resources/coupons/subscriptions.js.map +1 -0
- package/resources/coupons/subscriptions.mjs +16 -0
- package/resources/coupons/subscriptions.mjs.map +1 -0
- package/resources/credit-notes.d.ts +136 -0
- package/resources/credit-notes.d.ts.map +1 -0
- package/resources/credit-notes.js +54 -0
- package/resources/credit-notes.js.map +1 -0
- package/resources/credit-notes.mjs +26 -0
- package/resources/credit-notes.mjs.map +1 -0
- package/resources/customers/balance-transactions.d.ts +159 -0
- package/resources/customers/balance-transactions.d.ts.map +1 -0
- package/resources/customers/balance-transactions.js +54 -0
- package/resources/customers/balance-transactions.js.map +1 -0
- package/resources/customers/balance-transactions.mjs +26 -0
- package/resources/customers/balance-transactions.mjs.map +1 -0
- package/resources/customers/costs.d.ts +915 -0
- package/resources/customers/costs.d.ts.map +1 -0
- package/resources/customers/costs.js +24 -0
- package/resources/customers/costs.js.map +1 -0
- package/resources/customers/costs.mjs +20 -0
- package/resources/customers/costs.mjs.map +1 -0
- package/resources/customers/credits/credits.d.ts +58 -0
- package/resources/customers/credits/credits.d.ts.map +1 -0
- package/resources/customers/credits/credits.js +68 -0
- package/resources/customers/credits/credits.js.map +1 -0
- package/resources/customers/credits/credits.mjs +39 -0
- package/resources/customers/credits/credits.mjs.map +1 -0
- package/resources/customers/credits/index.d.ts +3 -0
- package/resources/customers/credits/index.d.ts.map +1 -0
- package/resources/customers/credits/index.js +13 -0
- package/resources/customers/credits/index.js.map +1 -0
- package/resources/customers/credits/index.mjs +4 -0
- package/resources/customers/credits/index.mjs.map +1 -0
- package/resources/customers/credits/ledger.d.ts +1537 -0
- package/resources/customers/credits/ledger.d.ts.map +1 -0
- package/resources/customers/credits/ledger.js +291 -0
- package/resources/customers/credits/ledger.js.map +1 -0
- package/resources/customers/credits/ledger.mjs +262 -0
- package/resources/customers/credits/ledger.mjs.map +1 -0
- package/resources/customers/customers.d.ts +524 -0
- package/resources/customers/customers.d.ts.map +1 -0
- package/resources/customers/customers.js +135 -0
- package/resources/customers/customers.js.map +1 -0
- package/resources/customers/customers.mjs +107 -0
- package/resources/customers/customers.mjs.map +1 -0
- package/resources/customers/index.d.ts +6 -0
- package/resources/customers/index.d.ts.map +1 -0
- package/resources/customers/index.js +19 -0
- package/resources/customers/index.js.map +1 -0
- package/resources/customers/index.mjs +7 -0
- package/resources/customers/index.mjs.map +1 -0
- package/resources/customers/usage.d.ts +306 -0
- package/resources/customers/usage.d.ts.map +1 -0
- package/resources/customers/usage.js +223 -0
- package/resources/customers/usage.js.map +1 -0
- package/resources/customers/usage.mjs +219 -0
- package/resources/customers/usage.mjs.map +1 -0
- package/resources/events/backfills.d.ts +250 -0
- package/resources/events/backfills.d.ts.map +1 -0
- package/resources/events/backfills.js +104 -0
- package/resources/events/backfills.js.map +1 -0
- package/resources/events/backfills.mjs +76 -0
- package/resources/events/backfills.mjs.map +1 -0
- package/resources/events/events.d.ts +547 -0
- package/resources/events/events.d.ts.map +1 -0
- package/resources/events/events.js +354 -0
- package/resources/events/events.js.map +1 -0
- package/resources/events/events.mjs +327 -0
- package/resources/events/events.mjs.map +1 -0
- package/resources/events/index.d.ts +3 -0
- package/resources/events/index.d.ts.map +1 -0
- package/resources/events/index.js +10 -0
- package/resources/events/index.js.map +1 -0
- package/resources/events/index.mjs +4 -0
- package/resources/events/index.mjs.map +1 -0
- package/resources/index.d.ts +13 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +39 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +14 -0
- package/resources/index.mjs.map +1 -0
- package/resources/invoice-line-items.d.ts +434 -0
- package/resources/invoice-line-items.d.ts.map +1 -0
- package/resources/invoice-line-items.js +18 -0
- package/resources/invoice-line-items.js.map +1 -0
- package/resources/invoice-line-items.mjs +14 -0
- package/resources/invoice-line-items.mjs.map +1 -0
- package/resources/invoices.d.ts +1541 -0
- package/resources/invoices.d.ts.map +1 -0
- package/resources/invoices.js +96 -0
- package/resources/invoices.js.map +1 -0
- package/resources/invoices.mjs +68 -0
- package/resources/invoices.mjs.map +1 -0
- package/resources/items.d.ts +61 -0
- package/resources/items.d.ts.map +1 -0
- package/resources/items.js +53 -0
- package/resources/items.js.map +1 -0
- package/resources/items.mjs +25 -0
- package/resources/items.mjs.map +1 -0
- package/resources/metrics.d.ts +176 -0
- package/resources/metrics.d.ts.map +1 -0
- package/resources/metrics.js +63 -0
- package/resources/metrics.js.map +1 -0
- package/resources/metrics.mjs +35 -0
- package/resources/metrics.mjs.map +1 -0
- package/resources/plans/external-plan-id.d.ts +50 -0
- package/resources/plans/external-plan-id.d.ts.map +1 -0
- package/resources/plans/external-plan-id.js +35 -0
- package/resources/plans/external-plan-id.js.map +1 -0
- package/resources/plans/external-plan-id.mjs +31 -0
- package/resources/plans/external-plan-id.mjs.map +1 -0
- package/resources/plans/index.d.ts +3 -0
- package/resources/plans/index.d.ts.map +1 -0
- package/resources/plans/index.js +10 -0
- package/resources/plans/index.js.map +1 -0
- package/resources/plans/index.mjs +4 -0
- package/resources/plans/index.mjs.map +1 -0
- package/resources/plans/plans.d.ts +256 -0
- package/resources/plans/plans.d.ts.map +1 -0
- package/resources/plans/plans.js +87 -0
- package/resources/plans/plans.js.map +1 -0
- package/resources/plans/plans.mjs +59 -0
- package/resources/plans/plans.mjs.map +1 -0
- package/resources/prices/external-price-id.d.ts +12 -0
- package/resources/prices/external-price-id.d.ts.map +1 -0
- package/resources/prices/external-price-id.js +17 -0
- package/resources/prices/external-price-id.js.map +1 -0
- package/resources/prices/external-price-id.mjs +13 -0
- package/resources/prices/external-price-id.mjs.map +1 -0
- package/resources/prices/index.d.ts +3 -0
- package/resources/prices/index.d.ts.map +1 -0
- package/resources/prices/index.js +10 -0
- package/resources/prices/index.js.map +1 -0
- package/resources/prices/index.mjs +4 -0
- package/resources/prices/index.mjs.map +1 -0
- package/resources/prices/prices.d.ts +1872 -0
- package/resources/prices/prices.d.ts.map +1 -0
- package/resources/prices/prices.js +74 -0
- package/resources/prices/prices.js.map +1 -0
- package/resources/prices/prices.mjs +46 -0
- package/resources/prices/prices.mjs.map +1 -0
- package/resources/subscriptions.d.ts +3752 -0
- package/resources/subscriptions.d.ts.map +1 -0
- package/resources/subscriptions.js +254 -0
- package/resources/subscriptions.js.map +1 -0
- package/resources/subscriptions.mjs +225 -0
- package/resources/subscriptions.mjs.map +1 -0
- package/resources/top-level.d.ts +21 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +22 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +18 -0
- package/resources/top-level.mjs.map +1 -0
- package/shims/node.d.ts +29 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +83 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1103 -0
- package/src/error.ts +469 -0
- package/src/index.ts +305 -0
- package/src/pagination.ts +63 -0
- package/src/resource.ts +24 -0
- package/src/resources/coupons/coupons.ts +150 -0
- package/src/resources/coupons/index.ts +4 -0
- package/src/resources/coupons/subscriptions.ts +45 -0
- package/src/resources/credit-notes.ts +184 -0
- package/src/resources/customers/balance-transactions.ts +222 -0
- package/src/resources/customers/costs.ts +991 -0
- package/src/resources/customers/credits/credits.ts +113 -0
- package/src/resources/customers/credits/index.ts +24 -0
- package/src/resources/customers/credits/ledger.ts +2254 -0
- package/src/resources/customers/customers.ts +734 -0
- package/src/resources/customers/index.ts +42 -0
- package/src/resources/customers/usage.ts +350 -0
- package/src/resources/events/backfills.ts +324 -0
- package/src/resources/events/events.ts +635 -0
- package/src/resources/events/index.ts +23 -0
- package/src/resources/index.ts +72 -0
- package/src/resources/invoice-line-items.ts +502 -0
- package/src/resources/invoices.ts +1906 -0
- package/src/resources/items.ts +106 -0
- package/src/resources/metrics.ts +264 -0
- package/src/resources/plans/external-plan-id.ts +73 -0
- package/src/resources/plans/index.ts +4 -0
- package/src/resources/plans/plans.ts +350 -0
- package/src/resources/prices/external-price-id.ts +16 -0
- package/src/resources/prices/index.ts +4 -0
- package/src/resources/prices/prices.ts +2466 -0
- package/src/resources/subscriptions.ts +4590 -0
- package/src/resources/top-level.ts +27 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +246 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +162 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +149 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/LICENSE.md +0 -21
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -20
- package/dist/internal/utils/contenttype.d.ts +0 -1
- package/dist/internal/utils/contenttype.js +0 -33
- package/dist/internal/utils/headers.d.ts +0 -4
- package/dist/internal/utils/headers.js +0 -92
- package/dist/internal/utils/index.d.ts +0 -8
- package/dist/internal/utils/index.js +0 -27
- package/dist/internal/utils/pathparams.d.ts +0 -2
- package/dist/internal/utils/pathparams.js +0 -53
- package/dist/internal/utils/queryparams.d.ts +0 -2
- package/dist/internal/utils/queryparams.js +0 -178
- package/dist/internal/utils/requestbody.d.ts +0 -2
- package/dist/internal/utils/requestbody.js +0 -318
- package/dist/internal/utils/retries.d.ts +0 -20
- package/dist/internal/utils/retries.js +0 -250
- package/dist/internal/utils/security.d.ts +0 -5
- package/dist/internal/utils/security.js +0 -188
- package/dist/internal/utils/utils.d.ts +0 -37
- package/dist/internal/utils/utils.js +0 -370
- package/dist/sdk/availability.d.ts +0 -18
- package/dist/sdk/availability.js +0 -186
- package/dist/sdk/coupon.d.ts +0 -62
- package/dist/sdk/coupon.js +0 -629
- package/dist/sdk/credit.d.ts +0 -348
- package/dist/sdk/credit.js +0 -1020
- package/dist/sdk/creditnote.d.ts +0 -29
- package/dist/sdk/creditnote.js +0 -293
- package/dist/sdk/customer.d.ts +0 -529
- package/dist/sdk/customer.js +0 -1882
- package/dist/sdk/event.d.ts +0 -353
- package/dist/sdk/event.js +0 -1314
- package/dist/sdk/index.d.ts +0 -1
- package/dist/sdk/index.js +0 -20
- package/dist/sdk/invoice.d.ts +0 -89
- package/dist/sdk/invoice.js +0 -945
- package/dist/sdk/item.d.ts +0 -27
- package/dist/sdk/item.js +0 -291
- package/dist/sdk/metric.d.ts +0 -39
- package/dist/sdk/metric.js +0 -418
- package/dist/sdk/models/errors/fivehundrederror.d.ts +0 -11
- package/dist/sdk/models/errors/fivehundrederror.js +0 -88
- package/dist/sdk/models/errors/fourhundredandoneerror.d.ts +0 -11
- package/dist/sdk/models/errors/fourhundredandoneerror.js +0 -88
- package/dist/sdk/models/errors/fourhundredandtwentynineerror.d.ts +0 -11
- package/dist/sdk/models/errors/fourhundredandtwentynineerror.js +0 -88
- package/dist/sdk/models/errors/index.d.ts +0 -4
- package/dist/sdk/models/errors/index.js +0 -23
- package/dist/sdk/models/errors/sdkerror.d.ts +0 -7
- package/dist/sdk/models/errors/sdkerror.js +0 -40
- package/dist/sdk/models/operations/addeditpriceintervals.d.ts +0 -25
- package/dist/sdk/models/operations/addeditpriceintervals.js +0 -95
- package/dist/sdk/models/operations/amendevent.d.ts +0 -25
- package/dist/sdk/models/operations/amendevent.js +0 -95
- package/dist/sdk/models/operations/amendusage.d.ts +0 -27
- package/dist/sdk/models/operations/amendusage.js +0 -103
- package/dist/sdk/models/operations/amendusageexternalcustomerid.d.ts +0 -27
- package/dist/sdk/models/operations/amendusageexternalcustomerid.js +0 -103
- package/dist/sdk/models/operations/archivecoupon.d.ts +0 -24
- package/dist/sdk/models/operations/archivecoupon.js +0 -91
- package/dist/sdk/models/operations/cancelsubscription.d.ts +0 -25
- package/dist/sdk/models/operations/cancelsubscription.js +0 -95
- package/dist/sdk/models/operations/closebackfill.d.ts +0 -24
- package/dist/sdk/models/operations/closebackfill.js +0 -91
- package/dist/sdk/models/operations/createbackfill.d.ts +0 -21
- package/dist/sdk/models/operations/createbackfill.js +0 -79
- package/dist/sdk/models/operations/createcoupon.d.ts +0 -21
- package/dist/sdk/models/operations/createcoupon.js +0 -79
- package/dist/sdk/models/operations/createcustomer.d.ts +0 -21
- package/dist/sdk/models/operations/createcustomer.js +0 -79
- package/dist/sdk/models/operations/createcustomerbalancetransaction.d.ts +0 -25
- package/dist/sdk/models/operations/createcustomerbalancetransaction.js +0 -95
- package/dist/sdk/models/operations/createinvoice.d.ts +0 -21
- package/dist/sdk/models/operations/createinvoice.js +0 -79
- package/dist/sdk/models/operations/createinvoicelineitem.d.ts +0 -21
- package/dist/sdk/models/operations/createinvoicelineitem.js +0 -79
- package/dist/sdk/models/operations/createledgerentry.d.ts +0 -24
- package/dist/sdk/models/operations/createledgerentry.js +0 -71
- package/dist/sdk/models/operations/createledgerentryexternalid.d.ts +0 -24
- package/dist/sdk/models/operations/createledgerentryexternalid.js +0 -71
- package/dist/sdk/models/operations/createmetric.d.ts +0 -21
- package/dist/sdk/models/operations/createmetric.js +0 -79
- package/dist/sdk/models/operations/createplan.d.ts +0 -21
- package/dist/sdk/models/operations/createplan.js +0 -79
- package/dist/sdk/models/operations/createprice.d.ts +0 -20
- package/dist/sdk/models/operations/createprice.js +0 -55
- package/dist/sdk/models/operations/createsubscription.d.ts +0 -21
- package/dist/sdk/models/operations/createsubscription.js +0 -79
- package/dist/sdk/models/operations/deletecustomer.d.ts +0 -24
- package/dist/sdk/models/operations/deletecustomer.js +0 -91
- package/dist/sdk/models/operations/deprecateevent.d.ts +0 -24
- package/dist/sdk/models/operations/deprecateevent.js +0 -91
- package/dist/sdk/models/operations/fetchbackfill.d.ts +0 -24
- package/dist/sdk/models/operations/fetchbackfill.js +0 -91
- package/dist/sdk/models/operations/fetchcoupon.d.ts +0 -24
- package/dist/sdk/models/operations/fetchcoupon.js +0 -91
- package/dist/sdk/models/operations/fetchcreditnote.d.ts +0 -24
- package/dist/sdk/models/operations/fetchcreditnote.js +0 -91
- package/dist/sdk/models/operations/fetchcustomer.d.ts +0 -24
- package/dist/sdk/models/operations/fetchcustomer.js +0 -91
- package/dist/sdk/models/operations/fetchcustomercosts.d.ts +0 -38
- package/dist/sdk/models/operations/fetchcustomercosts.js +0 -115
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.d.ts +0 -38
- package/dist/sdk/models/operations/fetchcustomercostsexternalid.js +0 -115
- package/dist/sdk/models/operations/fetchcustomercredits.d.ts +0 -26
- package/dist/sdk/models/operations/fetchcustomercredits.js +0 -99
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.d.ts +0 -26
- package/dist/sdk/models/operations/fetchcustomercreditsexternalid.js +0 -99
- package/dist/sdk/models/operations/fetchcustomercreditsledger.d.ts +0 -47
- package/dist/sdk/models/operations/fetchcustomercreditsledger.js +0 -146
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.d.ts +0 -47
- package/dist/sdk/models/operations/fetchcustomercreditsledgerexternalid.js +0 -146
- package/dist/sdk/models/operations/fetchcustomerexternalid.d.ts +0 -24
- package/dist/sdk/models/operations/fetchcustomerexternalid.js +0 -91
- package/dist/sdk/models/operations/fetchinvoice.d.ts +0 -24
- package/dist/sdk/models/operations/fetchinvoice.js +0 -91
- package/dist/sdk/models/operations/fetchitem.d.ts +0 -24
- package/dist/sdk/models/operations/fetchitem.js +0 -91
- package/dist/sdk/models/operations/fetchmetric.d.ts +0 -24
- package/dist/sdk/models/operations/fetchmetric.js +0 -91
- package/dist/sdk/models/operations/fetchplan.d.ts +0 -24
- package/dist/sdk/models/operations/fetchplan.js +0 -91
- package/dist/sdk/models/operations/fetchplanexternalid.d.ts +0 -24
- package/dist/sdk/models/operations/fetchplanexternalid.js +0 -91
- package/dist/sdk/models/operations/fetchprice.d.ts +0 -23
- package/dist/sdk/models/operations/fetchprice.js +0 -67
- package/dist/sdk/models/operations/fetchpriceexternalid.d.ts +0 -23
- package/dist/sdk/models/operations/fetchpriceexternalid.js +0 -67
- package/dist/sdk/models/operations/fetchsubscription.d.ts +0 -24
- package/dist/sdk/models/operations/fetchsubscription.js +0 -91
- package/dist/sdk/models/operations/fetchsubscriptioncosts.d.ts +0 -38
- package/dist/sdk/models/operations/fetchsubscriptioncosts.js +0 -115
- package/dist/sdk/models/operations/fetchsubscriptionschedule.d.ts +0 -30
- package/dist/sdk/models/operations/fetchsubscriptionschedule.js +0 -115
- package/dist/sdk/models/operations/fetchsubscriptionusage.d.ts +0 -54
- package/dist/sdk/models/operations/fetchsubscriptionusage.js +0 -130
- package/dist/sdk/models/operations/fetchupcominginvoice.d.ts +0 -24
- package/dist/sdk/models/operations/fetchupcominginvoice.js +0 -91
- package/dist/sdk/models/operations/index.d.ts +0 -73
- package/dist/sdk/models/operations/index.js +0 -92
- package/dist/sdk/models/operations/ingest.d.ts +0 -26
- package/dist/sdk/models/operations/ingest.js +0 -99
- package/dist/sdk/models/operations/issueinvoice.d.ts +0 -24
- package/dist/sdk/models/operations/issueinvoice.js +0 -91
- package/dist/sdk/models/operations/listbackfills.d.ts +0 -25
- package/dist/sdk/models/operations/listbackfills.js +0 -95
- package/dist/sdk/models/operations/listbalancetransactions.d.ts +0 -30
- package/dist/sdk/models/operations/listbalancetransactions.js +0 -115
- package/dist/sdk/models/operations/listcoupons.d.ts +0 -27
- package/dist/sdk/models/operations/listcoupons.js +0 -103
- package/dist/sdk/models/operations/listcouponsubscriptions.d.ts +0 -26
- package/dist/sdk/models/operations/listcouponsubscriptions.js +0 -99
- package/dist/sdk/models/operations/listcreditnotes.d.ts +0 -25
- package/dist/sdk/models/operations/listcreditnotes.js +0 -95
- package/dist/sdk/models/operations/listcustomers.d.ts +0 -29
- package/dist/sdk/models/operations/listcustomers.js +0 -111
- package/dist/sdk/models/operations/listinvoices.d.ts +0 -62
- package/dist/sdk/models/operations/listinvoices.js +0 -189
- package/dist/sdk/models/operations/listitems.d.ts +0 -25
- package/dist/sdk/models/operations/listitems.js +0 -95
- package/dist/sdk/models/operations/listmetrics.d.ts +0 -29
- package/dist/sdk/models/operations/listmetrics.js +0 -111
- package/dist/sdk/models/operations/listplans.d.ts +0 -41
- package/dist/sdk/models/operations/listplans.js +0 -124
- package/dist/sdk/models/operations/listprices.d.ts +0 -25
- package/dist/sdk/models/operations/listprices.js +0 -95
- package/dist/sdk/models/operations/listsubscriptions.d.ts +0 -37
- package/dist/sdk/models/operations/listsubscriptions.js +0 -129
- package/dist/sdk/models/operations/markinvoiceaspaid.d.ts +0 -25
- package/dist/sdk/models/operations/markinvoiceaspaid.js +0 -95
- package/dist/sdk/models/operations/ping.d.ts +0 -21
- package/dist/sdk/models/operations/ping.js +0 -79
- package/dist/sdk/models/operations/revertbackfill.d.ts +0 -24
- package/dist/sdk/models/operations/revertbackfill.js +0 -91
- package/dist/sdk/models/operations/scheduleplanchange.d.ts +0 -25
- package/dist/sdk/models/operations/scheduleplanchange.js +0 -95
- package/dist/sdk/models/operations/searchevents.d.ts +0 -30
- package/dist/sdk/models/operations/searchevents.js +0 -115
- package/dist/sdk/models/operations/triggerphase.d.ts +0 -25
- package/dist/sdk/models/operations/triggerphase.js +0 -95
- package/dist/sdk/models/operations/unschedulecancellation.d.ts +0 -24
- package/dist/sdk/models/operations/unschedulecancellation.js +0 -91
- package/dist/sdk/models/operations/unschedulefixedfeequantity.d.ts +0 -25
- package/dist/sdk/models/operations/unschedulefixedfeequantity.js +0 -95
- package/dist/sdk/models/operations/unscheduleplanchange.d.ts +0 -24
- package/dist/sdk/models/operations/unscheduleplanchange.js +0 -91
- package/dist/sdk/models/operations/updatecustomer.d.ts +0 -25
- package/dist/sdk/models/operations/updatecustomer.js +0 -95
- package/dist/sdk/models/operations/updatecustomerexternalid.d.ts +0 -25
- package/dist/sdk/models/operations/updatecustomerexternalid.js +0 -95
- package/dist/sdk/models/operations/updatefixedfeequantity.d.ts +0 -25
- package/dist/sdk/models/operations/updatefixedfeequantity.js +0 -95
- package/dist/sdk/models/operations/updateplan.d.ts +0 -25
- package/dist/sdk/models/operations/updateplan.js +0 -95
- package/dist/sdk/models/operations/updateplanexternal.d.ts +0 -25
- package/dist/sdk/models/operations/updateplanexternal.js +0 -95
- package/dist/sdk/models/operations/voidinvoice.d.ts +0 -24
- package/dist/sdk/models/operations/voidinvoice.js +0 -91
- package/dist/sdk/models/shared/accountingprovider.d.ts +0 -9
- package/dist/sdk/models/shared/accountingprovider.js +0 -55
- package/dist/sdk/models/shared/accountingproviderconfig.d.ts +0 -5
- package/dist/sdk/models/shared/accountingproviderconfig.js +0 -50
- package/dist/sdk/models/shared/accountingsyncconfiguration.d.ts +0 -6
- package/dist/sdk/models/shared/accountingsyncconfiguration.js +0 -52
- package/dist/sdk/models/shared/addeditpriceintervalparams.d.ts +0 -13
- package/dist/sdk/models/shared/addeditpriceintervalparams.js +0 -54
- package/dist/sdk/models/shared/addpriceintervalparams.d.ts +0 -40
- package/dist/sdk/models/shared/addpriceintervalparams.js +0 -87
- package/dist/sdk/models/shared/address.d.ts +0 -9
- package/dist/sdk/models/shared/address.js +0 -70
- package/dist/sdk/models/shared/addressinput.d.ts +0 -9
- package/dist/sdk/models/shared/addressinput.js +0 -70
- package/dist/sdk/models/shared/aggregatedcost.d.ts +0 -15
- package/dist/sdk/models/shared/aggregatedcost.js +0 -75
- package/dist/sdk/models/shared/amendedevent.d.ts +0 -28
- package/dist/sdk/models/shared/amendedevent.js +0 -81
- package/dist/sdk/models/shared/amendedusage.d.ts +0 -11
- package/dist/sdk/models/shared/amendedusage.js +0 -50
- package/dist/sdk/models/shared/amendeventresult.d.ts +0 -7
- package/dist/sdk/models/shared/amendeventresult.js +0 -45
- package/dist/sdk/models/shared/autocollection.d.ts +0 -15
- package/dist/sdk/models/shared/autocollection.js +0 -63
- package/dist/sdk/models/shared/backfill.d.ts +0 -27
- package/dist/sdk/models/shared/backfill.js +0 -104
- package/dist/sdk/models/shared/backfills.d.ts +0 -7
- package/dist/sdk/models/shared/backfills.js +0 -54
- package/dist/sdk/models/shared/backfillstatus.d.ts +0 -9
- package/dist/sdk/models/shared/backfillstatus.js +0 -16
- package/dist/sdk/models/shared/billablemetric.d.ts +0 -27
- package/dist/sdk/models/shared/billablemetric.js +0 -84
- package/dist/sdk/models/shared/billablemetrics.d.ts +0 -7
- package/dist/sdk/models/shared/billablemetrics.js +0 -54
- package/dist/sdk/models/shared/billingcyclealignment.d.ts +0 -8
- package/dist/sdk/models/shared/billingcyclealignment.js +0 -15
- package/dist/sdk/models/shared/cancelsubscriptionparams.d.ts +0 -19
- package/dist/sdk/models/shared/cancelsubscriptionparams.js +0 -63
- package/dist/sdk/models/shared/changeoption.d.ts +0 -5
- package/dist/sdk/models/shared/changeoption.js +0 -12
- package/dist/sdk/models/shared/coupon.d.ts +0 -40
- package/dist/sdk/models/shared/coupon.js +0 -98
- package/dist/sdk/models/shared/couponredemption.d.ts +0 -6
- package/dist/sdk/models/shared/couponredemption.js +0 -63
- package/dist/sdk/models/shared/coupons.d.ts +0 -7
- package/dist/sdk/models/shared/coupons.js +0 -54
- package/dist/sdk/models/shared/createinvoicelineitemparams.d.ts +0 -28
- package/dist/sdk/models/shared/createinvoicelineitemparams.js +0 -81
- package/dist/sdk/models/shared/createoneoffinvoiceparams.d.ts +0 -33
- package/dist/sdk/models/shared/createoneoffinvoiceparams.js +0 -86
- package/dist/sdk/models/shared/creditledgerentries.d.ts +0 -6
- package/dist/sdk/models/shared/creditledgerentries.js +0 -52
- package/dist/sdk/models/shared/creditnote.d.ts +0 -83
- package/dist/sdk/models/shared/creditnote.js +0 -171
- package/dist/sdk/models/shared/creditnotelineitem.d.ts +0 -40
- package/dist/sdk/models/shared/creditnotelineitem.js +0 -100
- package/dist/sdk/models/shared/creditnoteminified.d.ts +0 -7
- package/dist/sdk/models/shared/creditnoteminified.js +0 -45
- package/dist/sdk/models/shared/creditnotes.d.ts +0 -7
- package/dist/sdk/models/shared/creditnotes.js +0 -54
- package/dist/sdk/models/shared/creditnotesublineitem.d.ts +0 -6
- package/dist/sdk/models/shared/creditnotesublineitem.js +0 -55
- package/dist/sdk/models/shared/creditnotesummary.d.ts +0 -12
- package/dist/sdk/models/shared/creditnotesummary.js +0 -74
- package/dist/sdk/models/shared/customer.d.ts +0 -76
- package/dist/sdk/models/shared/customer.js +0 -182
- package/dist/sdk/models/shared/customerbalancetransaction.d.ts +0 -42
- package/dist/sdk/models/shared/customerbalancetransaction.js +0 -109
- package/dist/sdk/models/shared/customerbalancetransactions.d.ts +0 -7
- package/dist/sdk/models/shared/customerbalancetransactions.js +0 -54
- package/dist/sdk/models/shared/customercosts.d.ts +0 -5
- package/dist/sdk/models/shared/customercosts.js +0 -47
- package/dist/sdk/models/shared/customercreditbalance.d.ts +0 -7
- package/dist/sdk/models/shared/customercreditbalance.js +0 -64
- package/dist/sdk/models/shared/customercreditbalances.d.ts +0 -7
- package/dist/sdk/models/shared/customercreditbalances.js +0 -54
- package/dist/sdk/models/shared/customerminified.d.ts +0 -5
- package/dist/sdk/models/shared/customerminified.js +0 -50
- package/dist/sdk/models/shared/customers.d.ts +0 -7
- package/dist/sdk/models/shared/customers.js +0 -54
- package/dist/sdk/models/shared/customertaxid.d.ts +0 -6
- package/dist/sdk/models/shared/customertaxid.js +0 -55
- package/dist/sdk/models/shared/debug.d.ts +0 -8
- package/dist/sdk/models/shared/debug.js +0 -53
- package/dist/sdk/models/shared/deletecustomerresponse.d.ts +0 -3
- package/dist/sdk/models/shared/deletecustomerresponse.js +0 -30
- package/dist/sdk/models/shared/deprecatedeventresult.d.ts +0 -7
- package/dist/sdk/models/shared/deprecatedeventresult.js +0 -45
- package/dist/sdk/models/shared/discount.d.ts +0 -33
- package/dist/sdk/models/shared/discount.js +0 -80
- package/dist/sdk/models/shared/editcustomer.d.ts +0 -72
- package/dist/sdk/models/shared/editcustomer.js +0 -151
- package/dist/sdk/models/shared/editplan.d.ts +0 -10
- package/dist/sdk/models/shared/editplan.js +0 -59
- package/dist/sdk/models/shared/editpriceintervalparams.d.ts +0 -20
- package/dist/sdk/models/shared/editpriceintervalparams.js +0 -62
- package/dist/sdk/models/shared/event.d.ts +0 -39
- package/dist/sdk/models/shared/event.js +0 -93
- package/dist/sdk/models/shared/events.d.ts +0 -7
- package/dist/sdk/models/shared/events.js +0 -54
- package/dist/sdk/models/shared/eventsearchcriteria.d.ts +0 -11
- package/dist/sdk/models/shared/eventsearchcriteria.js +0 -50
- package/dist/sdk/models/shared/fixedfeequantitychange.d.ts +0 -25
- package/dist/sdk/models/shared/fixedfeequantitychange.js +0 -75
- package/dist/sdk/models/shared/fixedfeequantityscheduleentry.d.ts +0 -7
- package/dist/sdk/models/shared/fixedfeequantityscheduleentry.js +0 -68
- package/dist/sdk/models/shared/fixedfeequantitytransition.d.ts +0 -6
- package/dist/sdk/models/shared/fixedfeequantitytransition.js +0 -59
- package/dist/sdk/models/shared/index.d.ts +0 -109
- package/dist/sdk/models/shared/index.js +0 -128
- package/dist/sdk/models/shared/ingestevent.d.ts +0 -32
- package/dist/sdk/models/shared/ingestevent.js +0 -86
- package/dist/sdk/models/shared/ingestionresponse.d.ts +0 -13
- package/dist/sdk/models/shared/ingestionresponse.js +0 -54
- package/dist/sdk/models/shared/ingestrequestbody.d.ts +0 -5
- package/dist/sdk/models/shared/ingestrequestbody.js +0 -47
- package/dist/sdk/models/shared/invoice.d.ts +0 -138
- package/dist/sdk/models/shared/invoice.js +0 -329
- package/dist/sdk/models/shared/invoicelineitem.d.ts +0 -49
- package/dist/sdk/models/shared/invoicelineitem.js +0 -134
- package/dist/sdk/models/shared/invoicelineitemparams.d.ts +0 -26
- package/dist/sdk/models/shared/invoicelineitemparams.js +0 -90
- package/dist/sdk/models/shared/invoiceminified.d.ts +0 -7
- package/dist/sdk/models/shared/invoiceminified.js +0 -45
- package/dist/sdk/models/shared/invoices.d.ts +0 -7
- package/dist/sdk/models/shared/invoices.js +0 -54
- package/dist/sdk/models/shared/item.d.ts +0 -14
- package/dist/sdk/models/shared/item.js +0 -72
- package/dist/sdk/models/shared/itemexternalconnection.d.ts +0 -5
- package/dist/sdk/models/shared/itemexternalconnection.js +0 -50
- package/dist/sdk/models/shared/items.d.ts +0 -7
- package/dist/sdk/models/shared/items.js +0 -54
- package/dist/sdk/models/shared/markaspaidrequestparams.d.ts +0 -16
- package/dist/sdk/models/shared/markaspaidrequestparams.js +0 -61
- package/dist/sdk/models/shared/maximum.d.ts +0 -11
- package/dist/sdk/models/shared/maximum.js +0 -50
- package/dist/sdk/models/shared/maximuminterval.d.ts +0 -23
- package/dist/sdk/models/shared/maximuminterval.js +0 -73
- package/dist/sdk/models/shared/minimum.d.ts +0 -11
- package/dist/sdk/models/shared/minimum.js +0 -50
- package/dist/sdk/models/shared/minimuminterval.d.ts +0 -23
- package/dist/sdk/models/shared/minimuminterval.js +0 -73
- package/dist/sdk/models/shared/newaccountingsyncconfiguration.d.ts +0 -6
- package/dist/sdk/models/shared/newaccountingsyncconfiguration.js +0 -52
- package/dist/sdk/models/shared/newbackfill.d.ts +0 -27
- package/dist/sdk/models/shared/newbackfill.js +0 -82
- package/dist/sdk/models/shared/newbillablemetric.d.ts +0 -28
- package/dist/sdk/models/shared/newbillablemetric.js +0 -77
- package/dist/sdk/models/shared/newcoupon.d.ts +0 -18
- package/dist/sdk/models/shared/newcoupon.js +0 -69
- package/dist/sdk/models/shared/newcustomer.d.ts +0 -68
- package/dist/sdk/models/shared/newcustomer.js +0 -152
- package/dist/sdk/models/shared/newcustomerbalancetransaction.d.ts +0 -13
- package/dist/sdk/models/shared/newcustomerbalancetransaction.js +0 -60
- package/dist/sdk/models/shared/newplan.d.ts +0 -26
- package/dist/sdk/models/shared/newplan.js +0 -93
- package/dist/sdk/models/shared/newreportingconfiguration.d.ts +0 -4
- package/dist/sdk/models/shared/newreportingconfiguration.js +0 -45
- package/dist/sdk/models/shared/newsubscription.d.ts +0 -54
- package/dist/sdk/models/shared/newsubscription.js +0 -187
- package/dist/sdk/models/shared/paginationmetadata.d.ts +0 -5
- package/dist/sdk/models/shared/paginationmetadata.js +0 -50
- package/dist/sdk/models/shared/perpricecost.d.ts +0 -224
- package/dist/sdk/models/shared/perpricecost.js +0 -67
- package/dist/sdk/models/shared/phaseoverride.d.ts +0 -17
- package/dist/sdk/models/shared/phaseoverride.js +0 -62
- package/dist/sdk/models/shared/pingresponse.d.ts +0 -4
- package/dist/sdk/models/shared/pingresponse.js +0 -45
- package/dist/sdk/models/shared/plan.d.ts +0 -66
- package/dist/sdk/models/shared/plan.js +0 -188
- package/dist/sdk/models/shared/planminified.d.ts +0 -9
- package/dist/sdk/models/shared/planminified.js +0 -55
- package/dist/sdk/models/shared/planphase.d.ts +0 -28
- package/dist/sdk/models/shared/planphase.js +0 -106
- package/dist/sdk/models/shared/plans.d.ts +0 -7
- package/dist/sdk/models/shared/plans.js +0 -54
- package/dist/sdk/models/shared/pricegroup.d.ts +0 -17
- package/dist/sdk/models/shared/pricegroup.js +0 -65
- package/dist/sdk/models/shared/priceinterval.d.ts +0 -239
- package/dist/sdk/models/shared/priceinterval.js +0 -104
- package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.d.ts +0 -11
- package/dist/sdk/models/shared/priceintervalfixedfeequantitytransitionparams.js +0 -54
- package/dist/sdk/models/shared/prices.d.ts +0 -6
- package/dist/sdk/models/shared/prices.js +0 -52
- package/dist/sdk/models/shared/product.d.ts +0 -6
- package/dist/sdk/models/shared/product.js +0 -59
- package/dist/sdk/models/shared/reportingconfiguration.d.ts +0 -4
- package/dist/sdk/models/shared/reportingconfiguration.js +0 -45
- package/dist/sdk/models/shared/security.d.ts +0 -4
- package/dist/sdk/models/shared/security.js +0 -45
- package/dist/sdk/models/shared/subscription.d.ts +0 -128
- package/dist/sdk/models/shared/subscription.js +0 -226
- package/dist/sdk/models/shared/subscriptioncosts.d.ts +0 -5
- package/dist/sdk/models/shared/subscriptioncosts.js +0 -47
- package/dist/sdk/models/shared/subscriptionminified.d.ts +0 -4
- package/dist/sdk/models/shared/subscriptionminified.js +0 -45
- package/dist/sdk/models/shared/subscriptionplanchange.d.ts +0 -59
- package/dist/sdk/models/shared/subscriptionplanchange.js +0 -126
- package/dist/sdk/models/shared/subscriptions.d.ts +0 -7
- package/dist/sdk/models/shared/subscriptions.js +0 -54
- package/dist/sdk/models/shared/subscriptionscheduleitem.d.ts +0 -7
- package/dist/sdk/models/shared/subscriptionscheduleitem.js +0 -65
- package/dist/sdk/models/shared/subscriptionscheduleitems.d.ts +0 -7
- package/dist/sdk/models/shared/subscriptionscheduleitems.js +0 -54
- package/dist/sdk/models/shared/subscriptiontrialinfo.d.ts +0 -4
- package/dist/sdk/models/shared/subscriptiontrialinfo.js +0 -49
- package/dist/sdk/models/shared/taxamount.d.ts +0 -15
- package/dist/sdk/models/shared/taxamount.js +0 -55
- package/dist/sdk/models/shared/trialconfig.d.ts +0 -8
- package/dist/sdk/models/shared/trialconfig.js +0 -54
- package/dist/sdk/models/shared/triggersubscriptionphaseparams.d.ts +0 -8
- package/dist/sdk/models/shared/triggersubscriptionphaseparams.js +0 -51
- package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.d.ts +0 -7
- package/dist/sdk/models/shared/unschedulefixedfeequantitychangeparams.js +0 -45
- package/dist/sdk/models/shared/upcominginvoice.d.ts +0 -130
- package/dist/sdk/models/shared/upcominginvoice.js +0 -321
- package/dist/sdk/models/shared/updateevent.d.ts +0 -28
- package/dist/sdk/models/shared/updateevent.js +0 -81
- package/dist/sdk/models/shared/validationerror.d.ts +0 -11
- package/dist/sdk/models/shared/validationerror.js +0 -50
- package/dist/sdk/plan.d.ts +0 -90
- package/dist/sdk/plan.js +0 -764
- package/dist/sdk/price.d.ts +0 -246
- package/dist/sdk/price.js +0 -715
- package/dist/sdk/priceinterval.d.ts +0 -66
- package/dist/sdk/priceinterval.js +0 -263
- package/dist/sdk/sdk.d.ts +0 -389
- package/dist/sdk/sdk.js +0 -93
- package/dist/sdk/subscription.d.ts +0 -769
- package/dist/sdk/subscription.js +0 -2116
- package/dist/sdk/types/index.d.ts +0 -1
- package/dist/sdk/types/index.js +0 -20
- package/dist/sdk/types/rfcdate.d.ts +0 -9
- package/dist/sdk/types/rfcdate.js +0 -59
- package/docs/models/errors/fivehundrederror.md +0 -12
- package/docs/models/errors/fivehundrederrorheaders.md +0 -7
- package/docs/models/errors/fourhundredandoneerror.md +0 -12
- package/docs/models/errors/fourhundredandoneerrorheaders.md +0 -7
- package/docs/models/errors/fourhundredandtwentynineerror.md +0 -12
- package/docs/models/errors/fourhundredandtwentynineerrorheaders.md +0 -7
- package/docs/models/operations/addeditpriceintervalsrequest.md +0 -9
- package/docs/models/operations/addeditpriceintervalsresponse.md +0 -11
- package/docs/models/operations/amendeventrequest.md +0 -9
- package/docs/models/operations/amendeventresponse.md +0 -11
- package/docs/models/operations/amendusageexternalcustomeridrequest.md +0 -11
- package/docs/models/operations/amendusageexternalcustomeridresponse.md +0 -11
- package/docs/models/operations/amendusagerequest.md +0 -11
- package/docs/models/operations/amendusageresponse.md +0 -11
- package/docs/models/operations/archivecouponrequest.md +0 -8
- package/docs/models/operations/archivecouponresponse.md +0 -11
- package/docs/models/operations/cancelsubscriptionrequest.md +0 -9
- package/docs/models/operations/cancelsubscriptionresponse.md +0 -11
- package/docs/models/operations/closebackfillrequest.md +0 -8
- package/docs/models/operations/closebackfillresponse.md +0 -11
- package/docs/models/operations/createbackfillresponse.md +0 -11
- package/docs/models/operations/createcouponresponse.md +0 -11
- package/docs/models/operations/createcustomerbalancetransactionrequest.md +0 -9
- package/docs/models/operations/createcustomerbalancetransactionresponse.md +0 -11
- package/docs/models/operations/createcustomerresponse.md +0 -11
- package/docs/models/operations/createinvoicelineitemresponse.md +0 -11
- package/docs/models/operations/createinvoiceresponse.md +0 -11
- package/docs/models/operations/createledgerentryexternalidrequest.md +0 -9
- package/docs/models/operations/createledgerentryexternalidresponse.md +0 -11
- package/docs/models/operations/createledgerentryrequest.md +0 -9
- package/docs/models/operations/createledgerentryresponse.md +0 -11
- package/docs/models/operations/createmetricresponse.md +0 -11
- package/docs/models/operations/createplanresponse.md +0 -11
- package/docs/models/operations/createpriceresponse.md +0 -11
- package/docs/models/operations/createsubscriptionresponse.md +0 -11
- package/docs/models/operations/deletecustomerrequest.md +0 -8
- package/docs/models/operations/deletecustomerresponse.md +0 -11
- package/docs/models/operations/deprecateeventrequest.md +0 -8
- package/docs/models/operations/deprecateeventresponse.md +0 -11
- package/docs/models/operations/fetchbackfillrequest.md +0 -8
- package/docs/models/operations/fetchbackfillresponse.md +0 -11
- package/docs/models/operations/fetchcouponrequest.md +0 -8
- package/docs/models/operations/fetchcouponresponse.md +0 -11
- package/docs/models/operations/fetchcreditnoterequest.md +0 -8
- package/docs/models/operations/fetchcreditnoteresponse.md +0 -11
- package/docs/models/operations/fetchcustomercostsexternalidrequest.md +0 -12
- package/docs/models/operations/fetchcustomercostsexternalidresponse.md +0 -11
- package/docs/models/operations/fetchcustomercostsexternalidviewmodeviewmode.md +0 -11
- package/docs/models/operations/fetchcustomercostsrequest.md +0 -12
- package/docs/models/operations/fetchcustomercostsresponse.md +0 -11
- package/docs/models/operations/fetchcustomercostsviewmodeviewmode.md +0 -11
- package/docs/models/operations/fetchcustomercreditsexternalidrequest.md +0 -10
- package/docs/models/operations/fetchcustomercreditsexternalidresponse.md +0 -11
- package/docs/models/operations/fetchcustomercreditsledgerentrystatusentrystatus.md +0 -9
- package/docs/models/operations/fetchcustomercreditsledgerentrytypeentrytype.md +0 -14
- package/docs/models/operations/fetchcustomercreditsledgerexternalidentrystatusentrystatus.md +0 -9
- package/docs/models/operations/fetchcustomercreditsledgerexternalidentrytypeentrytype.md +0 -14
- package/docs/models/operations/fetchcustomercreditsledgerexternalidrequest.md +0 -18
- package/docs/models/operations/fetchcustomercreditsledgerexternalidresponse.md +0 -11
- package/docs/models/operations/fetchcustomercreditsledgerrequest.md +0 -18
- package/docs/models/operations/fetchcustomercreditsledgerresponse.md +0 -11
- package/docs/models/operations/fetchcustomercreditsrequest.md +0 -10
- package/docs/models/operations/fetchcustomercreditsresponse.md +0 -11
- package/docs/models/operations/fetchcustomerexternalidrequest.md +0 -8
- package/docs/models/operations/fetchcustomerexternalidresponse.md +0 -11
- package/docs/models/operations/fetchcustomerrequest.md +0 -8
- package/docs/models/operations/fetchcustomerresponse.md +0 -11
- package/docs/models/operations/fetchinvoicerequest.md +0 -8
- package/docs/models/operations/fetchinvoiceresponse.md +0 -11
- package/docs/models/operations/fetchitemrequest.md +0 -8
- package/docs/models/operations/fetchitemresponse.md +0 -11
- package/docs/models/operations/fetchmetricrequest.md +0 -8
- package/docs/models/operations/fetchmetricresponse.md +0 -11
- package/docs/models/operations/fetchplanexternalidrequest.md +0 -8
- package/docs/models/operations/fetchplanexternalidresponse.md +0 -11
- package/docs/models/operations/fetchplanrequest.md +0 -8
- package/docs/models/operations/fetchplanresponse.md +0 -11
- package/docs/models/operations/fetchpriceexternalidrequest.md +0 -8
- package/docs/models/operations/fetchpriceexternalidresponse.md +0 -11
- package/docs/models/operations/fetchpricerequest.md +0 -8
- package/docs/models/operations/fetchpriceresponse.md +0 -11
- package/docs/models/operations/fetchsubscriptioncostsrequest.md +0 -12
- package/docs/models/operations/fetchsubscriptioncostsresponse.md +0 -11
- package/docs/models/operations/fetchsubscriptioncostsviewmodeviewmode.md +0 -11
- package/docs/models/operations/fetchsubscriptionrequest.md +0 -8
- package/docs/models/operations/fetchsubscriptionresponse.md +0 -11
- package/docs/models/operations/fetchsubscriptionschedulerequest.md +0 -14
- package/docs/models/operations/fetchsubscriptionscheduleresponse.md +0 -11
- package/docs/models/operations/fetchsubscriptionusagegranularitygranularity.md +0 -10
- package/docs/models/operations/fetchsubscriptionusagerequest.md +0 -20
- package/docs/models/operations/fetchsubscriptionusageresponse.md +0 -11
- package/docs/models/operations/fetchsubscriptionusageviewmodeviewmode.md +0 -11
- package/docs/models/operations/fetchupcominginvoicerequest.md +0 -8
- package/docs/models/operations/fetchupcominginvoiceresponse.md +0 -11
- package/docs/models/operations/ingestrequest.md +0 -10
- package/docs/models/operations/ingestresponse.md +0 -11
- package/docs/models/operations/issueinvoicerequest.md +0 -8
- package/docs/models/operations/issueinvoiceresponse.md +0 -11
- package/docs/models/operations/listbackfillsrequest.md +0 -9
- package/docs/models/operations/listbackfillsresponse.md +0 -11
- package/docs/models/operations/listbalancetransactionsrequest.md +0 -14
- package/docs/models/operations/listbalancetransactionsresponse.md +0 -11
- package/docs/models/operations/listcouponsrequest.md +0 -11
- package/docs/models/operations/listcouponsresponse.md +0 -11
- package/docs/models/operations/listcouponsubscriptionsrequest.md +0 -10
- package/docs/models/operations/listcouponsubscriptionsresponse.md +0 -11
- package/docs/models/operations/listcreditnotesrequest.md +0 -9
- package/docs/models/operations/listcreditnotesresponse.md +0 -11
- package/docs/models/operations/listcustomersrequest.md +0 -13
- package/docs/models/operations/listcustomersresponse.md +0 -11
- package/docs/models/operations/listinvoicesdatetypedatetype.md +0 -9
- package/docs/models/operations/listinvoicesrequest.md +0 -27
- package/docs/models/operations/listinvoicesresponse.md +0 -11
- package/docs/models/operations/listinvoicesstatus.md +0 -12
- package/docs/models/operations/listinvoicesstatusstatus.md +0 -12
- package/docs/models/operations/listitemsrequest.md +0 -9
- package/docs/models/operations/listitemsresponse.md +0 -11
- package/docs/models/operations/listmetricsrequest.md +0 -13
- package/docs/models/operations/listmetricsresponse.md +0 -11
- package/docs/models/operations/listplansrequest.md +0 -14
- package/docs/models/operations/listplansresponse.md +0 -11
- package/docs/models/operations/listplansstatusstatus.md +0 -12
- package/docs/models/operations/listpricesrequest.md +0 -9
- package/docs/models/operations/listpricesresponse.md +0 -11
- package/docs/models/operations/listsubscriptionsrequest.md +0 -16
- package/docs/models/operations/listsubscriptionsresponse.md +0 -11
- package/docs/models/operations/listsubscriptionsstatusstatus.md +0 -10
- package/docs/models/operations/markinvoiceaspaidrequest.md +0 -9
- package/docs/models/operations/markinvoiceaspaidresponse.md +0 -11
- package/docs/models/operations/pingresponse.md +0 -11
- package/docs/models/operations/revertbackfillrequest.md +0 -8
- package/docs/models/operations/revertbackfillresponse.md +0 -11
- package/docs/models/operations/scheduleplanchangerequest.md +0 -9
- package/docs/models/operations/scheduleplanchangeresponse.md +0 -11
- package/docs/models/operations/searcheventsrequest.md +0 -14
- package/docs/models/operations/searcheventsresponse.md +0 -11
- package/docs/models/operations/triggerphaserequest.md +0 -9
- package/docs/models/operations/triggerphaseresponse.md +0 -11
- package/docs/models/operations/unschedulecancellationrequest.md +0 -8
- package/docs/models/operations/unschedulecancellationresponse.md +0 -11
- package/docs/models/operations/unschedulefixedfeequantityrequest.md +0 -9
- package/docs/models/operations/unschedulefixedfeequantityresponse.md +0 -11
- package/docs/models/operations/unscheduleplanchangerequest.md +0 -8
- package/docs/models/operations/unscheduleplanchangeresponse.md +0 -11
- package/docs/models/operations/updatecustomerexternalidrequest.md +0 -9
- package/docs/models/operations/updatecustomerexternalidresponse.md +0 -11
- package/docs/models/operations/updatecustomerrequest.md +0 -9
- package/docs/models/operations/updatecustomerresponse.md +0 -11
- package/docs/models/operations/updatefixedfeequantityrequest.md +0 -9
- package/docs/models/operations/updatefixedfeequantityresponse.md +0 -11
- package/docs/models/operations/updateplanexternalrequest.md +0 -9
- package/docs/models/operations/updateplanexternalresponse.md +0 -11
- package/docs/models/operations/updateplanrequest.md +0 -9
- package/docs/models/operations/updateplanresponse.md +0 -11
- package/docs/models/operations/voidinvoicerequest.md +0 -8
- package/docs/models/operations/voidinvoiceresponse.md +0 -11
- package/docs/models/shared/accountingprovider.md +0 -9
- package/docs/models/shared/accountingproviderconfig.md +0 -9
- package/docs/models/shared/accountingproviderprovidertype.md +0 -9
- package/docs/models/shared/accountingsyncconfiguration.md +0 -9
- package/docs/models/shared/addeditpriceintervalparams.md +0 -9
- package/docs/models/shared/addpriceintervalparams.md +0 -16
- package/docs/models/shared/address.md +0 -13
- package/docs/models/shared/addressinput.md +0 -13
- package/docs/models/shared/aggregatedcost.md +0 -12
- package/docs/models/shared/amendedevent.md +0 -12
- package/docs/models/shared/amendedeventproperties.md +0 -9
- package/docs/models/shared/amendedusage.md +0 -9
- package/docs/models/shared/amendeventresult.md +0 -8
- package/docs/models/shared/autocollection.md +0 -10
- package/docs/models/shared/backfill.md +0 -17
- package/docs/models/shared/backfills.md +0 -9
- package/docs/models/shared/backfillstatus.md +0 -13
- package/docs/models/shared/billablemetric.md +0 -16
- package/docs/models/shared/billablemetrics.md +0 -9
- package/docs/models/shared/billablemetricstatus.md +0 -10
- package/docs/models/shared/billingcyclealignment.md +0 -12
- package/docs/models/shared/cancelsubscriptionparams.md +0 -9
- package/docs/models/shared/cancelsubscriptionparamscanceloption.md +0 -12
- package/docs/models/shared/changeoption.md +0 -10
- package/docs/models/shared/coupon.md +0 -21
- package/docs/models/shared/coupondiscount.md +0 -7
- package/docs/models/shared/couponredemption.md +0 -10
- package/docs/models/shared/coupons.md +0 -9
- package/docs/models/shared/createinvoicelineitemparams.md +0 -13
- package/docs/models/shared/createoneoffinvoiceparams.md +0 -15
- package/docs/models/shared/creditledgerentries.md +0 -9
- package/docs/models/shared/creditnote.md +0 -26
- package/docs/models/shared/creditnotediscounts.md +0 -7
- package/docs/models/shared/creditnotelineitem.md +0 -15
- package/docs/models/shared/creditnotelineitemdiscounts.md +0 -7
- package/docs/models/shared/creditnotelineitemtaxamounts.md +0 -7
- package/docs/models/shared/creditnotemaximumamountadjustment.md +0 -9
- package/docs/models/shared/creditnoteminified.md +0 -8
- package/docs/models/shared/creditnotereason.md +0 -11
- package/docs/models/shared/creditnotes.md +0 -9
- package/docs/models/shared/creditnotesublineitem.md +0 -10
- package/docs/models/shared/creditnotesummary.md +0 -13
- package/docs/models/shared/creditnotetype.md +0 -9
- package/docs/models/shared/customer.md +0 -42
- package/docs/models/shared/customerbalancetransaction.md +0 -17
- package/docs/models/shared/customerbalancetransactionaction.md +0 -10
- package/docs/models/shared/customerbalancetransactions.md +0 -9
- package/docs/models/shared/customerbalancetransactiontype.md +0 -9
- package/docs/models/shared/customercosts.md +0 -8
- package/docs/models/shared/customercreditbalance.md +0 -11
- package/docs/models/shared/customercreditbalances.md +0 -9
- package/docs/models/shared/customerminified.md +0 -9
- package/docs/models/shared/customerpaymentprovider.md +0 -14
- package/docs/models/shared/customers.md +0 -9
- package/docs/models/shared/customertaxid.md +0 -10
- package/docs/models/shared/debug.md +0 -11
- package/docs/models/shared/deletecustomerresponse.md +0 -7
- package/docs/models/shared/deprecatedeventresult.md +0 -8
- package/docs/models/shared/discount.md +0 -15
- package/docs/models/shared/discountdiscounttype.md +0 -11
- package/docs/models/shared/editcustomer.md +0 -22
- package/docs/models/shared/editcustomermetadata.md +0 -9
- package/docs/models/shared/editcustomerpaymentprovider.md +0 -16
- package/docs/models/shared/editplan.md +0 -9
- package/docs/models/shared/editplanmetadata.md +0 -7
- package/docs/models/shared/editpriceintervalparams.md +0 -11
- package/docs/models/shared/event.md +0 -17
- package/docs/models/shared/eventproperties.md +0 -9
- package/docs/models/shared/events.md +0 -9
- package/docs/models/shared/eventsearchcriteria.md +0 -9
- package/docs/models/shared/fixedfeequantitychange.md +0 -11
- package/docs/models/shared/fixedfeequantitychangechangeoption.md +0 -12
- package/docs/models/shared/fixedfeequantityscheduleentry.md +0 -11
- package/docs/models/shared/fixedfeequantitytransition.md +0 -10
- package/docs/models/shared/ingestevent.md +0 -13
- package/docs/models/shared/ingesteventproperties.md +0 -9
- package/docs/models/shared/ingestionresponse.md +0 -9
- package/docs/models/shared/ingestrequestbody.md +0 -8
- package/docs/models/shared/invoice.md +0 -51
- package/docs/models/shared/invoicelineitem.md +0 -23
- package/docs/models/shared/invoicelineitemparams.md +0 -14
- package/docs/models/shared/invoicelineitemparamsmodeltype.md +0 -8
- package/docs/models/shared/invoicemetadata.md +0 -7
- package/docs/models/shared/invoiceminified.md +0 -8
- package/docs/models/shared/invoices.md +0 -9
- package/docs/models/shared/invoicestatus.md +0 -12
- package/docs/models/shared/item.md +0 -14
- package/docs/models/shared/itemexternalconnection.md +0 -9
- package/docs/models/shared/items.md +0 -9
- package/docs/models/shared/markaspaidrequestparams.md +0 -10
- package/docs/models/shared/maximum.md +0 -9
- package/docs/models/shared/maximuminterval.md +0 -12
- package/docs/models/shared/minimum.md +0 -9
- package/docs/models/shared/minimuminterval.md +0 -12
- package/docs/models/shared/newaccountingsyncconfiguration.md +0 -9
- package/docs/models/shared/newbackfill.md +0 -13
- package/docs/models/shared/newbillablemetric.md +0 -12
- package/docs/models/shared/newbillablemetricmetadata.md +0 -9
- package/docs/models/shared/newcoupon.md +0 -11
- package/docs/models/shared/newcoupondiscount.md +0 -7
- package/docs/models/shared/newcustomer.md +0 -23
- package/docs/models/shared/newcustomerbalancetransaction.md +0 -10
- package/docs/models/shared/newcustomerbalancetransactiontype.md +0 -9
- package/docs/models/shared/newcustomermetadata.md +0 -9
- package/docs/models/shared/newcustomerpaymentprovider.md +0 -14
- package/docs/models/shared/newplan.md +0 -14
- package/docs/models/shared/newplanmetadata.md +0 -7
- package/docs/models/shared/newplanprices.md +0 -7
- package/docs/models/shared/newreportingconfiguration.md +0 -8
- package/docs/models/shared/newsubscription.md +0 -31
- package/docs/models/shared/newsubscriptionexternalmarketplace.md +0 -10
- package/docs/models/shared/newsubscriptionmetadata.md +0 -7
- package/docs/models/shared/paginationmetadata.md +0 -9
- package/docs/models/shared/perpricecost.md +0 -12
- package/docs/models/shared/phaseoverride.md +0 -11
- package/docs/models/shared/pingresponse.md +0 -8
- package/docs/models/shared/plan.md +0 -33
- package/docs/models/shared/planmetadata.md +0 -7
- package/docs/models/shared/planminified.md +0 -10
- package/docs/models/shared/planphase.md +0 -18
- package/docs/models/shared/planphasedurationunit.md +0 -11
- package/docs/models/shared/plans.md +0 -9
- package/docs/models/shared/planstatus.md +0 -10
- package/docs/models/shared/pricegroup.md +0 -12
- package/docs/models/shared/priceinterval.md +0 -18
- package/docs/models/shared/priceintervalfixedfeequantitytransitionparams.md +0 -9
- package/docs/models/shared/prices.md +0 -9
- package/docs/models/shared/product.md +0 -10
- package/docs/models/shared/reportingconfiguration.md +0 -8
- package/docs/models/shared/security.md +0 -8
- package/docs/models/shared/subscription.md +0 -44
- package/docs/models/shared/subscriptioncosts.md +0 -8
- package/docs/models/shared/subscriptionmetadata.md +0 -9
- package/docs/models/shared/subscriptionminified.md +0 -8
- package/docs/models/shared/subscriptionplanchange.md +0 -23
- package/docs/models/shared/subscriptions.md +0 -9
- package/docs/models/shared/subscriptionscheduleitem.md +0 -10
- package/docs/models/shared/subscriptionscheduleitems.md +0 -9
- package/docs/models/shared/subscriptionstatus.md +0 -10
- package/docs/models/shared/subscriptiontrialinfo.md +0 -8
- package/docs/models/shared/taxamount.md +0 -10
- package/docs/models/shared/trialconfig.md +0 -9
- package/docs/models/shared/trialconfigtrialperiodunit.md +0 -8
- package/docs/models/shared/triggersubscriptionphaseparams.md +0 -8
- package/docs/models/shared/unschedulefixedfeequantitychangeparams.md +0 -8
- package/docs/models/shared/upcominginvoice.md +0 -46
- package/docs/models/shared/upcominginvoicemetadata.md +0 -7
- package/docs/models/shared/upcominginvoicestatus.md +0 -12
- package/docs/models/shared/updateevent.md +0 -12
- package/docs/models/shared/updateeventproperties.md +0 -9
- package/docs/models/shared/validationerror.md +0 -9
- package/docs/sdks/availability/README.md +0 -46
- package/docs/sdks/coupon/README.md +0 -235
- package/docs/sdks/credit/README.md +0 -565
- package/docs/sdks/creditnote/README.md +0 -94
- package/docs/sdks/customer/README.md +0 -1080
- package/docs/sdks/event/README.md +0 -674
- package/docs/sdks/invoice/README.md +0 -388
- package/docs/sdks/item/README.md +0 -92
- package/docs/sdks/metric/README.md +0 -136
- package/docs/sdks/orb/README.md +0 -21
- package/docs/sdks/plan/README.md +0 -298
- package/docs/sdks/price/README.md +0 -375
- package/docs/sdks/priceinterval/README.md +0 -137
- package/docs/sdks/subscription/README.md +0 -1306
- package/docs/types/rfcdate.md +0 -11
|
@@ -0,0 +1,3752 @@
|
|
|
1
|
+
import * as Core from 'orb-billing/core';
|
|
2
|
+
import { APIResource } from 'orb-billing/resource';
|
|
3
|
+
import * as SubscriptionsAPI from 'orb-billing/resources/subscriptions';
|
|
4
|
+
import * as CustomersAPI from 'orb-billing/resources/customers/customers';
|
|
5
|
+
import * as PlansAPI from 'orb-billing/resources/plans/plans';
|
|
6
|
+
import * as PricesAPI from 'orb-billing/resources/prices/prices';
|
|
7
|
+
import { Page, type PageParams } from 'orb-billing/pagination';
|
|
8
|
+
export declare class Subscriptions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* A subscription represents the purchase of a plan by a customer. The customer is
|
|
11
|
+
* identified by either the `customer_id` or the `external_customer_id`, and
|
|
12
|
+
* exactly one of these fields must be provided.
|
|
13
|
+
*
|
|
14
|
+
* By default, subscriptions begin on the day that they're created and renew
|
|
15
|
+
* automatically for each billing cycle at the cadence that's configured in the
|
|
16
|
+
* plan definition.
|
|
17
|
+
*
|
|
18
|
+
* The default configuration for subscriptions in Orb is **In-advance billing** and
|
|
19
|
+
* **Beginning of month alignment** (see
|
|
20
|
+
* [Subscription](../guides/concepts#subscription) for more details).
|
|
21
|
+
*
|
|
22
|
+
* In order to change the alignment behavior, Orb also supports billing
|
|
23
|
+
* subscriptions on the day of the month they are created. If
|
|
24
|
+
* `align_billing_with_subscription_start_date = true` is specified, subscriptions
|
|
25
|
+
* have billing cycles that are aligned with their `start_date`. For example, a
|
|
26
|
+
* subscription that begins on January 15th will have a billing cycle from January
|
|
27
|
+
* 15th to February 15th. Every subsequent billing cycle will continue to start and
|
|
28
|
+
* invoice on the 15th.
|
|
29
|
+
*
|
|
30
|
+
* If the "day" value is greater than the number of days in the month, the next
|
|
31
|
+
* billing cycle will start at the end of the month. For example, if the start_date
|
|
32
|
+
* is January 31st, the next billing cycle will start on February 28th.
|
|
33
|
+
*
|
|
34
|
+
* If a customer was created with a currency, Orb only allows subscribing the
|
|
35
|
+
* customer to a plan with a matching `invoicing_currency`. If the customer does
|
|
36
|
+
* not have a currency set, on subscription creation, we set the customer's
|
|
37
|
+
* currency to be the `invoicing_currency` of the plan.
|
|
38
|
+
*
|
|
39
|
+
* ## Price overrides
|
|
40
|
+
*
|
|
41
|
+
* Price overrides are used to update some or all prices in a plan for the specific
|
|
42
|
+
* subscription being created. This is useful when a new customer has negotiated
|
|
43
|
+
* one or more different prices for a specific plan than the plan's default prices.
|
|
44
|
+
* Any type of price can be overridden, if the correct data is provided. The
|
|
45
|
+
* billable metric, cadence, type, and name of a price can not be overridden.
|
|
46
|
+
*
|
|
47
|
+
* To override prices, provide a list of objects with the key `price_overrides`.
|
|
48
|
+
* The price object in the list of overrides is expected to contain the existing
|
|
49
|
+
* price id, the `model_type` and config value in the format below. The specific
|
|
50
|
+
* numerical values can be updated, but the config value and `model_type` must
|
|
51
|
+
* match the existing price that is being overridden
|
|
52
|
+
*
|
|
53
|
+
* ### Request format for price overrides
|
|
54
|
+
*
|
|
55
|
+
* Orb supports a few different pricing models out of the box. The `model_type`
|
|
56
|
+
* field determines the key for the configuration object that is present.
|
|
57
|
+
*
|
|
58
|
+
* ### Unit pricing
|
|
59
|
+
*
|
|
60
|
+
* With unit pricing, each unit costs a fixed amount.
|
|
61
|
+
*
|
|
62
|
+
* ```json
|
|
63
|
+
* {
|
|
64
|
+
* ...
|
|
65
|
+
* "id": "price_id",
|
|
66
|
+
* "model_type": "unit",
|
|
67
|
+
* "unit_config": {
|
|
68
|
+
* "unit_amount": "0.50"
|
|
69
|
+
* }
|
|
70
|
+
* ...
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* ### Tiered pricing
|
|
75
|
+
*
|
|
76
|
+
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
77
|
+
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
78
|
+
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
79
|
+
* cost $0.10 each. Tiered prices can be overridden with a new number of tiers or
|
|
80
|
+
* new values for `first_unit`, `last_unit`, or `unit_amount`.
|
|
81
|
+
*
|
|
82
|
+
* ```json
|
|
83
|
+
* {
|
|
84
|
+
* ...
|
|
85
|
+
* "id": "price_id",
|
|
86
|
+
* "model_type": "tiered",
|
|
87
|
+
* "tiered_config": {
|
|
88
|
+
* "tiers": [
|
|
89
|
+
* {
|
|
90
|
+
* "first_unit":"1",
|
|
91
|
+
* "last_unit": "10",
|
|
92
|
+
* "unit_amount": "0.50"
|
|
93
|
+
* },
|
|
94
|
+
* {
|
|
95
|
+
* "first_unit": "10",
|
|
96
|
+
* "last_unit": null,
|
|
97
|
+
* "unit_amount": "0.10"
|
|
98
|
+
* }
|
|
99
|
+
* ]
|
|
100
|
+
* }
|
|
101
|
+
* ...
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* ### Bulk pricing
|
|
106
|
+
*
|
|
107
|
+
* Bulk pricing applies when the number of units determine the cost of _all_ units.
|
|
108
|
+
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
109
|
+
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
110
|
+
* priced at $0.40 (i.e. 101 units total would be $40.40). Bulk prices can be
|
|
111
|
+
* overridden with a new number of tiers or new values for `maximum_units`, or
|
|
112
|
+
* `unit_amount`.
|
|
113
|
+
*
|
|
114
|
+
* ```json
|
|
115
|
+
* {
|
|
116
|
+
* ...
|
|
117
|
+
* "id": "price_id",
|
|
118
|
+
* "model_type": "bulk",
|
|
119
|
+
* "bulk_config": {
|
|
120
|
+
* "tiers": [
|
|
121
|
+
* {
|
|
122
|
+
* "maximum_units": "10",
|
|
123
|
+
* "unit_amount": "0.50"
|
|
124
|
+
* },
|
|
125
|
+
* {
|
|
126
|
+
* "maximum_units": "1000",
|
|
127
|
+
* "unit_amount": "0.40"
|
|
128
|
+
* }
|
|
129
|
+
* ]
|
|
130
|
+
* }
|
|
131
|
+
* ...
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* ### Package pricing
|
|
136
|
+
*
|
|
137
|
+
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
138
|
+
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
139
|
+
* and 6 units will be billed at 10.
|
|
140
|
+
*
|
|
141
|
+
* ```json
|
|
142
|
+
* {
|
|
143
|
+
* ...
|
|
144
|
+
* "id": "price_id",
|
|
145
|
+
* "model_type": "package",
|
|
146
|
+
* "package_config": {
|
|
147
|
+
* "package_amount": "0.80",
|
|
148
|
+
* "package_size": 10
|
|
149
|
+
* }
|
|
150
|
+
* ...
|
|
151
|
+
* }
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* ### BPS pricing
|
|
155
|
+
*
|
|
156
|
+
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
157
|
+
* percent (the number of basis points to charge), as well as a cap per event to
|
|
158
|
+
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
159
|
+
* payment you process, with a maximum charge of $25 per payment.
|
|
160
|
+
*
|
|
161
|
+
* ```json
|
|
162
|
+
* {
|
|
163
|
+
* ...
|
|
164
|
+
* "id": "price_id"
|
|
165
|
+
* "model_type": "bps",
|
|
166
|
+
* "bps_config": {
|
|
167
|
+
* "bps": 125,
|
|
168
|
+
* "per_event_cap": "11.00"
|
|
169
|
+
* }
|
|
170
|
+
* ...
|
|
171
|
+
* }
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
174
|
+
* ### Bulk BPS pricing
|
|
175
|
+
*
|
|
176
|
+
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
177
|
+
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
178
|
+
* a given event depends on the tier range that the billing period falls into. Each
|
|
179
|
+
* tier range is defined by an upper and lower bound. For example, after $1.5M of
|
|
180
|
+
* payment volume is reached, each individual payment may have a lower cap or a
|
|
181
|
+
* smaller take-rate.
|
|
182
|
+
*
|
|
183
|
+
* ```json
|
|
184
|
+
* {
|
|
185
|
+
* ...
|
|
186
|
+
* "id": "price_id"
|
|
187
|
+
* "model_type": "bulk_bps",
|
|
188
|
+
* "bulk_bps_config": {
|
|
189
|
+
* "tiers": [
|
|
190
|
+
* {
|
|
191
|
+
* "minimum_amount": "0.00",
|
|
192
|
+
* "maximum_amount": "1000000.00",
|
|
193
|
+
* "bps": 125,
|
|
194
|
+
* "per_event_cap": "19.00"
|
|
195
|
+
* },
|
|
196
|
+
* {
|
|
197
|
+
* "minimum_amount":"1000000.00",
|
|
198
|
+
* "maximum_amount": null,
|
|
199
|
+
* "bps": 115,
|
|
200
|
+
* "per_event_cap": "4.00"
|
|
201
|
+
* }
|
|
202
|
+
* ]
|
|
203
|
+
* }
|
|
204
|
+
* ...
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* ### Tiered BPS pricing
|
|
209
|
+
*
|
|
210
|
+
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
211
|
+
* event's applicable parameter is a function of its marginal addition to the
|
|
212
|
+
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
213
|
+
* depends on the tier range that it falls into, where each tier range is defined
|
|
214
|
+
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
215
|
+
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
216
|
+
* 0.5 BPS each.
|
|
217
|
+
*
|
|
218
|
+
* ```json
|
|
219
|
+
* {
|
|
220
|
+
* ...
|
|
221
|
+
* "id": "price_id"
|
|
222
|
+
* "model_type": "tiered_bps",
|
|
223
|
+
* "tiered_bps_config": {
|
|
224
|
+
* "tiers": [
|
|
225
|
+
* {
|
|
226
|
+
* "minimum_amount": "0.00",
|
|
227
|
+
* "maximum_amount": "1000000.00",
|
|
228
|
+
* "bps": 125,
|
|
229
|
+
* "per_event_cap": "19.00"
|
|
230
|
+
* },
|
|
231
|
+
* {
|
|
232
|
+
* "minimum_amount":"1000000",
|
|
233
|
+
* "maximum_amount": null,
|
|
234
|
+
* "bps": 115,
|
|
235
|
+
* "per_event_cap": "4.00"
|
|
236
|
+
* }
|
|
237
|
+
* ]
|
|
238
|
+
* }
|
|
239
|
+
* ...
|
|
240
|
+
* }
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
* ### Matrix pricing
|
|
244
|
+
*
|
|
245
|
+
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
246
|
+
* `dimensions` defines the two event property values evaluated in this pricing
|
|
247
|
+
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
248
|
+
* configuration has a list of `matrix_values` which give the unit prices for
|
|
249
|
+
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
250
|
+
* have `dimension_values` where the second value of the pair is null. If an event
|
|
251
|
+
* does not match any of the dimension values in the matrix, it will resort to the
|
|
252
|
+
* `default_unit_amount`.
|
|
253
|
+
*
|
|
254
|
+
* ```json
|
|
255
|
+
* ...
|
|
256
|
+
* "model_type": "matrix"
|
|
257
|
+
* "matrix_config": {
|
|
258
|
+
* "default_unit_amount": "3.00",
|
|
259
|
+
* "dimensions": [
|
|
260
|
+
* "cluster_name",
|
|
261
|
+
* "region"
|
|
262
|
+
* ],
|
|
263
|
+
* "matrix_values": [
|
|
264
|
+
* {
|
|
265
|
+
* "dimension_values": [
|
|
266
|
+
* "alpha",
|
|
267
|
+
* "west"
|
|
268
|
+
* ],
|
|
269
|
+
* "unit_amount": "2.00"
|
|
270
|
+
* },
|
|
271
|
+
* ...
|
|
272
|
+
* ]
|
|
273
|
+
* }
|
|
274
|
+
* ...
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* ### Fixed fees
|
|
278
|
+
*
|
|
279
|
+
* Fixed fees follow unit pricing, and also have an additional parameter
|
|
280
|
+
* `fixed_price_quantity` that indicates how many of a fixed fee that should be
|
|
281
|
+
* applied for a subscription. This parameter defaults to 1.
|
|
282
|
+
*
|
|
283
|
+
* ```json
|
|
284
|
+
* {
|
|
285
|
+
* ...
|
|
286
|
+
* "id": "price_id",
|
|
287
|
+
* "model_type": "unit",
|
|
288
|
+
* "unit_config": {
|
|
289
|
+
* "unit_amount": "2.00"
|
|
290
|
+
* },
|
|
291
|
+
* "fixed_price_quantity": 3.0
|
|
292
|
+
* ...
|
|
293
|
+
* }
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* ## Maximums and Minimums
|
|
297
|
+
*
|
|
298
|
+
* Minimums and maximums, much like price overrides, can be useful when a new
|
|
299
|
+
* customer has negotiated a new or different minimum or maximum spend cap than the
|
|
300
|
+
* default for a given price. If one exists for a price and null is provided for
|
|
301
|
+
* the minimum/maximum override on creation, then there will be no minimum/maximum
|
|
302
|
+
* on the new subscription. If no value is provided, then the default price maximum
|
|
303
|
+
* or minimum is used.
|
|
304
|
+
*
|
|
305
|
+
* To add a minimum for a specific price, add `minimum_amount` to the specific
|
|
306
|
+
* price in the `price_overrides` object.
|
|
307
|
+
*
|
|
308
|
+
* To add a maximum for a specific price, add `maximum_amount` to the specific
|
|
309
|
+
* price in the `price_overrides` object.
|
|
310
|
+
*
|
|
311
|
+
* ### Minimum override example
|
|
312
|
+
*
|
|
313
|
+
* Price minimum override example:
|
|
314
|
+
*
|
|
315
|
+
* ```json
|
|
316
|
+
* {
|
|
317
|
+
* ...
|
|
318
|
+
* "id": "price_id",
|
|
319
|
+
* "model_type": "unit",
|
|
320
|
+
* "unit_config": {
|
|
321
|
+
* "unit_amount": "0.50"
|
|
322
|
+
* },
|
|
323
|
+
* "minimum_amount": "100.00"
|
|
324
|
+
* ...
|
|
325
|
+
* }
|
|
326
|
+
* ```
|
|
327
|
+
*
|
|
328
|
+
* Removing an existing minimum example
|
|
329
|
+
*
|
|
330
|
+
* ```json
|
|
331
|
+
* {
|
|
332
|
+
* ...
|
|
333
|
+
* "id": "price_id",
|
|
334
|
+
* "model_type": "unit",
|
|
335
|
+
* "unit_config": {
|
|
336
|
+
* "unit_amount": "0.50"
|
|
337
|
+
* },
|
|
338
|
+
* "minimum_amount": null
|
|
339
|
+
* ...
|
|
340
|
+
* }
|
|
341
|
+
* ```
|
|
342
|
+
*
|
|
343
|
+
* ## Discounts
|
|
344
|
+
*
|
|
345
|
+
* Discounts, like price overrides, can be useful when a new customer has
|
|
346
|
+
* negotiated a new or different discount than the default for a price. A single
|
|
347
|
+
* price price can have at most one discount. If a discount exists for a price and
|
|
348
|
+
* a null discount is provided on creation, then there will be no discount on the
|
|
349
|
+
* new subscription.
|
|
350
|
+
*
|
|
351
|
+
* To add a discount for a specific price, add `discount` to the price in the
|
|
352
|
+
* `price_overrides` object. Discount should be a dictionary of the format:
|
|
353
|
+
*
|
|
354
|
+
* ```json
|
|
355
|
+
* {
|
|
356
|
+
* "discount_type": "amount" | "percentage" | "usage",
|
|
357
|
+
* "amount_discount": string,
|
|
358
|
+
* "percentage_discount": string,
|
|
359
|
+
* "usage_discount": string
|
|
360
|
+
* }
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
* where either `amount_discount`, `percentage_discount`, or `usage_discount` is
|
|
364
|
+
* provided.
|
|
365
|
+
*
|
|
366
|
+
* Price discount example
|
|
367
|
+
*
|
|
368
|
+
* ```json
|
|
369
|
+
* {
|
|
370
|
+
* ...
|
|
371
|
+
* "id": "price_id",
|
|
372
|
+
* "model_type": "unit",
|
|
373
|
+
* "unit_config": {
|
|
374
|
+
* "unit_amount": "0.50"
|
|
375
|
+
* },
|
|
376
|
+
* "discount": {"discount_type": "amount", "amount_discount": "175"},
|
|
377
|
+
* }
|
|
378
|
+
* ```
|
|
379
|
+
*
|
|
380
|
+
* Removing an existing discount example
|
|
381
|
+
*
|
|
382
|
+
* ```json
|
|
383
|
+
* {
|
|
384
|
+
* "customer_id": "customer_id",
|
|
385
|
+
* "plan_id": "plan_id",
|
|
386
|
+
* "discount": null,
|
|
387
|
+
* "price_overrides": [ ... ]
|
|
388
|
+
* ...
|
|
389
|
+
* }
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* ## Threshold Billing
|
|
393
|
+
*
|
|
394
|
+
* Orb supports invoicing for a subscription when a preconfigured usage threshold
|
|
395
|
+
* is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is
|
|
396
|
+
* specified in the subscription's invoicing currency, when creating a
|
|
397
|
+
* subscription. Ex. pass in `10.00` to issue an invoice when usage amounts hit
|
|
398
|
+
* $10.00 for a subscription that invoices in USD.
|
|
399
|
+
*/
|
|
400
|
+
create(body?: SubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
401
|
+
create(options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
402
|
+
/**
|
|
403
|
+
* This endpoint returns a list of all subscriptions for an account as a
|
|
404
|
+
* [paginated](../reference/pagination) list, ordered starting from the most
|
|
405
|
+
* recently created subscription. For a full discussion of the subscription
|
|
406
|
+
* resource, see [Subscription](../guides/concepts#subscription).
|
|
407
|
+
*
|
|
408
|
+
* Subscriptions can be filtered to a single customer by passing in the
|
|
409
|
+
* `customer_id` query parameter or the `external_customer_id` query parameter.
|
|
410
|
+
*/
|
|
411
|
+
list(query?: SubscriptionListParams, options?: Core.RequestOptions): Core.PagePromise<SubscriptionsPage, Subscription>;
|
|
412
|
+
list(options?: Core.RequestOptions): Core.PagePromise<SubscriptionsPage, Subscription>;
|
|
413
|
+
/**
|
|
414
|
+
* This endpoint can be used to cancel an existing subscription. It returns the
|
|
415
|
+
* serialized subscription object with an `end_date` parameter that signifies when
|
|
416
|
+
* the subscription will transition to an ended state.
|
|
417
|
+
*
|
|
418
|
+
* The body parameter `cancel_option` determines the cancellation behavior. Orb
|
|
419
|
+
* supports three cancellation options:
|
|
420
|
+
*
|
|
421
|
+
* - `end_of_subscription_term`: stops the subscription from auto-renewing.
|
|
422
|
+
* Subscriptions that have been cancelled with this option can still incur
|
|
423
|
+
* charges for the remainder of their term:
|
|
424
|
+
*
|
|
425
|
+
* - Issuing this cancellation request for a monthly subscription will keep the
|
|
426
|
+
* subscription active until the start of the subsequent month, and potentially
|
|
427
|
+
* issue an invoice for any usage charges incurred in the intervening period.
|
|
428
|
+
* - Issuing this cancellation request for a quarterly subscription will keep the
|
|
429
|
+
* subscription active until the end of the quarter and potentially issue an
|
|
430
|
+
* invoice for any usage charges incurred in the intervening period.
|
|
431
|
+
* - Issuing this cancellation request for a yearly subscription will keep the
|
|
432
|
+
* subscription active for the full year. For example, a yearly subscription
|
|
433
|
+
* starting on 2021-11-01 and cancelled on 2021-12-08 will remain active until
|
|
434
|
+
* 2022-11-01 and potentially issue charges in the intervening months for any
|
|
435
|
+
* recurring monthly usage charges in its plan.
|
|
436
|
+
* - **Note**: If a subscription's plan contains prices with difference cadences,
|
|
437
|
+
* the end of term date will be determined by the largest cadence value. For
|
|
438
|
+
* example, cancelling end of term for a subscription with a quarterly fixed
|
|
439
|
+
* fee with a monthly usage fee will result in the subscription ending at the
|
|
440
|
+
* end of the quarter.
|
|
441
|
+
*
|
|
442
|
+
* - `immediate`: ends the subscription immediately, setting the `end_date` to the
|
|
443
|
+
* current time:
|
|
444
|
+
*
|
|
445
|
+
* - Subscriptions that have been cancelled with this option will be invoiced
|
|
446
|
+
* immediately. This invoice will include any usage fees incurred in the
|
|
447
|
+
* billing period up to the cancellation, along with any prorated recurring
|
|
448
|
+
* fees for the billing period, if applicable.
|
|
449
|
+
* - **Note**: If the subscription has a recurring fee that was paid in-advance,
|
|
450
|
+
* the prorated amount for the remaining time period will be added to the
|
|
451
|
+
* [customer's balance](list-balance-transactions) upon immediate cancellation.
|
|
452
|
+
* However, if the customer is ineligible to use the customer balance, the
|
|
453
|
+
* subscription cannot be cancelled immediately.
|
|
454
|
+
*
|
|
455
|
+
* - `requested_date`: ends the subscription on a specified date, which requires a
|
|
456
|
+
* `cancellation_date` to be passed in. If no timezone is provided, the
|
|
457
|
+
* customer's timezone is used. For example, a subscription starting on January
|
|
458
|
+
* 1st with a monthly price can be set to be cancelled on the first of any month
|
|
459
|
+
* after January 1st (e.g. March 1st, April 1st, May 1st). A subscription with
|
|
460
|
+
* multiple prices with different cadences defines the "term" to be the highest
|
|
461
|
+
* cadence of the prices.
|
|
462
|
+
*
|
|
463
|
+
* Upcoming subscriptions are only eligible for immediate cancellation, which will
|
|
464
|
+
* set the `end_date` equal to the `start_date` upon cancellation.
|
|
465
|
+
*
|
|
466
|
+
* ## Backdated cancellations
|
|
467
|
+
*
|
|
468
|
+
* Orb allows you to cancel a subscription in the past as long as there are no paid
|
|
469
|
+
* invoices between the `requested_date` and the current time. If the cancellation
|
|
470
|
+
* is after the latest issued invoice, Orb will generate a balance refund for the
|
|
471
|
+
* current period. If the cancellation is before the most recently issued invoice,
|
|
472
|
+
* Orb will void the intervening invoice and generate a new one based on the new
|
|
473
|
+
* dates for the subscription. See the section on
|
|
474
|
+
* [cancellation behaviors](../guides/product-catalog/creating-subscriptions.md#cancellation-behaviors).
|
|
475
|
+
*/
|
|
476
|
+
cancel(subscriptionId: string, body: SubscriptionCancelParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
477
|
+
/**
|
|
478
|
+
* This endpoint is used to fetch a [Subscription](../guides/concepts#subscription)
|
|
479
|
+
* given an identifier.
|
|
480
|
+
*/
|
|
481
|
+
fetch(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
482
|
+
/**
|
|
483
|
+
* This endpoint is used to fetch a day-by-day snapshot of a subscription's costs
|
|
484
|
+
* in Orb, calculated by applying pricing information to the underlying usage (see
|
|
485
|
+
* the [subscription usage endpoint](fetch-subscription-usage) to fetch usage per
|
|
486
|
+
* metric, in usage units rather than a currency).
|
|
487
|
+
*
|
|
488
|
+
* The semantics of this endpoint exactly mirror those of
|
|
489
|
+
* [fetching a customer's costs](fetch-customer-costs). Use this endpoint to limit
|
|
490
|
+
* your analysis of costs to a specific subscription for the customer (e.g. to
|
|
491
|
+
* de-aggregate costs when a customer's subscription has started and stopped on the
|
|
492
|
+
* same day).
|
|
493
|
+
*/
|
|
494
|
+
fetchCosts(subscriptionId: string, query?: SubscriptionFetchCostsParams, options?: Core.RequestOptions): Core.APIPromise<SubscriptionFetchCostsResponse>;
|
|
495
|
+
fetchCosts(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<SubscriptionFetchCostsResponse>;
|
|
496
|
+
/**
|
|
497
|
+
* This endpoint returns a [paginated](../reference/pagination) list of all plans
|
|
498
|
+
* associated with a subscription along with their start and end dates. This list
|
|
499
|
+
* contains the subscription's initial plan along with past and future plan
|
|
500
|
+
* changes.
|
|
501
|
+
*/
|
|
502
|
+
fetchSchedule(subscriptionId: string, query?: SubscriptionFetchScheduleParams, options?: Core.RequestOptions): Core.PagePromise<SubscriptionFetchScheduleResponsesPage, SubscriptionFetchScheduleResponse>;
|
|
503
|
+
fetchSchedule(subscriptionId: string, options?: Core.RequestOptions): Core.PagePromise<SubscriptionFetchScheduleResponsesPage, SubscriptionFetchScheduleResponse>;
|
|
504
|
+
/**
|
|
505
|
+
* This endpoint is used to fetch a subscription's usage in Orb. Especially when
|
|
506
|
+
* combined with optional query parameters, this endpoint is a powerful way to
|
|
507
|
+
* build visualizations on top of Orb's event data and metrics.
|
|
508
|
+
*
|
|
509
|
+
* With no query parameters specified, this endpoint returns usage for the
|
|
510
|
+
* subscription's _current billing period_ across each billable metric that
|
|
511
|
+
* participates in the subscription. Usage quantities returned are the result of
|
|
512
|
+
* evaluating the metric definition for the entirety of the customer's billing
|
|
513
|
+
* period.
|
|
514
|
+
*
|
|
515
|
+
* ### Default response shape
|
|
516
|
+
*
|
|
517
|
+
* Orb returns a `data` array with an object corresponding to each billable metric.
|
|
518
|
+
* Nested within this object is a `usage` array which has a `quantity` value and a
|
|
519
|
+
* corresponding `timeframe_start` and `timeframe_end`. The `quantity` value
|
|
520
|
+
* represents the calculated usage value for the billable metric over the specified
|
|
521
|
+
* timeframe (inclusive of the `timeframe_start` timestamp and exclusive of the
|
|
522
|
+
* `timeframe_end` timestamp).
|
|
523
|
+
*
|
|
524
|
+
* Orb will include _every_ window in the response starting from the beginning of
|
|
525
|
+
* the billing period, even when there were no events (and therefore no usage) in
|
|
526
|
+
* the window. This increases the size of the response but prevents the caller from
|
|
527
|
+
* filling in gaps and handling cumbersome time-based logic.
|
|
528
|
+
*
|
|
529
|
+
* The query parameters in this endpoint serve to override this behavior and
|
|
530
|
+
* provide some key functionality, as listed below. Note that this functionality
|
|
531
|
+
* can also be used _in conjunction_ with each other, e.g. to display grouped usage
|
|
532
|
+
* on a custom timeframe.
|
|
533
|
+
*
|
|
534
|
+
* ## Custom timeframe
|
|
535
|
+
*
|
|
536
|
+
* In order to view usage for a custom timeframe rather than the current billing
|
|
537
|
+
* period, specify a `timeframe_start` and `timeframe_end`. This will calculate
|
|
538
|
+
* quantities for usage incurred between timeframe_start (inclusive) and
|
|
539
|
+
* timeframe_end (exclusive), i.e. `[timeframe_start, timeframe_end)`.
|
|
540
|
+
*
|
|
541
|
+
* Note:
|
|
542
|
+
*
|
|
543
|
+
* - These timestamps must be specified in ISO 8601 format and UTC timezone, e.g.
|
|
544
|
+
* `2022-02-01T05:00:00Z`.
|
|
545
|
+
* - Both parameters must be specified if either is specified.
|
|
546
|
+
*
|
|
547
|
+
* ## Grouping by custom attributes
|
|
548
|
+
*
|
|
549
|
+
* In order to view a single metric grouped by a specific _attribute_ that each
|
|
550
|
+
* event is tagged with (e.g. `cluster`), you must additionally specify a
|
|
551
|
+
* `billable_metric_id` and a `group_by` key. The `group_by` key denotes the event
|
|
552
|
+
* property on which to group.
|
|
553
|
+
*
|
|
554
|
+
* When returning grouped usage, only usage for `billable_metric_id` is returned,
|
|
555
|
+
* and a separate object in the `data` array is returned for each value of the
|
|
556
|
+
* `group_by` key present in your events. The `quantity` value is the result of
|
|
557
|
+
* evaluating the billable metric for events filtered to a single value of the
|
|
558
|
+
* `group_by` key.
|
|
559
|
+
*
|
|
560
|
+
* Orb expects that events that match the billable metric will contain values in
|
|
561
|
+
* the `properties` dictionary that correspond to the `group_by` key specified. By
|
|
562
|
+
* default, Orb will not return a `null` group (i.e. events that match the metric
|
|
563
|
+
* but do not have the key set). Currently, it is only possible to view usage
|
|
564
|
+
* grouped by a single attribute at a time.
|
|
565
|
+
*
|
|
566
|
+
* When viewing grouped usage, Orb uses pagination to limit the response size to
|
|
567
|
+
* 1000 groups by default. If there are more groups for a given subscription,
|
|
568
|
+
* pagination metadata in the response can be used to fetch all of the data.
|
|
569
|
+
*
|
|
570
|
+
* The following example shows usage for an "API Requests" billable metric grouped
|
|
571
|
+
* by `region`. Note the extra `metric_group` dictionary in the response, which
|
|
572
|
+
* provides metadata about the group:
|
|
573
|
+
*
|
|
574
|
+
* ```json
|
|
575
|
+
* {
|
|
576
|
+
* "data": [
|
|
577
|
+
* {
|
|
578
|
+
* "usage": [
|
|
579
|
+
* {
|
|
580
|
+
* "quantity": 0.19291,
|
|
581
|
+
* "timeframe_start": "2021-10-01T07:00:00Z",
|
|
582
|
+
* "timeframe_end": "2021-10-02T07:00:00Z",
|
|
583
|
+
* },
|
|
584
|
+
* ...
|
|
585
|
+
* ],
|
|
586
|
+
* "metric_group": {
|
|
587
|
+
* "property_key": "region",
|
|
588
|
+
* "property_value": "asia/pacific"
|
|
589
|
+
* },
|
|
590
|
+
* "billable_metric": {
|
|
591
|
+
* "id": "Fe9pbpMk86xpwdGB",
|
|
592
|
+
* "name": "API Requests"
|
|
593
|
+
* },
|
|
594
|
+
* "view_mode": "periodic"
|
|
595
|
+
* },
|
|
596
|
+
* ...
|
|
597
|
+
* ]
|
|
598
|
+
* }
|
|
599
|
+
* ```
|
|
600
|
+
*
|
|
601
|
+
* ## Windowed usage
|
|
602
|
+
*
|
|
603
|
+
* The `granularity` parameter can be used to _window_ the usage `quantity` value
|
|
604
|
+
* into periods. When not specified, usage is returned for the entirety of the time
|
|
605
|
+
* range.
|
|
606
|
+
*
|
|
607
|
+
* When `granularity = day` is specified with a timeframe longer than a day, Orb
|
|
608
|
+
* will return a `quantity` value for each full day between `timeframe_start` and
|
|
609
|
+
* `timeframe_end`. Note that the days are demarcated by the _customer's local
|
|
610
|
+
* midnight_.
|
|
611
|
+
*
|
|
612
|
+
* For example, with `timeframe_start = 2022-02-01T05:00:00Z`,
|
|
613
|
+
* `timeframe_end = 2022-02-04T01:00:00Z` and `granularity=day`, the following
|
|
614
|
+
* windows will be returned for a customer in the `America/Los_Angeles` timezone
|
|
615
|
+
* since local midnight is `08:00` UTC:
|
|
616
|
+
*
|
|
617
|
+
* - `[2022-02-01T05:00:00Z, 2022-02-01T08:00:00Z)`
|
|
618
|
+
* - `[2022-02-01T08:00:00, 2022-02-02T08:00:00Z)`
|
|
619
|
+
* - `[2022-02-02T08:00:00, 2022-02-03T08:00:00Z)`
|
|
620
|
+
* - `[2022-02-03T08:00:00, 2022-02-04T01:00:00Z)`
|
|
621
|
+
*
|
|
622
|
+
* ```json
|
|
623
|
+
* {
|
|
624
|
+
* "data": [
|
|
625
|
+
* {
|
|
626
|
+
* "billable_metric": {
|
|
627
|
+
* "id": "Q8w89wjTtBdejXKsm",
|
|
628
|
+
* "name": "API Requests"
|
|
629
|
+
* },
|
|
630
|
+
* "usage": [
|
|
631
|
+
* {
|
|
632
|
+
* "quantity": 0,
|
|
633
|
+
* "timeframe_end": "2022-02-01T08:00:00+00:00",
|
|
634
|
+
* "timeframe_start": "2022-02-01T05:00:00+00:00"
|
|
635
|
+
* },
|
|
636
|
+
* {
|
|
637
|
+
*
|
|
638
|
+
* "quantity": 0,
|
|
639
|
+
* "timeframe_end": "2022-02-02T08:00:00+00:00",
|
|
640
|
+
* "timeframe_start": "2022-02-01T08:00:00+00:00"
|
|
641
|
+
* },
|
|
642
|
+
* {
|
|
643
|
+
* "quantity": 0,
|
|
644
|
+
* "timeframe_end": "2022-02-03T08:00:00+00:00",
|
|
645
|
+
* "timeframe_start": "2022-02-02T08:00:00+00:00"
|
|
646
|
+
* },
|
|
647
|
+
* {
|
|
648
|
+
* "quantity": 0,
|
|
649
|
+
* "timeframe_end": "2022-02-04T01:00:00+00:00",
|
|
650
|
+
* "timeframe_start": "2022-02-03T08:00:00+00:00"
|
|
651
|
+
* }
|
|
652
|
+
* ],
|
|
653
|
+
* "view_mode": "periodic"
|
|
654
|
+
* },
|
|
655
|
+
* ...
|
|
656
|
+
* ]
|
|
657
|
+
* }
|
|
658
|
+
* ```
|
|
659
|
+
*
|
|
660
|
+
* ## Decomposable vs. non-decomposable metrics
|
|
661
|
+
*
|
|
662
|
+
* Billable metrics fall into one of two categories: decomposable and
|
|
663
|
+
* non-decomposable. A decomposable billable metric, such as a sum or a count, can
|
|
664
|
+
* be displayed and aggregated across arbitrary timescales. On the other hand, a
|
|
665
|
+
* non-decomposable metric is not meaningful when only a slice of the billing
|
|
666
|
+
* window is considered.
|
|
667
|
+
*
|
|
668
|
+
* As an example, if we have a billable metric that's defined to count unique
|
|
669
|
+
* users, displaying a graph of unique users for each day is not representative of
|
|
670
|
+
* the billable metric value over the month (days could have an overlapping set of
|
|
671
|
+
* 'unique' users). Instead, what's useful for any given day is the number of
|
|
672
|
+
* unique users in the billing period so far, which are the _cumulative_ unique
|
|
673
|
+
* users.
|
|
674
|
+
*
|
|
675
|
+
* Accordingly, this endpoint returns treats these two types of metrics differently
|
|
676
|
+
* when `group_by` is specified:
|
|
677
|
+
*
|
|
678
|
+
* - Decomposable metrics can be grouped by any event property.
|
|
679
|
+
* - Non-decomposable metrics can only be grouped by the corresponding price's
|
|
680
|
+
* invoice grouping key. If no invoice grouping key is present, the metric does
|
|
681
|
+
* not support `group_by`.
|
|
682
|
+
*
|
|
683
|
+
* ## Matrix prices
|
|
684
|
+
*
|
|
685
|
+
* When a billable metric is attached to a price that uses matrix pricing, it's
|
|
686
|
+
* important to view usage grouped by those matrix dimensions. In this case, use
|
|
687
|
+
* the query parameters `first_dimension_key`, `first_dimension_value` and
|
|
688
|
+
* `second_dimension_key`, `second_dimension_value` while filtering to a specific
|
|
689
|
+
* `billable_metric_id`.
|
|
690
|
+
*
|
|
691
|
+
* For example, if your compute metric has a separate unit price (i.e. a matrix
|
|
692
|
+
* pricing model) per `region` and `provider`, your request might provide the
|
|
693
|
+
* following parameters:
|
|
694
|
+
*
|
|
695
|
+
* - `first_dimension_key`: `region`
|
|
696
|
+
* - `first_dimension_value`: `us-east-1`
|
|
697
|
+
* - `second_dimension_key`: `provider`
|
|
698
|
+
* - `second_dimension_value`: `aws`
|
|
699
|
+
*/
|
|
700
|
+
fetchUsage(subscriptionId: string, query?: SubscriptionFetchUsageParams, options?: Core.RequestOptions): Core.APIPromise<SubscriptionUsage>;
|
|
701
|
+
fetchUsage(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<SubscriptionUsage>;
|
|
702
|
+
/**
|
|
703
|
+
* This endpoint is used to add and edit subscription
|
|
704
|
+
* [price intervals](../reference/price-interval). By making modifications to a
|
|
705
|
+
* subscription’s price intervals, you can
|
|
706
|
+
* [flexibly and atomically control the billing behavior of a subscription](../guides/product-catalog/modifying-subscriptions).
|
|
707
|
+
*
|
|
708
|
+
* ## Adding price intervals
|
|
709
|
+
*
|
|
710
|
+
* Prices can be added as price intervals to a subscription by specifying them in
|
|
711
|
+
* the `add` array. A `price_id` or `external_price_id` from an add-on price or
|
|
712
|
+
* previously removed plan price can be specified to reuse an existing price
|
|
713
|
+
* definition (however, please note that prices from other plans cannot be added to
|
|
714
|
+
* the subscription). Additionally, a new price can be specified using the `price`
|
|
715
|
+
* field — this price will be created automatically.
|
|
716
|
+
*
|
|
717
|
+
* A `start_date` must be specified for the price interval. This is the date when
|
|
718
|
+
* the price will start billing on the subscription, so this will notably result in
|
|
719
|
+
* an immediate charge at this time for any billed in advance fixed fees. The
|
|
720
|
+
* `end_date` will default to null, resulting in a price interval that will bill on
|
|
721
|
+
* a continually recurring basis. Both of these dates can be set in the past or the
|
|
722
|
+
* future and Orb will generate or modify invoices to ensure the subscription’s
|
|
723
|
+
* invoicing behavior is correct.
|
|
724
|
+
*
|
|
725
|
+
* Additionally, a discount, minimum, or maximum can be specified on the price
|
|
726
|
+
* interval. This will only apply to this price interval, not any other price
|
|
727
|
+
* intervals on the subscription.
|
|
728
|
+
*
|
|
729
|
+
* ## Editing price intervals
|
|
730
|
+
*
|
|
731
|
+
* Price intervals can be adjusted by specifying edits to make in the `edit` array.
|
|
732
|
+
* A `price_interval_id` to edit must be specified — this can be retrieved from the
|
|
733
|
+
* `price_intervals` field on the subscription.
|
|
734
|
+
*
|
|
735
|
+
* A new `start_date` or `end_date` can be specified to change the range of the
|
|
736
|
+
* price interval, which will modify past or future invoices to ensure correctness.
|
|
737
|
+
* If either of these dates are unspecified, they will default to the existing date
|
|
738
|
+
* on the price interval. To remove a price interval entirely from a subscription,
|
|
739
|
+
* set the `end_date` to be equivalent to the `start_date`.
|
|
740
|
+
*
|
|
741
|
+
* ## Fixed fee quantity transitions
|
|
742
|
+
*
|
|
743
|
+
* The fixed fee quantity transitions for a fixed fee price interval can also be
|
|
744
|
+
* specified when adding or editing by passing an array for
|
|
745
|
+
* `fixed_fee_quantity_transitions`. A fixed fee quantity transition must have a
|
|
746
|
+
* `quantity` and an `effective_date`, which is the date after which the new
|
|
747
|
+
* quantity will be used for billing. If a fixed fee quantity transition is
|
|
748
|
+
* scheduled at a billing period boundary, the full quantity will be billed on an
|
|
749
|
+
* invoice with the other prices on the subscription. If the fixed fee quantity
|
|
750
|
+
* transition is scheduled mid-billing period, the difference between the existing
|
|
751
|
+
* quantity and quantity specified in the transition will be prorated for the rest
|
|
752
|
+
* of the billing period and billed immediately, which will generate a new invoice.
|
|
753
|
+
*
|
|
754
|
+
* Notably, the list of fixed fee quantity transitions passed will overwrite the
|
|
755
|
+
* existing fixed fee quantity transitions on the price interval, so the entire
|
|
756
|
+
* list of transitions must be specified to add additional transitions. The
|
|
757
|
+
* existing list of transitions can be retrieved using the
|
|
758
|
+
* `fixed_fee_quantity_transitions` property on a subscription’s serialized price
|
|
759
|
+
* intervals.
|
|
760
|
+
*/
|
|
761
|
+
priceIntervals(subscriptionId: string, body?: SubscriptionPriceIntervalsParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
762
|
+
priceIntervals(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
763
|
+
/**
|
|
764
|
+
* This endpoint can be used to change the plan on an existing subscription. It
|
|
765
|
+
* returns the serialized updated subscription object.
|
|
766
|
+
*
|
|
767
|
+
* The body parameter `change_option` determines the timing of the plan change. Orb
|
|
768
|
+
* supports three options:
|
|
769
|
+
*
|
|
770
|
+
* - `end_of_subscription_term`: changes the plan at the end of the existing plan's
|
|
771
|
+
* term.
|
|
772
|
+
* - Issuing this plan change request for a monthly subscription will keep the
|
|
773
|
+
* existing plan active until the start of the subsequent month, and
|
|
774
|
+
* potentially issue an invoice for any usage charges incurred in the
|
|
775
|
+
* intervening period.
|
|
776
|
+
* - Issuing this plan change request for a yearly subscription will keep the
|
|
777
|
+
* existing plan active for the full year.
|
|
778
|
+
* - `immediate`: changes the plan immediately. Subscriptions that have their plan
|
|
779
|
+
* changed with this option will be invoiced immediately. This invoice will
|
|
780
|
+
* include any usage fees incurred in the billing period up to the change, along
|
|
781
|
+
* with any prorated recurring fees for the billing period, if applicable.
|
|
782
|
+
* - `requested_date`: changes the plan on the requested date (`change_date`). If
|
|
783
|
+
* no timezone is provided, the customer's timezone is used. The `change_date`
|
|
784
|
+
* body parameter is required if this option is chosen.
|
|
785
|
+
*
|
|
786
|
+
* Note that one of `plan_id` or `external_plan_id` is required in the request body
|
|
787
|
+
* for this operation.
|
|
788
|
+
*
|
|
789
|
+
* ## Price overrides, maximums, and minimums
|
|
790
|
+
*
|
|
791
|
+
* Price overrides are used to update some or all prices in the target plan.
|
|
792
|
+
* Minimums and maximums, much like price overrides, can be useful when a new
|
|
793
|
+
* customer has negotiated a new or different minimum or maximum spend cap than the
|
|
794
|
+
* default for the plan. The request format for price overrides, maximums, and
|
|
795
|
+
* minimums are the same as those in [subscription creation](create-subscription).
|
|
796
|
+
*
|
|
797
|
+
* ## Prorations for in-advance fees
|
|
798
|
+
*
|
|
799
|
+
* By default, Orb calculates the prorated difference in any fixed fees when making
|
|
800
|
+
* a plan change, adjusting the customer balance as needed. For details on this
|
|
801
|
+
* behavior, see
|
|
802
|
+
* [Modifying subscriptions](../guides/product-catalog/modifying-subscriptions.md#prorations-for-in-advance-fees).
|
|
803
|
+
*/
|
|
804
|
+
schedulePlanChange(subscriptionId: string, body: SubscriptionSchedulePlanChangeParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
805
|
+
/**
|
|
806
|
+
* Manually trigger a phase, effective the given date (or the current time, if not
|
|
807
|
+
* specified).
|
|
808
|
+
*/
|
|
809
|
+
triggerPhase(subscriptionId: string, body?: SubscriptionTriggerPhaseParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
810
|
+
triggerPhase(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
811
|
+
/**
|
|
812
|
+
* This endpoint can be used to unschedule any pending cancellations for a
|
|
813
|
+
* subscription.
|
|
814
|
+
*
|
|
815
|
+
* To be eligible, the subscription must currently be active and have a future
|
|
816
|
+
* cancellation. This operation will turn on auto-renew, ensuring that the
|
|
817
|
+
* subscription does not end at the currently scheduled cancellation time.
|
|
818
|
+
*/
|
|
819
|
+
unscheduleCancellation(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
820
|
+
/**
|
|
821
|
+
* This endpoint can be used to clear scheduled updates to the quantity for a fixed
|
|
822
|
+
* fee.
|
|
823
|
+
*
|
|
824
|
+
* If there are no updates scheduled, this endpoint is a no-op.
|
|
825
|
+
*/
|
|
826
|
+
unscheduleFixedFeeQuantityUpdates(subscriptionId: string, body: SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
827
|
+
/**
|
|
828
|
+
* This endpoint can be used to unschedule any pending plan changes on an existing
|
|
829
|
+
* subscription.
|
|
830
|
+
*/
|
|
831
|
+
unschedulePendingPlanChanges(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
832
|
+
/**
|
|
833
|
+
* This endpoint can be used to update the quantity for a fixed fee.
|
|
834
|
+
*
|
|
835
|
+
* To be eligible, the subscription must currently be active and the price
|
|
836
|
+
* specified must be a fixed fee (not usage-based). This operation will immediately
|
|
837
|
+
* update the quantity for the fee, or if a `effective_date` is passed in, will
|
|
838
|
+
* update the quantity on the requested date at midnight in the customer's
|
|
839
|
+
* timezone.
|
|
840
|
+
*
|
|
841
|
+
* In order to change the fixed fee quantity as of the next draft invoice for this
|
|
842
|
+
* subscription, pass `change_option=upcoming_invoice` without an `effective_date`
|
|
843
|
+
* specified.
|
|
844
|
+
*
|
|
845
|
+
* If the fee is an in-advance fixed fee, it will also issue an immediate invoice
|
|
846
|
+
* for the difference for the remainder of the billing period.
|
|
847
|
+
*/
|
|
848
|
+
updateFixedFeeQuantity(subscriptionId: string, body: SubscriptionUpdateFixedFeeQuantityParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
|
|
849
|
+
}
|
|
850
|
+
export declare class SubscriptionsPage extends Page<Subscription> {
|
|
851
|
+
}
|
|
852
|
+
export declare class SubscriptionFetchScheduleResponsesPage extends Page<SubscriptionFetchScheduleResponse> {
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* A [subscription](../guides/core-concepts.mdx#subscription) represents the
|
|
856
|
+
* purchase of a plan by a customer.
|
|
857
|
+
*
|
|
858
|
+
* By default, subscriptions begin on the day that they're created and renew
|
|
859
|
+
* automatically for each billing cycle at the cadence that's configured in the
|
|
860
|
+
* plan definition.
|
|
861
|
+
*
|
|
862
|
+
* Subscriptions also default to **beginning of month alignment**, which means the
|
|
863
|
+
* first invoice issued for the subscription will have pro-rated charges between
|
|
864
|
+
* the `start_date` and the first of the following month. Subsequent billing
|
|
865
|
+
* periods will always start and end on a month boundary (e.g. subsequent month
|
|
866
|
+
* starts for monthly billing).
|
|
867
|
+
*
|
|
868
|
+
* Depending on the plan configuration, any _flat_ recurring fees will be billed
|
|
869
|
+
* either at the beginning (in-advance) or end (in-arrears) of each billing cycle.
|
|
870
|
+
* Plans default to **in-advance billing**. Usage-based fees are billed in arrears
|
|
871
|
+
* as usage is accumulated. In the normal course of events, you can expect an
|
|
872
|
+
* invoice to contain usage-based charges for the previous period, and a recurring
|
|
873
|
+
* fee for the following period.
|
|
874
|
+
*/
|
|
875
|
+
export interface Subscription {
|
|
876
|
+
id: string;
|
|
877
|
+
/**
|
|
878
|
+
* The current plan phase that is active, only if the subscription's plan has
|
|
879
|
+
* phases.
|
|
880
|
+
*/
|
|
881
|
+
active_plan_phase_order: number | null;
|
|
882
|
+
/**
|
|
883
|
+
* Determines whether issued invoices for this subscription will automatically be
|
|
884
|
+
* charged with the saved payment method on the due date. This property defaults to
|
|
885
|
+
* the plan's behavior.
|
|
886
|
+
*/
|
|
887
|
+
auto_collection: boolean | null;
|
|
888
|
+
/**
|
|
889
|
+
* The day of the month on which the billing cycle is anchored. If the maximum
|
|
890
|
+
* number of days in a month is greater than this value, the last day of the month
|
|
891
|
+
* is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
|
892
|
+
* period begins on the 30th.
|
|
893
|
+
*/
|
|
894
|
+
billing_cycle_day: number;
|
|
895
|
+
created_at: string;
|
|
896
|
+
/**
|
|
897
|
+
* The end of the current billing period. This is an exclusive timestamp, such that
|
|
898
|
+
* the instant returned is not part of the billing period. Set to null for
|
|
899
|
+
* subscriptions that are not currently active.
|
|
900
|
+
*/
|
|
901
|
+
current_billing_period_end_date: string | null;
|
|
902
|
+
/**
|
|
903
|
+
* The start date of the current billing period. This is an inclusive timestamp;
|
|
904
|
+
* the instant returned is exactly the beginning of the billing period. Set to null
|
|
905
|
+
* if the subscription is not currently active.
|
|
906
|
+
*/
|
|
907
|
+
current_billing_period_start_date: string | null;
|
|
908
|
+
/**
|
|
909
|
+
* A customer is a buyer of your products, and the other party to the billing
|
|
910
|
+
* relationship.
|
|
911
|
+
*
|
|
912
|
+
* In Orb, customers are assigned system generated identifiers automatically, but
|
|
913
|
+
* it's often desirable to have these match existing identifiers in your system. To
|
|
914
|
+
* avoid having to denormalize Orb ID information, you can pass in an
|
|
915
|
+
* `external_customer_id` with your own identifier. See
|
|
916
|
+
* [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further
|
|
917
|
+
* information about how these aliases work in Orb.
|
|
918
|
+
*
|
|
919
|
+
* In addition to having an identifier in your system, a customer may exist in a
|
|
920
|
+
* payment provider solution like Stripe. Use the `payment_provider_id` and the
|
|
921
|
+
* `payment_provider` enum field to express this mapping.
|
|
922
|
+
*
|
|
923
|
+
* A customer also has a timezone (from the standard
|
|
924
|
+
* [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
|
925
|
+
* your account's timezone. See
|
|
926
|
+
* [Timezone localization](../guides/product-catalog/timezones.md) for information
|
|
927
|
+
* on what this timezone parameter influences within Orb.
|
|
928
|
+
*/
|
|
929
|
+
customer: CustomersAPI.Customer;
|
|
930
|
+
/**
|
|
931
|
+
* Determines the default memo on this subscriptions' invoices. Note that if this
|
|
932
|
+
* is not provided, it is determined by the plan configuration.
|
|
933
|
+
*/
|
|
934
|
+
default_invoice_memo: string | null;
|
|
935
|
+
/**
|
|
936
|
+
* The discount intervals for this subscription.
|
|
937
|
+
*/
|
|
938
|
+
discount_intervals: Array<Subscription.AmountDiscountInterval | Subscription.PercentageDiscountInterval | Subscription.UsageDiscountInterval>;
|
|
939
|
+
/**
|
|
940
|
+
* The date Orb stops billing for this subscription.
|
|
941
|
+
*/
|
|
942
|
+
end_date: string | null;
|
|
943
|
+
fixed_fee_quantity_schedule: Array<Subscription.FixedFeeQuantitySchedule>;
|
|
944
|
+
invoicing_threshold: string | null;
|
|
945
|
+
/**
|
|
946
|
+
* The maximum intervals for this subscription.
|
|
947
|
+
*/
|
|
948
|
+
maximum_intervals: Array<Subscription.MaximumInterval>;
|
|
949
|
+
/**
|
|
950
|
+
* User specified key-value pairs. If no metadata was specified at subscription
|
|
951
|
+
* creation time, this defaults to an empty dictionary.
|
|
952
|
+
*/
|
|
953
|
+
metadata: unknown;
|
|
954
|
+
/**
|
|
955
|
+
* The minimum intervals for this subscription.
|
|
956
|
+
*/
|
|
957
|
+
minimum_intervals: Array<Subscription.MinimumInterval>;
|
|
958
|
+
/**
|
|
959
|
+
* Determines the difference between the invoice issue date for subscription
|
|
960
|
+
* invoices as the date that they are due. A value of `0` here represents that the
|
|
961
|
+
* invoice is due on issue, whereas a value of `30` represents that the customer
|
|
962
|
+
* has a month to pay the invoice.
|
|
963
|
+
*/
|
|
964
|
+
net_terms: number;
|
|
965
|
+
/**
|
|
966
|
+
* The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a
|
|
967
|
+
* plan that can be subscribed to by a customer. Plans define the billing behavior
|
|
968
|
+
* of the subscription. You can see more about how to configure prices in the
|
|
969
|
+
* [Price resource](/reference/price).
|
|
970
|
+
*/
|
|
971
|
+
plan: PlansAPI.Plan;
|
|
972
|
+
/**
|
|
973
|
+
* The price intervals for this subscription.
|
|
974
|
+
*/
|
|
975
|
+
price_intervals: Array<Subscription.PriceInterval>;
|
|
976
|
+
redeemed_coupon: Subscription.RedeemedCoupon | null;
|
|
977
|
+
/**
|
|
978
|
+
* The date Orb starts billing for this subscription.
|
|
979
|
+
*/
|
|
980
|
+
start_date: string;
|
|
981
|
+
status: 'active' | 'ended' | 'upcoming';
|
|
982
|
+
trial_info: Subscription.TrialInfo;
|
|
983
|
+
}
|
|
984
|
+
export declare namespace Subscription {
|
|
985
|
+
interface AmountDiscountInterval {
|
|
986
|
+
/**
|
|
987
|
+
* Only available if discount_type is `amount`.
|
|
988
|
+
*/
|
|
989
|
+
amount_discount: string;
|
|
990
|
+
/**
|
|
991
|
+
* The price ids that this discount interval applies to.
|
|
992
|
+
*/
|
|
993
|
+
applies_to_price_ids: Array<string>;
|
|
994
|
+
/**
|
|
995
|
+
* The price interval ids that this discount interval applies to.
|
|
996
|
+
*/
|
|
997
|
+
applies_to_price_interval_ids: Array<string>;
|
|
998
|
+
discount_type: 'amount';
|
|
999
|
+
/**
|
|
1000
|
+
* The end date of the discount interval.
|
|
1001
|
+
*/
|
|
1002
|
+
end_date: string | null;
|
|
1003
|
+
/**
|
|
1004
|
+
* The start date of the discount interval.
|
|
1005
|
+
*/
|
|
1006
|
+
start_date: string;
|
|
1007
|
+
}
|
|
1008
|
+
interface PercentageDiscountInterval {
|
|
1009
|
+
/**
|
|
1010
|
+
* The price ids that this discount interval applies to.
|
|
1011
|
+
*/
|
|
1012
|
+
applies_to_price_ids: Array<string>;
|
|
1013
|
+
/**
|
|
1014
|
+
* The price interval ids that this discount interval applies to.
|
|
1015
|
+
*/
|
|
1016
|
+
applies_to_price_interval_ids: Array<string>;
|
|
1017
|
+
discount_type: 'percentage';
|
|
1018
|
+
/**
|
|
1019
|
+
* The end date of the discount interval.
|
|
1020
|
+
*/
|
|
1021
|
+
end_date: string | null;
|
|
1022
|
+
/**
|
|
1023
|
+
* Only available if discount_type is `percentage`.This is a number between 0
|
|
1024
|
+
* and 1.
|
|
1025
|
+
*/
|
|
1026
|
+
percentage_discount: number;
|
|
1027
|
+
/**
|
|
1028
|
+
* The start date of the discount interval.
|
|
1029
|
+
*/
|
|
1030
|
+
start_date: string;
|
|
1031
|
+
}
|
|
1032
|
+
interface UsageDiscountInterval {
|
|
1033
|
+
/**
|
|
1034
|
+
* The price ids that this discount interval applies to.
|
|
1035
|
+
*/
|
|
1036
|
+
applies_to_price_ids: Array<string>;
|
|
1037
|
+
/**
|
|
1038
|
+
* The price interval ids that this discount interval applies to.
|
|
1039
|
+
*/
|
|
1040
|
+
applies_to_price_interval_ids: Array<string>;
|
|
1041
|
+
discount_type: 'usage';
|
|
1042
|
+
/**
|
|
1043
|
+
* The end date of the discount interval.
|
|
1044
|
+
*/
|
|
1045
|
+
end_date: string | null;
|
|
1046
|
+
/**
|
|
1047
|
+
* The start date of the discount interval.
|
|
1048
|
+
*/
|
|
1049
|
+
start_date: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
1052
|
+
* discount is for
|
|
1053
|
+
*/
|
|
1054
|
+
usage_discount: number;
|
|
1055
|
+
}
|
|
1056
|
+
interface FixedFeeQuantitySchedule {
|
|
1057
|
+
end_date: string | null;
|
|
1058
|
+
price_id: string;
|
|
1059
|
+
quantity: number;
|
|
1060
|
+
start_date: string;
|
|
1061
|
+
}
|
|
1062
|
+
interface MaximumInterval {
|
|
1063
|
+
/**
|
|
1064
|
+
* The price ids that this maximum interval applies to.
|
|
1065
|
+
*/
|
|
1066
|
+
applies_to_price_ids: Array<string>;
|
|
1067
|
+
/**
|
|
1068
|
+
* The price interval ids that this maximum interval applies to.
|
|
1069
|
+
*/
|
|
1070
|
+
applies_to_price_interval_ids: Array<string>;
|
|
1071
|
+
/**
|
|
1072
|
+
* The end date of the maximum interval.
|
|
1073
|
+
*/
|
|
1074
|
+
end_date: string | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* The maximum amount to charge in a given billing period for the price intervals
|
|
1077
|
+
* this transform applies to.
|
|
1078
|
+
*/
|
|
1079
|
+
maximum_amount: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* The start date of the maximum interval.
|
|
1082
|
+
*/
|
|
1083
|
+
start_date: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface MinimumInterval {
|
|
1086
|
+
/**
|
|
1087
|
+
* The price ids that this minimum interval applies to.
|
|
1088
|
+
*/
|
|
1089
|
+
applies_to_price_ids: Array<string>;
|
|
1090
|
+
/**
|
|
1091
|
+
* The price interval ids that this minimum interval applies to.
|
|
1092
|
+
*/
|
|
1093
|
+
applies_to_price_interval_ids: Array<string>;
|
|
1094
|
+
/**
|
|
1095
|
+
* The end date of the minimum interval.
|
|
1096
|
+
*/
|
|
1097
|
+
end_date: string | null;
|
|
1098
|
+
/**
|
|
1099
|
+
* The minimum amount to charge in a given billing period for the price intervals
|
|
1100
|
+
* this minimum applies to.
|
|
1101
|
+
*/
|
|
1102
|
+
minimum_amount: string;
|
|
1103
|
+
/**
|
|
1104
|
+
* The start date of the minimum interval.
|
|
1105
|
+
*/
|
|
1106
|
+
start_date: string;
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* The Price Interval resource represents a period of time for which a price will
|
|
1110
|
+
* bill on a subscription. A subscription’s price intervals define its billing
|
|
1111
|
+
* behavior.
|
|
1112
|
+
*/
|
|
1113
|
+
interface PriceInterval {
|
|
1114
|
+
id: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* The day of the month that Orb bills for this price
|
|
1117
|
+
*/
|
|
1118
|
+
billing_cycle_day: number;
|
|
1119
|
+
/**
|
|
1120
|
+
* The end of the current billing period. This is an exclusive timestamp, such that
|
|
1121
|
+
* the instant returned is exactly the end of the billing period. Set to null if
|
|
1122
|
+
* this price interval is not currently active.
|
|
1123
|
+
*/
|
|
1124
|
+
current_billing_period_end_date: string | null;
|
|
1125
|
+
/**
|
|
1126
|
+
* The start date of the current billing period. This is an inclusive timestamp;
|
|
1127
|
+
* the instant returned is exactly the beginning of the billing period. Set to null
|
|
1128
|
+
* if this price interval is not currently active.
|
|
1129
|
+
*/
|
|
1130
|
+
current_billing_period_start_date: string | null;
|
|
1131
|
+
/**
|
|
1132
|
+
* The end date of the price interval. This is the date that Orb stops billing for
|
|
1133
|
+
* this price.
|
|
1134
|
+
*/
|
|
1135
|
+
end_date: string | null;
|
|
1136
|
+
/**
|
|
1137
|
+
* The fixed fee quantity transitions for this price interval. This is only
|
|
1138
|
+
* relevant for fixed fees.
|
|
1139
|
+
*/
|
|
1140
|
+
fixed_fee_quantity_transitions: Array<PriceInterval.FixedFeeQuantityTransition> | null;
|
|
1141
|
+
/**
|
|
1142
|
+
* The Price resource represents a price that can be billed on a subscription,
|
|
1143
|
+
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
1144
|
+
* take a quantity and determine an amount to bill.
|
|
1145
|
+
*
|
|
1146
|
+
* Orb supports a few different pricing models out of the box. Each of these models
|
|
1147
|
+
* is serialized differently in a given Price object. The model_type field
|
|
1148
|
+
* determines the key for the configuration object that is present.
|
|
1149
|
+
*
|
|
1150
|
+
* ## Unit pricing
|
|
1151
|
+
*
|
|
1152
|
+
* With unit pricing, each unit costs a fixed amount.
|
|
1153
|
+
*
|
|
1154
|
+
* ```json
|
|
1155
|
+
* {
|
|
1156
|
+
* ...
|
|
1157
|
+
* "model_type": "unit",
|
|
1158
|
+
* "unit_config": {
|
|
1159
|
+
* "unit_amount": "0.50"
|
|
1160
|
+
* }
|
|
1161
|
+
* ...
|
|
1162
|
+
* }
|
|
1163
|
+
* ```
|
|
1164
|
+
*
|
|
1165
|
+
* ## Tiered pricing
|
|
1166
|
+
*
|
|
1167
|
+
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
1168
|
+
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
1169
|
+
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
1170
|
+
* cost $0.10 each.
|
|
1171
|
+
*
|
|
1172
|
+
* ```json
|
|
1173
|
+
* {
|
|
1174
|
+
* ...
|
|
1175
|
+
* "model_type": "tiered",
|
|
1176
|
+
* "tiered_config": {
|
|
1177
|
+
* "tiers": [
|
|
1178
|
+
* {
|
|
1179
|
+
* "first_unit": 1,
|
|
1180
|
+
* "last_unit": 10,
|
|
1181
|
+
* "unit_amount": "0.50"
|
|
1182
|
+
* },
|
|
1183
|
+
* {
|
|
1184
|
+
* "first_unit": 11,
|
|
1185
|
+
* "last_unit": null,
|
|
1186
|
+
* "unit_amount": "0.10"
|
|
1187
|
+
* }
|
|
1188
|
+
* ]
|
|
1189
|
+
* }
|
|
1190
|
+
* ...
|
|
1191
|
+
* ```
|
|
1192
|
+
*
|
|
1193
|
+
* ## Bulk pricing
|
|
1194
|
+
*
|
|
1195
|
+
* Bulk pricing applies when the number of units determine the cost of all units.
|
|
1196
|
+
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
1197
|
+
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
1198
|
+
* priced at $0.40 (i.e. 101 units total would be $40.40).
|
|
1199
|
+
*
|
|
1200
|
+
* ```json
|
|
1201
|
+
* {
|
|
1202
|
+
* ...
|
|
1203
|
+
* "model_type": "bulk",
|
|
1204
|
+
* "bulk_config": {
|
|
1205
|
+
* "tiers": [
|
|
1206
|
+
* {
|
|
1207
|
+
* "maximum_units": 10,
|
|
1208
|
+
* "unit_amount": "0.50"
|
|
1209
|
+
* },
|
|
1210
|
+
* {
|
|
1211
|
+
* "maximum_units": 1000,
|
|
1212
|
+
* "unit_amount": "0.40"
|
|
1213
|
+
* }
|
|
1214
|
+
* ]
|
|
1215
|
+
* }
|
|
1216
|
+
* ...
|
|
1217
|
+
* }
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* ## Package pricing
|
|
1221
|
+
*
|
|
1222
|
+
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
1223
|
+
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
1224
|
+
* and 6 units will be billed at 10.
|
|
1225
|
+
*
|
|
1226
|
+
* ```json
|
|
1227
|
+
* {
|
|
1228
|
+
* ...
|
|
1229
|
+
* "model_type": "package",
|
|
1230
|
+
* "package_config": {
|
|
1231
|
+
* "package_amount": "0.80",
|
|
1232
|
+
* "package_size": 10
|
|
1233
|
+
* }
|
|
1234
|
+
* ...
|
|
1235
|
+
* }
|
|
1236
|
+
* ```
|
|
1237
|
+
*
|
|
1238
|
+
* ## BPS pricing
|
|
1239
|
+
*
|
|
1240
|
+
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
1241
|
+
* percent (the number of basis points to charge), as well as a cap per event to
|
|
1242
|
+
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
1243
|
+
* payment you process, with a maximum charge of $25 per payment.
|
|
1244
|
+
*
|
|
1245
|
+
* ```json
|
|
1246
|
+
* {
|
|
1247
|
+
* ...
|
|
1248
|
+
* "model_type": "bps",
|
|
1249
|
+
* "bps_config": {
|
|
1250
|
+
* "bps": 125,
|
|
1251
|
+
* "per_unit_maximum": "11.00"
|
|
1252
|
+
* }
|
|
1253
|
+
* ...
|
|
1254
|
+
* }
|
|
1255
|
+
* ```
|
|
1256
|
+
*
|
|
1257
|
+
* ## Bulk BPS pricing
|
|
1258
|
+
*
|
|
1259
|
+
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
1260
|
+
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
1261
|
+
* a given event depends on the tier range that the billing period falls into. Each
|
|
1262
|
+
* tier range is defined by an upper bound. For example, after $1.5M of payment
|
|
1263
|
+
* volume is reached, each individual payment may have a lower cap or a smaller
|
|
1264
|
+
* take-rate.
|
|
1265
|
+
*
|
|
1266
|
+
* ```json
|
|
1267
|
+
* ...
|
|
1268
|
+
* "model_type": "bulk_bps",
|
|
1269
|
+
* "bulk_bps_config": {
|
|
1270
|
+
* "tiers": [
|
|
1271
|
+
* {
|
|
1272
|
+
* "maximum_amount": "1000000.00",
|
|
1273
|
+
* "bps": 125,
|
|
1274
|
+
* "per_unit_maximum": "19.00"
|
|
1275
|
+
* },
|
|
1276
|
+
* {
|
|
1277
|
+
* "maximum_amount": null,
|
|
1278
|
+
* "bps": 115,
|
|
1279
|
+
* "per_unit_maximum": "4.00"
|
|
1280
|
+
* }
|
|
1281
|
+
* ]
|
|
1282
|
+
* }
|
|
1283
|
+
* ...
|
|
1284
|
+
* }
|
|
1285
|
+
* ```
|
|
1286
|
+
*
|
|
1287
|
+
* ## Tiered BPS pricing
|
|
1288
|
+
*
|
|
1289
|
+
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
1290
|
+
* event's applicable parameter is a function of its marginal addition to the
|
|
1291
|
+
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
1292
|
+
* depends on the tier range that it falls into, where each tier range is defined
|
|
1293
|
+
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
1294
|
+
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
1295
|
+
* 0.5 BPS each.
|
|
1296
|
+
*
|
|
1297
|
+
* ```json
|
|
1298
|
+
* ...
|
|
1299
|
+
* "model_type": "tiered_bps",
|
|
1300
|
+
* "tiered_bps_config": {
|
|
1301
|
+
* "tiers": [
|
|
1302
|
+
* {
|
|
1303
|
+
* "minimum_amount": "0",
|
|
1304
|
+
* "maximum_amount": "1000000.00",
|
|
1305
|
+
* "bps": 125,
|
|
1306
|
+
* "per_unit_maximum": "19.00"
|
|
1307
|
+
* },
|
|
1308
|
+
* {
|
|
1309
|
+
* "minimum_amount": "1000000.00",
|
|
1310
|
+
* "maximum_amount": null,
|
|
1311
|
+
* "bps": 115,
|
|
1312
|
+
* "per_unit_maximum": "4.00"
|
|
1313
|
+
* }
|
|
1314
|
+
* ]
|
|
1315
|
+
* }
|
|
1316
|
+
* ...
|
|
1317
|
+
* }
|
|
1318
|
+
* ```
|
|
1319
|
+
*
|
|
1320
|
+
* ## Matrix pricing
|
|
1321
|
+
*
|
|
1322
|
+
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
1323
|
+
* `dimensions` defines the two event property values evaluated in this pricing
|
|
1324
|
+
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
1325
|
+
* configuration has a list of `matrix_values` which give the unit prices for
|
|
1326
|
+
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
1327
|
+
* have `dimension_values` where the second value of the pair is null. If an event
|
|
1328
|
+
* does not match any of the dimension values in the matrix, it will resort to the
|
|
1329
|
+
* `default_unit_amount`.
|
|
1330
|
+
*
|
|
1331
|
+
* ```json
|
|
1332
|
+
* {
|
|
1333
|
+
* "model_type": "matrix"
|
|
1334
|
+
* "matrix_config": {
|
|
1335
|
+
* "default_unit_amount": "3.00",
|
|
1336
|
+
* "dimensions": [
|
|
1337
|
+
* "cluster_name",
|
|
1338
|
+
* "region"
|
|
1339
|
+
* ],
|
|
1340
|
+
* "matrix_values": [
|
|
1341
|
+
* {
|
|
1342
|
+
* "dimension_values": [
|
|
1343
|
+
* "alpha",
|
|
1344
|
+
* "west"
|
|
1345
|
+
* ],
|
|
1346
|
+
* "unit_amount": "2.00"
|
|
1347
|
+
* },
|
|
1348
|
+
* ...
|
|
1349
|
+
* ]
|
|
1350
|
+
* }
|
|
1351
|
+
* }
|
|
1352
|
+
* ```
|
|
1353
|
+
*
|
|
1354
|
+
* ### Fixed fees
|
|
1355
|
+
*
|
|
1356
|
+
* Fixed fees are prices that are applied independent of usage quantities, and
|
|
1357
|
+
* follow unit pricing. They also have an additional parameter
|
|
1358
|
+
* `fixed_price_quantity`. If the Price represents a fixed cost, this represents
|
|
1359
|
+
* the quantity of units applied.
|
|
1360
|
+
*
|
|
1361
|
+
* ```json
|
|
1362
|
+
* {
|
|
1363
|
+
* ...
|
|
1364
|
+
* "id": "price_id",
|
|
1365
|
+
* "model_type": "unit",
|
|
1366
|
+
* "unit_config": {
|
|
1367
|
+
* "unit_amount": "2.00"
|
|
1368
|
+
* },
|
|
1369
|
+
* "fixed_price_quantity": 3.0
|
|
1370
|
+
* ...
|
|
1371
|
+
* }
|
|
1372
|
+
* ```
|
|
1373
|
+
*/
|
|
1374
|
+
price: PricesAPI.Price;
|
|
1375
|
+
/**
|
|
1376
|
+
* The start date of the price interval. This is the date that Orb starts billing
|
|
1377
|
+
* for this price.
|
|
1378
|
+
*/
|
|
1379
|
+
start_date: string;
|
|
1380
|
+
}
|
|
1381
|
+
namespace PriceInterval {
|
|
1382
|
+
interface FixedFeeQuantityTransition {
|
|
1383
|
+
effective_date: string;
|
|
1384
|
+
price_id: string;
|
|
1385
|
+
quantity: number;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
interface RedeemedCoupon {
|
|
1389
|
+
coupon_id: string;
|
|
1390
|
+
end_date: string | null;
|
|
1391
|
+
start_date: string;
|
|
1392
|
+
}
|
|
1393
|
+
interface TrialInfo {
|
|
1394
|
+
end_date: string | null;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
export interface Subscriptions {
|
|
1398
|
+
data: Array<Subscription>;
|
|
1399
|
+
pagination_metadata: Subscriptions.PaginationMetadata;
|
|
1400
|
+
}
|
|
1401
|
+
export declare namespace Subscriptions {
|
|
1402
|
+
interface PaginationMetadata {
|
|
1403
|
+
has_more: boolean;
|
|
1404
|
+
next_cursor: string | null;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
export type SubscriptionUsage = SubscriptionUsage.UngroupedSubscriptionUsage | SubscriptionUsage.GroupedSubscriptionUsage;
|
|
1408
|
+
export declare namespace SubscriptionUsage {
|
|
1409
|
+
interface UngroupedSubscriptionUsage {
|
|
1410
|
+
data: Array<UngroupedSubscriptionUsage.Data>;
|
|
1411
|
+
}
|
|
1412
|
+
namespace UngroupedSubscriptionUsage {
|
|
1413
|
+
interface Data {
|
|
1414
|
+
billable_metric: Data.BillableMetric;
|
|
1415
|
+
usage: Array<Data.Usage>;
|
|
1416
|
+
view_mode: 'periodic' | 'cumulative';
|
|
1417
|
+
}
|
|
1418
|
+
namespace Data {
|
|
1419
|
+
interface BillableMetric {
|
|
1420
|
+
id: string;
|
|
1421
|
+
name: string;
|
|
1422
|
+
}
|
|
1423
|
+
interface Usage {
|
|
1424
|
+
quantity: number;
|
|
1425
|
+
timeframe_end: string;
|
|
1426
|
+
timeframe_start: string;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
interface GroupedSubscriptionUsage {
|
|
1431
|
+
data: Array<GroupedSubscriptionUsage.Data>;
|
|
1432
|
+
pagination_metadata?: GroupedSubscriptionUsage.PaginationMetadata | null;
|
|
1433
|
+
}
|
|
1434
|
+
namespace GroupedSubscriptionUsage {
|
|
1435
|
+
interface Data {
|
|
1436
|
+
billable_metric: Data.BillableMetric;
|
|
1437
|
+
metric_group: Data.MetricGroup;
|
|
1438
|
+
usage: Array<Data.Usage>;
|
|
1439
|
+
view_mode: 'periodic' | 'cumulative';
|
|
1440
|
+
}
|
|
1441
|
+
namespace Data {
|
|
1442
|
+
interface BillableMetric {
|
|
1443
|
+
id: string;
|
|
1444
|
+
name: string;
|
|
1445
|
+
}
|
|
1446
|
+
interface MetricGroup {
|
|
1447
|
+
property_key: string;
|
|
1448
|
+
property_value: string;
|
|
1449
|
+
}
|
|
1450
|
+
interface Usage {
|
|
1451
|
+
quantity: number;
|
|
1452
|
+
timeframe_end: string;
|
|
1453
|
+
timeframe_start: string;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
interface PaginationMetadata {
|
|
1457
|
+
has_more: boolean;
|
|
1458
|
+
next_cursor: string | null;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
export interface SubscriptionFetchCostsResponse {
|
|
1463
|
+
data: Array<SubscriptionFetchCostsResponse.Data>;
|
|
1464
|
+
}
|
|
1465
|
+
export declare namespace SubscriptionFetchCostsResponse {
|
|
1466
|
+
interface Data {
|
|
1467
|
+
per_price_costs: Array<Data.PerPriceCost>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Total costs for the timeframe, excluding any minimums and discounts.
|
|
1470
|
+
*/
|
|
1471
|
+
subtotal: string;
|
|
1472
|
+
timeframe_end: string;
|
|
1473
|
+
timeframe_start: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* Total costs for the timeframe, including any minimums and discounts.
|
|
1476
|
+
*/
|
|
1477
|
+
total: string;
|
|
1478
|
+
}
|
|
1479
|
+
namespace Data {
|
|
1480
|
+
interface PerPriceCost {
|
|
1481
|
+
/**
|
|
1482
|
+
* The Price resource represents a price that can be billed on a subscription,
|
|
1483
|
+
* resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
1484
|
+
* take a quantity and determine an amount to bill.
|
|
1485
|
+
*
|
|
1486
|
+
* Orb supports a few different pricing models out of the box. Each of these models
|
|
1487
|
+
* is serialized differently in a given Price object. The model_type field
|
|
1488
|
+
* determines the key for the configuration object that is present.
|
|
1489
|
+
*
|
|
1490
|
+
* ## Unit pricing
|
|
1491
|
+
*
|
|
1492
|
+
* With unit pricing, each unit costs a fixed amount.
|
|
1493
|
+
*
|
|
1494
|
+
* ```json
|
|
1495
|
+
* {
|
|
1496
|
+
* ...
|
|
1497
|
+
* "model_type": "unit",
|
|
1498
|
+
* "unit_config": {
|
|
1499
|
+
* "unit_amount": "0.50"
|
|
1500
|
+
* }
|
|
1501
|
+
* ...
|
|
1502
|
+
* }
|
|
1503
|
+
* ```
|
|
1504
|
+
*
|
|
1505
|
+
* ## Tiered pricing
|
|
1506
|
+
*
|
|
1507
|
+
* In tiered pricing, the cost of a given unit depends on the tier range that it
|
|
1508
|
+
* falls into, where each tier range is defined by an upper and lower bound. For
|
|
1509
|
+
* example, the first ten units may cost $0.50 each and all units thereafter may
|
|
1510
|
+
* cost $0.10 each.
|
|
1511
|
+
*
|
|
1512
|
+
* ```json
|
|
1513
|
+
* {
|
|
1514
|
+
* ...
|
|
1515
|
+
* "model_type": "tiered",
|
|
1516
|
+
* "tiered_config": {
|
|
1517
|
+
* "tiers": [
|
|
1518
|
+
* {
|
|
1519
|
+
* "first_unit": 1,
|
|
1520
|
+
* "last_unit": 10,
|
|
1521
|
+
* "unit_amount": "0.50"
|
|
1522
|
+
* },
|
|
1523
|
+
* {
|
|
1524
|
+
* "first_unit": 11,
|
|
1525
|
+
* "last_unit": null,
|
|
1526
|
+
* "unit_amount": "0.10"
|
|
1527
|
+
* }
|
|
1528
|
+
* ]
|
|
1529
|
+
* }
|
|
1530
|
+
* ...
|
|
1531
|
+
* ```
|
|
1532
|
+
*
|
|
1533
|
+
* ## Bulk pricing
|
|
1534
|
+
*
|
|
1535
|
+
* Bulk pricing applies when the number of units determine the cost of all units.
|
|
1536
|
+
* For example, if you've bought less than 10 units, they may each be $0.50 for a
|
|
1537
|
+
* total of $5.00. Once you've bought more than 10 units, all units may now be
|
|
1538
|
+
* priced at $0.40 (i.e. 101 units total would be $40.40).
|
|
1539
|
+
*
|
|
1540
|
+
* ```json
|
|
1541
|
+
* {
|
|
1542
|
+
* ...
|
|
1543
|
+
* "model_type": "bulk",
|
|
1544
|
+
* "bulk_config": {
|
|
1545
|
+
* "tiers": [
|
|
1546
|
+
* {
|
|
1547
|
+
* "maximum_units": 10,
|
|
1548
|
+
* "unit_amount": "0.50"
|
|
1549
|
+
* },
|
|
1550
|
+
* {
|
|
1551
|
+
* "maximum_units": 1000,
|
|
1552
|
+
* "unit_amount": "0.40"
|
|
1553
|
+
* }
|
|
1554
|
+
* ]
|
|
1555
|
+
* }
|
|
1556
|
+
* ...
|
|
1557
|
+
* }
|
|
1558
|
+
* ```
|
|
1559
|
+
*
|
|
1560
|
+
* ## Package pricing
|
|
1561
|
+
*
|
|
1562
|
+
* Package pricing defines the size or granularity of a unit for billing purposes.
|
|
1563
|
+
* For example, if the package size is set to 5, then 4 units will be billed as 5
|
|
1564
|
+
* and 6 units will be billed at 10.
|
|
1565
|
+
*
|
|
1566
|
+
* ```json
|
|
1567
|
+
* {
|
|
1568
|
+
* ...
|
|
1569
|
+
* "model_type": "package",
|
|
1570
|
+
* "package_config": {
|
|
1571
|
+
* "package_amount": "0.80",
|
|
1572
|
+
* "package_size": 10
|
|
1573
|
+
* }
|
|
1574
|
+
* ...
|
|
1575
|
+
* }
|
|
1576
|
+
* ```
|
|
1577
|
+
*
|
|
1578
|
+
* ## BPS pricing
|
|
1579
|
+
*
|
|
1580
|
+
* BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a
|
|
1581
|
+
* percent (the number of basis points to charge), as well as a cap per event to
|
|
1582
|
+
* assess. For example, this would allow you to assess a fee of 0.25% on every
|
|
1583
|
+
* payment you process, with a maximum charge of $25 per payment.
|
|
1584
|
+
*
|
|
1585
|
+
* ```json
|
|
1586
|
+
* {
|
|
1587
|
+
* ...
|
|
1588
|
+
* "model_type": "bps",
|
|
1589
|
+
* "bps_config": {
|
|
1590
|
+
* "bps": 125,
|
|
1591
|
+
* "per_unit_maximum": "11.00"
|
|
1592
|
+
* }
|
|
1593
|
+
* ...
|
|
1594
|
+
* }
|
|
1595
|
+
* ```
|
|
1596
|
+
*
|
|
1597
|
+
* ## Bulk BPS pricing
|
|
1598
|
+
*
|
|
1599
|
+
* Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the
|
|
1600
|
+
* total quantity across all events. Similar to bulk pricing, the BPS parameters of
|
|
1601
|
+
* a given event depends on the tier range that the billing period falls into. Each
|
|
1602
|
+
* tier range is defined by an upper bound. For example, after $1.5M of payment
|
|
1603
|
+
* volume is reached, each individual payment may have a lower cap or a smaller
|
|
1604
|
+
* take-rate.
|
|
1605
|
+
*
|
|
1606
|
+
* ```json
|
|
1607
|
+
* ...
|
|
1608
|
+
* "model_type": "bulk_bps",
|
|
1609
|
+
* "bulk_bps_config": {
|
|
1610
|
+
* "tiers": [
|
|
1611
|
+
* {
|
|
1612
|
+
* "maximum_amount": "1000000.00",
|
|
1613
|
+
* "bps": 125,
|
|
1614
|
+
* "per_unit_maximum": "19.00"
|
|
1615
|
+
* },
|
|
1616
|
+
* {
|
|
1617
|
+
* "maximum_amount": null,
|
|
1618
|
+
* "bps": 115,
|
|
1619
|
+
* "per_unit_maximum": "4.00"
|
|
1620
|
+
* }
|
|
1621
|
+
* ]
|
|
1622
|
+
* }
|
|
1623
|
+
* ...
|
|
1624
|
+
* }
|
|
1625
|
+
* ```
|
|
1626
|
+
*
|
|
1627
|
+
* ## Tiered BPS pricing
|
|
1628
|
+
*
|
|
1629
|
+
* Tiered BPS pricing specifies BPS parameters in a graduated manner, where an
|
|
1630
|
+
* event's applicable parameter is a function of its marginal addition to the
|
|
1631
|
+
* period total. Similar to tiered pricing, the BPS parameters of a given event
|
|
1632
|
+
* depends on the tier range that it falls into, where each tier range is defined
|
|
1633
|
+
* by an upper and lower bound. For example, the first few payments may have a 0.8
|
|
1634
|
+
* BPS take-rate and all payments after a specific volume may incur a take-rate of
|
|
1635
|
+
* 0.5 BPS each.
|
|
1636
|
+
*
|
|
1637
|
+
* ```json
|
|
1638
|
+
* ...
|
|
1639
|
+
* "model_type": "tiered_bps",
|
|
1640
|
+
* "tiered_bps_config": {
|
|
1641
|
+
* "tiers": [
|
|
1642
|
+
* {
|
|
1643
|
+
* "minimum_amount": "0",
|
|
1644
|
+
* "maximum_amount": "1000000.00",
|
|
1645
|
+
* "bps": 125,
|
|
1646
|
+
* "per_unit_maximum": "19.00"
|
|
1647
|
+
* },
|
|
1648
|
+
* {
|
|
1649
|
+
* "minimum_amount": "1000000.00",
|
|
1650
|
+
* "maximum_amount": null,
|
|
1651
|
+
* "bps": 115,
|
|
1652
|
+
* "per_unit_maximum": "4.00"
|
|
1653
|
+
* }
|
|
1654
|
+
* ]
|
|
1655
|
+
* }
|
|
1656
|
+
* ...
|
|
1657
|
+
* }
|
|
1658
|
+
* ```
|
|
1659
|
+
*
|
|
1660
|
+
* ## Matrix pricing
|
|
1661
|
+
*
|
|
1662
|
+
* Matrix pricing defines a set of unit prices in a one or two-dimensional matrix.
|
|
1663
|
+
* `dimensions` defines the two event property values evaluated in this pricing
|
|
1664
|
+
* model. In a one-dimensional matrix, the second value is `null`. Every
|
|
1665
|
+
* configuration has a list of `matrix_values` which give the unit prices for
|
|
1666
|
+
* specified property values. In a one-dimensional matrix, the matrix values will
|
|
1667
|
+
* have `dimension_values` where the second value of the pair is null. If an event
|
|
1668
|
+
* does not match any of the dimension values in the matrix, it will resort to the
|
|
1669
|
+
* `default_unit_amount`.
|
|
1670
|
+
*
|
|
1671
|
+
* ```json
|
|
1672
|
+
* {
|
|
1673
|
+
* "model_type": "matrix"
|
|
1674
|
+
* "matrix_config": {
|
|
1675
|
+
* "default_unit_amount": "3.00",
|
|
1676
|
+
* "dimensions": [
|
|
1677
|
+
* "cluster_name",
|
|
1678
|
+
* "region"
|
|
1679
|
+
* ],
|
|
1680
|
+
* "matrix_values": [
|
|
1681
|
+
* {
|
|
1682
|
+
* "dimension_values": [
|
|
1683
|
+
* "alpha",
|
|
1684
|
+
* "west"
|
|
1685
|
+
* ],
|
|
1686
|
+
* "unit_amount": "2.00"
|
|
1687
|
+
* },
|
|
1688
|
+
* ...
|
|
1689
|
+
* ]
|
|
1690
|
+
* }
|
|
1691
|
+
* }
|
|
1692
|
+
* ```
|
|
1693
|
+
*
|
|
1694
|
+
* ### Fixed fees
|
|
1695
|
+
*
|
|
1696
|
+
* Fixed fees are prices that are applied independent of usage quantities, and
|
|
1697
|
+
* follow unit pricing. They also have an additional parameter
|
|
1698
|
+
* `fixed_price_quantity`. If the Price represents a fixed cost, this represents
|
|
1699
|
+
* the quantity of units applied.
|
|
1700
|
+
*
|
|
1701
|
+
* ```json
|
|
1702
|
+
* {
|
|
1703
|
+
* ...
|
|
1704
|
+
* "id": "price_id",
|
|
1705
|
+
* "model_type": "unit",
|
|
1706
|
+
* "unit_config": {
|
|
1707
|
+
* "unit_amount": "2.00"
|
|
1708
|
+
* },
|
|
1709
|
+
* "fixed_price_quantity": 3.0
|
|
1710
|
+
* ...
|
|
1711
|
+
* }
|
|
1712
|
+
* ```
|
|
1713
|
+
*/
|
|
1714
|
+
price: PricesAPI.Price;
|
|
1715
|
+
/**
|
|
1716
|
+
* Price's contributions for the timeframe, excluding any minimums and discounts.
|
|
1717
|
+
*/
|
|
1718
|
+
subtotal: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* Price's contributions for the timeframe, including minimums and discounts.
|
|
1721
|
+
*/
|
|
1722
|
+
total: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* If a `group_by` attribute is passed in, array of costs per `grouping_key`,
|
|
1725
|
+
* `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`.
|
|
1726
|
+
*/
|
|
1727
|
+
price_groups?: Array<PerPriceCost.PriceGroup> | null;
|
|
1728
|
+
/**
|
|
1729
|
+
* The price's quantity for the timeframe
|
|
1730
|
+
*/
|
|
1731
|
+
quantity?: number | null;
|
|
1732
|
+
}
|
|
1733
|
+
namespace PerPriceCost {
|
|
1734
|
+
interface PriceGroup {
|
|
1735
|
+
/**
|
|
1736
|
+
* Grouping key to break down a single price's costs
|
|
1737
|
+
*/
|
|
1738
|
+
grouping_key: string;
|
|
1739
|
+
grouping_value: string | null;
|
|
1740
|
+
/**
|
|
1741
|
+
* If the price is a matrix price, this is the second dimension key
|
|
1742
|
+
*/
|
|
1743
|
+
secondary_grouping_key: string | null;
|
|
1744
|
+
secondary_grouping_value: string | null;
|
|
1745
|
+
/**
|
|
1746
|
+
* Total costs for this group for the timeframe. Note that this does not account
|
|
1747
|
+
* for any minimums or discounts.
|
|
1748
|
+
*/
|
|
1749
|
+
total: string;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
export interface SubscriptionFetchScheduleResponse {
|
|
1755
|
+
end_date: string | null;
|
|
1756
|
+
plan: SubscriptionFetchScheduleResponse.Plan;
|
|
1757
|
+
start_date: string;
|
|
1758
|
+
}
|
|
1759
|
+
export declare namespace SubscriptionFetchScheduleResponse {
|
|
1760
|
+
interface Plan {
|
|
1761
|
+
id: string | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* An optional user-defined ID for this plan resource, used throughout the system
|
|
1764
|
+
* as an alias for this Plan. Use this field to identify a plan by an existing
|
|
1765
|
+
* identifier in your system.
|
|
1766
|
+
*/
|
|
1767
|
+
external_plan_id: string | null;
|
|
1768
|
+
name: string | null;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
export interface SubscriptionCreateParams {
|
|
1772
|
+
align_billing_with_subscription_start_date?: boolean;
|
|
1773
|
+
auto_collection?: boolean | null;
|
|
1774
|
+
aws_region?: string | null;
|
|
1775
|
+
coupon_redemption_code?: string | null;
|
|
1776
|
+
credits_overage_rate?: number | null;
|
|
1777
|
+
customer_id?: string | null;
|
|
1778
|
+
default_invoice_memo?: string | null;
|
|
1779
|
+
end_date?: string | null;
|
|
1780
|
+
external_customer_id?: string | null;
|
|
1781
|
+
external_marketplace?: 'google' | 'aws' | 'azure' | null;
|
|
1782
|
+
external_marketplace_reporting_id?: string | null;
|
|
1783
|
+
/**
|
|
1784
|
+
* The external_plan_id of the plan that the given subscription should be switched
|
|
1785
|
+
* to. Note that either this property or `plan_id` must be specified.
|
|
1786
|
+
*/
|
|
1787
|
+
external_plan_id?: string | null;
|
|
1788
|
+
initial_phase_order?: number | null;
|
|
1789
|
+
invoicing_threshold?: string | null;
|
|
1790
|
+
metadata?: unknown | null;
|
|
1791
|
+
net_terms?: number | null;
|
|
1792
|
+
per_credit_overage_amount?: string | null;
|
|
1793
|
+
/**
|
|
1794
|
+
* The plan that the given subscription should be switched to. Note that either
|
|
1795
|
+
* this property or `external_plan_id` must be specified.
|
|
1796
|
+
*/
|
|
1797
|
+
plan_id?: string | null;
|
|
1798
|
+
/**
|
|
1799
|
+
* Optionally provide a list of overrides for prices on the plan
|
|
1800
|
+
*/
|
|
1801
|
+
price_overrides?: Array<SubscriptionCreateParams.OverrideUnitPrice | SubscriptionCreateParams.OverridePackagePrice | SubscriptionCreateParams.OverrideMatrixPrice | SubscriptionCreateParams.OverrideTieredPrice | SubscriptionCreateParams.OverrideTieredBpsPrice | SubscriptionCreateParams.OverrideBpsPrice | SubscriptionCreateParams.OverrideBulkBpsPrice | SubscriptionCreateParams.OverrideBulkPrice | SubscriptionCreateParams.OverrideTestRatingFunctionPrice | SubscriptionCreateParams.OverrideFivetranExamplePrice | SubscriptionCreateParams.OverrideThresholdTotalAmountPrice | SubscriptionCreateParams.OverrideTieredPackagePrice | SubscriptionCreateParams.OverrideTieredWithMinimumPrice | SubscriptionCreateParams.OverridePackageWithAllocationPrice> | null;
|
|
1802
|
+
start_date?: string | null;
|
|
1803
|
+
}
|
|
1804
|
+
export declare namespace SubscriptionCreateParams {
|
|
1805
|
+
interface OverrideUnitPrice {
|
|
1806
|
+
id: string;
|
|
1807
|
+
model_type: 'unit';
|
|
1808
|
+
unit_config: OverrideUnitPrice.UnitConfig;
|
|
1809
|
+
/**
|
|
1810
|
+
* The subscription's override discount for the plan.
|
|
1811
|
+
*/
|
|
1812
|
+
discount?: PricesAPI.Discount | null;
|
|
1813
|
+
/**
|
|
1814
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
1815
|
+
*/
|
|
1816
|
+
fixed_price_quantity?: number | null;
|
|
1817
|
+
/**
|
|
1818
|
+
* The subscription's override maximum amount for the plan.
|
|
1819
|
+
*/
|
|
1820
|
+
maximum_amount?: string | null;
|
|
1821
|
+
/**
|
|
1822
|
+
* The subscription's override minimum amount for the plan.
|
|
1823
|
+
*/
|
|
1824
|
+
minimum_amount?: string | null;
|
|
1825
|
+
}
|
|
1826
|
+
namespace OverrideUnitPrice {
|
|
1827
|
+
interface UnitConfig {
|
|
1828
|
+
/**
|
|
1829
|
+
* Rate per unit of usage
|
|
1830
|
+
*/
|
|
1831
|
+
unit_amount: string;
|
|
1832
|
+
/**
|
|
1833
|
+
* Multiplier to scale rated quantity by
|
|
1834
|
+
*/
|
|
1835
|
+
scaling_factor?: number | null;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
interface OverridePackagePrice {
|
|
1839
|
+
id: string;
|
|
1840
|
+
model_type: 'package';
|
|
1841
|
+
package_config: OverridePackagePrice.PackageConfig;
|
|
1842
|
+
/**
|
|
1843
|
+
* The subscription's override discount for the plan.
|
|
1844
|
+
*/
|
|
1845
|
+
discount?: PricesAPI.Discount | null;
|
|
1846
|
+
/**
|
|
1847
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
1848
|
+
*/
|
|
1849
|
+
fixed_price_quantity?: number | null;
|
|
1850
|
+
/**
|
|
1851
|
+
* The subscription's override maximum amount for the plan.
|
|
1852
|
+
*/
|
|
1853
|
+
maximum_amount?: string | null;
|
|
1854
|
+
/**
|
|
1855
|
+
* The subscription's override minimum amount for the plan.
|
|
1856
|
+
*/
|
|
1857
|
+
minimum_amount?: string | null;
|
|
1858
|
+
}
|
|
1859
|
+
namespace OverridePackagePrice {
|
|
1860
|
+
interface PackageConfig {
|
|
1861
|
+
/**
|
|
1862
|
+
* A currency amount to rate usage by
|
|
1863
|
+
*/
|
|
1864
|
+
package_amount: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* An integer amount to represent package size. For example, 1000 here would divide
|
|
1867
|
+
* usage by 1000 before multiplying by package_amount in rating
|
|
1868
|
+
*/
|
|
1869
|
+
package_size?: number | null;
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
interface OverrideMatrixPrice {
|
|
1873
|
+
id: string;
|
|
1874
|
+
matrix_config: OverrideMatrixPrice.MatrixConfig;
|
|
1875
|
+
model_type: 'matrix';
|
|
1876
|
+
/**
|
|
1877
|
+
* The subscription's override discount for the plan.
|
|
1878
|
+
*/
|
|
1879
|
+
discount?: PricesAPI.Discount | null;
|
|
1880
|
+
/**
|
|
1881
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
1882
|
+
*/
|
|
1883
|
+
fixed_price_quantity?: number | null;
|
|
1884
|
+
/**
|
|
1885
|
+
* The subscription's override maximum amount for the plan.
|
|
1886
|
+
*/
|
|
1887
|
+
maximum_amount?: string | null;
|
|
1888
|
+
/**
|
|
1889
|
+
* The subscription's override minimum amount for the plan.
|
|
1890
|
+
*/
|
|
1891
|
+
minimum_amount?: string | null;
|
|
1892
|
+
}
|
|
1893
|
+
namespace OverrideMatrixPrice {
|
|
1894
|
+
interface MatrixConfig {
|
|
1895
|
+
/**
|
|
1896
|
+
* Default per unit rate for any usage not bucketed into a specified matrix_value
|
|
1897
|
+
*/
|
|
1898
|
+
default_unit_amount: string;
|
|
1899
|
+
/**
|
|
1900
|
+
* One or two event property values to evaluate matrix groups by
|
|
1901
|
+
*/
|
|
1902
|
+
dimensions: Array<string | null>;
|
|
1903
|
+
/**
|
|
1904
|
+
* Matrix values for specified matrix grouping keys
|
|
1905
|
+
*/
|
|
1906
|
+
matrix_values: Array<MatrixConfig.MatrixValue>;
|
|
1907
|
+
/**
|
|
1908
|
+
* Default optional multiplier to scale rated quantities that fall into the default
|
|
1909
|
+
* bucket by
|
|
1910
|
+
*/
|
|
1911
|
+
scaling_factor?: number | null;
|
|
1912
|
+
}
|
|
1913
|
+
namespace MatrixConfig {
|
|
1914
|
+
interface MatrixValue {
|
|
1915
|
+
/**
|
|
1916
|
+
* One or two matrix keys to filter usage to this Matrix value by. For example,
|
|
1917
|
+
* ["region", "tier"] could be used to filter cloud usage by a cloud region and an
|
|
1918
|
+
* instance tier.
|
|
1919
|
+
*/
|
|
1920
|
+
dimension_values: Array<string | null>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Unit price for the specified dimension_values
|
|
1923
|
+
*/
|
|
1924
|
+
unit_amount: string;
|
|
1925
|
+
/**
|
|
1926
|
+
* Optional multiplier to scale rated quantities by
|
|
1927
|
+
*/
|
|
1928
|
+
scaling_factor?: number | null;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
interface OverrideTieredPrice {
|
|
1933
|
+
id: string;
|
|
1934
|
+
model_type: 'tiered';
|
|
1935
|
+
tiered_config: OverrideTieredPrice.TieredConfig;
|
|
1936
|
+
/**
|
|
1937
|
+
* The subscription's override discount for the plan.
|
|
1938
|
+
*/
|
|
1939
|
+
discount?: PricesAPI.Discount | null;
|
|
1940
|
+
/**
|
|
1941
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
1942
|
+
*/
|
|
1943
|
+
fixed_price_quantity?: number | null;
|
|
1944
|
+
/**
|
|
1945
|
+
* The subscription's override maximum amount for the plan.
|
|
1946
|
+
*/
|
|
1947
|
+
maximum_amount?: string | null;
|
|
1948
|
+
/**
|
|
1949
|
+
* The subscription's override minimum amount for the plan.
|
|
1950
|
+
*/
|
|
1951
|
+
minimum_amount?: string | null;
|
|
1952
|
+
}
|
|
1953
|
+
namespace OverrideTieredPrice {
|
|
1954
|
+
interface TieredConfig {
|
|
1955
|
+
/**
|
|
1956
|
+
* Tiers for rating based on total usage quantities into the specified tier
|
|
1957
|
+
*/
|
|
1958
|
+
tiers: Array<TieredConfig.Tier>;
|
|
1959
|
+
}
|
|
1960
|
+
namespace TieredConfig {
|
|
1961
|
+
interface Tier {
|
|
1962
|
+
/**
|
|
1963
|
+
* Inclusive tier starting value
|
|
1964
|
+
*/
|
|
1965
|
+
first_unit: number;
|
|
1966
|
+
/**
|
|
1967
|
+
* Amount per unit
|
|
1968
|
+
*/
|
|
1969
|
+
unit_amount: string;
|
|
1970
|
+
/**
|
|
1971
|
+
* Exclusive tier ending value. If null, this is treated as the last tier
|
|
1972
|
+
*/
|
|
1973
|
+
last_unit?: number | null;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
interface OverrideTieredBpsPrice {
|
|
1978
|
+
id: string;
|
|
1979
|
+
model_type: 'tiered_bps';
|
|
1980
|
+
tiered_bps_config: OverrideTieredBpsPrice.TieredBpsConfig;
|
|
1981
|
+
/**
|
|
1982
|
+
* The subscription's override discount for the plan.
|
|
1983
|
+
*/
|
|
1984
|
+
discount?: PricesAPI.Discount | null;
|
|
1985
|
+
/**
|
|
1986
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
1987
|
+
*/
|
|
1988
|
+
fixed_price_quantity?: number | null;
|
|
1989
|
+
/**
|
|
1990
|
+
* The subscription's override maximum amount for the plan.
|
|
1991
|
+
*/
|
|
1992
|
+
maximum_amount?: string | null;
|
|
1993
|
+
/**
|
|
1994
|
+
* The subscription's override minimum amount for the plan.
|
|
1995
|
+
*/
|
|
1996
|
+
minimum_amount?: string | null;
|
|
1997
|
+
}
|
|
1998
|
+
namespace OverrideTieredBpsPrice {
|
|
1999
|
+
interface TieredBpsConfig {
|
|
2000
|
+
/**
|
|
2001
|
+
* Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
|
|
2002
|
+
* tiers
|
|
2003
|
+
*/
|
|
2004
|
+
tiers: Array<TieredBpsConfig.Tier>;
|
|
2005
|
+
}
|
|
2006
|
+
namespace TieredBpsConfig {
|
|
2007
|
+
interface Tier {
|
|
2008
|
+
/**
|
|
2009
|
+
* Per-event basis point rate
|
|
2010
|
+
*/
|
|
2011
|
+
bps: number;
|
|
2012
|
+
/**
|
|
2013
|
+
* Inclusive tier starting value
|
|
2014
|
+
*/
|
|
2015
|
+
minimum_amount: string;
|
|
2016
|
+
/**
|
|
2017
|
+
* Exclusive tier ending value
|
|
2018
|
+
*/
|
|
2019
|
+
maximum_amount?: string | null;
|
|
2020
|
+
/**
|
|
2021
|
+
* Per unit maximum to charge
|
|
2022
|
+
*/
|
|
2023
|
+
per_unit_maximum?: string | null;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
interface OverrideBpsPrice {
|
|
2028
|
+
id: string;
|
|
2029
|
+
bps_config: OverrideBpsPrice.BpsConfig;
|
|
2030
|
+
model_type: 'bps';
|
|
2031
|
+
/**
|
|
2032
|
+
* The subscription's override discount for the plan.
|
|
2033
|
+
*/
|
|
2034
|
+
discount?: PricesAPI.Discount | null;
|
|
2035
|
+
/**
|
|
2036
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2037
|
+
*/
|
|
2038
|
+
fixed_price_quantity?: number | null;
|
|
2039
|
+
/**
|
|
2040
|
+
* The subscription's override maximum amount for the plan.
|
|
2041
|
+
*/
|
|
2042
|
+
maximum_amount?: string | null;
|
|
2043
|
+
/**
|
|
2044
|
+
* The subscription's override minimum amount for the plan.
|
|
2045
|
+
*/
|
|
2046
|
+
minimum_amount?: string | null;
|
|
2047
|
+
}
|
|
2048
|
+
namespace OverrideBpsPrice {
|
|
2049
|
+
interface BpsConfig {
|
|
2050
|
+
/**
|
|
2051
|
+
* Basis point take rate per event
|
|
2052
|
+
*/
|
|
2053
|
+
bps: number;
|
|
2054
|
+
/**
|
|
2055
|
+
* Optional currency amount maximum to cap spend per event
|
|
2056
|
+
*/
|
|
2057
|
+
per_unit_maximum?: string | null;
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
interface OverrideBulkBpsPrice {
|
|
2061
|
+
id: string;
|
|
2062
|
+
bulk_bps_config: OverrideBulkBpsPrice.BulkBpsConfig;
|
|
2063
|
+
model_type: 'bulk_bps';
|
|
2064
|
+
/**
|
|
2065
|
+
* The subscription's override discount for the plan.
|
|
2066
|
+
*/
|
|
2067
|
+
discount?: PricesAPI.Discount | null;
|
|
2068
|
+
/**
|
|
2069
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2070
|
+
*/
|
|
2071
|
+
fixed_price_quantity?: number | null;
|
|
2072
|
+
/**
|
|
2073
|
+
* The subscription's override maximum amount for the plan.
|
|
2074
|
+
*/
|
|
2075
|
+
maximum_amount?: string | null;
|
|
2076
|
+
/**
|
|
2077
|
+
* The subscription's override minimum amount for the plan.
|
|
2078
|
+
*/
|
|
2079
|
+
minimum_amount?: string | null;
|
|
2080
|
+
}
|
|
2081
|
+
namespace OverrideBulkBpsPrice {
|
|
2082
|
+
interface BulkBpsConfig {
|
|
2083
|
+
/**
|
|
2084
|
+
* Tiers for a bulk BPS pricing model where all usage is aggregated to a single
|
|
2085
|
+
* tier based on total volume
|
|
2086
|
+
*/
|
|
2087
|
+
tiers: Array<BulkBpsConfig.Tier>;
|
|
2088
|
+
}
|
|
2089
|
+
namespace BulkBpsConfig {
|
|
2090
|
+
interface Tier {
|
|
2091
|
+
/**
|
|
2092
|
+
* Basis points to rate on
|
|
2093
|
+
*/
|
|
2094
|
+
bps: number;
|
|
2095
|
+
/**
|
|
2096
|
+
* Upper bound for tier
|
|
2097
|
+
*/
|
|
2098
|
+
maximum_amount?: string | null;
|
|
2099
|
+
/**
|
|
2100
|
+
* The maximum amount to charge for any one event
|
|
2101
|
+
*/
|
|
2102
|
+
per_unit_maximum?: string | null;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
interface OverrideBulkPrice {
|
|
2107
|
+
id: string;
|
|
2108
|
+
bulk_config: OverrideBulkPrice.BulkConfig;
|
|
2109
|
+
model_type: 'bulk';
|
|
2110
|
+
/**
|
|
2111
|
+
* The subscription's override discount for the plan.
|
|
2112
|
+
*/
|
|
2113
|
+
discount?: PricesAPI.Discount | null;
|
|
2114
|
+
/**
|
|
2115
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2116
|
+
*/
|
|
2117
|
+
fixed_price_quantity?: number | null;
|
|
2118
|
+
/**
|
|
2119
|
+
* The subscription's override maximum amount for the plan.
|
|
2120
|
+
*/
|
|
2121
|
+
maximum_amount?: string | null;
|
|
2122
|
+
/**
|
|
2123
|
+
* The subscription's override minimum amount for the plan.
|
|
2124
|
+
*/
|
|
2125
|
+
minimum_amount?: string | null;
|
|
2126
|
+
}
|
|
2127
|
+
namespace OverrideBulkPrice {
|
|
2128
|
+
interface BulkConfig {
|
|
2129
|
+
/**
|
|
2130
|
+
* Bulk tiers for rating based on total usage volume
|
|
2131
|
+
*/
|
|
2132
|
+
tiers: Array<BulkConfig.Tier>;
|
|
2133
|
+
}
|
|
2134
|
+
namespace BulkConfig {
|
|
2135
|
+
interface Tier {
|
|
2136
|
+
/**
|
|
2137
|
+
* Amount per unit
|
|
2138
|
+
*/
|
|
2139
|
+
unit_amount: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* Upper bound for this tier
|
|
2142
|
+
*/
|
|
2143
|
+
maximum_units?: number | null;
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
interface OverrideTestRatingFunctionPrice {
|
|
2148
|
+
id: string;
|
|
2149
|
+
model_type: 'test_rating_function';
|
|
2150
|
+
test_rating_function_config: Record<string, unknown>;
|
|
2151
|
+
/**
|
|
2152
|
+
* The subscription's override discount for the plan.
|
|
2153
|
+
*/
|
|
2154
|
+
discount?: PricesAPI.Discount | null;
|
|
2155
|
+
/**
|
|
2156
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2157
|
+
*/
|
|
2158
|
+
fixed_price_quantity?: number | null;
|
|
2159
|
+
/**
|
|
2160
|
+
* The subscription's override maximum amount for the plan.
|
|
2161
|
+
*/
|
|
2162
|
+
maximum_amount?: string | null;
|
|
2163
|
+
/**
|
|
2164
|
+
* The subscription's override minimum amount for the plan.
|
|
2165
|
+
*/
|
|
2166
|
+
minimum_amount?: string | null;
|
|
2167
|
+
}
|
|
2168
|
+
interface OverrideFivetranExamplePrice {
|
|
2169
|
+
id: string;
|
|
2170
|
+
fivetran_example_config: Record<string, unknown>;
|
|
2171
|
+
model_type: 'fivetran_example';
|
|
2172
|
+
/**
|
|
2173
|
+
* The subscription's override discount for the plan.
|
|
2174
|
+
*/
|
|
2175
|
+
discount?: PricesAPI.Discount | null;
|
|
2176
|
+
/**
|
|
2177
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2178
|
+
*/
|
|
2179
|
+
fixed_price_quantity?: number | null;
|
|
2180
|
+
/**
|
|
2181
|
+
* The subscription's override maximum amount for the plan.
|
|
2182
|
+
*/
|
|
2183
|
+
maximum_amount?: string | null;
|
|
2184
|
+
/**
|
|
2185
|
+
* The subscription's override minimum amount for the plan.
|
|
2186
|
+
*/
|
|
2187
|
+
minimum_amount?: string | null;
|
|
2188
|
+
}
|
|
2189
|
+
interface OverrideThresholdTotalAmountPrice {
|
|
2190
|
+
id: string;
|
|
2191
|
+
model_type: 'threshold_total_amount';
|
|
2192
|
+
threshold_total_amount_config: Record<string, unknown>;
|
|
2193
|
+
/**
|
|
2194
|
+
* The subscription's override discount for the plan.
|
|
2195
|
+
*/
|
|
2196
|
+
discount?: PricesAPI.Discount | null;
|
|
2197
|
+
/**
|
|
2198
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2199
|
+
*/
|
|
2200
|
+
fixed_price_quantity?: number | null;
|
|
2201
|
+
/**
|
|
2202
|
+
* The subscription's override maximum amount for the plan.
|
|
2203
|
+
*/
|
|
2204
|
+
maximum_amount?: string | null;
|
|
2205
|
+
/**
|
|
2206
|
+
* The subscription's override minimum amount for the plan.
|
|
2207
|
+
*/
|
|
2208
|
+
minimum_amount?: string | null;
|
|
2209
|
+
}
|
|
2210
|
+
interface OverrideTieredPackagePrice {
|
|
2211
|
+
id: string;
|
|
2212
|
+
model_type: 'tiered_package';
|
|
2213
|
+
tiered_package_config: Record<string, unknown>;
|
|
2214
|
+
/**
|
|
2215
|
+
* The subscription's override discount for the plan.
|
|
2216
|
+
*/
|
|
2217
|
+
discount?: PricesAPI.Discount | null;
|
|
2218
|
+
/**
|
|
2219
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2220
|
+
*/
|
|
2221
|
+
fixed_price_quantity?: number | null;
|
|
2222
|
+
/**
|
|
2223
|
+
* The subscription's override maximum amount for the plan.
|
|
2224
|
+
*/
|
|
2225
|
+
maximum_amount?: string | null;
|
|
2226
|
+
/**
|
|
2227
|
+
* The subscription's override minimum amount for the plan.
|
|
2228
|
+
*/
|
|
2229
|
+
minimum_amount?: string | null;
|
|
2230
|
+
}
|
|
2231
|
+
interface OverrideTieredWithMinimumPrice {
|
|
2232
|
+
id: string;
|
|
2233
|
+
model_type: 'tiered_with_minimum';
|
|
2234
|
+
tiered_with_minimum_config: Record<string, unknown>;
|
|
2235
|
+
/**
|
|
2236
|
+
* The subscription's override discount for the plan.
|
|
2237
|
+
*/
|
|
2238
|
+
discount?: PricesAPI.Discount | null;
|
|
2239
|
+
/**
|
|
2240
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2241
|
+
*/
|
|
2242
|
+
fixed_price_quantity?: number | null;
|
|
2243
|
+
/**
|
|
2244
|
+
* The subscription's override maximum amount for the plan.
|
|
2245
|
+
*/
|
|
2246
|
+
maximum_amount?: string | null;
|
|
2247
|
+
/**
|
|
2248
|
+
* The subscription's override minimum amount for the plan.
|
|
2249
|
+
*/
|
|
2250
|
+
minimum_amount?: string | null;
|
|
2251
|
+
}
|
|
2252
|
+
interface OverridePackageWithAllocationPrice {
|
|
2253
|
+
id: string;
|
|
2254
|
+
model_type: 'package_with_allocation';
|
|
2255
|
+
package_with_allocation_config: Record<string, unknown>;
|
|
2256
|
+
/**
|
|
2257
|
+
* The subscription's override discount for the plan.
|
|
2258
|
+
*/
|
|
2259
|
+
discount?: PricesAPI.Discount | null;
|
|
2260
|
+
/**
|
|
2261
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
2262
|
+
*/
|
|
2263
|
+
fixed_price_quantity?: number | null;
|
|
2264
|
+
/**
|
|
2265
|
+
* The subscription's override maximum amount for the plan.
|
|
2266
|
+
*/
|
|
2267
|
+
maximum_amount?: string | null;
|
|
2268
|
+
/**
|
|
2269
|
+
* The subscription's override minimum amount for the plan.
|
|
2270
|
+
*/
|
|
2271
|
+
minimum_amount?: string | null;
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
export interface SubscriptionListParams extends PageParams {
|
|
2275
|
+
'created_at[gt]'?: string | null;
|
|
2276
|
+
'created_at[gte]'?: string | null;
|
|
2277
|
+
'created_at[lt]'?: string | null;
|
|
2278
|
+
'created_at[lte]'?: string | null;
|
|
2279
|
+
customer_id?: string | null;
|
|
2280
|
+
external_customer_id?: string | null;
|
|
2281
|
+
status?: 'active' | 'ended' | 'upcoming' | null;
|
|
2282
|
+
}
|
|
2283
|
+
export interface SubscriptionCancelParams {
|
|
2284
|
+
/**
|
|
2285
|
+
* Determines the timing of subscription cancellation
|
|
2286
|
+
*/
|
|
2287
|
+
cancel_option: 'end_of_subscription_term' | 'immediate' | 'requested_date';
|
|
2288
|
+
/**
|
|
2289
|
+
* The date that the cancellation should take effect. This parameter can only be
|
|
2290
|
+
* passed if the `cancel_option` is `requested_date`.
|
|
2291
|
+
*/
|
|
2292
|
+
cancellation_date?: string | null;
|
|
2293
|
+
}
|
|
2294
|
+
export interface SubscriptionFetchCostsParams {
|
|
2295
|
+
/**
|
|
2296
|
+
* Groups per-price costs by the key provided.
|
|
2297
|
+
*/
|
|
2298
|
+
group_by?: string | null;
|
|
2299
|
+
/**
|
|
2300
|
+
* Costs returned are exclusive of `timeframe_end`.
|
|
2301
|
+
*/
|
|
2302
|
+
timeframe_end?: string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
* Costs returned are inclusive of `timeframe_start`.
|
|
2305
|
+
*/
|
|
2306
|
+
timeframe_start?: string | null;
|
|
2307
|
+
/**
|
|
2308
|
+
* Controls whether Orb returns cumulative costs since the start of the billing
|
|
2309
|
+
* period, or incremental day-by-day costs. If your customer has minimums or
|
|
2310
|
+
* discounts, it's strongly recommended that you use the default cumulative
|
|
2311
|
+
* behavior.
|
|
2312
|
+
*/
|
|
2313
|
+
view_mode?: 'periodic' | 'cumulative' | null;
|
|
2314
|
+
}
|
|
2315
|
+
export interface SubscriptionFetchScheduleParams extends PageParams {
|
|
2316
|
+
'start_date[gt]'?: string | null;
|
|
2317
|
+
'start_date[gte]'?: string | null;
|
|
2318
|
+
'start_date[lt]'?: string | null;
|
|
2319
|
+
'start_date[lte]'?: string | null;
|
|
2320
|
+
}
|
|
2321
|
+
export interface SubscriptionFetchUsageParams {
|
|
2322
|
+
/**
|
|
2323
|
+
* When specified in conjunction with `group_by`, this parameter filters usage to a
|
|
2324
|
+
* single billable metric. Note that both `group_by` and `billable_metric_id` must
|
|
2325
|
+
* be specified together.
|
|
2326
|
+
*/
|
|
2327
|
+
billable_metric_id?: string | null;
|
|
2328
|
+
/**
|
|
2329
|
+
* Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
2330
|
+
* from the initial request.
|
|
2331
|
+
*/
|
|
2332
|
+
cursor?: string | null;
|
|
2333
|
+
first_dimension_key?: string | null;
|
|
2334
|
+
first_dimension_value?: string | null;
|
|
2335
|
+
/**
|
|
2336
|
+
* This determines the windowing of usage reporting.
|
|
2337
|
+
*/
|
|
2338
|
+
granularity?: 'day' | null;
|
|
2339
|
+
/**
|
|
2340
|
+
* Groups per-price usage by the key provided.
|
|
2341
|
+
*/
|
|
2342
|
+
group_by?: string | null;
|
|
2343
|
+
/**
|
|
2344
|
+
* If including a `group_by`, the number of groups to fetch data for. Defaults
|
|
2345
|
+
* to 1000.
|
|
2346
|
+
*/
|
|
2347
|
+
limit?: number | null;
|
|
2348
|
+
second_dimension_key?: string | null;
|
|
2349
|
+
second_dimension_value?: string | null;
|
|
2350
|
+
/**
|
|
2351
|
+
* Usage returned is exclusive of `timeframe_end`.
|
|
2352
|
+
*/
|
|
2353
|
+
timeframe_end?: string | null;
|
|
2354
|
+
/**
|
|
2355
|
+
* Usage returned is inclusive of `timeframe_start`.
|
|
2356
|
+
*/
|
|
2357
|
+
timeframe_start?: string | null;
|
|
2358
|
+
/**
|
|
2359
|
+
* Controls whether Orb returns cumulative usage since the start of the billing
|
|
2360
|
+
* period, or incremental day-by-day usage. If your customer has minimums or
|
|
2361
|
+
* discounts, it's strongly recommended that you use the default cumulative
|
|
2362
|
+
* behavior.
|
|
2363
|
+
*/
|
|
2364
|
+
view_mode?: 'periodic' | 'cumulative' | null;
|
|
2365
|
+
}
|
|
2366
|
+
export interface SubscriptionPriceIntervalsParams {
|
|
2367
|
+
/**
|
|
2368
|
+
* A list of price intervals to add to the subscription.
|
|
2369
|
+
*/
|
|
2370
|
+
add?: Array<SubscriptionPriceIntervalsParams.Add>;
|
|
2371
|
+
/**
|
|
2372
|
+
* A list of price intervals to edit on the subscription.
|
|
2373
|
+
*/
|
|
2374
|
+
edit?: Array<SubscriptionPriceIntervalsParams.Edit>;
|
|
2375
|
+
}
|
|
2376
|
+
export declare namespace SubscriptionPriceIntervalsParams {
|
|
2377
|
+
interface Add {
|
|
2378
|
+
/**
|
|
2379
|
+
* The start date of the price interval. This is the date that the price will start
|
|
2380
|
+
* billing on the subscription.
|
|
2381
|
+
*/
|
|
2382
|
+
start_date: (string & {}) | 'start_of_term' | 'end_of_term';
|
|
2383
|
+
/**
|
|
2384
|
+
* A list of discounts to initialize on the price interval.
|
|
2385
|
+
*/
|
|
2386
|
+
discounts?: Array<Add.AmountDiscountCreationParams | Add.PercentageDiscountCreationParams | Add.UsageDiscountCreationParams> | null;
|
|
2387
|
+
/**
|
|
2388
|
+
* The end date of the price interval. This is the date that the price will stop
|
|
2389
|
+
* billing on the subscription.
|
|
2390
|
+
*/
|
|
2391
|
+
end_date?: (string & {}) | 'start_of_term' | 'end_of_term' | null;
|
|
2392
|
+
/**
|
|
2393
|
+
* The external price id of the price to add to the subscription.
|
|
2394
|
+
*/
|
|
2395
|
+
external_price_id?: string | null;
|
|
2396
|
+
/**
|
|
2397
|
+
* A list of fixed fee quantity transitions to initialize on the price interval.
|
|
2398
|
+
*/
|
|
2399
|
+
fixed_fee_quantity_transitions?: Array<Add.FixedFeeQuantityTransition> | null;
|
|
2400
|
+
/**
|
|
2401
|
+
* The maximum amount that will be billed for this price interval for a given
|
|
2402
|
+
* billing period.
|
|
2403
|
+
*/
|
|
2404
|
+
maximum_amount?: number | null;
|
|
2405
|
+
/**
|
|
2406
|
+
* The minimum amount that will be billed for this price interval for a given
|
|
2407
|
+
* billing period.
|
|
2408
|
+
*/
|
|
2409
|
+
minimum_amount?: number | null;
|
|
2410
|
+
/**
|
|
2411
|
+
* The definition of a new price to create and add to the subscription.
|
|
2412
|
+
*/
|
|
2413
|
+
price?: Add.NewUnitPrice | Add.NewPackagePrice | Add.NewMatrixPrice | Add.NewTieredPrice | Add.NewTieredBpsPrice | Add.NewBpsPrice | Add.NewBulkBpsPrice | Add.NewBulkPrice | Add.NewThresholdTotalAmountPrice | Add.NewTieredPackagePrice | Add.NewTieredWithMinimumPrice | Add.NewPackageWithAllocationPrice | null;
|
|
2414
|
+
/**
|
|
2415
|
+
* The id of the price to add to the subscription.
|
|
2416
|
+
*/
|
|
2417
|
+
price_id?: string | null;
|
|
2418
|
+
}
|
|
2419
|
+
namespace Add {
|
|
2420
|
+
interface AmountDiscountCreationParams {
|
|
2421
|
+
/**
|
|
2422
|
+
* Only available if discount_type is `amount`.
|
|
2423
|
+
*/
|
|
2424
|
+
amount_discount: number;
|
|
2425
|
+
discount_type: 'amount';
|
|
2426
|
+
}
|
|
2427
|
+
interface PercentageDiscountCreationParams {
|
|
2428
|
+
discount_type: 'percentage';
|
|
2429
|
+
/**
|
|
2430
|
+
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2431
|
+
* and 1.
|
|
2432
|
+
*/
|
|
2433
|
+
percentage_discount: number;
|
|
2434
|
+
}
|
|
2435
|
+
interface UsageDiscountCreationParams {
|
|
2436
|
+
discount_type: 'usage';
|
|
2437
|
+
/**
|
|
2438
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2439
|
+
* discount is for.
|
|
2440
|
+
*/
|
|
2441
|
+
usage_discount: number;
|
|
2442
|
+
}
|
|
2443
|
+
interface FixedFeeQuantityTransition {
|
|
2444
|
+
/**
|
|
2445
|
+
* The date that the fixed fee quantity transition should take effect.
|
|
2446
|
+
*/
|
|
2447
|
+
effective_date: string;
|
|
2448
|
+
/**
|
|
2449
|
+
* The quantity of the fixed fee quantity transition.
|
|
2450
|
+
*/
|
|
2451
|
+
quantity: number;
|
|
2452
|
+
}
|
|
2453
|
+
interface NewUnitPrice {
|
|
2454
|
+
/**
|
|
2455
|
+
* The cadence to bill for this price on.
|
|
2456
|
+
*/
|
|
2457
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2458
|
+
/**
|
|
2459
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2460
|
+
*/
|
|
2461
|
+
currency: string;
|
|
2462
|
+
/**
|
|
2463
|
+
* The id of the item the plan will be associated with.
|
|
2464
|
+
*/
|
|
2465
|
+
item_id: string;
|
|
2466
|
+
model_type: 'unit';
|
|
2467
|
+
/**
|
|
2468
|
+
* The name of the price.
|
|
2469
|
+
*/
|
|
2470
|
+
name: string;
|
|
2471
|
+
unit_config: NewUnitPrice.UnitConfig;
|
|
2472
|
+
/**
|
|
2473
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2474
|
+
* usage-based.
|
|
2475
|
+
*/
|
|
2476
|
+
billable_metric_id?: string | null;
|
|
2477
|
+
/**
|
|
2478
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2479
|
+
* this is true, and in-arrears if this is false.
|
|
2480
|
+
*/
|
|
2481
|
+
billed_in_advance?: boolean | null;
|
|
2482
|
+
/**
|
|
2483
|
+
* An alias for the price.
|
|
2484
|
+
*/
|
|
2485
|
+
external_price_id?: string | null;
|
|
2486
|
+
/**
|
|
2487
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2488
|
+
* applied.
|
|
2489
|
+
*/
|
|
2490
|
+
fixed_price_quantity?: number | null;
|
|
2491
|
+
/**
|
|
2492
|
+
* The property used to group this price on an invoice
|
|
2493
|
+
*/
|
|
2494
|
+
invoice_grouping_key?: string | null;
|
|
2495
|
+
}
|
|
2496
|
+
namespace NewUnitPrice {
|
|
2497
|
+
interface UnitConfig {
|
|
2498
|
+
/**
|
|
2499
|
+
* Rate per unit of usage
|
|
2500
|
+
*/
|
|
2501
|
+
unit_amount: string;
|
|
2502
|
+
/**
|
|
2503
|
+
* Multiplier to scale rated quantity by
|
|
2504
|
+
*/
|
|
2505
|
+
scaling_factor?: number | null;
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
interface NewPackagePrice {
|
|
2509
|
+
/**
|
|
2510
|
+
* The cadence to bill for this price on.
|
|
2511
|
+
*/
|
|
2512
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2513
|
+
/**
|
|
2514
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2515
|
+
*/
|
|
2516
|
+
currency: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* The id of the item the plan will be associated with.
|
|
2519
|
+
*/
|
|
2520
|
+
item_id: string;
|
|
2521
|
+
model_type: 'package';
|
|
2522
|
+
/**
|
|
2523
|
+
* The name of the price.
|
|
2524
|
+
*/
|
|
2525
|
+
name: string;
|
|
2526
|
+
package_config: NewPackagePrice.PackageConfig;
|
|
2527
|
+
/**
|
|
2528
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2529
|
+
* usage-based.
|
|
2530
|
+
*/
|
|
2531
|
+
billable_metric_id?: string | null;
|
|
2532
|
+
/**
|
|
2533
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2534
|
+
* this is true, and in-arrears if this is false.
|
|
2535
|
+
*/
|
|
2536
|
+
billed_in_advance?: boolean | null;
|
|
2537
|
+
/**
|
|
2538
|
+
* An alias for the price.
|
|
2539
|
+
*/
|
|
2540
|
+
external_price_id?: string | null;
|
|
2541
|
+
/**
|
|
2542
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2543
|
+
* applied.
|
|
2544
|
+
*/
|
|
2545
|
+
fixed_price_quantity?: number | null;
|
|
2546
|
+
/**
|
|
2547
|
+
* The property used to group this price on an invoice
|
|
2548
|
+
*/
|
|
2549
|
+
invoice_grouping_key?: string | null;
|
|
2550
|
+
}
|
|
2551
|
+
namespace NewPackagePrice {
|
|
2552
|
+
interface PackageConfig {
|
|
2553
|
+
/**
|
|
2554
|
+
* A currency amount to rate usage by
|
|
2555
|
+
*/
|
|
2556
|
+
package_amount: string;
|
|
2557
|
+
/**
|
|
2558
|
+
* An integer amount to represent package size. For example, 1000 here would divide
|
|
2559
|
+
* usage by 1000 before multiplying by package_amount in rating
|
|
2560
|
+
*/
|
|
2561
|
+
package_size?: number | null;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
interface NewMatrixPrice {
|
|
2565
|
+
/**
|
|
2566
|
+
* The cadence to bill for this price on.
|
|
2567
|
+
*/
|
|
2568
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2569
|
+
/**
|
|
2570
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2571
|
+
*/
|
|
2572
|
+
currency: string;
|
|
2573
|
+
/**
|
|
2574
|
+
* The id of the item the plan will be associated with.
|
|
2575
|
+
*/
|
|
2576
|
+
item_id: string;
|
|
2577
|
+
matrix_config: NewMatrixPrice.MatrixConfig;
|
|
2578
|
+
model_type: 'matrix';
|
|
2579
|
+
/**
|
|
2580
|
+
* The name of the price.
|
|
2581
|
+
*/
|
|
2582
|
+
name: string;
|
|
2583
|
+
/**
|
|
2584
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2585
|
+
* usage-based.
|
|
2586
|
+
*/
|
|
2587
|
+
billable_metric_id?: string | null;
|
|
2588
|
+
/**
|
|
2589
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2590
|
+
* this is true, and in-arrears if this is false.
|
|
2591
|
+
*/
|
|
2592
|
+
billed_in_advance?: boolean | null;
|
|
2593
|
+
/**
|
|
2594
|
+
* An alias for the price.
|
|
2595
|
+
*/
|
|
2596
|
+
external_price_id?: string | null;
|
|
2597
|
+
/**
|
|
2598
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2599
|
+
* applied.
|
|
2600
|
+
*/
|
|
2601
|
+
fixed_price_quantity?: number | null;
|
|
2602
|
+
/**
|
|
2603
|
+
* The property used to group this price on an invoice
|
|
2604
|
+
*/
|
|
2605
|
+
invoice_grouping_key?: string | null;
|
|
2606
|
+
}
|
|
2607
|
+
namespace NewMatrixPrice {
|
|
2608
|
+
interface MatrixConfig {
|
|
2609
|
+
/**
|
|
2610
|
+
* Default per unit rate for any usage not bucketed into a specified matrix_value
|
|
2611
|
+
*/
|
|
2612
|
+
default_unit_amount: string;
|
|
2613
|
+
/**
|
|
2614
|
+
* One or two event property values to evaluate matrix groups by
|
|
2615
|
+
*/
|
|
2616
|
+
dimensions: Array<string | null>;
|
|
2617
|
+
/**
|
|
2618
|
+
* Matrix values for specified matrix grouping keys
|
|
2619
|
+
*/
|
|
2620
|
+
matrix_values: Array<MatrixConfig.MatrixValue>;
|
|
2621
|
+
/**
|
|
2622
|
+
* Default optional multiplier to scale rated quantities that fall into the default
|
|
2623
|
+
* bucket by
|
|
2624
|
+
*/
|
|
2625
|
+
scaling_factor?: number | null;
|
|
2626
|
+
}
|
|
2627
|
+
namespace MatrixConfig {
|
|
2628
|
+
interface MatrixValue {
|
|
2629
|
+
/**
|
|
2630
|
+
* One or two matrix keys to filter usage to this Matrix value by. For example,
|
|
2631
|
+
* ["region", "tier"] could be used to filter cloud usage by a cloud region and an
|
|
2632
|
+
* instance tier.
|
|
2633
|
+
*/
|
|
2634
|
+
dimension_values: Array<string | null>;
|
|
2635
|
+
/**
|
|
2636
|
+
* Unit price for the specified dimension_values
|
|
2637
|
+
*/
|
|
2638
|
+
unit_amount: string;
|
|
2639
|
+
/**
|
|
2640
|
+
* Optional multiplier to scale rated quantities by
|
|
2641
|
+
*/
|
|
2642
|
+
scaling_factor?: number | null;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
interface NewTieredPrice {
|
|
2647
|
+
/**
|
|
2648
|
+
* The cadence to bill for this price on.
|
|
2649
|
+
*/
|
|
2650
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2651
|
+
/**
|
|
2652
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2653
|
+
*/
|
|
2654
|
+
currency: string;
|
|
2655
|
+
/**
|
|
2656
|
+
* The id of the item the plan will be associated with.
|
|
2657
|
+
*/
|
|
2658
|
+
item_id: string;
|
|
2659
|
+
model_type: 'tiered';
|
|
2660
|
+
/**
|
|
2661
|
+
* The name of the price.
|
|
2662
|
+
*/
|
|
2663
|
+
name: string;
|
|
2664
|
+
tiered_config: NewTieredPrice.TieredConfig;
|
|
2665
|
+
/**
|
|
2666
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2667
|
+
* usage-based.
|
|
2668
|
+
*/
|
|
2669
|
+
billable_metric_id?: string | null;
|
|
2670
|
+
/**
|
|
2671
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2672
|
+
* this is true, and in-arrears if this is false.
|
|
2673
|
+
*/
|
|
2674
|
+
billed_in_advance?: boolean | null;
|
|
2675
|
+
/**
|
|
2676
|
+
* An alias for the price.
|
|
2677
|
+
*/
|
|
2678
|
+
external_price_id?: string | null;
|
|
2679
|
+
/**
|
|
2680
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2681
|
+
* applied.
|
|
2682
|
+
*/
|
|
2683
|
+
fixed_price_quantity?: number | null;
|
|
2684
|
+
/**
|
|
2685
|
+
* The property used to group this price on an invoice
|
|
2686
|
+
*/
|
|
2687
|
+
invoice_grouping_key?: string | null;
|
|
2688
|
+
}
|
|
2689
|
+
namespace NewTieredPrice {
|
|
2690
|
+
interface TieredConfig {
|
|
2691
|
+
/**
|
|
2692
|
+
* Tiers for rating based on total usage quantities into the specified tier
|
|
2693
|
+
*/
|
|
2694
|
+
tiers: Array<TieredConfig.Tier>;
|
|
2695
|
+
}
|
|
2696
|
+
namespace TieredConfig {
|
|
2697
|
+
interface Tier {
|
|
2698
|
+
/**
|
|
2699
|
+
* Inclusive tier starting value
|
|
2700
|
+
*/
|
|
2701
|
+
first_unit: number;
|
|
2702
|
+
/**
|
|
2703
|
+
* Amount per unit
|
|
2704
|
+
*/
|
|
2705
|
+
unit_amount: string;
|
|
2706
|
+
/**
|
|
2707
|
+
* Exclusive tier ending value. If null, this is treated as the last tier
|
|
2708
|
+
*/
|
|
2709
|
+
last_unit?: number | null;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
interface NewTieredBpsPrice {
|
|
2714
|
+
/**
|
|
2715
|
+
* The cadence to bill for this price on.
|
|
2716
|
+
*/
|
|
2717
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2718
|
+
/**
|
|
2719
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2720
|
+
*/
|
|
2721
|
+
currency: string;
|
|
2722
|
+
/**
|
|
2723
|
+
* The id of the item the plan will be associated with.
|
|
2724
|
+
*/
|
|
2725
|
+
item_id: string;
|
|
2726
|
+
model_type: 'tiered_bps';
|
|
2727
|
+
/**
|
|
2728
|
+
* The name of the price.
|
|
2729
|
+
*/
|
|
2730
|
+
name: string;
|
|
2731
|
+
tiered_bps_config: NewTieredBpsPrice.TieredBpsConfig;
|
|
2732
|
+
/**
|
|
2733
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2734
|
+
* usage-based.
|
|
2735
|
+
*/
|
|
2736
|
+
billable_metric_id?: string | null;
|
|
2737
|
+
/**
|
|
2738
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2739
|
+
* this is true, and in-arrears if this is false.
|
|
2740
|
+
*/
|
|
2741
|
+
billed_in_advance?: boolean | null;
|
|
2742
|
+
/**
|
|
2743
|
+
* An alias for the price.
|
|
2744
|
+
*/
|
|
2745
|
+
external_price_id?: string | null;
|
|
2746
|
+
/**
|
|
2747
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2748
|
+
* applied.
|
|
2749
|
+
*/
|
|
2750
|
+
fixed_price_quantity?: number | null;
|
|
2751
|
+
/**
|
|
2752
|
+
* The property used to group this price on an invoice
|
|
2753
|
+
*/
|
|
2754
|
+
invoice_grouping_key?: string | null;
|
|
2755
|
+
}
|
|
2756
|
+
namespace NewTieredBpsPrice {
|
|
2757
|
+
interface TieredBpsConfig {
|
|
2758
|
+
/**
|
|
2759
|
+
* Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
|
|
2760
|
+
* tiers
|
|
2761
|
+
*/
|
|
2762
|
+
tiers: Array<TieredBpsConfig.Tier>;
|
|
2763
|
+
}
|
|
2764
|
+
namespace TieredBpsConfig {
|
|
2765
|
+
interface Tier {
|
|
2766
|
+
/**
|
|
2767
|
+
* Per-event basis point rate
|
|
2768
|
+
*/
|
|
2769
|
+
bps: number;
|
|
2770
|
+
/**
|
|
2771
|
+
* Inclusive tier starting value
|
|
2772
|
+
*/
|
|
2773
|
+
minimum_amount: string;
|
|
2774
|
+
/**
|
|
2775
|
+
* Exclusive tier ending value
|
|
2776
|
+
*/
|
|
2777
|
+
maximum_amount?: string | null;
|
|
2778
|
+
/**
|
|
2779
|
+
* Per unit maximum to charge
|
|
2780
|
+
*/
|
|
2781
|
+
per_unit_maximum?: string | null;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
interface NewBpsPrice {
|
|
2786
|
+
bps_config: NewBpsPrice.BpsConfig;
|
|
2787
|
+
/**
|
|
2788
|
+
* The cadence to bill for this price on.
|
|
2789
|
+
*/
|
|
2790
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2791
|
+
/**
|
|
2792
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2793
|
+
*/
|
|
2794
|
+
currency: string;
|
|
2795
|
+
/**
|
|
2796
|
+
* The id of the item the plan will be associated with.
|
|
2797
|
+
*/
|
|
2798
|
+
item_id: string;
|
|
2799
|
+
model_type: 'bps';
|
|
2800
|
+
/**
|
|
2801
|
+
* The name of the price.
|
|
2802
|
+
*/
|
|
2803
|
+
name: string;
|
|
2804
|
+
/**
|
|
2805
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2806
|
+
* usage-based.
|
|
2807
|
+
*/
|
|
2808
|
+
billable_metric_id?: string | null;
|
|
2809
|
+
/**
|
|
2810
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2811
|
+
* this is true, and in-arrears if this is false.
|
|
2812
|
+
*/
|
|
2813
|
+
billed_in_advance?: boolean | null;
|
|
2814
|
+
/**
|
|
2815
|
+
* An alias for the price.
|
|
2816
|
+
*/
|
|
2817
|
+
external_price_id?: string | null;
|
|
2818
|
+
/**
|
|
2819
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2820
|
+
* applied.
|
|
2821
|
+
*/
|
|
2822
|
+
fixed_price_quantity?: number | null;
|
|
2823
|
+
/**
|
|
2824
|
+
* The property used to group this price on an invoice
|
|
2825
|
+
*/
|
|
2826
|
+
invoice_grouping_key?: string | null;
|
|
2827
|
+
}
|
|
2828
|
+
namespace NewBpsPrice {
|
|
2829
|
+
interface BpsConfig {
|
|
2830
|
+
/**
|
|
2831
|
+
* Basis point take rate per event
|
|
2832
|
+
*/
|
|
2833
|
+
bps: number;
|
|
2834
|
+
/**
|
|
2835
|
+
* Optional currency amount maximum to cap spend per event
|
|
2836
|
+
*/
|
|
2837
|
+
per_unit_maximum?: string | null;
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
interface NewBulkBpsPrice {
|
|
2841
|
+
bulk_bps_config: NewBulkBpsPrice.BulkBpsConfig;
|
|
2842
|
+
/**
|
|
2843
|
+
* The cadence to bill for this price on.
|
|
2844
|
+
*/
|
|
2845
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2846
|
+
/**
|
|
2847
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2848
|
+
*/
|
|
2849
|
+
currency: string;
|
|
2850
|
+
/**
|
|
2851
|
+
* The id of the item the plan will be associated with.
|
|
2852
|
+
*/
|
|
2853
|
+
item_id: string;
|
|
2854
|
+
model_type: 'bulk_bps';
|
|
2855
|
+
/**
|
|
2856
|
+
* The name of the price.
|
|
2857
|
+
*/
|
|
2858
|
+
name: string;
|
|
2859
|
+
/**
|
|
2860
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2861
|
+
* usage-based.
|
|
2862
|
+
*/
|
|
2863
|
+
billable_metric_id?: string | null;
|
|
2864
|
+
/**
|
|
2865
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2866
|
+
* this is true, and in-arrears if this is false.
|
|
2867
|
+
*/
|
|
2868
|
+
billed_in_advance?: boolean | null;
|
|
2869
|
+
/**
|
|
2870
|
+
* An alias for the price.
|
|
2871
|
+
*/
|
|
2872
|
+
external_price_id?: string | null;
|
|
2873
|
+
/**
|
|
2874
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2875
|
+
* applied.
|
|
2876
|
+
*/
|
|
2877
|
+
fixed_price_quantity?: number | null;
|
|
2878
|
+
/**
|
|
2879
|
+
* The property used to group this price on an invoice
|
|
2880
|
+
*/
|
|
2881
|
+
invoice_grouping_key?: string | null;
|
|
2882
|
+
}
|
|
2883
|
+
namespace NewBulkBpsPrice {
|
|
2884
|
+
interface BulkBpsConfig {
|
|
2885
|
+
/**
|
|
2886
|
+
* Tiers for a bulk BPS pricing model where all usage is aggregated to a single
|
|
2887
|
+
* tier based on total volume
|
|
2888
|
+
*/
|
|
2889
|
+
tiers: Array<BulkBpsConfig.Tier>;
|
|
2890
|
+
}
|
|
2891
|
+
namespace BulkBpsConfig {
|
|
2892
|
+
interface Tier {
|
|
2893
|
+
/**
|
|
2894
|
+
* Basis points to rate on
|
|
2895
|
+
*/
|
|
2896
|
+
bps: number;
|
|
2897
|
+
/**
|
|
2898
|
+
* Upper bound for tier
|
|
2899
|
+
*/
|
|
2900
|
+
maximum_amount?: string | null;
|
|
2901
|
+
/**
|
|
2902
|
+
* The maximum amount to charge for any one event
|
|
2903
|
+
*/
|
|
2904
|
+
per_unit_maximum?: string | null;
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
interface NewBulkPrice {
|
|
2909
|
+
bulk_config: NewBulkPrice.BulkConfig;
|
|
2910
|
+
/**
|
|
2911
|
+
* The cadence to bill for this price on.
|
|
2912
|
+
*/
|
|
2913
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2914
|
+
/**
|
|
2915
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2916
|
+
*/
|
|
2917
|
+
currency: string;
|
|
2918
|
+
/**
|
|
2919
|
+
* The id of the item the plan will be associated with.
|
|
2920
|
+
*/
|
|
2921
|
+
item_id: string;
|
|
2922
|
+
model_type: 'bulk';
|
|
2923
|
+
/**
|
|
2924
|
+
* The name of the price.
|
|
2925
|
+
*/
|
|
2926
|
+
name: string;
|
|
2927
|
+
/**
|
|
2928
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2929
|
+
* usage-based.
|
|
2930
|
+
*/
|
|
2931
|
+
billable_metric_id?: string | null;
|
|
2932
|
+
/**
|
|
2933
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2934
|
+
* this is true, and in-arrears if this is false.
|
|
2935
|
+
*/
|
|
2936
|
+
billed_in_advance?: boolean | null;
|
|
2937
|
+
/**
|
|
2938
|
+
* An alias for the price.
|
|
2939
|
+
*/
|
|
2940
|
+
external_price_id?: string | null;
|
|
2941
|
+
/**
|
|
2942
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2943
|
+
* applied.
|
|
2944
|
+
*/
|
|
2945
|
+
fixed_price_quantity?: number | null;
|
|
2946
|
+
/**
|
|
2947
|
+
* The property used to group this price on an invoice
|
|
2948
|
+
*/
|
|
2949
|
+
invoice_grouping_key?: string | null;
|
|
2950
|
+
}
|
|
2951
|
+
namespace NewBulkPrice {
|
|
2952
|
+
interface BulkConfig {
|
|
2953
|
+
/**
|
|
2954
|
+
* Bulk tiers for rating based on total usage volume
|
|
2955
|
+
*/
|
|
2956
|
+
tiers: Array<BulkConfig.Tier>;
|
|
2957
|
+
}
|
|
2958
|
+
namespace BulkConfig {
|
|
2959
|
+
interface Tier {
|
|
2960
|
+
/**
|
|
2961
|
+
* Amount per unit
|
|
2962
|
+
*/
|
|
2963
|
+
unit_amount: string;
|
|
2964
|
+
/**
|
|
2965
|
+
* Upper bound for this tier
|
|
2966
|
+
*/
|
|
2967
|
+
maximum_units?: number | null;
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
interface NewThresholdTotalAmountPrice {
|
|
2972
|
+
/**
|
|
2973
|
+
* The cadence to bill for this price on.
|
|
2974
|
+
*/
|
|
2975
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
2976
|
+
/**
|
|
2977
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
2978
|
+
*/
|
|
2979
|
+
currency: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* The id of the item the plan will be associated with.
|
|
2982
|
+
*/
|
|
2983
|
+
item_id: string;
|
|
2984
|
+
model_type: 'threshold_total_amount';
|
|
2985
|
+
/**
|
|
2986
|
+
* The name of the price.
|
|
2987
|
+
*/
|
|
2988
|
+
name: string;
|
|
2989
|
+
threshold_total_amount_config: Record<string, unknown>;
|
|
2990
|
+
/**
|
|
2991
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2992
|
+
* usage-based.
|
|
2993
|
+
*/
|
|
2994
|
+
billable_metric_id?: string | null;
|
|
2995
|
+
/**
|
|
2996
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2997
|
+
* this is true, and in-arrears if this is false.
|
|
2998
|
+
*/
|
|
2999
|
+
billed_in_advance?: boolean | null;
|
|
3000
|
+
/**
|
|
3001
|
+
* An alias for the price.
|
|
3002
|
+
*/
|
|
3003
|
+
external_price_id?: string | null;
|
|
3004
|
+
/**
|
|
3005
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3006
|
+
* applied.
|
|
3007
|
+
*/
|
|
3008
|
+
fixed_price_quantity?: number | null;
|
|
3009
|
+
/**
|
|
3010
|
+
* The property used to group this price on an invoice
|
|
3011
|
+
*/
|
|
3012
|
+
invoice_grouping_key?: string | null;
|
|
3013
|
+
}
|
|
3014
|
+
interface NewTieredPackagePrice {
|
|
3015
|
+
/**
|
|
3016
|
+
* The cadence to bill for this price on.
|
|
3017
|
+
*/
|
|
3018
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
3019
|
+
/**
|
|
3020
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
3021
|
+
*/
|
|
3022
|
+
currency: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* The id of the item the plan will be associated with.
|
|
3025
|
+
*/
|
|
3026
|
+
item_id: string;
|
|
3027
|
+
model_type: 'tiered_package';
|
|
3028
|
+
/**
|
|
3029
|
+
* The name of the price.
|
|
3030
|
+
*/
|
|
3031
|
+
name: string;
|
|
3032
|
+
tiered_package_config: Record<string, unknown>;
|
|
3033
|
+
/**
|
|
3034
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3035
|
+
* usage-based.
|
|
3036
|
+
*/
|
|
3037
|
+
billable_metric_id?: string | null;
|
|
3038
|
+
/**
|
|
3039
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3040
|
+
* this is true, and in-arrears if this is false.
|
|
3041
|
+
*/
|
|
3042
|
+
billed_in_advance?: boolean | null;
|
|
3043
|
+
/**
|
|
3044
|
+
* An alias for the price.
|
|
3045
|
+
*/
|
|
3046
|
+
external_price_id?: string | null;
|
|
3047
|
+
/**
|
|
3048
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3049
|
+
* applied.
|
|
3050
|
+
*/
|
|
3051
|
+
fixed_price_quantity?: number | null;
|
|
3052
|
+
/**
|
|
3053
|
+
* The property used to group this price on an invoice
|
|
3054
|
+
*/
|
|
3055
|
+
invoice_grouping_key?: string | null;
|
|
3056
|
+
}
|
|
3057
|
+
interface NewTieredWithMinimumPrice {
|
|
3058
|
+
/**
|
|
3059
|
+
* The cadence to bill for this price on.
|
|
3060
|
+
*/
|
|
3061
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
3062
|
+
/**
|
|
3063
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
3064
|
+
*/
|
|
3065
|
+
currency: string;
|
|
3066
|
+
/**
|
|
3067
|
+
* The id of the item the plan will be associated with.
|
|
3068
|
+
*/
|
|
3069
|
+
item_id: string;
|
|
3070
|
+
model_type: 'tiered_with_minimum';
|
|
3071
|
+
/**
|
|
3072
|
+
* The name of the price.
|
|
3073
|
+
*/
|
|
3074
|
+
name: string;
|
|
3075
|
+
tiered_with_minimum_config: Record<string, unknown>;
|
|
3076
|
+
/**
|
|
3077
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3078
|
+
* usage-based.
|
|
3079
|
+
*/
|
|
3080
|
+
billable_metric_id?: string | null;
|
|
3081
|
+
/**
|
|
3082
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3083
|
+
* this is true, and in-arrears if this is false.
|
|
3084
|
+
*/
|
|
3085
|
+
billed_in_advance?: boolean | null;
|
|
3086
|
+
/**
|
|
3087
|
+
* An alias for the price.
|
|
3088
|
+
*/
|
|
3089
|
+
external_price_id?: string | null;
|
|
3090
|
+
/**
|
|
3091
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3092
|
+
* applied.
|
|
3093
|
+
*/
|
|
3094
|
+
fixed_price_quantity?: number | null;
|
|
3095
|
+
/**
|
|
3096
|
+
* The property used to group this price on an invoice
|
|
3097
|
+
*/
|
|
3098
|
+
invoice_grouping_key?: string | null;
|
|
3099
|
+
}
|
|
3100
|
+
interface NewPackageWithAllocationPrice {
|
|
3101
|
+
/**
|
|
3102
|
+
* The cadence to bill for this price on.
|
|
3103
|
+
*/
|
|
3104
|
+
cadence: 'annual' | 'monthly' | 'quarterly';
|
|
3105
|
+
/**
|
|
3106
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
3107
|
+
*/
|
|
3108
|
+
currency: string;
|
|
3109
|
+
/**
|
|
3110
|
+
* The id of the item the plan will be associated with.
|
|
3111
|
+
*/
|
|
3112
|
+
item_id: string;
|
|
3113
|
+
model_type: 'package_with_allocation';
|
|
3114
|
+
/**
|
|
3115
|
+
* The name of the price.
|
|
3116
|
+
*/
|
|
3117
|
+
name: string;
|
|
3118
|
+
package_with_allocation_config: Record<string, unknown>;
|
|
3119
|
+
/**
|
|
3120
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
3121
|
+
* usage-based.
|
|
3122
|
+
*/
|
|
3123
|
+
billable_metric_id?: string | null;
|
|
3124
|
+
/**
|
|
3125
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
3126
|
+
* this is true, and in-arrears if this is false.
|
|
3127
|
+
*/
|
|
3128
|
+
billed_in_advance?: boolean | null;
|
|
3129
|
+
/**
|
|
3130
|
+
* An alias for the price.
|
|
3131
|
+
*/
|
|
3132
|
+
external_price_id?: string | null;
|
|
3133
|
+
/**
|
|
3134
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
3135
|
+
* applied.
|
|
3136
|
+
*/
|
|
3137
|
+
fixed_price_quantity?: number | null;
|
|
3138
|
+
/**
|
|
3139
|
+
* The property used to group this price on an invoice
|
|
3140
|
+
*/
|
|
3141
|
+
invoice_grouping_key?: string | null;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
interface Edit {
|
|
3145
|
+
/**
|
|
3146
|
+
* The id of the price interval to edit.
|
|
3147
|
+
*/
|
|
3148
|
+
price_interval_id: string;
|
|
3149
|
+
/**
|
|
3150
|
+
* The updated end date of this price interval. If not specified, the start date
|
|
3151
|
+
* will not be updated.
|
|
3152
|
+
*/
|
|
3153
|
+
end_date?: (string & {}) | 'start_of_term' | 'end_of_term' | null;
|
|
3154
|
+
/**
|
|
3155
|
+
* A list of fixed fee quantity transitions to use for this price interval. Note
|
|
3156
|
+
* that this list will overwrite all existing fixed fee quantity transitions on the
|
|
3157
|
+
* price interval.
|
|
3158
|
+
*/
|
|
3159
|
+
fixed_fee_quantity_transitions?: Array<Edit.FixedFeeQuantityTransition> | null;
|
|
3160
|
+
/**
|
|
3161
|
+
* The updated start date of this price interval. If not specified, the start date
|
|
3162
|
+
* will not be updated.
|
|
3163
|
+
*/
|
|
3164
|
+
start_date?: (string & {}) | 'start_of_term' | 'end_of_term' | null;
|
|
3165
|
+
}
|
|
3166
|
+
namespace Edit {
|
|
3167
|
+
interface FixedFeeQuantityTransition {
|
|
3168
|
+
/**
|
|
3169
|
+
* The date that the fixed fee quantity transition should take effect.
|
|
3170
|
+
*/
|
|
3171
|
+
effective_date: string;
|
|
3172
|
+
/**
|
|
3173
|
+
* The quantity of the fixed fee quantity transition.
|
|
3174
|
+
*/
|
|
3175
|
+
quantity: number;
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
export interface SubscriptionSchedulePlanChangeParams {
|
|
3180
|
+
change_option: 'requested_date' | 'end_of_subscription_term' | 'immediate';
|
|
3181
|
+
/**
|
|
3182
|
+
* [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be
|
|
3183
|
+
* aligned with the plan change’s effective date.
|
|
3184
|
+
*/
|
|
3185
|
+
align_billing_with_plan_change_date?: boolean | null;
|
|
3186
|
+
/**
|
|
3187
|
+
* Reset billing periods to be aligned with the plan change’s effective date or
|
|
3188
|
+
* start of the month. Defaults to `unchanged` which keeps subscription's existing
|
|
3189
|
+
* billing cycle alignment.
|
|
3190
|
+
*/
|
|
3191
|
+
billing_cycle_alignment?: 'unchanged' | 'plan_change_date' | 'start_of_month' | null;
|
|
3192
|
+
/**
|
|
3193
|
+
* The date that the plan change should take effect. This parameter can only be
|
|
3194
|
+
* passed if the `change_option` is `requested_date`.
|
|
3195
|
+
*/
|
|
3196
|
+
change_date?: string | null;
|
|
3197
|
+
/**
|
|
3198
|
+
* Redemption code to be used for this subscription. If the coupon cannot be found
|
|
3199
|
+
* by its redemption code, or cannot be redeemed, an error response will be
|
|
3200
|
+
* returned and the plan change will not be scheduled.
|
|
3201
|
+
*/
|
|
3202
|
+
coupon_redemption_code?: string | null;
|
|
3203
|
+
credits_overage_rate?: number | null;
|
|
3204
|
+
/**
|
|
3205
|
+
* The external_plan_id of the plan that the given subscription should be switched
|
|
3206
|
+
* to. Note that either this property or `plan_id` must be specified.
|
|
3207
|
+
*/
|
|
3208
|
+
external_plan_id?: string | null;
|
|
3209
|
+
/**
|
|
3210
|
+
* The phase of the plan to start with
|
|
3211
|
+
*/
|
|
3212
|
+
initial_phase_order?: number | null;
|
|
3213
|
+
/**
|
|
3214
|
+
* When this subscription's accrued usage reaches this threshold, an invoice will
|
|
3215
|
+
* be issued for the subscription. If not specified, invoices will only be issued
|
|
3216
|
+
* at the end of the billing period.
|
|
3217
|
+
*/
|
|
3218
|
+
invoicing_threshold?: string | null;
|
|
3219
|
+
per_credit_overage_amount?: string | null;
|
|
3220
|
+
/**
|
|
3221
|
+
* The plan that the given subscription should be switched to. Note that either
|
|
3222
|
+
* this property or `external_plan_id` must be specified.
|
|
3223
|
+
*/
|
|
3224
|
+
plan_id?: string | null;
|
|
3225
|
+
/**
|
|
3226
|
+
* Optionally provide a list of overrides for prices on the plan
|
|
3227
|
+
*/
|
|
3228
|
+
price_overrides?: Array<SubscriptionSchedulePlanChangeParams.OverrideUnitPrice | SubscriptionSchedulePlanChangeParams.OverridePackagePrice | SubscriptionSchedulePlanChangeParams.OverrideMatrixPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkPrice | SubscriptionSchedulePlanChangeParams.OverrideTestRatingFunctionPrice | SubscriptionSchedulePlanChangeParams.OverrideFivetranExamplePrice | SubscriptionSchedulePlanChangeParams.OverrideThresholdTotalAmountPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPackagePrice | SubscriptionSchedulePlanChangeParams.OverrideTieredWithMinimumPrice | SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice> | null;
|
|
3229
|
+
}
|
|
3230
|
+
export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
3231
|
+
interface OverrideUnitPrice {
|
|
3232
|
+
id: string;
|
|
3233
|
+
model_type: 'unit';
|
|
3234
|
+
unit_config: OverrideUnitPrice.UnitConfig;
|
|
3235
|
+
/**
|
|
3236
|
+
* The subscription's override discount for the plan.
|
|
3237
|
+
*/
|
|
3238
|
+
discount?: PricesAPI.Discount | null;
|
|
3239
|
+
/**
|
|
3240
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3241
|
+
*/
|
|
3242
|
+
fixed_price_quantity?: number | null;
|
|
3243
|
+
/**
|
|
3244
|
+
* The subscription's override maximum amount for the plan.
|
|
3245
|
+
*/
|
|
3246
|
+
maximum_amount?: string | null;
|
|
3247
|
+
/**
|
|
3248
|
+
* The subscription's override minimum amount for the plan.
|
|
3249
|
+
*/
|
|
3250
|
+
minimum_amount?: string | null;
|
|
3251
|
+
}
|
|
3252
|
+
namespace OverrideUnitPrice {
|
|
3253
|
+
interface UnitConfig {
|
|
3254
|
+
/**
|
|
3255
|
+
* Rate per unit of usage
|
|
3256
|
+
*/
|
|
3257
|
+
unit_amount: string;
|
|
3258
|
+
/**
|
|
3259
|
+
* Multiplier to scale rated quantity by
|
|
3260
|
+
*/
|
|
3261
|
+
scaling_factor?: number | null;
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
interface OverridePackagePrice {
|
|
3265
|
+
id: string;
|
|
3266
|
+
model_type: 'package';
|
|
3267
|
+
package_config: OverridePackagePrice.PackageConfig;
|
|
3268
|
+
/**
|
|
3269
|
+
* The subscription's override discount for the plan.
|
|
3270
|
+
*/
|
|
3271
|
+
discount?: PricesAPI.Discount | null;
|
|
3272
|
+
/**
|
|
3273
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3274
|
+
*/
|
|
3275
|
+
fixed_price_quantity?: number | null;
|
|
3276
|
+
/**
|
|
3277
|
+
* The subscription's override maximum amount for the plan.
|
|
3278
|
+
*/
|
|
3279
|
+
maximum_amount?: string | null;
|
|
3280
|
+
/**
|
|
3281
|
+
* The subscription's override minimum amount for the plan.
|
|
3282
|
+
*/
|
|
3283
|
+
minimum_amount?: string | null;
|
|
3284
|
+
}
|
|
3285
|
+
namespace OverridePackagePrice {
|
|
3286
|
+
interface PackageConfig {
|
|
3287
|
+
/**
|
|
3288
|
+
* A currency amount to rate usage by
|
|
3289
|
+
*/
|
|
3290
|
+
package_amount: string;
|
|
3291
|
+
/**
|
|
3292
|
+
* An integer amount to represent package size. For example, 1000 here would divide
|
|
3293
|
+
* usage by 1000 before multiplying by package_amount in rating
|
|
3294
|
+
*/
|
|
3295
|
+
package_size?: number | null;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
interface OverrideMatrixPrice {
|
|
3299
|
+
id: string;
|
|
3300
|
+
matrix_config: OverrideMatrixPrice.MatrixConfig;
|
|
3301
|
+
model_type: 'matrix';
|
|
3302
|
+
/**
|
|
3303
|
+
* The subscription's override discount for the plan.
|
|
3304
|
+
*/
|
|
3305
|
+
discount?: PricesAPI.Discount | null;
|
|
3306
|
+
/**
|
|
3307
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3308
|
+
*/
|
|
3309
|
+
fixed_price_quantity?: number | null;
|
|
3310
|
+
/**
|
|
3311
|
+
* The subscription's override maximum amount for the plan.
|
|
3312
|
+
*/
|
|
3313
|
+
maximum_amount?: string | null;
|
|
3314
|
+
/**
|
|
3315
|
+
* The subscription's override minimum amount for the plan.
|
|
3316
|
+
*/
|
|
3317
|
+
minimum_amount?: string | null;
|
|
3318
|
+
}
|
|
3319
|
+
namespace OverrideMatrixPrice {
|
|
3320
|
+
interface MatrixConfig {
|
|
3321
|
+
/**
|
|
3322
|
+
* Default per unit rate for any usage not bucketed into a specified matrix_value
|
|
3323
|
+
*/
|
|
3324
|
+
default_unit_amount: string;
|
|
3325
|
+
/**
|
|
3326
|
+
* One or two event property values to evaluate matrix groups by
|
|
3327
|
+
*/
|
|
3328
|
+
dimensions: Array<string | null>;
|
|
3329
|
+
/**
|
|
3330
|
+
* Matrix values for specified matrix grouping keys
|
|
3331
|
+
*/
|
|
3332
|
+
matrix_values: Array<MatrixConfig.MatrixValue>;
|
|
3333
|
+
/**
|
|
3334
|
+
* Default optional multiplier to scale rated quantities that fall into the default
|
|
3335
|
+
* bucket by
|
|
3336
|
+
*/
|
|
3337
|
+
scaling_factor?: number | null;
|
|
3338
|
+
}
|
|
3339
|
+
namespace MatrixConfig {
|
|
3340
|
+
interface MatrixValue {
|
|
3341
|
+
/**
|
|
3342
|
+
* One or two matrix keys to filter usage to this Matrix value by. For example,
|
|
3343
|
+
* ["region", "tier"] could be used to filter cloud usage by a cloud region and an
|
|
3344
|
+
* instance tier.
|
|
3345
|
+
*/
|
|
3346
|
+
dimension_values: Array<string | null>;
|
|
3347
|
+
/**
|
|
3348
|
+
* Unit price for the specified dimension_values
|
|
3349
|
+
*/
|
|
3350
|
+
unit_amount: string;
|
|
3351
|
+
/**
|
|
3352
|
+
* Optional multiplier to scale rated quantities by
|
|
3353
|
+
*/
|
|
3354
|
+
scaling_factor?: number | null;
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
interface OverrideTieredPrice {
|
|
3359
|
+
id: string;
|
|
3360
|
+
model_type: 'tiered';
|
|
3361
|
+
tiered_config: OverrideTieredPrice.TieredConfig;
|
|
3362
|
+
/**
|
|
3363
|
+
* The subscription's override discount for the plan.
|
|
3364
|
+
*/
|
|
3365
|
+
discount?: PricesAPI.Discount | null;
|
|
3366
|
+
/**
|
|
3367
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3368
|
+
*/
|
|
3369
|
+
fixed_price_quantity?: number | null;
|
|
3370
|
+
/**
|
|
3371
|
+
* The subscription's override maximum amount for the plan.
|
|
3372
|
+
*/
|
|
3373
|
+
maximum_amount?: string | null;
|
|
3374
|
+
/**
|
|
3375
|
+
* The subscription's override minimum amount for the plan.
|
|
3376
|
+
*/
|
|
3377
|
+
minimum_amount?: string | null;
|
|
3378
|
+
}
|
|
3379
|
+
namespace OverrideTieredPrice {
|
|
3380
|
+
interface TieredConfig {
|
|
3381
|
+
/**
|
|
3382
|
+
* Tiers for rating based on total usage quantities into the specified tier
|
|
3383
|
+
*/
|
|
3384
|
+
tiers: Array<TieredConfig.Tier>;
|
|
3385
|
+
}
|
|
3386
|
+
namespace TieredConfig {
|
|
3387
|
+
interface Tier {
|
|
3388
|
+
/**
|
|
3389
|
+
* Inclusive tier starting value
|
|
3390
|
+
*/
|
|
3391
|
+
first_unit: number;
|
|
3392
|
+
/**
|
|
3393
|
+
* Amount per unit
|
|
3394
|
+
*/
|
|
3395
|
+
unit_amount: string;
|
|
3396
|
+
/**
|
|
3397
|
+
* Exclusive tier ending value. If null, this is treated as the last tier
|
|
3398
|
+
*/
|
|
3399
|
+
last_unit?: number | null;
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
interface OverrideTieredBpsPrice {
|
|
3404
|
+
id: string;
|
|
3405
|
+
model_type: 'tiered_bps';
|
|
3406
|
+
tiered_bps_config: OverrideTieredBpsPrice.TieredBpsConfig;
|
|
3407
|
+
/**
|
|
3408
|
+
* The subscription's override discount for the plan.
|
|
3409
|
+
*/
|
|
3410
|
+
discount?: PricesAPI.Discount | null;
|
|
3411
|
+
/**
|
|
3412
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3413
|
+
*/
|
|
3414
|
+
fixed_price_quantity?: number | null;
|
|
3415
|
+
/**
|
|
3416
|
+
* The subscription's override maximum amount for the plan.
|
|
3417
|
+
*/
|
|
3418
|
+
maximum_amount?: string | null;
|
|
3419
|
+
/**
|
|
3420
|
+
* The subscription's override minimum amount for the plan.
|
|
3421
|
+
*/
|
|
3422
|
+
minimum_amount?: string | null;
|
|
3423
|
+
}
|
|
3424
|
+
namespace OverrideTieredBpsPrice {
|
|
3425
|
+
interface TieredBpsConfig {
|
|
3426
|
+
/**
|
|
3427
|
+
* Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
|
|
3428
|
+
* tiers
|
|
3429
|
+
*/
|
|
3430
|
+
tiers: Array<TieredBpsConfig.Tier>;
|
|
3431
|
+
}
|
|
3432
|
+
namespace TieredBpsConfig {
|
|
3433
|
+
interface Tier {
|
|
3434
|
+
/**
|
|
3435
|
+
* Per-event basis point rate
|
|
3436
|
+
*/
|
|
3437
|
+
bps: number;
|
|
3438
|
+
/**
|
|
3439
|
+
* Inclusive tier starting value
|
|
3440
|
+
*/
|
|
3441
|
+
minimum_amount: string;
|
|
3442
|
+
/**
|
|
3443
|
+
* Exclusive tier ending value
|
|
3444
|
+
*/
|
|
3445
|
+
maximum_amount?: string | null;
|
|
3446
|
+
/**
|
|
3447
|
+
* Per unit maximum to charge
|
|
3448
|
+
*/
|
|
3449
|
+
per_unit_maximum?: string | null;
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
interface OverrideBpsPrice {
|
|
3454
|
+
id: string;
|
|
3455
|
+
bps_config: OverrideBpsPrice.BpsConfig;
|
|
3456
|
+
model_type: 'bps';
|
|
3457
|
+
/**
|
|
3458
|
+
* The subscription's override discount for the plan.
|
|
3459
|
+
*/
|
|
3460
|
+
discount?: PricesAPI.Discount | null;
|
|
3461
|
+
/**
|
|
3462
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3463
|
+
*/
|
|
3464
|
+
fixed_price_quantity?: number | null;
|
|
3465
|
+
/**
|
|
3466
|
+
* The subscription's override maximum amount for the plan.
|
|
3467
|
+
*/
|
|
3468
|
+
maximum_amount?: string | null;
|
|
3469
|
+
/**
|
|
3470
|
+
* The subscription's override minimum amount for the plan.
|
|
3471
|
+
*/
|
|
3472
|
+
minimum_amount?: string | null;
|
|
3473
|
+
}
|
|
3474
|
+
namespace OverrideBpsPrice {
|
|
3475
|
+
interface BpsConfig {
|
|
3476
|
+
/**
|
|
3477
|
+
* Basis point take rate per event
|
|
3478
|
+
*/
|
|
3479
|
+
bps: number;
|
|
3480
|
+
/**
|
|
3481
|
+
* Optional currency amount maximum to cap spend per event
|
|
3482
|
+
*/
|
|
3483
|
+
per_unit_maximum?: string | null;
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
interface OverrideBulkBpsPrice {
|
|
3487
|
+
id: string;
|
|
3488
|
+
bulk_bps_config: OverrideBulkBpsPrice.BulkBpsConfig;
|
|
3489
|
+
model_type: 'bulk_bps';
|
|
3490
|
+
/**
|
|
3491
|
+
* The subscription's override discount for the plan.
|
|
3492
|
+
*/
|
|
3493
|
+
discount?: PricesAPI.Discount | null;
|
|
3494
|
+
/**
|
|
3495
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3496
|
+
*/
|
|
3497
|
+
fixed_price_quantity?: number | null;
|
|
3498
|
+
/**
|
|
3499
|
+
* The subscription's override maximum amount for the plan.
|
|
3500
|
+
*/
|
|
3501
|
+
maximum_amount?: string | null;
|
|
3502
|
+
/**
|
|
3503
|
+
* The subscription's override minimum amount for the plan.
|
|
3504
|
+
*/
|
|
3505
|
+
minimum_amount?: string | null;
|
|
3506
|
+
}
|
|
3507
|
+
namespace OverrideBulkBpsPrice {
|
|
3508
|
+
interface BulkBpsConfig {
|
|
3509
|
+
/**
|
|
3510
|
+
* Tiers for a bulk BPS pricing model where all usage is aggregated to a single
|
|
3511
|
+
* tier based on total volume
|
|
3512
|
+
*/
|
|
3513
|
+
tiers: Array<BulkBpsConfig.Tier>;
|
|
3514
|
+
}
|
|
3515
|
+
namespace BulkBpsConfig {
|
|
3516
|
+
interface Tier {
|
|
3517
|
+
/**
|
|
3518
|
+
* Basis points to rate on
|
|
3519
|
+
*/
|
|
3520
|
+
bps: number;
|
|
3521
|
+
/**
|
|
3522
|
+
* Upper bound for tier
|
|
3523
|
+
*/
|
|
3524
|
+
maximum_amount?: string | null;
|
|
3525
|
+
/**
|
|
3526
|
+
* The maximum amount to charge for any one event
|
|
3527
|
+
*/
|
|
3528
|
+
per_unit_maximum?: string | null;
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
interface OverrideBulkPrice {
|
|
3533
|
+
id: string;
|
|
3534
|
+
bulk_config: OverrideBulkPrice.BulkConfig;
|
|
3535
|
+
model_type: 'bulk';
|
|
3536
|
+
/**
|
|
3537
|
+
* The subscription's override discount for the plan.
|
|
3538
|
+
*/
|
|
3539
|
+
discount?: PricesAPI.Discount | null;
|
|
3540
|
+
/**
|
|
3541
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3542
|
+
*/
|
|
3543
|
+
fixed_price_quantity?: number | null;
|
|
3544
|
+
/**
|
|
3545
|
+
* The subscription's override maximum amount for the plan.
|
|
3546
|
+
*/
|
|
3547
|
+
maximum_amount?: string | null;
|
|
3548
|
+
/**
|
|
3549
|
+
* The subscription's override minimum amount for the plan.
|
|
3550
|
+
*/
|
|
3551
|
+
minimum_amount?: string | null;
|
|
3552
|
+
}
|
|
3553
|
+
namespace OverrideBulkPrice {
|
|
3554
|
+
interface BulkConfig {
|
|
3555
|
+
/**
|
|
3556
|
+
* Bulk tiers for rating based on total usage volume
|
|
3557
|
+
*/
|
|
3558
|
+
tiers: Array<BulkConfig.Tier>;
|
|
3559
|
+
}
|
|
3560
|
+
namespace BulkConfig {
|
|
3561
|
+
interface Tier {
|
|
3562
|
+
/**
|
|
3563
|
+
* Amount per unit
|
|
3564
|
+
*/
|
|
3565
|
+
unit_amount: string;
|
|
3566
|
+
/**
|
|
3567
|
+
* Upper bound for this tier
|
|
3568
|
+
*/
|
|
3569
|
+
maximum_units?: number | null;
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
interface OverrideTestRatingFunctionPrice {
|
|
3574
|
+
id: string;
|
|
3575
|
+
model_type: 'test_rating_function';
|
|
3576
|
+
test_rating_function_config: Record<string, unknown>;
|
|
3577
|
+
/**
|
|
3578
|
+
* The subscription's override discount for the plan.
|
|
3579
|
+
*/
|
|
3580
|
+
discount?: PricesAPI.Discount | null;
|
|
3581
|
+
/**
|
|
3582
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3583
|
+
*/
|
|
3584
|
+
fixed_price_quantity?: number | null;
|
|
3585
|
+
/**
|
|
3586
|
+
* The subscription's override maximum amount for the plan.
|
|
3587
|
+
*/
|
|
3588
|
+
maximum_amount?: string | null;
|
|
3589
|
+
/**
|
|
3590
|
+
* The subscription's override minimum amount for the plan.
|
|
3591
|
+
*/
|
|
3592
|
+
minimum_amount?: string | null;
|
|
3593
|
+
}
|
|
3594
|
+
interface OverrideFivetranExamplePrice {
|
|
3595
|
+
id: string;
|
|
3596
|
+
fivetran_example_config: Record<string, unknown>;
|
|
3597
|
+
model_type: 'fivetran_example';
|
|
3598
|
+
/**
|
|
3599
|
+
* The subscription's override discount for the plan.
|
|
3600
|
+
*/
|
|
3601
|
+
discount?: PricesAPI.Discount | null;
|
|
3602
|
+
/**
|
|
3603
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3604
|
+
*/
|
|
3605
|
+
fixed_price_quantity?: number | null;
|
|
3606
|
+
/**
|
|
3607
|
+
* The subscription's override maximum amount for the plan.
|
|
3608
|
+
*/
|
|
3609
|
+
maximum_amount?: string | null;
|
|
3610
|
+
/**
|
|
3611
|
+
* The subscription's override minimum amount for the plan.
|
|
3612
|
+
*/
|
|
3613
|
+
minimum_amount?: string | null;
|
|
3614
|
+
}
|
|
3615
|
+
interface OverrideThresholdTotalAmountPrice {
|
|
3616
|
+
id: string;
|
|
3617
|
+
model_type: 'threshold_total_amount';
|
|
3618
|
+
threshold_total_amount_config: Record<string, unknown>;
|
|
3619
|
+
/**
|
|
3620
|
+
* The subscription's override discount for the plan.
|
|
3621
|
+
*/
|
|
3622
|
+
discount?: PricesAPI.Discount | null;
|
|
3623
|
+
/**
|
|
3624
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3625
|
+
*/
|
|
3626
|
+
fixed_price_quantity?: number | null;
|
|
3627
|
+
/**
|
|
3628
|
+
* The subscription's override maximum amount for the plan.
|
|
3629
|
+
*/
|
|
3630
|
+
maximum_amount?: string | null;
|
|
3631
|
+
/**
|
|
3632
|
+
* The subscription's override minimum amount for the plan.
|
|
3633
|
+
*/
|
|
3634
|
+
minimum_amount?: string | null;
|
|
3635
|
+
}
|
|
3636
|
+
interface OverrideTieredPackagePrice {
|
|
3637
|
+
id: string;
|
|
3638
|
+
model_type: 'tiered_package';
|
|
3639
|
+
tiered_package_config: Record<string, unknown>;
|
|
3640
|
+
/**
|
|
3641
|
+
* The subscription's override discount for the plan.
|
|
3642
|
+
*/
|
|
3643
|
+
discount?: PricesAPI.Discount | null;
|
|
3644
|
+
/**
|
|
3645
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3646
|
+
*/
|
|
3647
|
+
fixed_price_quantity?: number | null;
|
|
3648
|
+
/**
|
|
3649
|
+
* The subscription's override maximum amount for the plan.
|
|
3650
|
+
*/
|
|
3651
|
+
maximum_amount?: string | null;
|
|
3652
|
+
/**
|
|
3653
|
+
* The subscription's override minimum amount for the plan.
|
|
3654
|
+
*/
|
|
3655
|
+
minimum_amount?: string | null;
|
|
3656
|
+
}
|
|
3657
|
+
interface OverrideTieredWithMinimumPrice {
|
|
3658
|
+
id: string;
|
|
3659
|
+
model_type: 'tiered_with_minimum';
|
|
3660
|
+
tiered_with_minimum_config: Record<string, unknown>;
|
|
3661
|
+
/**
|
|
3662
|
+
* The subscription's override discount for the plan.
|
|
3663
|
+
*/
|
|
3664
|
+
discount?: PricesAPI.Discount | null;
|
|
3665
|
+
/**
|
|
3666
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3667
|
+
*/
|
|
3668
|
+
fixed_price_quantity?: number | null;
|
|
3669
|
+
/**
|
|
3670
|
+
* The subscription's override maximum amount for the plan.
|
|
3671
|
+
*/
|
|
3672
|
+
maximum_amount?: string | null;
|
|
3673
|
+
/**
|
|
3674
|
+
* The subscription's override minimum amount for the plan.
|
|
3675
|
+
*/
|
|
3676
|
+
minimum_amount?: string | null;
|
|
3677
|
+
}
|
|
3678
|
+
interface OverridePackageWithAllocationPrice {
|
|
3679
|
+
id: string;
|
|
3680
|
+
model_type: 'package_with_allocation';
|
|
3681
|
+
package_with_allocation_config: Record<string, unknown>;
|
|
3682
|
+
/**
|
|
3683
|
+
* The subscription's override discount for the plan.
|
|
3684
|
+
*/
|
|
3685
|
+
discount?: PricesAPI.Discount | null;
|
|
3686
|
+
/**
|
|
3687
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3688
|
+
*/
|
|
3689
|
+
fixed_price_quantity?: number | null;
|
|
3690
|
+
/**
|
|
3691
|
+
* The subscription's override maximum amount for the plan.
|
|
3692
|
+
*/
|
|
3693
|
+
maximum_amount?: string | null;
|
|
3694
|
+
/**
|
|
3695
|
+
* The subscription's override minimum amount for the plan.
|
|
3696
|
+
*/
|
|
3697
|
+
minimum_amount?: string | null;
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
export interface SubscriptionTriggerPhaseParams {
|
|
3701
|
+
/**
|
|
3702
|
+
* The date on which the phase change should take effect. If not provided, defaults
|
|
3703
|
+
* to today in the customer's timezone.
|
|
3704
|
+
*/
|
|
3705
|
+
effective_date?: string | null;
|
|
3706
|
+
}
|
|
3707
|
+
export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesParams {
|
|
3708
|
+
/**
|
|
3709
|
+
* Price for which the updates should be cleared. Must be a fixed fee.
|
|
3710
|
+
*/
|
|
3711
|
+
price_id: string;
|
|
3712
|
+
}
|
|
3713
|
+
export interface SubscriptionUpdateFixedFeeQuantityParams {
|
|
3714
|
+
/**
|
|
3715
|
+
* Price for which the quantity should be updated. Must be a fixed fee.
|
|
3716
|
+
*/
|
|
3717
|
+
price_id: string;
|
|
3718
|
+
quantity: number;
|
|
3719
|
+
/**
|
|
3720
|
+
* Determines when the change takes effect. Note that if `effective_date` is
|
|
3721
|
+
* specified, this defaults to `effective_date`. Otherwise, this defaults to
|
|
3722
|
+
* `immediate` unless it's explicitly set to `upcoming_invoice.
|
|
3723
|
+
*/
|
|
3724
|
+
change_option?: 'immediate' | 'upcoming_invoice' | 'effective_date';
|
|
3725
|
+
/**
|
|
3726
|
+
* The date that the quantity change should take effect, localized to the
|
|
3727
|
+
* customer's timezone. Ifthis parameter is not passed in, the quantity change is
|
|
3728
|
+
* effective according to `change_option`.
|
|
3729
|
+
*/
|
|
3730
|
+
effective_date?: string | null;
|
|
3731
|
+
}
|
|
3732
|
+
export declare namespace Subscriptions {
|
|
3733
|
+
export import Subscription = SubscriptionsAPI.Subscription;
|
|
3734
|
+
export import Subscriptions = SubscriptionsAPI.Subscriptions;
|
|
3735
|
+
export import SubscriptionUsage = SubscriptionsAPI.SubscriptionUsage;
|
|
3736
|
+
export import SubscriptionFetchCostsResponse = SubscriptionsAPI.SubscriptionFetchCostsResponse;
|
|
3737
|
+
export import SubscriptionFetchScheduleResponse = SubscriptionsAPI.SubscriptionFetchScheduleResponse;
|
|
3738
|
+
export import SubscriptionsPage = SubscriptionsAPI.SubscriptionsPage;
|
|
3739
|
+
export import SubscriptionFetchScheduleResponsesPage = SubscriptionsAPI.SubscriptionFetchScheduleResponsesPage;
|
|
3740
|
+
export import SubscriptionCreateParams = SubscriptionsAPI.SubscriptionCreateParams;
|
|
3741
|
+
export import SubscriptionListParams = SubscriptionsAPI.SubscriptionListParams;
|
|
3742
|
+
export import SubscriptionCancelParams = SubscriptionsAPI.SubscriptionCancelParams;
|
|
3743
|
+
export import SubscriptionFetchCostsParams = SubscriptionsAPI.SubscriptionFetchCostsParams;
|
|
3744
|
+
export import SubscriptionFetchScheduleParams = SubscriptionsAPI.SubscriptionFetchScheduleParams;
|
|
3745
|
+
export import SubscriptionFetchUsageParams = SubscriptionsAPI.SubscriptionFetchUsageParams;
|
|
3746
|
+
export import SubscriptionPriceIntervalsParams = SubscriptionsAPI.SubscriptionPriceIntervalsParams;
|
|
3747
|
+
export import SubscriptionSchedulePlanChangeParams = SubscriptionsAPI.SubscriptionSchedulePlanChangeParams;
|
|
3748
|
+
export import SubscriptionTriggerPhaseParams = SubscriptionsAPI.SubscriptionTriggerPhaseParams;
|
|
3749
|
+
export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = SubscriptionsAPI.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
|
|
3750
|
+
export import SubscriptionUpdateFixedFeeQuantityParams = SubscriptionsAPI.SubscriptionUpdateFixedFeeQuantityParams;
|
|
3751
|
+
}
|
|
3752
|
+
//# sourceMappingURL=subscriptions.d.ts.map
|