@stigg/typescript 0.1.0-alpha.3 → 0.1.0-alpha.31
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 +406 -0
- package/README.md +9 -0
- package/client.d.mts +10 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -9
- package/client.d.ts.map +1 -1
- package/client.js +32 -26
- package/client.js.map +1 -1
- package/client.mjs +33 -27
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/tslib.js +17 -17
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +12 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal/beta/beta.d.mts +10 -0
- package/resources/internal/beta/beta.d.mts.map +1 -0
- package/resources/internal/beta/beta.d.ts +10 -0
- package/resources/internal/beta/beta.d.ts.map +1 -0
- package/resources/internal/beta/beta.js +17 -0
- package/resources/internal/beta/beta.js.map +1 -0
- package/resources/internal/beta/beta.mjs +12 -0
- package/resources/internal/beta/beta.mjs.map +1 -0
- package/resources/internal/beta/event-queues.d.mts +171 -0
- package/resources/internal/beta/event-queues.d.mts.map +1 -0
- package/resources/internal/beta/event-queues.d.ts +171 -0
- package/resources/internal/beta/event-queues.d.ts.map +1 -0
- package/resources/internal/beta/event-queues.js +40 -0
- package/resources/internal/beta/event-queues.js.map +1 -0
- package/resources/internal/beta/event-queues.mjs +36 -0
- package/resources/internal/beta/event-queues.mjs.map +1 -0
- package/resources/internal/beta/index.d.mts +3 -0
- package/resources/internal/beta/index.d.mts.map +1 -0
- package/resources/internal/beta/index.d.ts +3 -0
- package/resources/internal/beta/index.d.ts.map +1 -0
- package/resources/internal/beta/index.js +9 -0
- package/resources/internal/beta/index.js.map +1 -0
- package/resources/internal/beta/index.mjs +4 -0
- package/resources/internal/beta/index.mjs.map +1 -0
- package/resources/internal/beta.d.mts +2 -0
- package/resources/internal/beta.d.mts.map +1 -0
- package/resources/internal/beta.d.ts +2 -0
- package/resources/internal/beta.d.ts.map +1 -0
- package/resources/internal/beta.js +6 -0
- package/resources/internal/beta.js.map +1 -0
- package/resources/internal/beta.mjs +3 -0
- package/resources/internal/beta.mjs.map +1 -0
- package/resources/internal/index.d.mts +3 -0
- package/resources/internal/index.d.mts.map +1 -0
- package/resources/internal/index.d.ts +3 -0
- package/resources/internal/index.d.ts.map +1 -0
- package/resources/internal/index.js +9 -0
- package/resources/internal/index.js.map +1 -0
- package/resources/internal/index.mjs +4 -0
- package/resources/internal/index.mjs.map +1 -0
- package/resources/internal/internal.d.mts +10 -0
- package/resources/internal/internal.d.mts.map +1 -0
- package/resources/internal/internal.d.ts +10 -0
- package/resources/internal/internal.d.ts.map +1 -0
- package/resources/internal/internal.js +17 -0
- package/resources/internal/internal.js.map +1 -0
- package/resources/internal/internal.mjs +12 -0
- package/resources/internal/internal.mjs.map +1 -0
- package/resources/internal.d.mts +2 -0
- package/resources/internal.d.mts.map +1 -0
- package/resources/internal.d.ts +2 -0
- package/resources/internal.d.ts.map +1 -0
- package/resources/internal.js +6 -0
- package/resources/internal.js.map +1 -0
- package/resources/internal.mjs +3 -0
- package/resources/internal.mjs.map +1 -0
- package/resources/v1/addons/addons.d.mts +828 -0
- package/resources/v1/addons/addons.d.mts.map +1 -0
- package/resources/v1/addons/addons.d.ts +828 -0
- package/resources/v1/addons/addons.d.ts.map +1 -0
- package/resources/v1/addons/addons.js +75 -0
- package/resources/v1/addons/addons.js.map +1 -0
- package/resources/v1/addons/addons.mjs +70 -0
- package/resources/v1/addons/addons.mjs.map +1 -0
- package/resources/v1/addons/entitlements.d.mts +888 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -0
- package/resources/v1/addons/entitlements.d.ts +888 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -0
- package/resources/v1/addons/entitlements.js +36 -0
- package/resources/v1/addons/entitlements.js.map +1 -0
- package/resources/v1/addons/entitlements.mjs +32 -0
- package/resources/v1/addons/entitlements.mjs.map +1 -0
- package/resources/v1/addons/index.d.mts +3 -0
- package/resources/v1/addons/index.d.mts.map +1 -0
- package/resources/v1/addons/index.d.ts +3 -0
- package/resources/v1/addons/index.d.ts.map +1 -0
- package/resources/v1/addons/index.js +9 -0
- package/resources/v1/addons/index.js.map +1 -0
- package/resources/v1/addons/index.mjs +4 -0
- package/resources/v1/addons/index.mjs.map +1 -0
- package/resources/v1/addons.d.mts +2 -0
- package/resources/v1/addons.d.mts.map +1 -0
- package/resources/v1/addons.d.ts +2 -0
- package/resources/v1/addons.d.ts.map +1 -0
- package/resources/v1/addons.js +6 -0
- package/resources/v1/addons.js.map +1 -0
- package/resources/v1/addons.mjs +3 -0
- package/resources/v1/addons.mjs.map +1 -0
- package/resources/v1/coupons.d.mts +94 -96
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +94 -96
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +19 -3
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +19 -3
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +1214 -48
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +1214 -48
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +48 -15
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +48 -15
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +3 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +3 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +5 -3
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +2 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +142 -0
- package/resources/v1/customers/integrations.d.mts.map +1 -0
- package/resources/v1/customers/integrations.d.ts +142 -0
- package/resources/v1/customers/integrations.d.ts.map +1 -0
- package/resources/v1/customers/integrations.js +50 -0
- package/resources/v1/customers/integrations.js.map +1 -0
- package/resources/v1/customers/integrations.mjs +46 -0
- package/resources/v1/customers/integrations.mjs.map +1 -0
- package/resources/v1/customers/payment-method.d.mts +7 -2
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +7 -2
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.js +7 -2
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +7 -2
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +501 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.d.ts +501 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.js +35 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -0
- package/resources/v1/customers/promotional-entitlements.mjs +31 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
- package/resources/v1/events/credits/credits.d.mts +270 -0
- package/resources/v1/events/credits/credits.d.mts.map +1 -0
- package/resources/v1/events/credits/credits.d.ts +270 -0
- package/resources/v1/events/credits/credits.d.ts.map +1 -0
- package/resources/v1/events/credits/credits.js +41 -0
- package/resources/v1/events/credits/credits.js.map +1 -0
- package/resources/v1/events/credits/credits.mjs +36 -0
- package/resources/v1/events/credits/credits.mjs.map +1 -0
- package/resources/v1/events/credits/grants.d.mts +549 -0
- package/resources/v1/events/credits/grants.d.mts.map +1 -0
- package/resources/v1/events/credits/grants.d.ts +549 -0
- package/resources/v1/events/credits/grants.d.ts.map +1 -0
- package/resources/v1/events/credits/grants.js +37 -0
- package/resources/v1/events/credits/grants.js.map +1 -0
- package/resources/v1/events/credits/grants.mjs +33 -0
- package/resources/v1/events/credits/grants.mjs.map +1 -0
- package/resources/v1/events/credits/index.d.mts +3 -0
- package/resources/v1/events/credits/index.d.mts.map +1 -0
- package/resources/v1/events/credits/index.d.ts +3 -0
- package/resources/v1/events/credits/index.d.ts.map +1 -0
- package/resources/v1/events/credits/index.js +9 -0
- package/resources/v1/events/credits/index.js.map +1 -0
- package/resources/v1/events/credits/index.mjs +4 -0
- package/resources/v1/events/credits/index.mjs.map +1 -0
- package/resources/v1/events/credits.d.mts +2 -0
- package/resources/v1/events/credits.d.mts.map +1 -0
- package/resources/v1/events/credits.d.ts +2 -0
- package/resources/v1/events/credits.d.ts.map +1 -0
- package/resources/v1/events/credits.js +6 -0
- package/resources/v1/events/credits.js.map +1 -0
- package/resources/v1/events/credits.mjs +3 -0
- package/resources/v1/events/credits.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +70 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +70 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +27 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +22 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +3 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +3 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +9 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +4 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events.d.mts +2 -0
- package/resources/v1/events.d.mts.map +1 -0
- package/resources/v1/events.d.ts +2 -0
- package/resources/v1/events.d.ts.map +1 -0
- package/resources/v1/events.js +6 -0
- package/resources/v1/events.js.map +1 -0
- package/resources/v1/events.mjs +3 -0
- package/resources/v1/events.mjs.map +1 -0
- package/resources/v1/features.d.mts +456 -0
- package/resources/v1/features.d.mts.map +1 -0
- package/resources/v1/features.d.ts +456 -0
- package/resources/v1/features.d.ts.map +1 -0
- package/resources/v1/features.js +54 -0
- package/resources/v1/features.js.map +1 -0
- package/resources/v1/features.mjs +50 -0
- package/resources/v1/features.mjs.map +1 -0
- package/resources/v1/index.d.mts +10 -4
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +10 -4
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +17 -5
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +7 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +888 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -0
- package/resources/v1/plans/entitlements.d.ts +888 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -0
- package/resources/v1/plans/entitlements.js +36 -0
- package/resources/v1/plans/entitlements.js.map +1 -0
- package/resources/v1/plans/entitlements.mjs +32 -0
- package/resources/v1/plans/entitlements.mjs.map +1 -0
- package/resources/v1/plans/index.d.mts +3 -0
- package/resources/v1/plans/index.d.mts.map +1 -0
- package/resources/v1/plans/index.d.ts +3 -0
- package/resources/v1/plans/index.d.ts.map +1 -0
- package/resources/v1/plans/index.js +9 -0
- package/resources/v1/plans/index.js.map +1 -0
- package/resources/v1/plans/index.mjs +4 -0
- package/resources/v1/plans/index.mjs.map +1 -0
- package/resources/v1/plans/plans.d.mts +977 -0
- package/resources/v1/plans/plans.d.mts.map +1 -0
- package/resources/v1/plans/plans.d.ts +977 -0
- package/resources/v1/plans/plans.d.ts.map +1 -0
- package/resources/v1/plans/plans.js +72 -0
- package/resources/v1/plans/plans.js.map +1 -0
- package/resources/v1/plans/plans.mjs +67 -0
- package/resources/v1/plans/plans.mjs.map +1 -0
- package/resources/v1/plans.d.mts +2 -0
- package/resources/v1/plans.d.mts.map +1 -0
- package/resources/v1/plans.d.ts +2 -0
- package/resources/v1/plans.d.ts.map +1 -0
- package/resources/v1/plans.js +6 -0
- package/resources/v1/plans.js.map +1 -0
- package/resources/v1/plans.mjs +3 -0
- package/resources/v1/plans.mjs.map +1 -0
- package/resources/v1/products.d.mts +339 -0
- package/resources/v1/products.d.mts.map +1 -0
- package/resources/v1/products.d.ts +339 -0
- package/resources/v1/products.d.ts.map +1 -0
- package/resources/v1/products.js +55 -0
- package/resources/v1/products.js.map +1 -0
- package/resources/v1/products.mjs +51 -0
- package/resources/v1/products.mjs.map +1 -0
- package/resources/v1/subscriptions/future-update.d.mts +12 -22
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +12 -22
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +6 -2
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +6 -2
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +4 -2
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +4 -2
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js +5 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +3 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/invoice.d.mts +37 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
- package/resources/v1/subscriptions/invoice.d.ts +37 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
- package/resources/v1/subscriptions/invoice.js +20 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -0
- package/resources/v1/subscriptions/invoice.mjs +16 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -0
- package/resources/v1/subscriptions/subscriptions.d.mts +1926 -915
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1926 -915
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +47 -11
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +49 -13
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +101 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -0
- package/resources/v1/subscriptions/usage.d.ts +101 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -0
- package/resources/v1/subscriptions/usage.js +27 -0
- package/resources/v1/subscriptions/usage.js.map +1 -0
- package/resources/v1/subscriptions/usage.mjs +23 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -0
- package/resources/v1/usage.d.mts +233 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +233 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +27 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +23 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.mts +30 -172
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +30 -172
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +24 -12
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +24 -12
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +46 -47
- package/src/internal/parse.ts +6 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/index.ts +2 -7
- package/src/resources/internal/beta/beta.ts +27 -0
- package/src/resources/internal/beta/event-queues.ts +554 -0
- package/src/resources/internal/beta/index.ts +10 -0
- package/src/resources/internal/beta.ts +3 -0
- package/src/resources/internal/index.ts +4 -0
- package/src/resources/internal/internal.ts +15 -0
- package/src/resources/internal.ts +3 -0
- package/src/resources/v1/addons/addons.ts +1856 -0
- package/src/resources/v1/addons/entitlements.ts +1153 -0
- package/src/resources/v1/addons/index.ts +23 -0
- package/src/resources/v1/addons.ts +3 -0
- package/src/resources/v1/coupons.ts +106 -229
- package/src/resources/v1/customers/customers.ts +2465 -60
- package/src/resources/v1/customers/index.ts +29 -2
- package/src/resources/v1/customers/integrations.ts +241 -0
- package/src/resources/v1/customers/payment-method.ts +7 -2
- package/src/resources/v1/customers/promotional-entitlements.ts +672 -0
- package/src/resources/v1/events/credits/credits.ts +370 -0
- package/src/resources/v1/events/credits/grants.ts +795 -0
- package/src/resources/v1/events/credits/index.ts +20 -0
- package/src/resources/v1/events/credits.ts +3 -0
- package/src/resources/v1/events/events.ts +103 -0
- package/src/resources/v1/events/index.ts +13 -0
- package/src/resources/v1/events.ts +3 -0
- package/src/resources/v1/features.ts +583 -0
- package/src/resources/v1/index.ts +69 -15
- package/src/resources/v1/plans/entitlements.ts +1145 -0
- package/src/resources/v1/plans/index.ts +23 -0
- package/src/resources/v1/plans/plans.ts +2029 -0
- package/src/resources/v1/plans.ts +3 -0
- package/src/resources/v1/products.ts +430 -0
- package/src/resources/v1/subscriptions/future-update.ts +12 -30
- package/src/resources/v1/subscriptions/index.ts +15 -11
- package/src/resources/v1/subscriptions/invoice.ts +45 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +5302 -2289
- package/src/resources/v1/subscriptions/usage.ts +129 -0
- package/src/resources/v1/usage.ts +287 -0
- package/src/resources/v1/v1.ts +166 -220
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/v1/customers/usage.d.mts +0 -4
- package/resources/v1/customers/usage.d.mts.map +0 -1
- package/resources/v1/customers/usage.d.ts +0 -4
- package/resources/v1/customers/usage.d.ts.map +0 -1
- package/resources/v1/customers/usage.js +0 -9
- package/resources/v1/customers/usage.js.map +0 -1
- package/resources/v1/customers/usage.mjs +0 -5
- package/resources/v1/customers/usage.mjs.map +0 -1
- package/src/resources/v1/customers/usage.ts +0 -5
|
@@ -1,312 +1,79 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as FutureUpdateAPI from "./future-update.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CancelSubscription, FutureUpdate as FutureUpdateAPIFutureUpdate } from "./future-update.js";
|
|
4
|
+
import * as InvoiceAPI from "./invoice.js";
|
|
5
|
+
import { Invoice, InvoiceMarkAsPaidResponse } from "./invoice.js";
|
|
6
|
+
import * as UsageAPI from "./usage.js";
|
|
7
|
+
import { Usage, UsageChargeUsageParams, UsageChargeUsageResponse, UsageSyncResponse } from "./usage.js";
|
|
4
8
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
9
|
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
|
|
6
10
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
7
11
|
export declare class Subscriptions extends APIResource {
|
|
8
12
|
futureUpdate: FutureUpdateAPI.FutureUpdate;
|
|
13
|
+
usage: UsageAPI.Usage;
|
|
14
|
+
invoice: InvoiceAPI.Invoice;
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
16
|
+
* Retrieves a subscription by its unique identifier, including plan details,
|
|
17
|
+
* billing period, status, and add-ons.
|
|
11
18
|
*/
|
|
12
|
-
|
|
19
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Subscription>;
|
|
13
20
|
/**
|
|
14
|
-
*
|
|
21
|
+
* Updates an active subscription's properties including billing period, add-ons,
|
|
22
|
+
* unit quantities, and discounts.
|
|
15
23
|
*/
|
|
16
|
-
|
|
24
|
+
update(id: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
17
25
|
/**
|
|
18
|
-
*
|
|
26
|
+
* Retrieves a paginated list of subscriptions, with optional filters for customer,
|
|
27
|
+
* status, and plan.
|
|
19
28
|
*/
|
|
20
29
|
list(query?: SubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionListResponsesMyCursorIDPage, SubscriptionListResponse>;
|
|
21
30
|
/**
|
|
22
|
-
*
|
|
31
|
+
* Cancels an active subscription, either immediately or at a specified time such
|
|
32
|
+
* as end of billing period.
|
|
23
33
|
*/
|
|
24
|
-
|
|
34
|
+
cancel(id: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
25
35
|
/**
|
|
26
|
-
*
|
|
36
|
+
* Delegates the payment responsibility of a subscription to a different customer.
|
|
37
|
+
* The delegated customer will be billed for this subscription.
|
|
27
38
|
*/
|
|
28
|
-
|
|
39
|
+
delegate(id: string, body: SubscriptionDelegateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
29
40
|
/**
|
|
30
|
-
*
|
|
41
|
+
* Imports multiple subscriptions in bulk. Used for migrating subscription data
|
|
42
|
+
* from external systems.
|
|
31
43
|
*/
|
|
32
|
-
|
|
44
|
+
import(body: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse>;
|
|
33
45
|
/**
|
|
34
|
-
*
|
|
46
|
+
* Migrates a subscription to the latest published version of its plan or add-ons.
|
|
47
|
+
* Handles prorated charges or credits automatically.
|
|
35
48
|
*/
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
export type SubscriptionListResponsesMyCursorIDPage = MyCursorIDPage<SubscriptionListResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* Response object
|
|
41
|
-
*/
|
|
42
|
-
export interface SubscriptionCreateResponse {
|
|
49
|
+
migrate(id: string, body: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
43
50
|
/**
|
|
44
|
-
*
|
|
51
|
+
* Previews the pricing impact of creating or updating a subscription without
|
|
52
|
+
* making changes. Returns estimated costs, taxes, and proration details.
|
|
45
53
|
*/
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
export declare namespace SubscriptionCreateResponse {
|
|
54
|
+
preview(body: SubscriptionPreviewParams, options?: RequestOptions): APIPromise<SubscriptionPreviewResponse>;
|
|
49
55
|
/**
|
|
50
|
-
*
|
|
56
|
+
* Creates a new subscription for an existing customer. When payment is required
|
|
57
|
+
* and no payment method exists, returns a checkout URL.
|
|
51
58
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
60
|
-
*/
|
|
61
|
-
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
62
|
-
/**
|
|
63
|
-
* Checkout billing ID when payment is required
|
|
64
|
-
*/
|
|
65
|
-
checkoutBillingId?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* URL to complete payment when PAYMENT_REQUIRED
|
|
68
|
-
*/
|
|
69
|
-
checkoutUrl?: string | null;
|
|
70
|
-
/**
|
|
71
|
-
* Whether the subscription is scheduled for future activation
|
|
72
|
-
*/
|
|
73
|
-
isScheduled?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Created subscription (when status is SUCCESS)
|
|
76
|
-
*/
|
|
77
|
-
subscription?: Data.Subscription;
|
|
78
|
-
}
|
|
79
|
-
namespace Data {
|
|
80
|
-
interface Entitlement {
|
|
81
|
-
accessDeniedReason?: string | null;
|
|
82
|
-
currentUsage?: number;
|
|
83
|
-
/**
|
|
84
|
-
* entitlement updated at
|
|
85
|
-
*/
|
|
86
|
-
entitlementUpdatedAt?: string | null;
|
|
87
|
-
feature?: Entitlement.Feature | null;
|
|
88
|
-
hasUnlimitedUsage?: boolean | null;
|
|
89
|
-
isGranted?: boolean;
|
|
90
|
-
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
|
|
91
|
-
usageLimit?: number | null;
|
|
92
|
-
/**
|
|
93
|
-
* usage period anchor
|
|
94
|
-
*/
|
|
95
|
-
usagePeriodAnchor?: string | null;
|
|
96
|
-
/**
|
|
97
|
-
* usage period end
|
|
98
|
-
*/
|
|
99
|
-
usagePeriodEnd?: string | null;
|
|
100
|
-
/**
|
|
101
|
-
* usage period start
|
|
102
|
-
*/
|
|
103
|
-
usagePeriodStart?: string | null;
|
|
104
|
-
}
|
|
105
|
-
namespace Entitlement {
|
|
106
|
-
interface Feature {
|
|
107
|
-
/**
|
|
108
|
-
* Feature ID
|
|
109
|
-
*/
|
|
110
|
-
refId: string;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Created subscription (when status is SUCCESS)
|
|
115
|
-
*/
|
|
116
|
-
interface Subscription {
|
|
117
|
-
/**
|
|
118
|
-
* Subscription ID
|
|
119
|
-
*/
|
|
120
|
-
id: string;
|
|
121
|
-
/**
|
|
122
|
-
* Billing ID
|
|
123
|
-
*/
|
|
124
|
-
billingId: string | null;
|
|
125
|
-
/**
|
|
126
|
-
* Created at
|
|
127
|
-
*/
|
|
128
|
-
createdAt: string;
|
|
129
|
-
/**
|
|
130
|
-
* Customer ID
|
|
131
|
-
*/
|
|
132
|
-
customerId: string;
|
|
133
|
-
/**
|
|
134
|
-
* Payment collection
|
|
135
|
-
*/
|
|
136
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
137
|
-
/**
|
|
138
|
-
* Plan ID
|
|
139
|
-
*/
|
|
140
|
-
planId: string;
|
|
141
|
-
/**
|
|
142
|
-
* Pricing type
|
|
143
|
-
*/
|
|
144
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
145
|
-
/**
|
|
146
|
-
* Subscription start date
|
|
147
|
-
*/
|
|
148
|
-
startDate: string;
|
|
149
|
-
/**
|
|
150
|
-
* Subscription status
|
|
151
|
-
*/
|
|
152
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
153
|
-
/**
|
|
154
|
-
* Subscription cancellation date
|
|
155
|
-
*/
|
|
156
|
-
cancellationDate?: string | null;
|
|
157
|
-
/**
|
|
158
|
-
* Subscription cancel reason
|
|
159
|
-
*/
|
|
160
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
161
|
-
/**
|
|
162
|
-
* End of the current billing period
|
|
163
|
-
*/
|
|
164
|
-
currentBillingPeriodEnd?: string | null;
|
|
165
|
-
/**
|
|
166
|
-
* Start of the current billing period
|
|
167
|
-
*/
|
|
168
|
-
currentBillingPeriodStart?: string | null;
|
|
169
|
-
/**
|
|
170
|
-
* Subscription effective end date
|
|
171
|
-
*/
|
|
172
|
-
effectiveEndDate?: string | null;
|
|
173
|
-
/**
|
|
174
|
-
* Subscription end date
|
|
175
|
-
*/
|
|
176
|
-
endDate?: string | null;
|
|
177
|
-
/**
|
|
178
|
-
* Additional metadata for the subscription
|
|
179
|
-
*/
|
|
180
|
-
metadata?: {
|
|
181
|
-
[key: string]: string;
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Paying customer ID for delegated billing
|
|
185
|
-
*/
|
|
186
|
-
payingCustomerId?: string | null;
|
|
187
|
-
/**
|
|
188
|
-
* The method used to collect payments for a subscription
|
|
189
|
-
*/
|
|
190
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
191
|
-
prices?: Array<Subscription.Price>;
|
|
192
|
-
/**
|
|
193
|
-
* Resource ID
|
|
194
|
-
*/
|
|
195
|
-
resourceId?: string | null;
|
|
196
|
-
/**
|
|
197
|
-
* Subscription trial end date
|
|
198
|
-
*/
|
|
199
|
-
trialEndDate?: string | null;
|
|
200
|
-
}
|
|
201
|
-
namespace Subscription {
|
|
202
|
-
interface Price {
|
|
203
|
-
/**
|
|
204
|
-
* Addon identifier for the price override
|
|
205
|
-
*/
|
|
206
|
-
addonId?: string | null;
|
|
207
|
-
/**
|
|
208
|
-
* Whether this is a base charge override
|
|
209
|
-
*/
|
|
210
|
-
baseCharge?: boolean;
|
|
211
|
-
/**
|
|
212
|
-
* Block size for pricing
|
|
213
|
-
*/
|
|
214
|
-
blockSize?: number;
|
|
215
|
-
/**
|
|
216
|
-
* Feature identifier for the price override
|
|
217
|
-
*/
|
|
218
|
-
featureId?: string | null;
|
|
219
|
-
/**
|
|
220
|
-
* Override price amount
|
|
221
|
-
*/
|
|
222
|
-
price?: Price.Price;
|
|
223
|
-
/**
|
|
224
|
-
* Pricing tiers configuration
|
|
225
|
-
*/
|
|
226
|
-
tiers?: Array<Price.Tier>;
|
|
227
|
-
}
|
|
228
|
-
namespace Price {
|
|
229
|
-
/**
|
|
230
|
-
* Override price amount
|
|
231
|
-
*/
|
|
232
|
-
interface Price {
|
|
233
|
-
/**
|
|
234
|
-
* The price amount
|
|
235
|
-
*/
|
|
236
|
-
amount?: number;
|
|
237
|
-
/**
|
|
238
|
-
* The billing country code of the price
|
|
239
|
-
*/
|
|
240
|
-
billingCountryCode?: string | null;
|
|
241
|
-
/**
|
|
242
|
-
* The price currency
|
|
243
|
-
*/
|
|
244
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
245
|
-
}
|
|
246
|
-
interface Tier {
|
|
247
|
-
/**
|
|
248
|
-
* The flat fee price of the price tier
|
|
249
|
-
*/
|
|
250
|
-
flatPrice?: Tier.FlatPrice;
|
|
251
|
-
/**
|
|
252
|
-
* The unit price of the price tier
|
|
253
|
-
*/
|
|
254
|
-
unitPrice?: Tier.UnitPrice;
|
|
255
|
-
/**
|
|
256
|
-
* The up to quantity of the price tier
|
|
257
|
-
*/
|
|
258
|
-
upTo?: number;
|
|
259
|
-
}
|
|
260
|
-
namespace Tier {
|
|
261
|
-
/**
|
|
262
|
-
* The flat fee price of the price tier
|
|
263
|
-
*/
|
|
264
|
-
interface FlatPrice {
|
|
265
|
-
/**
|
|
266
|
-
* The price amount
|
|
267
|
-
*/
|
|
268
|
-
amount?: number;
|
|
269
|
-
/**
|
|
270
|
-
* The billing country code of the price
|
|
271
|
-
*/
|
|
272
|
-
billingCountryCode?: string | null;
|
|
273
|
-
/**
|
|
274
|
-
* The price currency
|
|
275
|
-
*/
|
|
276
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* The unit price of the price tier
|
|
280
|
-
*/
|
|
281
|
-
interface UnitPrice {
|
|
282
|
-
/**
|
|
283
|
-
* The price amount
|
|
284
|
-
*/
|
|
285
|
-
amount?: number;
|
|
286
|
-
/**
|
|
287
|
-
* The billing country code of the price
|
|
288
|
-
*/
|
|
289
|
-
billingCountryCode?: string | null;
|
|
290
|
-
/**
|
|
291
|
-
* The price currency
|
|
292
|
-
*/
|
|
293
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
59
|
+
provision(body: SubscriptionProvisionParams, options?: RequestOptions): APIPromise<SubscriptionProvisionResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Transfers a subscription to a different resource ID. Used for multi-resource
|
|
62
|
+
* products where subscriptions apply to specific entities like websites or apps.
|
|
63
|
+
*/
|
|
64
|
+
transfer(id: string, body: SubscriptionTransferParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
299
65
|
}
|
|
66
|
+
export type SubscriptionListResponsesMyCursorIDPage = MyCursorIDPage<SubscriptionListResponse>;
|
|
300
67
|
/**
|
|
301
68
|
* Response object
|
|
302
69
|
*/
|
|
303
|
-
export interface
|
|
70
|
+
export interface Subscription {
|
|
304
71
|
/**
|
|
305
72
|
* Customer subscription to a plan
|
|
306
73
|
*/
|
|
307
|
-
data:
|
|
74
|
+
data: Subscription.Data;
|
|
308
75
|
}
|
|
309
|
-
export declare namespace
|
|
76
|
+
export declare namespace Subscription {
|
|
310
77
|
/**
|
|
311
78
|
* Customer subscription to a plan
|
|
312
79
|
*/
|
|
@@ -347,6 +114,15 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
347
114
|
* Subscription status
|
|
348
115
|
*/
|
|
349
116
|
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
117
|
+
addons?: Array<Data.Addon>;
|
|
118
|
+
/**
|
|
119
|
+
* Billing cycle anchor date
|
|
120
|
+
*/
|
|
121
|
+
billingCycleAnchor?: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* Budget configuration
|
|
124
|
+
*/
|
|
125
|
+
budget?: Data.Budget | null;
|
|
350
126
|
/**
|
|
351
127
|
* Subscription cancellation date
|
|
352
128
|
*/
|
|
@@ -355,6 +131,10 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
355
131
|
* Subscription cancel reason
|
|
356
132
|
*/
|
|
357
133
|
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
134
|
+
/**
|
|
135
|
+
* Coupons applied to the subscription
|
|
136
|
+
*/
|
|
137
|
+
coupons?: Array<Data.Coupon>;
|
|
358
138
|
/**
|
|
359
139
|
* End of the current billing period
|
|
360
140
|
*/
|
|
@@ -371,12 +151,24 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
371
151
|
* Subscription end date
|
|
372
152
|
*/
|
|
373
153
|
endDate?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Scheduled future updates for the subscription
|
|
156
|
+
*/
|
|
157
|
+
futureUpdates?: Array<Data.FutureUpdate>;
|
|
158
|
+
/**
|
|
159
|
+
* Latest invoice for the subscription
|
|
160
|
+
*/
|
|
161
|
+
latestInvoice?: Data.LatestInvoice | null;
|
|
374
162
|
/**
|
|
375
163
|
* Additional metadata for the subscription
|
|
376
164
|
*/
|
|
377
165
|
metadata?: {
|
|
378
166
|
[key: string]: string;
|
|
379
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Minimum spend configuration
|
|
170
|
+
*/
|
|
171
|
+
minimumSpend?: Data.MinimumSpend | null;
|
|
380
172
|
/**
|
|
381
173
|
* Paying customer ID for delegated billing
|
|
382
174
|
*/
|
|
@@ -390,32 +182,274 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
390
182
|
* Resource ID
|
|
391
183
|
*/
|
|
392
184
|
resourceId?: string | null;
|
|
185
|
+
/**
|
|
186
|
+
* Entitlements associated with the subscription
|
|
187
|
+
*/
|
|
188
|
+
subscriptionEntitlements?: Array<Data.SubscriptionEntitlement>;
|
|
189
|
+
/**
|
|
190
|
+
* Trial configuration
|
|
191
|
+
*/
|
|
192
|
+
trial?: Data.Trial | null;
|
|
393
193
|
/**
|
|
394
194
|
* Subscription trial end date
|
|
395
195
|
*/
|
|
396
196
|
trialEndDate?: string | null;
|
|
397
197
|
}
|
|
398
198
|
namespace Data {
|
|
399
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Addon configuration
|
|
201
|
+
*/
|
|
202
|
+
interface Addon {
|
|
400
203
|
/**
|
|
401
|
-
*
|
|
204
|
+
* Addon ID
|
|
402
205
|
*/
|
|
403
206
|
id: string;
|
|
404
207
|
/**
|
|
405
|
-
*
|
|
208
|
+
* Number of addon instances
|
|
406
209
|
*/
|
|
407
|
-
|
|
210
|
+
quantity: number;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Budget configuration
|
|
214
|
+
*/
|
|
215
|
+
interface Budget {
|
|
216
|
+
/**
|
|
217
|
+
* Whether the budget is a soft limit
|
|
218
|
+
*/
|
|
219
|
+
hasSoftLimit: boolean;
|
|
408
220
|
/**
|
|
409
|
-
*
|
|
221
|
+
* Maximum spending limit
|
|
410
222
|
*/
|
|
411
|
-
|
|
412
|
-
[k: string]: unknown;
|
|
223
|
+
limit: number;
|
|
413
224
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Coupon applied to a subscription
|
|
227
|
+
*/
|
|
228
|
+
interface Coupon {
|
|
229
|
+
/**
|
|
230
|
+
* Coupon ID
|
|
231
|
+
*/
|
|
232
|
+
id: string;
|
|
233
|
+
/**
|
|
234
|
+
* Coupon name
|
|
235
|
+
*/
|
|
236
|
+
name: string;
|
|
237
|
+
/**
|
|
238
|
+
* Coupon status
|
|
239
|
+
*/
|
|
240
|
+
status: 'ACTIVE' | 'EXPIRED' | 'REMOVED';
|
|
241
|
+
/**
|
|
242
|
+
* Fixed amount discounts by currency
|
|
243
|
+
*/
|
|
244
|
+
amountsOff?: Array<Coupon.AmountsOff> | null;
|
|
245
|
+
/**
|
|
246
|
+
* Percentage discount
|
|
247
|
+
*/
|
|
248
|
+
percentOff?: number | null;
|
|
249
|
+
}
|
|
250
|
+
namespace Coupon {
|
|
251
|
+
interface AmountsOff {
|
|
252
|
+
/**
|
|
253
|
+
* The price amount
|
|
254
|
+
*/
|
|
255
|
+
amount?: number;
|
|
256
|
+
/**
|
|
257
|
+
* The price currency
|
|
258
|
+
*/
|
|
259
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Scheduled subscription update
|
|
264
|
+
*/
|
|
265
|
+
interface FutureUpdate {
|
|
266
|
+
/**
|
|
267
|
+
* Scheduled execution time
|
|
268
|
+
*/
|
|
269
|
+
scheduledExecutionTime: string;
|
|
270
|
+
/**
|
|
271
|
+
* Status of the scheduled update
|
|
272
|
+
*/
|
|
273
|
+
scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED';
|
|
274
|
+
/**
|
|
275
|
+
* Type of scheduled change
|
|
276
|
+
*/
|
|
277
|
+
subscriptionScheduleType: 'DOWNGRADE' | 'PLAN' | 'BILLING_PERIOD' | 'UNIT_AMOUNT' | 'RECURRING_CREDITS' | 'PRICE_OVERRIDE' | 'ADDON' | 'COUPON' | 'MIGRATE_TO_LATEST' | 'ADDITIONAL_META_DATA' | 'BILLING_INFO_METADATA';
|
|
278
|
+
/**
|
|
279
|
+
* Target package for the update
|
|
280
|
+
*/
|
|
281
|
+
targetPackage?: FutureUpdate.TargetPackage | null;
|
|
282
|
+
}
|
|
283
|
+
namespace FutureUpdate {
|
|
284
|
+
/**
|
|
285
|
+
* Target package for the update
|
|
286
|
+
*/
|
|
287
|
+
interface TargetPackage {
|
|
288
|
+
/**
|
|
289
|
+
* Target package for the update
|
|
290
|
+
*/
|
|
291
|
+
id: string;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Latest invoice for the subscription
|
|
296
|
+
*/
|
|
297
|
+
interface LatestInvoice {
|
|
298
|
+
/**
|
|
299
|
+
* Invoice billing ID
|
|
300
|
+
*/
|
|
301
|
+
billingId: string;
|
|
302
|
+
/**
|
|
303
|
+
* Invoice creation date
|
|
304
|
+
*/
|
|
305
|
+
createdAt: string;
|
|
306
|
+
/**
|
|
307
|
+
* Whether payment requires action
|
|
308
|
+
*/
|
|
309
|
+
requiresAction: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Invoice status
|
|
312
|
+
*/
|
|
313
|
+
status: 'OPEN' | 'CANCELED' | 'PAID';
|
|
314
|
+
/**
|
|
315
|
+
* Amount due
|
|
316
|
+
*/
|
|
317
|
+
amountDue?: number | null;
|
|
318
|
+
/**
|
|
319
|
+
* Billing reason
|
|
320
|
+
*/
|
|
321
|
+
billingReason?: 'BILLING_CYCLE' | 'SUBSCRIPTION_CREATION' | 'SUBSCRIPTION_UPDATE' | 'MANUAL' | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED' | 'OTHER' | null;
|
|
322
|
+
/**
|
|
323
|
+
* Invoice currency
|
|
324
|
+
*/
|
|
325
|
+
currency?: string | null;
|
|
326
|
+
/**
|
|
327
|
+
* Invoice PDF URL
|
|
328
|
+
*/
|
|
329
|
+
pdfUrl?: string | null;
|
|
330
|
+
/**
|
|
331
|
+
* Total amount
|
|
332
|
+
*/
|
|
333
|
+
total?: number | null;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Minimum spend configuration
|
|
337
|
+
*/
|
|
338
|
+
interface MinimumSpend {
|
|
339
|
+
/**
|
|
340
|
+
* The price amount
|
|
341
|
+
*/
|
|
342
|
+
amount?: number;
|
|
343
|
+
/**
|
|
344
|
+
* The price currency
|
|
345
|
+
*/
|
|
346
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
347
|
+
}
|
|
348
|
+
interface Price {
|
|
349
|
+
/**
|
|
350
|
+
* Addon identifier for the price override
|
|
351
|
+
*/
|
|
352
|
+
addonId?: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* The price amount
|
|
355
|
+
*/
|
|
356
|
+
amount?: number;
|
|
357
|
+
/**
|
|
358
|
+
* Whether this is a base charge override
|
|
359
|
+
*/
|
|
360
|
+
baseCharge?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* The billing country code of the price
|
|
363
|
+
*/
|
|
364
|
+
billingCountryCode?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Block size for pricing
|
|
367
|
+
*/
|
|
368
|
+
blockSize?: number;
|
|
369
|
+
/**
|
|
370
|
+
* The price currency
|
|
371
|
+
*/
|
|
372
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
373
|
+
/**
|
|
374
|
+
* Feature identifier for the price override
|
|
375
|
+
*/
|
|
376
|
+
featureId?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Pricing tiers configuration
|
|
379
|
+
*/
|
|
380
|
+
tiers?: Array<Price.Tier>;
|
|
381
|
+
}
|
|
382
|
+
namespace Price {
|
|
383
|
+
interface Tier {
|
|
384
|
+
/**
|
|
385
|
+
* The flat fee price of the price tier
|
|
386
|
+
*/
|
|
387
|
+
flatPrice?: Tier.FlatPrice;
|
|
388
|
+
/**
|
|
389
|
+
* The unit price of the price tier
|
|
390
|
+
*/
|
|
391
|
+
unitPrice?: Tier.UnitPrice;
|
|
392
|
+
/**
|
|
393
|
+
* The up to quantity of the price tier
|
|
394
|
+
*/
|
|
395
|
+
upTo?: number;
|
|
396
|
+
}
|
|
397
|
+
namespace Tier {
|
|
398
|
+
/**
|
|
399
|
+
* The flat fee price of the price tier
|
|
400
|
+
*/
|
|
401
|
+
interface FlatPrice {
|
|
402
|
+
/**
|
|
403
|
+
* The price amount
|
|
404
|
+
*/
|
|
405
|
+
amount: number;
|
|
406
|
+
/**
|
|
407
|
+
* ISO 4217 currency code
|
|
408
|
+
*/
|
|
409
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* The unit price of the price tier
|
|
413
|
+
*/
|
|
414
|
+
interface UnitPrice {
|
|
415
|
+
/**
|
|
416
|
+
* The price amount
|
|
417
|
+
*/
|
|
418
|
+
amount: number;
|
|
419
|
+
/**
|
|
420
|
+
* ISO 4217 currency code
|
|
421
|
+
*/
|
|
422
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Subscription entitlement reference
|
|
428
|
+
*/
|
|
429
|
+
interface SubscriptionEntitlement {
|
|
430
|
+
/**
|
|
431
|
+
* Feature ID or currency ID
|
|
432
|
+
*/
|
|
433
|
+
id: string;
|
|
434
|
+
/**
|
|
435
|
+
* Entitlement type (FEATURE or CREDIT)
|
|
436
|
+
*/
|
|
437
|
+
type: 'FEATURE' | 'CREDIT';
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Trial configuration
|
|
441
|
+
*/
|
|
442
|
+
interface Trial {
|
|
443
|
+
/**
|
|
444
|
+
* Behavior when the trial ends
|
|
445
|
+
*/
|
|
446
|
+
trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Customer subscription to a plan
|
|
452
|
+
*/
|
|
419
453
|
export interface SubscriptionListResponse {
|
|
420
454
|
/**
|
|
421
455
|
* Subscription ID
|
|
@@ -453,6 +487,15 @@ export interface SubscriptionListResponse {
|
|
|
453
487
|
* Subscription status
|
|
454
488
|
*/
|
|
455
489
|
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
490
|
+
addons?: Array<SubscriptionListResponse.Addon>;
|
|
491
|
+
/**
|
|
492
|
+
* Billing cycle anchor date
|
|
493
|
+
*/
|
|
494
|
+
billingCycleAnchor?: string | null;
|
|
495
|
+
/**
|
|
496
|
+
* Budget configuration
|
|
497
|
+
*/
|
|
498
|
+
budget?: SubscriptionListResponse.Budget | null;
|
|
456
499
|
/**
|
|
457
500
|
* Subscription cancellation date
|
|
458
501
|
*/
|
|
@@ -461,6 +504,10 @@ export interface SubscriptionListResponse {
|
|
|
461
504
|
* Subscription cancel reason
|
|
462
505
|
*/
|
|
463
506
|
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
507
|
+
/**
|
|
508
|
+
* Coupons applied to the subscription
|
|
509
|
+
*/
|
|
510
|
+
coupons?: Array<SubscriptionListResponse.Coupon>;
|
|
464
511
|
/**
|
|
465
512
|
* End of the current billing period
|
|
466
513
|
*/
|
|
@@ -477,12 +524,24 @@ export interface SubscriptionListResponse {
|
|
|
477
524
|
* Subscription end date
|
|
478
525
|
*/
|
|
479
526
|
endDate?: string | null;
|
|
527
|
+
/**
|
|
528
|
+
* Scheduled future updates for the subscription
|
|
529
|
+
*/
|
|
530
|
+
futureUpdates?: Array<SubscriptionListResponse.FutureUpdate>;
|
|
531
|
+
/**
|
|
532
|
+
* Latest invoice for the subscription
|
|
533
|
+
*/
|
|
534
|
+
latestInvoice?: SubscriptionListResponse.LatestInvoice | null;
|
|
480
535
|
/**
|
|
481
536
|
* Additional metadata for the subscription
|
|
482
537
|
*/
|
|
483
538
|
metadata?: {
|
|
484
539
|
[key: string]: string;
|
|
485
540
|
};
|
|
541
|
+
/**
|
|
542
|
+
* Minimum spend configuration
|
|
543
|
+
*/
|
|
544
|
+
minimumSpend?: SubscriptionListResponse.MinimumSpend | null;
|
|
486
545
|
/**
|
|
487
546
|
* Paying customer ID for delegated billing
|
|
488
547
|
*/
|
|
@@ -496,259 +555,283 @@ export interface SubscriptionListResponse {
|
|
|
496
555
|
* Resource ID
|
|
497
556
|
*/
|
|
498
557
|
resourceId?: string | null;
|
|
558
|
+
/**
|
|
559
|
+
* Entitlements associated with the subscription
|
|
560
|
+
*/
|
|
561
|
+
subscriptionEntitlements?: Array<SubscriptionListResponse.SubscriptionEntitlement>;
|
|
562
|
+
/**
|
|
563
|
+
* Trial configuration
|
|
564
|
+
*/
|
|
565
|
+
trial?: SubscriptionListResponse.Trial | null;
|
|
499
566
|
/**
|
|
500
567
|
* Subscription trial end date
|
|
501
568
|
*/
|
|
502
569
|
trialEndDate?: string | null;
|
|
503
570
|
}
|
|
504
571
|
export declare namespace SubscriptionListResponse {
|
|
505
|
-
|
|
572
|
+
/**
|
|
573
|
+
* Addon configuration
|
|
574
|
+
*/
|
|
575
|
+
interface Addon {
|
|
506
576
|
/**
|
|
507
|
-
*
|
|
577
|
+
* Addon ID
|
|
508
578
|
*/
|
|
509
579
|
id: string;
|
|
510
580
|
/**
|
|
511
|
-
*
|
|
512
|
-
*/
|
|
513
|
-
createdAt: string;
|
|
514
|
-
/**
|
|
515
|
-
* Last update timestamp
|
|
581
|
+
* Number of addon instances
|
|
516
582
|
*/
|
|
517
|
-
|
|
518
|
-
[k: string]: unknown;
|
|
583
|
+
quantity: number;
|
|
519
584
|
}
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* Response object
|
|
523
|
-
*/
|
|
524
|
-
export interface SubscriptionDelegateResponse {
|
|
525
585
|
/**
|
|
526
|
-
*
|
|
586
|
+
* Budget configuration
|
|
527
587
|
*/
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
588
|
+
interface Budget {
|
|
589
|
+
/**
|
|
590
|
+
* Whether the budget is a soft limit
|
|
591
|
+
*/
|
|
592
|
+
hasSoftLimit: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Maximum spending limit
|
|
595
|
+
*/
|
|
596
|
+
limit: number;
|
|
597
|
+
}
|
|
531
598
|
/**
|
|
532
|
-
*
|
|
599
|
+
* Coupon applied to a subscription
|
|
533
600
|
*/
|
|
534
|
-
interface
|
|
601
|
+
interface Coupon {
|
|
535
602
|
/**
|
|
536
|
-
*
|
|
603
|
+
* Coupon ID
|
|
537
604
|
*/
|
|
538
605
|
id: string;
|
|
539
606
|
/**
|
|
540
|
-
*
|
|
607
|
+
* Coupon name
|
|
541
608
|
*/
|
|
542
|
-
|
|
609
|
+
name: string;
|
|
543
610
|
/**
|
|
544
|
-
*
|
|
611
|
+
* Coupon status
|
|
545
612
|
*/
|
|
546
|
-
|
|
613
|
+
status: 'ACTIVE' | 'EXPIRED' | 'REMOVED';
|
|
547
614
|
/**
|
|
548
|
-
*
|
|
615
|
+
* Fixed amount discounts by currency
|
|
549
616
|
*/
|
|
550
|
-
|
|
617
|
+
amountsOff?: Array<Coupon.AmountsOff> | null;
|
|
551
618
|
/**
|
|
552
|
-
*
|
|
619
|
+
* Percentage discount
|
|
553
620
|
*/
|
|
554
|
-
|
|
621
|
+
percentOff?: number | null;
|
|
622
|
+
}
|
|
623
|
+
namespace Coupon {
|
|
624
|
+
interface AmountsOff {
|
|
625
|
+
/**
|
|
626
|
+
* The price amount
|
|
627
|
+
*/
|
|
628
|
+
amount?: number;
|
|
629
|
+
/**
|
|
630
|
+
* The price currency
|
|
631
|
+
*/
|
|
632
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Scheduled subscription update
|
|
637
|
+
*/
|
|
638
|
+
interface FutureUpdate {
|
|
555
639
|
/**
|
|
556
|
-
*
|
|
640
|
+
* Scheduled execution time
|
|
557
641
|
*/
|
|
558
|
-
|
|
642
|
+
scheduledExecutionTime: string;
|
|
559
643
|
/**
|
|
560
|
-
*
|
|
644
|
+
* Status of the scheduled update
|
|
561
645
|
*/
|
|
562
|
-
|
|
646
|
+
scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED';
|
|
563
647
|
/**
|
|
564
|
-
*
|
|
648
|
+
* Type of scheduled change
|
|
565
649
|
*/
|
|
566
|
-
|
|
650
|
+
subscriptionScheduleType: 'DOWNGRADE' | 'PLAN' | 'BILLING_PERIOD' | 'UNIT_AMOUNT' | 'RECURRING_CREDITS' | 'PRICE_OVERRIDE' | 'ADDON' | 'COUPON' | 'MIGRATE_TO_LATEST' | 'ADDITIONAL_META_DATA' | 'BILLING_INFO_METADATA';
|
|
567
651
|
/**
|
|
568
|
-
*
|
|
652
|
+
* Target package for the update
|
|
569
653
|
*/
|
|
570
|
-
|
|
654
|
+
targetPackage?: FutureUpdate.TargetPackage | null;
|
|
655
|
+
}
|
|
656
|
+
namespace FutureUpdate {
|
|
571
657
|
/**
|
|
572
|
-
*
|
|
658
|
+
* Target package for the update
|
|
573
659
|
*/
|
|
574
|
-
|
|
660
|
+
interface TargetPackage {
|
|
661
|
+
/**
|
|
662
|
+
* Target package for the update
|
|
663
|
+
*/
|
|
664
|
+
id: string;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Latest invoice for the subscription
|
|
669
|
+
*/
|
|
670
|
+
interface LatestInvoice {
|
|
575
671
|
/**
|
|
576
|
-
*
|
|
672
|
+
* Invoice billing ID
|
|
577
673
|
*/
|
|
578
|
-
|
|
674
|
+
billingId: string;
|
|
579
675
|
/**
|
|
580
|
-
*
|
|
676
|
+
* Invoice creation date
|
|
581
677
|
*/
|
|
582
|
-
|
|
678
|
+
createdAt: string;
|
|
583
679
|
/**
|
|
584
|
-
*
|
|
680
|
+
* Whether payment requires action
|
|
585
681
|
*/
|
|
586
|
-
|
|
682
|
+
requiresAction: boolean;
|
|
587
683
|
/**
|
|
588
|
-
*
|
|
684
|
+
* Invoice status
|
|
589
685
|
*/
|
|
590
|
-
|
|
686
|
+
status: 'OPEN' | 'CANCELED' | 'PAID';
|
|
591
687
|
/**
|
|
592
|
-
*
|
|
688
|
+
* Amount due
|
|
593
689
|
*/
|
|
594
|
-
|
|
690
|
+
amountDue?: number | null;
|
|
595
691
|
/**
|
|
596
|
-
*
|
|
692
|
+
* Billing reason
|
|
597
693
|
*/
|
|
598
|
-
|
|
599
|
-
[key: string]: string;
|
|
600
|
-
};
|
|
694
|
+
billingReason?: 'BILLING_CYCLE' | 'SUBSCRIPTION_CREATION' | 'SUBSCRIPTION_UPDATE' | 'MANUAL' | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED' | 'OTHER' | null;
|
|
601
695
|
/**
|
|
602
|
-
*
|
|
696
|
+
* Invoice currency
|
|
603
697
|
*/
|
|
604
|
-
|
|
698
|
+
currency?: string | null;
|
|
605
699
|
/**
|
|
606
|
-
*
|
|
700
|
+
* Invoice PDF URL
|
|
607
701
|
*/
|
|
608
|
-
|
|
609
|
-
prices?: Array<Data.Price>;
|
|
702
|
+
pdfUrl?: string | null;
|
|
610
703
|
/**
|
|
611
|
-
*
|
|
704
|
+
* Total amount
|
|
612
705
|
*/
|
|
613
|
-
|
|
706
|
+
total?: number | null;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Minimum spend configuration
|
|
710
|
+
*/
|
|
711
|
+
interface MinimumSpend {
|
|
614
712
|
/**
|
|
615
|
-
*
|
|
713
|
+
* The price amount
|
|
616
714
|
*/
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
namespace Data {
|
|
620
|
-
interface Price {
|
|
621
|
-
/**
|
|
622
|
-
* Price ID
|
|
623
|
-
*/
|
|
624
|
-
id: string;
|
|
625
|
-
/**
|
|
626
|
-
* Creation timestamp
|
|
627
|
-
*/
|
|
628
|
-
createdAt: string;
|
|
629
|
-
/**
|
|
630
|
-
* Last update timestamp
|
|
631
|
-
*/
|
|
632
|
-
updatedAt: string;
|
|
633
|
-
[k: string]: unknown;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* Response object
|
|
639
|
-
*/
|
|
640
|
-
export interface SubscriptionMigrateResponse {
|
|
641
|
-
/**
|
|
642
|
-
* Customer subscription to a plan
|
|
643
|
-
*/
|
|
644
|
-
data: SubscriptionMigrateResponse.Data;
|
|
645
|
-
}
|
|
646
|
-
export declare namespace SubscriptionMigrateResponse {
|
|
647
|
-
/**
|
|
648
|
-
* Customer subscription to a plan
|
|
649
|
-
*/
|
|
650
|
-
interface Data {
|
|
651
|
-
/**
|
|
652
|
-
* Subscription ID
|
|
653
|
-
*/
|
|
654
|
-
id: string;
|
|
655
|
-
/**
|
|
656
|
-
* Billing ID
|
|
657
|
-
*/
|
|
658
|
-
billingId: string | null;
|
|
659
|
-
/**
|
|
660
|
-
* Created at
|
|
661
|
-
*/
|
|
662
|
-
createdAt: string;
|
|
663
|
-
/**
|
|
664
|
-
* Customer ID
|
|
665
|
-
*/
|
|
666
|
-
customerId: string;
|
|
667
|
-
/**
|
|
668
|
-
* Payment collection
|
|
669
|
-
*/
|
|
670
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
671
|
-
/**
|
|
672
|
-
* Plan ID
|
|
673
|
-
*/
|
|
674
|
-
planId: string;
|
|
675
|
-
/**
|
|
676
|
-
* Pricing type
|
|
677
|
-
*/
|
|
678
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
679
|
-
/**
|
|
680
|
-
* Subscription start date
|
|
681
|
-
*/
|
|
682
|
-
startDate: string;
|
|
683
|
-
/**
|
|
684
|
-
* Subscription status
|
|
685
|
-
*/
|
|
686
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
687
|
-
/**
|
|
688
|
-
* Subscription cancellation date
|
|
689
|
-
*/
|
|
690
|
-
cancellationDate?: string | null;
|
|
691
|
-
/**
|
|
692
|
-
* Subscription cancel reason
|
|
693
|
-
*/
|
|
694
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
715
|
+
amount?: number;
|
|
695
716
|
/**
|
|
696
|
-
*
|
|
717
|
+
* The price currency
|
|
697
718
|
*/
|
|
698
|
-
|
|
719
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
720
|
+
}
|
|
721
|
+
interface Price {
|
|
699
722
|
/**
|
|
700
|
-
*
|
|
723
|
+
* Addon identifier for the price override
|
|
701
724
|
*/
|
|
702
|
-
|
|
725
|
+
addonId?: string | null;
|
|
703
726
|
/**
|
|
704
|
-
*
|
|
727
|
+
* The price amount
|
|
705
728
|
*/
|
|
706
|
-
|
|
729
|
+
amount?: number;
|
|
707
730
|
/**
|
|
708
|
-
*
|
|
731
|
+
* Whether this is a base charge override
|
|
709
732
|
*/
|
|
710
|
-
|
|
733
|
+
baseCharge?: boolean;
|
|
711
734
|
/**
|
|
712
|
-
*
|
|
735
|
+
* The billing country code of the price
|
|
713
736
|
*/
|
|
714
|
-
|
|
715
|
-
[key: string]: string;
|
|
716
|
-
};
|
|
737
|
+
billingCountryCode?: string;
|
|
717
738
|
/**
|
|
718
|
-
*
|
|
739
|
+
* Block size for pricing
|
|
719
740
|
*/
|
|
720
|
-
|
|
741
|
+
blockSize?: number;
|
|
721
742
|
/**
|
|
722
|
-
* The
|
|
743
|
+
* The price currency
|
|
723
744
|
*/
|
|
724
|
-
|
|
725
|
-
prices?: Array<Data.Price>;
|
|
745
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
726
746
|
/**
|
|
727
|
-
*
|
|
747
|
+
* Feature identifier for the price override
|
|
728
748
|
*/
|
|
729
|
-
|
|
749
|
+
featureId?: string | null;
|
|
730
750
|
/**
|
|
731
|
-
*
|
|
751
|
+
* Pricing tiers configuration
|
|
732
752
|
*/
|
|
733
|
-
|
|
753
|
+
tiers?: Array<Price.Tier>;
|
|
734
754
|
}
|
|
735
|
-
namespace
|
|
736
|
-
interface
|
|
755
|
+
namespace Price {
|
|
756
|
+
interface Tier {
|
|
737
757
|
/**
|
|
738
|
-
*
|
|
758
|
+
* The flat fee price of the price tier
|
|
739
759
|
*/
|
|
740
|
-
|
|
760
|
+
flatPrice?: Tier.FlatPrice;
|
|
741
761
|
/**
|
|
742
|
-
*
|
|
762
|
+
* The unit price of the price tier
|
|
743
763
|
*/
|
|
744
|
-
|
|
764
|
+
unitPrice?: Tier.UnitPrice;
|
|
765
|
+
/**
|
|
766
|
+
* The up to quantity of the price tier
|
|
767
|
+
*/
|
|
768
|
+
upTo?: number;
|
|
769
|
+
}
|
|
770
|
+
namespace Tier {
|
|
771
|
+
/**
|
|
772
|
+
* The flat fee price of the price tier
|
|
773
|
+
*/
|
|
774
|
+
interface FlatPrice {
|
|
775
|
+
/**
|
|
776
|
+
* The price amount
|
|
777
|
+
*/
|
|
778
|
+
amount: number;
|
|
779
|
+
/**
|
|
780
|
+
* ISO 4217 currency code
|
|
781
|
+
*/
|
|
782
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
783
|
+
}
|
|
745
784
|
/**
|
|
746
|
-
*
|
|
785
|
+
* The unit price of the price tier
|
|
747
786
|
*/
|
|
748
|
-
|
|
749
|
-
|
|
787
|
+
interface UnitPrice {
|
|
788
|
+
/**
|
|
789
|
+
* The price amount
|
|
790
|
+
*/
|
|
791
|
+
amount: number;
|
|
792
|
+
/**
|
|
793
|
+
* ISO 4217 currency code
|
|
794
|
+
*/
|
|
795
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
796
|
+
}
|
|
750
797
|
}
|
|
751
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* Subscription entitlement reference
|
|
801
|
+
*/
|
|
802
|
+
interface SubscriptionEntitlement {
|
|
803
|
+
/**
|
|
804
|
+
* Feature ID or currency ID
|
|
805
|
+
*/
|
|
806
|
+
id: string;
|
|
807
|
+
/**
|
|
808
|
+
* Entitlement type (FEATURE or CREDIT)
|
|
809
|
+
*/
|
|
810
|
+
type: 'FEATURE' | 'CREDIT';
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Trial configuration
|
|
814
|
+
*/
|
|
815
|
+
interface Trial {
|
|
816
|
+
/**
|
|
817
|
+
* Behavior when the trial ends
|
|
818
|
+
*/
|
|
819
|
+
trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Response object
|
|
824
|
+
*/
|
|
825
|
+
export interface SubscriptionImportResponse {
|
|
826
|
+
data: SubscriptionImportResponse.Data;
|
|
827
|
+
}
|
|
828
|
+
export declare namespace SubscriptionImportResponse {
|
|
829
|
+
interface Data {
|
|
830
|
+
/**
|
|
831
|
+
* Unique identifier for the import task
|
|
832
|
+
*/
|
|
833
|
+
taskId: string;
|
|
834
|
+
}
|
|
752
835
|
}
|
|
753
836
|
/**
|
|
754
837
|
* Response object
|
|
@@ -919,15 +1002,15 @@ export declare namespace SubscriptionPreviewResponse {
|
|
|
919
1002
|
start?: string;
|
|
920
1003
|
}
|
|
921
1004
|
/**
|
|
922
|
-
*
|
|
1005
|
+
* Addon configuration
|
|
923
1006
|
*/
|
|
924
1007
|
interface FreeItem {
|
|
925
1008
|
/**
|
|
926
1009
|
* Addon ID
|
|
927
1010
|
*/
|
|
928
|
-
|
|
1011
|
+
id: string;
|
|
929
1012
|
/**
|
|
930
|
-
*
|
|
1013
|
+
* Number of addon instances
|
|
931
1014
|
*/
|
|
932
1015
|
quantity: number;
|
|
933
1016
|
}
|
|
@@ -1051,212 +1134,1075 @@ export declare namespace SubscriptionPreviewResponse {
|
|
|
1051
1134
|
/**
|
|
1052
1135
|
* Response object
|
|
1053
1136
|
*/
|
|
1054
|
-
export interface
|
|
1137
|
+
export interface SubscriptionProvisionResponse {
|
|
1055
1138
|
/**
|
|
1056
|
-
*
|
|
1139
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
1057
1140
|
*/
|
|
1058
|
-
data:
|
|
1141
|
+
data: SubscriptionProvisionResponse.Data;
|
|
1059
1142
|
}
|
|
1060
|
-
export declare namespace
|
|
1143
|
+
export declare namespace SubscriptionProvisionResponse {
|
|
1061
1144
|
/**
|
|
1062
|
-
*
|
|
1145
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
1063
1146
|
*/
|
|
1064
1147
|
interface Data {
|
|
1065
1148
|
/**
|
|
1066
|
-
*
|
|
1149
|
+
* Unique identifier for the provisioned subscription
|
|
1067
1150
|
*/
|
|
1068
1151
|
id: string;
|
|
1152
|
+
entitlements: Array<Data.UnionObjectVariant0 | Data.UnionObjectVariant1> | null;
|
|
1069
1153
|
/**
|
|
1070
|
-
*
|
|
1071
|
-
*/
|
|
1072
|
-
billingId: string | null;
|
|
1073
|
-
/**
|
|
1074
|
-
* Created at
|
|
1075
|
-
*/
|
|
1076
|
-
createdAt: string;
|
|
1077
|
-
/**
|
|
1078
|
-
* Customer ID
|
|
1079
|
-
*/
|
|
1080
|
-
customerId: string;
|
|
1081
|
-
/**
|
|
1082
|
-
* Payment collection
|
|
1083
|
-
*/
|
|
1084
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
1085
|
-
/**
|
|
1086
|
-
* Plan ID
|
|
1087
|
-
*/
|
|
1088
|
-
planId: string;
|
|
1089
|
-
/**
|
|
1090
|
-
* Pricing type
|
|
1091
|
-
*/
|
|
1092
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
1093
|
-
/**
|
|
1094
|
-
* Subscription start date
|
|
1095
|
-
*/
|
|
1096
|
-
startDate: string;
|
|
1097
|
-
/**
|
|
1098
|
-
* Subscription status
|
|
1099
|
-
*/
|
|
1100
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
1101
|
-
/**
|
|
1102
|
-
* Subscription cancellation date
|
|
1103
|
-
*/
|
|
1104
|
-
cancellationDate?: string | null;
|
|
1105
|
-
/**
|
|
1106
|
-
* Subscription cancel reason
|
|
1107
|
-
*/
|
|
1108
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
1109
|
-
/**
|
|
1110
|
-
* End of the current billing period
|
|
1111
|
-
*/
|
|
1112
|
-
currentBillingPeriodEnd?: string | null;
|
|
1113
|
-
/**
|
|
1114
|
-
* Start of the current billing period
|
|
1115
|
-
*/
|
|
1116
|
-
currentBillingPeriodStart?: string | null;
|
|
1117
|
-
/**
|
|
1118
|
-
* Subscription effective end date
|
|
1119
|
-
*/
|
|
1120
|
-
effectiveEndDate?: string | null;
|
|
1121
|
-
/**
|
|
1122
|
-
* Subscription end date
|
|
1123
|
-
*/
|
|
1124
|
-
endDate?: string | null;
|
|
1125
|
-
/**
|
|
1126
|
-
* Additional metadata for the subscription
|
|
1154
|
+
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
1127
1155
|
*/
|
|
1128
|
-
|
|
1129
|
-
[key: string]: string;
|
|
1130
|
-
};
|
|
1156
|
+
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
1131
1157
|
/**
|
|
1132
|
-
*
|
|
1158
|
+
* Created subscription (when status is SUCCESS)
|
|
1133
1159
|
*/
|
|
1134
|
-
|
|
1160
|
+
subscription: Data.Subscription | null;
|
|
1135
1161
|
/**
|
|
1136
|
-
*
|
|
1162
|
+
* Checkout billing ID when payment is required
|
|
1137
1163
|
*/
|
|
1138
|
-
|
|
1139
|
-
prices?: Array<Data.Price>;
|
|
1164
|
+
checkoutBillingId?: string;
|
|
1140
1165
|
/**
|
|
1141
|
-
*
|
|
1166
|
+
* URL to complete payment when PAYMENT_REQUIRED
|
|
1142
1167
|
*/
|
|
1143
|
-
|
|
1168
|
+
checkoutUrl?: string;
|
|
1144
1169
|
/**
|
|
1145
|
-
*
|
|
1170
|
+
* Whether the subscription is scheduled for future activation
|
|
1146
1171
|
*/
|
|
1147
|
-
|
|
1172
|
+
isScheduled?: boolean;
|
|
1148
1173
|
}
|
|
1149
1174
|
namespace Data {
|
|
1150
|
-
interface
|
|
1175
|
+
interface UnionObjectVariant0 {
|
|
1176
|
+
accessDeniedReason: 'FeatureNotFound' | 'CustomerNotFound' | 'CustomerIsArchived' | 'CustomerResourceNotFound' | 'NoActiveSubscription' | 'NoFeatureEntitlementInSubscription' | 'RequestedUsageExceedingLimit' | 'RequestedValuesMismatch' | 'BudgetExceeded' | 'Unknown' | 'FeatureTypeMismatch' | 'Revoked' | 'InsufficientCredits' | 'EntitlementNotFound' | null;
|
|
1177
|
+
isGranted: boolean;
|
|
1178
|
+
type: 'FEATURE';
|
|
1179
|
+
currentUsage?: number;
|
|
1151
1180
|
/**
|
|
1152
|
-
*
|
|
1181
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
1153
1182
|
*/
|
|
1154
|
-
|
|
1183
|
+
entitlementUpdatedAt?: string;
|
|
1184
|
+
feature?: UnionObjectVariant0.Feature;
|
|
1185
|
+
hasUnlimitedUsage?: boolean;
|
|
1186
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
|
|
1187
|
+
usageLimit?: number | null;
|
|
1155
1188
|
/**
|
|
1156
|
-
*
|
|
1189
|
+
* The anchor for calculating the usage period for metered entitlements with a
|
|
1190
|
+
* reset period configured
|
|
1157
1191
|
*/
|
|
1158
|
-
|
|
1192
|
+
usagePeriodAnchor?: string;
|
|
1193
|
+
/**
|
|
1194
|
+
* The end date of the usage period for metered entitlements with a reset period
|
|
1195
|
+
* configured
|
|
1196
|
+
*/
|
|
1197
|
+
usagePeriodEnd?: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* The start date of the usage period for metered entitlements with a reset period
|
|
1200
|
+
* configured
|
|
1201
|
+
*/
|
|
1202
|
+
usagePeriodStart?: string;
|
|
1159
1203
|
/**
|
|
1160
|
-
*
|
|
1204
|
+
* The next time the entitlement should be recalculated
|
|
1161
1205
|
*/
|
|
1162
|
-
|
|
1163
|
-
[k: string]: unknown;
|
|
1206
|
+
validUntil?: string;
|
|
1164
1207
|
}
|
|
1165
|
-
|
|
1208
|
+
namespace UnionObjectVariant0 {
|
|
1209
|
+
interface Feature {
|
|
1210
|
+
/**
|
|
1211
|
+
* The unique reference ID of the entitlement.
|
|
1212
|
+
*/
|
|
1213
|
+
id: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* The human-readable name of the entitlement, shown in UI elements.
|
|
1216
|
+
*/
|
|
1217
|
+
displayName: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* The current status of the feature.
|
|
1220
|
+
*/
|
|
1221
|
+
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
1222
|
+
/**
|
|
1223
|
+
* The type of feature associated with the entitlement.
|
|
1224
|
+
*/
|
|
1225
|
+
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
interface UnionObjectVariant1 {
|
|
1229
|
+
accessDeniedReason: 'FeatureNotFound' | 'CustomerNotFound' | 'CustomerIsArchived' | 'CustomerResourceNotFound' | 'NoActiveSubscription' | 'NoFeatureEntitlementInSubscription' | 'RequestedUsageExceedingLimit' | 'RequestedValuesMismatch' | 'BudgetExceeded' | 'Unknown' | 'FeatureTypeMismatch' | 'Revoked' | 'InsufficientCredits' | 'EntitlementNotFound' | null;
|
|
1230
|
+
/**
|
|
1231
|
+
* The currency associated with a credit entitlement.
|
|
1232
|
+
*/
|
|
1233
|
+
currency: UnionObjectVariant1.Currency;
|
|
1234
|
+
currentUsage: number;
|
|
1235
|
+
isGranted: boolean;
|
|
1236
|
+
type: 'CREDIT';
|
|
1237
|
+
usageLimit: number;
|
|
1238
|
+
/**
|
|
1239
|
+
* Timestamp of the last update to the credit usage.
|
|
1240
|
+
*/
|
|
1241
|
+
usageUpdatedAt: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
1244
|
+
*/
|
|
1245
|
+
entitlementUpdatedAt?: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* The end date of the current billing period for recurring credit grants.
|
|
1248
|
+
*/
|
|
1249
|
+
usagePeriodEnd?: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* The next time the entitlement should be recalculated
|
|
1252
|
+
*/
|
|
1253
|
+
validUntil?: string;
|
|
1254
|
+
}
|
|
1255
|
+
namespace UnionObjectVariant1 {
|
|
1256
|
+
/**
|
|
1257
|
+
* The currency associated with a credit entitlement.
|
|
1258
|
+
*/
|
|
1259
|
+
interface Currency {
|
|
1260
|
+
/**
|
|
1261
|
+
* The unique identifier of the custom currency.
|
|
1262
|
+
*/
|
|
1263
|
+
currencyId: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* The display name of the currency.
|
|
1266
|
+
*/
|
|
1267
|
+
displayName: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* A description of the currency.
|
|
1270
|
+
*/
|
|
1271
|
+
description?: string | null;
|
|
1272
|
+
/**
|
|
1273
|
+
* Additional metadata associated with the currency.
|
|
1274
|
+
*/
|
|
1275
|
+
metadata?: {
|
|
1276
|
+
[key: string]: string;
|
|
1277
|
+
} | null;
|
|
1278
|
+
/**
|
|
1279
|
+
* The plural form of the currency unit.
|
|
1280
|
+
*/
|
|
1281
|
+
unitPlural?: string | null;
|
|
1282
|
+
/**
|
|
1283
|
+
* The singular form of the currency unit.
|
|
1284
|
+
*/
|
|
1285
|
+
unitSingular?: string | null;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Created subscription (when status is SUCCESS)
|
|
1290
|
+
*/
|
|
1291
|
+
interface Subscription {
|
|
1292
|
+
/**
|
|
1293
|
+
* Subscription ID
|
|
1294
|
+
*/
|
|
1295
|
+
id: string;
|
|
1296
|
+
/**
|
|
1297
|
+
* Billing ID
|
|
1298
|
+
*/
|
|
1299
|
+
billingId: string | null;
|
|
1300
|
+
/**
|
|
1301
|
+
* Created at
|
|
1302
|
+
*/
|
|
1303
|
+
createdAt: string;
|
|
1304
|
+
/**
|
|
1305
|
+
* Customer ID
|
|
1306
|
+
*/
|
|
1307
|
+
customerId: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Payment collection
|
|
1310
|
+
*/
|
|
1311
|
+
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
1312
|
+
/**
|
|
1313
|
+
* Plan ID
|
|
1314
|
+
*/
|
|
1315
|
+
planId: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* Pricing type
|
|
1318
|
+
*/
|
|
1319
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
1320
|
+
/**
|
|
1321
|
+
* Subscription start date
|
|
1322
|
+
*/
|
|
1323
|
+
startDate: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Subscription status
|
|
1326
|
+
*/
|
|
1327
|
+
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
1328
|
+
addons?: Array<Subscription.Addon>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Billing cycle anchor date
|
|
1331
|
+
*/
|
|
1332
|
+
billingCycleAnchor?: string | null;
|
|
1333
|
+
/**
|
|
1334
|
+
* Budget configuration
|
|
1335
|
+
*/
|
|
1336
|
+
budget?: Subscription.Budget | null;
|
|
1337
|
+
/**
|
|
1338
|
+
* Subscription cancellation date
|
|
1339
|
+
*/
|
|
1340
|
+
cancellationDate?: string | null;
|
|
1341
|
+
/**
|
|
1342
|
+
* Subscription cancel reason
|
|
1343
|
+
*/
|
|
1344
|
+
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
1345
|
+
/**
|
|
1346
|
+
* Coupons applied to the subscription
|
|
1347
|
+
*/
|
|
1348
|
+
coupons?: Array<Subscription.Coupon>;
|
|
1349
|
+
/**
|
|
1350
|
+
* End of the current billing period
|
|
1351
|
+
*/
|
|
1352
|
+
currentBillingPeriodEnd?: string | null;
|
|
1353
|
+
/**
|
|
1354
|
+
* Start of the current billing period
|
|
1355
|
+
*/
|
|
1356
|
+
currentBillingPeriodStart?: string | null;
|
|
1357
|
+
/**
|
|
1358
|
+
* Subscription effective end date
|
|
1359
|
+
*/
|
|
1360
|
+
effectiveEndDate?: string | null;
|
|
1361
|
+
/**
|
|
1362
|
+
* Subscription end date
|
|
1363
|
+
*/
|
|
1364
|
+
endDate?: string | null;
|
|
1365
|
+
/**
|
|
1366
|
+
* Scheduled future updates for the subscription
|
|
1367
|
+
*/
|
|
1368
|
+
futureUpdates?: Array<Subscription.FutureUpdate>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Latest invoice for the subscription
|
|
1371
|
+
*/
|
|
1372
|
+
latestInvoice?: Subscription.LatestInvoice | null;
|
|
1373
|
+
/**
|
|
1374
|
+
* Additional metadata for the subscription
|
|
1375
|
+
*/
|
|
1376
|
+
metadata?: {
|
|
1377
|
+
[key: string]: string;
|
|
1378
|
+
};
|
|
1379
|
+
/**
|
|
1380
|
+
* Minimum spend configuration
|
|
1381
|
+
*/
|
|
1382
|
+
minimumSpend?: Subscription.MinimumSpend | null;
|
|
1383
|
+
/**
|
|
1384
|
+
* Paying customer ID for delegated billing
|
|
1385
|
+
*/
|
|
1386
|
+
payingCustomerId?: string | null;
|
|
1387
|
+
/**
|
|
1388
|
+
* The method used to collect payments for a subscription
|
|
1389
|
+
*/
|
|
1390
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
1391
|
+
prices?: Array<Subscription.Price>;
|
|
1392
|
+
/**
|
|
1393
|
+
* Resource ID
|
|
1394
|
+
*/
|
|
1395
|
+
resourceId?: string | null;
|
|
1396
|
+
/**
|
|
1397
|
+
* Entitlements associated with the subscription
|
|
1398
|
+
*/
|
|
1399
|
+
subscriptionEntitlements?: Array<Subscription.SubscriptionEntitlement>;
|
|
1400
|
+
/**
|
|
1401
|
+
* Trial configuration
|
|
1402
|
+
*/
|
|
1403
|
+
trial?: Subscription.Trial | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* Subscription trial end date
|
|
1406
|
+
*/
|
|
1407
|
+
trialEndDate?: string | null;
|
|
1408
|
+
}
|
|
1409
|
+
namespace Subscription {
|
|
1410
|
+
/**
|
|
1411
|
+
* Addon configuration
|
|
1412
|
+
*/
|
|
1413
|
+
interface Addon {
|
|
1414
|
+
/**
|
|
1415
|
+
* Addon ID
|
|
1416
|
+
*/
|
|
1417
|
+
id: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* Number of addon instances
|
|
1420
|
+
*/
|
|
1421
|
+
quantity: number;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Budget configuration
|
|
1425
|
+
*/
|
|
1426
|
+
interface Budget {
|
|
1427
|
+
/**
|
|
1428
|
+
* Whether the budget is a soft limit
|
|
1429
|
+
*/
|
|
1430
|
+
hasSoftLimit: boolean;
|
|
1431
|
+
/**
|
|
1432
|
+
* Maximum spending limit
|
|
1433
|
+
*/
|
|
1434
|
+
limit: number;
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Coupon applied to a subscription
|
|
1438
|
+
*/
|
|
1439
|
+
interface Coupon {
|
|
1440
|
+
/**
|
|
1441
|
+
* Coupon ID
|
|
1442
|
+
*/
|
|
1443
|
+
id: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* Coupon name
|
|
1446
|
+
*/
|
|
1447
|
+
name: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Coupon status
|
|
1450
|
+
*/
|
|
1451
|
+
status: 'ACTIVE' | 'EXPIRED' | 'REMOVED';
|
|
1452
|
+
/**
|
|
1453
|
+
* Fixed amount discounts by currency
|
|
1454
|
+
*/
|
|
1455
|
+
amountsOff?: Array<Coupon.AmountsOff> | null;
|
|
1456
|
+
/**
|
|
1457
|
+
* Percentage discount
|
|
1458
|
+
*/
|
|
1459
|
+
percentOff?: number | null;
|
|
1460
|
+
}
|
|
1461
|
+
namespace Coupon {
|
|
1462
|
+
interface AmountsOff {
|
|
1463
|
+
/**
|
|
1464
|
+
* The price amount
|
|
1465
|
+
*/
|
|
1466
|
+
amount?: number;
|
|
1467
|
+
/**
|
|
1468
|
+
* The price currency
|
|
1469
|
+
*/
|
|
1470
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Scheduled subscription update
|
|
1475
|
+
*/
|
|
1476
|
+
interface FutureUpdate {
|
|
1477
|
+
/**
|
|
1478
|
+
* Scheduled execution time
|
|
1479
|
+
*/
|
|
1480
|
+
scheduledExecutionTime: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* Status of the scheduled update
|
|
1483
|
+
*/
|
|
1484
|
+
scheduleStatus: 'PENDING_PAYMENT' | 'SCHEDULED' | 'CANCELED' | 'DONE' | 'FAILED';
|
|
1485
|
+
/**
|
|
1486
|
+
* Type of scheduled change
|
|
1487
|
+
*/
|
|
1488
|
+
subscriptionScheduleType: 'DOWNGRADE' | 'PLAN' | 'BILLING_PERIOD' | 'UNIT_AMOUNT' | 'RECURRING_CREDITS' | 'PRICE_OVERRIDE' | 'ADDON' | 'COUPON' | 'MIGRATE_TO_LATEST' | 'ADDITIONAL_META_DATA' | 'BILLING_INFO_METADATA';
|
|
1489
|
+
/**
|
|
1490
|
+
* Target package for the update
|
|
1491
|
+
*/
|
|
1492
|
+
targetPackage?: FutureUpdate.TargetPackage | null;
|
|
1493
|
+
}
|
|
1494
|
+
namespace FutureUpdate {
|
|
1495
|
+
/**
|
|
1496
|
+
* Target package for the update
|
|
1497
|
+
*/
|
|
1498
|
+
interface TargetPackage {
|
|
1499
|
+
/**
|
|
1500
|
+
* Target package for the update
|
|
1501
|
+
*/
|
|
1502
|
+
id: string;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Latest invoice for the subscription
|
|
1507
|
+
*/
|
|
1508
|
+
interface LatestInvoice {
|
|
1509
|
+
/**
|
|
1510
|
+
* Invoice billing ID
|
|
1511
|
+
*/
|
|
1512
|
+
billingId: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* Invoice creation date
|
|
1515
|
+
*/
|
|
1516
|
+
createdAt: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Whether payment requires action
|
|
1519
|
+
*/
|
|
1520
|
+
requiresAction: boolean;
|
|
1521
|
+
/**
|
|
1522
|
+
* Invoice status
|
|
1523
|
+
*/
|
|
1524
|
+
status: 'OPEN' | 'CANCELED' | 'PAID';
|
|
1525
|
+
/**
|
|
1526
|
+
* Amount due
|
|
1527
|
+
*/
|
|
1528
|
+
amountDue?: number | null;
|
|
1529
|
+
/**
|
|
1530
|
+
* Billing reason
|
|
1531
|
+
*/
|
|
1532
|
+
billingReason?: 'BILLING_CYCLE' | 'SUBSCRIPTION_CREATION' | 'SUBSCRIPTION_UPDATE' | 'MANUAL' | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED' | 'OTHER' | null;
|
|
1533
|
+
/**
|
|
1534
|
+
* Invoice currency
|
|
1535
|
+
*/
|
|
1536
|
+
currency?: string | null;
|
|
1537
|
+
/**
|
|
1538
|
+
* Invoice PDF URL
|
|
1539
|
+
*/
|
|
1540
|
+
pdfUrl?: string | null;
|
|
1541
|
+
/**
|
|
1542
|
+
* Total amount
|
|
1543
|
+
*/
|
|
1544
|
+
total?: number | null;
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* Minimum spend configuration
|
|
1548
|
+
*/
|
|
1549
|
+
interface MinimumSpend {
|
|
1550
|
+
/**
|
|
1551
|
+
* The price amount
|
|
1552
|
+
*/
|
|
1553
|
+
amount?: number;
|
|
1554
|
+
/**
|
|
1555
|
+
* The price currency
|
|
1556
|
+
*/
|
|
1557
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1558
|
+
}
|
|
1559
|
+
interface Price {
|
|
1560
|
+
/**
|
|
1561
|
+
* Addon identifier for the price override
|
|
1562
|
+
*/
|
|
1563
|
+
addonId?: string | null;
|
|
1564
|
+
/**
|
|
1565
|
+
* The price amount
|
|
1566
|
+
*/
|
|
1567
|
+
amount?: number;
|
|
1568
|
+
/**
|
|
1569
|
+
* Whether this is a base charge override
|
|
1570
|
+
*/
|
|
1571
|
+
baseCharge?: boolean;
|
|
1572
|
+
/**
|
|
1573
|
+
* The billing country code of the price
|
|
1574
|
+
*/
|
|
1575
|
+
billingCountryCode?: string;
|
|
1576
|
+
/**
|
|
1577
|
+
* Block size for pricing
|
|
1578
|
+
*/
|
|
1579
|
+
blockSize?: number;
|
|
1580
|
+
/**
|
|
1581
|
+
* The price currency
|
|
1582
|
+
*/
|
|
1583
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1584
|
+
/**
|
|
1585
|
+
* Feature identifier for the price override
|
|
1586
|
+
*/
|
|
1587
|
+
featureId?: string | null;
|
|
1588
|
+
/**
|
|
1589
|
+
* Pricing tiers configuration
|
|
1590
|
+
*/
|
|
1591
|
+
tiers?: Array<Price.Tier>;
|
|
1592
|
+
}
|
|
1593
|
+
namespace Price {
|
|
1594
|
+
interface Tier {
|
|
1595
|
+
/**
|
|
1596
|
+
* The flat fee price of the price tier
|
|
1597
|
+
*/
|
|
1598
|
+
flatPrice?: Tier.FlatPrice;
|
|
1599
|
+
/**
|
|
1600
|
+
* The unit price of the price tier
|
|
1601
|
+
*/
|
|
1602
|
+
unitPrice?: Tier.UnitPrice;
|
|
1603
|
+
/**
|
|
1604
|
+
* The up to quantity of the price tier
|
|
1605
|
+
*/
|
|
1606
|
+
upTo?: number;
|
|
1607
|
+
}
|
|
1608
|
+
namespace Tier {
|
|
1609
|
+
/**
|
|
1610
|
+
* The flat fee price of the price tier
|
|
1611
|
+
*/
|
|
1612
|
+
interface FlatPrice {
|
|
1613
|
+
/**
|
|
1614
|
+
* The price amount
|
|
1615
|
+
*/
|
|
1616
|
+
amount: number;
|
|
1617
|
+
/**
|
|
1618
|
+
* ISO 4217 currency code
|
|
1619
|
+
*/
|
|
1620
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* The unit price of the price tier
|
|
1624
|
+
*/
|
|
1625
|
+
interface UnitPrice {
|
|
1626
|
+
/**
|
|
1627
|
+
* The price amount
|
|
1628
|
+
*/
|
|
1629
|
+
amount: number;
|
|
1630
|
+
/**
|
|
1631
|
+
* ISO 4217 currency code
|
|
1632
|
+
*/
|
|
1633
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Subscription entitlement reference
|
|
1639
|
+
*/
|
|
1640
|
+
interface SubscriptionEntitlement {
|
|
1641
|
+
/**
|
|
1642
|
+
* Feature ID or currency ID
|
|
1643
|
+
*/
|
|
1644
|
+
id: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* Entitlement type (FEATURE or CREDIT)
|
|
1647
|
+
*/
|
|
1648
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1649
|
+
}
|
|
1650
|
+
/**
|
|
1651
|
+
* Trial configuration
|
|
1652
|
+
*/
|
|
1653
|
+
interface Trial {
|
|
1654
|
+
/**
|
|
1655
|
+
* Behavior when the trial ends
|
|
1656
|
+
*/
|
|
1657
|
+
trialEndBehavior: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
export interface SubscriptionUpdateParams {
|
|
1663
|
+
addons?: Array<SubscriptionUpdateParams.Addon>;
|
|
1664
|
+
appliedCoupon?: SubscriptionUpdateParams.AppliedCoupon;
|
|
1665
|
+
/**
|
|
1666
|
+
* Await payment confirmation
|
|
1667
|
+
*/
|
|
1668
|
+
awaitPaymentConfirmation?: boolean;
|
|
1669
|
+
billingCycleAnchor?: 'UNCHANGED' | 'NOW';
|
|
1670
|
+
billingInformation?: SubscriptionUpdateParams.BillingInformation;
|
|
1671
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
1672
|
+
budget?: SubscriptionUpdateParams.Budget | null;
|
|
1673
|
+
charges?: Array<SubscriptionUpdateParams.Charge>;
|
|
1674
|
+
entitlements?: Array<SubscriptionUpdateParams.Feature | SubscriptionUpdateParams.Credit>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Additional metadata for the subscription
|
|
1677
|
+
*/
|
|
1678
|
+
metadata?: {
|
|
1679
|
+
[key: string]: string;
|
|
1680
|
+
};
|
|
1681
|
+
/**
|
|
1682
|
+
* Minimum spend amount
|
|
1683
|
+
*/
|
|
1684
|
+
minimumSpend?: SubscriptionUpdateParams.MinimumSpend | null;
|
|
1685
|
+
priceOverrides?: Array<SubscriptionUpdateParams.PriceOverride>;
|
|
1686
|
+
/**
|
|
1687
|
+
* Promotion code
|
|
1688
|
+
*/
|
|
1689
|
+
promotionCode?: string;
|
|
1690
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
1691
|
+
/**
|
|
1692
|
+
* Subscription trial end date
|
|
1693
|
+
*/
|
|
1694
|
+
trialEndDate?: string;
|
|
1695
|
+
}
|
|
1696
|
+
export declare namespace SubscriptionUpdateParams {
|
|
1697
|
+
/**
|
|
1698
|
+
* Addon configuration
|
|
1699
|
+
*/
|
|
1700
|
+
interface Addon {
|
|
1701
|
+
/**
|
|
1702
|
+
* Addon ID
|
|
1703
|
+
*/
|
|
1704
|
+
id: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* Number of addon instances
|
|
1707
|
+
*/
|
|
1708
|
+
quantity: number;
|
|
1709
|
+
}
|
|
1710
|
+
interface AppliedCoupon {
|
|
1711
|
+
billingCouponId?: string;
|
|
1712
|
+
configuration?: AppliedCoupon.Configuration;
|
|
1713
|
+
/**
|
|
1714
|
+
* Stigg coupon ID
|
|
1715
|
+
*/
|
|
1716
|
+
couponId?: string;
|
|
1717
|
+
discount?: AppliedCoupon.Discount;
|
|
1718
|
+
promotionCode?: string | null;
|
|
1719
|
+
}
|
|
1720
|
+
namespace AppliedCoupon {
|
|
1721
|
+
interface Configuration {
|
|
1722
|
+
/**
|
|
1723
|
+
* Coupon start date
|
|
1724
|
+
*/
|
|
1725
|
+
startDate?: string;
|
|
1726
|
+
}
|
|
1727
|
+
interface Discount {
|
|
1728
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
1729
|
+
description?: string;
|
|
1730
|
+
durationInMonths?: number;
|
|
1731
|
+
name?: string;
|
|
1732
|
+
percentOff?: number;
|
|
1733
|
+
}
|
|
1734
|
+
namespace Discount {
|
|
1735
|
+
/**
|
|
1736
|
+
* Monetary amount with currency
|
|
1737
|
+
*/
|
|
1738
|
+
interface AmountsOff {
|
|
1739
|
+
/**
|
|
1740
|
+
* The price amount
|
|
1741
|
+
*/
|
|
1742
|
+
amount: number;
|
|
1743
|
+
/**
|
|
1744
|
+
* ISO 4217 currency code
|
|
1745
|
+
*/
|
|
1746
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
interface BillingInformation {
|
|
1751
|
+
/**
|
|
1752
|
+
* Physical address
|
|
1753
|
+
*/
|
|
1754
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
1755
|
+
chargeOnBehalfOfAccount?: string;
|
|
1756
|
+
couponId?: string;
|
|
1757
|
+
integrationId?: string;
|
|
1758
|
+
invoiceDaysUntilDue?: number;
|
|
1759
|
+
isBackdated?: boolean;
|
|
1760
|
+
isInvoicePaid?: boolean;
|
|
1761
|
+
/**
|
|
1762
|
+
* Additional metadata for the subscription
|
|
1763
|
+
*/
|
|
1764
|
+
metadata?: {
|
|
1765
|
+
[key: string]: string;
|
|
1766
|
+
};
|
|
1767
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1768
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
1769
|
+
taxPercentage?: number;
|
|
1770
|
+
taxRateIds?: Array<string>;
|
|
1771
|
+
}
|
|
1772
|
+
namespace BillingInformation {
|
|
1773
|
+
/**
|
|
1774
|
+
* Physical address
|
|
1775
|
+
*/
|
|
1776
|
+
interface BillingAddress {
|
|
1777
|
+
/**
|
|
1778
|
+
* City name
|
|
1779
|
+
*/
|
|
1780
|
+
city?: string;
|
|
1781
|
+
/**
|
|
1782
|
+
* Country code or name
|
|
1783
|
+
*/
|
|
1784
|
+
country?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* Street address line 1
|
|
1787
|
+
*/
|
|
1788
|
+
line1?: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* Street address line 2
|
|
1791
|
+
*/
|
|
1792
|
+
line2?: string;
|
|
1793
|
+
/**
|
|
1794
|
+
* Postal or ZIP code
|
|
1795
|
+
*/
|
|
1796
|
+
postalCode?: string;
|
|
1797
|
+
/**
|
|
1798
|
+
* State or province
|
|
1799
|
+
*/
|
|
1800
|
+
state?: string;
|
|
1801
|
+
}
|
|
1802
|
+
interface TaxID {
|
|
1803
|
+
type: string;
|
|
1804
|
+
value: string;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
interface Budget {
|
|
1808
|
+
/**
|
|
1809
|
+
* Whether the budget is a soft limit
|
|
1810
|
+
*/
|
|
1811
|
+
hasSoftLimit: boolean;
|
|
1812
|
+
/**
|
|
1813
|
+
* Maximum spending limit
|
|
1814
|
+
*/
|
|
1815
|
+
limit: number;
|
|
1816
|
+
}
|
|
1817
|
+
interface Charge {
|
|
1818
|
+
/**
|
|
1819
|
+
* Charge ID
|
|
1820
|
+
*/
|
|
1821
|
+
id: string;
|
|
1822
|
+
quantity: number;
|
|
1823
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* Feature entitlement configuration for a subscription
|
|
1827
|
+
*/
|
|
1828
|
+
interface Feature {
|
|
1829
|
+
/**
|
|
1830
|
+
* The feature ID to attach the entitlement to
|
|
1831
|
+
*/
|
|
1832
|
+
id: string;
|
|
1833
|
+
/**
|
|
1834
|
+
* SubscriptionFeatureEntitlementRequest
|
|
1835
|
+
*/
|
|
1836
|
+
type: 'FEATURE';
|
|
1837
|
+
/**
|
|
1838
|
+
* Whether the usage limit is a soft limit
|
|
1839
|
+
*/
|
|
1840
|
+
hasSoftLimit?: boolean;
|
|
1841
|
+
/**
|
|
1842
|
+
* Whether usage is unlimited
|
|
1843
|
+
*/
|
|
1844
|
+
hasUnlimitedUsage?: boolean;
|
|
1845
|
+
/**
|
|
1846
|
+
* Configuration for monthly reset period
|
|
1847
|
+
*/
|
|
1848
|
+
monthlyResetPeriodConfiguration?: Feature.MonthlyResetPeriodConfiguration | null;
|
|
1849
|
+
/**
|
|
1850
|
+
* Period at which usage resets
|
|
1851
|
+
*/
|
|
1852
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
1853
|
+
/**
|
|
1854
|
+
* Maximum allowed usage for the feature
|
|
1855
|
+
*/
|
|
1856
|
+
usageLimit?: number;
|
|
1857
|
+
/**
|
|
1858
|
+
* Configuration for weekly reset period
|
|
1859
|
+
*/
|
|
1860
|
+
weeklyResetPeriodConfiguration?: Feature.WeeklyResetPeriodConfiguration | null;
|
|
1861
|
+
/**
|
|
1862
|
+
* Configuration for yearly reset period
|
|
1863
|
+
*/
|
|
1864
|
+
yearlyResetPeriodConfiguration?: Feature.YearlyResetPeriodConfiguration | null;
|
|
1865
|
+
}
|
|
1866
|
+
namespace Feature {
|
|
1867
|
+
/**
|
|
1868
|
+
* Configuration for monthly reset period
|
|
1869
|
+
*/
|
|
1870
|
+
interface MonthlyResetPeriodConfiguration {
|
|
1871
|
+
/**
|
|
1872
|
+
* Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
1873
|
+
*/
|
|
1874
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Configuration for weekly reset period
|
|
1878
|
+
*/
|
|
1879
|
+
interface WeeklyResetPeriodConfiguration {
|
|
1880
|
+
/**
|
|
1881
|
+
* Reset anchor (SubscriptionStart or specific day)
|
|
1882
|
+
*/
|
|
1883
|
+
accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
|
|
1884
|
+
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Configuration for yearly reset period
|
|
1887
|
+
*/
|
|
1888
|
+
interface YearlyResetPeriodConfiguration {
|
|
1889
|
+
/**
|
|
1890
|
+
* Reset anchor (SubscriptionStart)
|
|
1891
|
+
*/
|
|
1892
|
+
accordingTo: 'SubscriptionStart';
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Credit entitlement configuration for a subscription
|
|
1897
|
+
*/
|
|
1898
|
+
interface Credit {
|
|
1899
|
+
/**
|
|
1900
|
+
* The custom currency ID for the credit entitlement
|
|
1901
|
+
*/
|
|
1902
|
+
id: string;
|
|
1903
|
+
/**
|
|
1904
|
+
* Credit grant amount
|
|
1905
|
+
*/
|
|
1906
|
+
amount: number;
|
|
1907
|
+
/**
|
|
1908
|
+
* Credit grant cadence (MONTH or YEAR)
|
|
1909
|
+
*/
|
|
1910
|
+
cadence: 'MONTH' | 'YEAR';
|
|
1911
|
+
/**
|
|
1912
|
+
* SubscriptionCreditEntitlementRequest
|
|
1913
|
+
*/
|
|
1914
|
+
type: 'CREDIT';
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Minimum spend amount
|
|
1918
|
+
*/
|
|
1919
|
+
interface MinimumSpend {
|
|
1920
|
+
/**
|
|
1921
|
+
* The price amount
|
|
1922
|
+
*/
|
|
1923
|
+
amount?: number;
|
|
1924
|
+
/**
|
|
1925
|
+
* The price currency
|
|
1926
|
+
*/
|
|
1927
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1928
|
+
}
|
|
1929
|
+
interface PriceOverride {
|
|
1930
|
+
/**
|
|
1931
|
+
* Addon ID
|
|
1932
|
+
*/
|
|
1933
|
+
addonId?: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* The price amount
|
|
1936
|
+
*/
|
|
1937
|
+
amount?: number;
|
|
1938
|
+
/**
|
|
1939
|
+
* Whether this is a base charge override
|
|
1940
|
+
*/
|
|
1941
|
+
baseCharge?: boolean;
|
|
1942
|
+
/**
|
|
1943
|
+
* The price currency
|
|
1944
|
+
*/
|
|
1945
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1946
|
+
/**
|
|
1947
|
+
* The corresponding custom currency id of the recurring credits price
|
|
1948
|
+
*/
|
|
1949
|
+
currencyId?: string;
|
|
1950
|
+
/**
|
|
1951
|
+
* Feature ID
|
|
1952
|
+
*/
|
|
1953
|
+
featureId?: string;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
export interface SubscriptionListParams extends MyCursorIDPageParams {
|
|
1957
|
+
/**
|
|
1958
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
1959
|
+
*/
|
|
1960
|
+
createdAt?: SubscriptionListParams.CreatedAt;
|
|
1961
|
+
/**
|
|
1962
|
+
* Filter by customer ID
|
|
1963
|
+
*/
|
|
1964
|
+
customerId?: string;
|
|
1965
|
+
/**
|
|
1966
|
+
* Filter by plan ID
|
|
1967
|
+
*/
|
|
1968
|
+
planId?: string;
|
|
1969
|
+
/**
|
|
1970
|
+
* Filter by pricing type. Supports comma-separated values for multiple types
|
|
1971
|
+
*/
|
|
1972
|
+
pricingType?: string;
|
|
1973
|
+
/**
|
|
1974
|
+
* Filter by resource ID
|
|
1975
|
+
*/
|
|
1976
|
+
resourceId?: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Filter by subscription status. Supports comma-separated values for multiple
|
|
1979
|
+
* statuses
|
|
1980
|
+
*/
|
|
1981
|
+
status?: string;
|
|
1982
|
+
}
|
|
1983
|
+
export declare namespace SubscriptionListParams {
|
|
1984
|
+
/**
|
|
1985
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
1986
|
+
*/
|
|
1987
|
+
interface CreatedAt {
|
|
1988
|
+
/**
|
|
1989
|
+
* Greater than the specified createdAt value
|
|
1990
|
+
*/
|
|
1991
|
+
gt?: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* Greater than or equal to the specified createdAt value
|
|
1994
|
+
*/
|
|
1995
|
+
gte?: string;
|
|
1996
|
+
/**
|
|
1997
|
+
* Less than the specified createdAt value
|
|
1998
|
+
*/
|
|
1999
|
+
lt?: string;
|
|
2000
|
+
/**
|
|
2001
|
+
* Less than or equal to the specified createdAt value
|
|
2002
|
+
*/
|
|
2003
|
+
lte?: string;
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
export interface SubscriptionCancelParams {
|
|
2007
|
+
/**
|
|
2008
|
+
* Action on cancellation (downgrade or revoke)
|
|
2009
|
+
*/
|
|
2010
|
+
cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS';
|
|
2011
|
+
/**
|
|
2012
|
+
* When to cancel (immediate, period end, or date)
|
|
2013
|
+
*/
|
|
2014
|
+
cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE';
|
|
2015
|
+
/**
|
|
2016
|
+
* Subscription end date
|
|
2017
|
+
*/
|
|
2018
|
+
endDate?: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* If set, enables or disables prorating of credits on subscription cancellation.
|
|
2021
|
+
*/
|
|
2022
|
+
prorate?: boolean;
|
|
1166
2023
|
}
|
|
1167
|
-
export interface
|
|
2024
|
+
export interface SubscriptionDelegateParams {
|
|
1168
2025
|
/**
|
|
1169
|
-
*
|
|
2026
|
+
* The unique identifier of the customer who will assume payment responsibility for
|
|
2027
|
+
* this subscription. This customer must already exist in your Stigg account and
|
|
2028
|
+
* have a valid payment method if the subscription requires payment.
|
|
1170
2029
|
*/
|
|
1171
|
-
|
|
2030
|
+
targetCustomerId: string;
|
|
2031
|
+
}
|
|
2032
|
+
export interface SubscriptionImportParams {
|
|
1172
2033
|
/**
|
|
1173
|
-
*
|
|
2034
|
+
* List of subscription objects to import
|
|
1174
2035
|
*/
|
|
1175
|
-
|
|
2036
|
+
subscriptions: Array<SubscriptionImportParams.Subscription>;
|
|
1176
2037
|
/**
|
|
1177
|
-
*
|
|
2038
|
+
* Integration ID to use for importing subscriptions
|
|
1178
2039
|
*/
|
|
1179
|
-
|
|
1180
|
-
|
|
2040
|
+
integrationId?: string | null;
|
|
2041
|
+
}
|
|
2042
|
+
export declare namespace SubscriptionImportParams {
|
|
2043
|
+
interface Subscription {
|
|
2044
|
+
/**
|
|
2045
|
+
* Subscription ID
|
|
2046
|
+
*/
|
|
2047
|
+
id: string;
|
|
2048
|
+
/**
|
|
2049
|
+
* Customer ID
|
|
2050
|
+
*/
|
|
2051
|
+
customerId: string;
|
|
2052
|
+
/**
|
|
2053
|
+
* Plan ID
|
|
2054
|
+
*/
|
|
2055
|
+
planId: string;
|
|
2056
|
+
addons?: Array<Subscription.Addon>;
|
|
2057
|
+
/**
|
|
2058
|
+
* Billing ID
|
|
2059
|
+
*/
|
|
2060
|
+
billingId?: string | null;
|
|
2061
|
+
/**
|
|
2062
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
2063
|
+
*/
|
|
2064
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
2065
|
+
charges?: Array<Subscription.Charge>;
|
|
2066
|
+
/**
|
|
2067
|
+
* Subscription end date
|
|
2068
|
+
*/
|
|
2069
|
+
endDate?: string | null;
|
|
2070
|
+
/**
|
|
2071
|
+
* Additional metadata for the subscription
|
|
2072
|
+
*/
|
|
2073
|
+
metadata?: {
|
|
2074
|
+
[key: string]: string;
|
|
2075
|
+
};
|
|
2076
|
+
/**
|
|
2077
|
+
* Resource ID
|
|
2078
|
+
*/
|
|
2079
|
+
resourceId?: string | null;
|
|
2080
|
+
/**
|
|
2081
|
+
* Subscription start date
|
|
2082
|
+
*/
|
|
2083
|
+
startDate?: string;
|
|
2084
|
+
}
|
|
2085
|
+
namespace Subscription {
|
|
2086
|
+
/**
|
|
2087
|
+
* Addon configuration
|
|
2088
|
+
*/
|
|
2089
|
+
interface Addon {
|
|
2090
|
+
/**
|
|
2091
|
+
* Addon ID
|
|
2092
|
+
*/
|
|
2093
|
+
id: string;
|
|
2094
|
+
/**
|
|
2095
|
+
* Number of addon instances
|
|
2096
|
+
*/
|
|
2097
|
+
quantity: number;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Charge item
|
|
2101
|
+
*/
|
|
2102
|
+
interface Charge {
|
|
2103
|
+
/**
|
|
2104
|
+
* Charge ID
|
|
2105
|
+
*/
|
|
2106
|
+
id: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* Charge quantity
|
|
2109
|
+
*/
|
|
2110
|
+
quantity: number;
|
|
2111
|
+
/**
|
|
2112
|
+
* Charge type
|
|
2113
|
+
*/
|
|
2114
|
+
type: 'FEATURE' | 'CREDIT';
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
export interface SubscriptionMigrateParams {
|
|
1181
2119
|
/**
|
|
1182
|
-
*
|
|
2120
|
+
* When to migrate (immediate or period end)
|
|
1183
2121
|
*/
|
|
1184
|
-
|
|
2122
|
+
subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';
|
|
2123
|
+
}
|
|
2124
|
+
export interface SubscriptionPreviewParams {
|
|
1185
2125
|
/**
|
|
1186
|
-
*
|
|
2126
|
+
* Customer ID
|
|
1187
2127
|
*/
|
|
1188
|
-
|
|
2128
|
+
customerId: string;
|
|
1189
2129
|
/**
|
|
1190
|
-
*
|
|
2130
|
+
* Plan ID
|
|
1191
2131
|
*/
|
|
1192
|
-
|
|
2132
|
+
planId: string;
|
|
1193
2133
|
/**
|
|
1194
|
-
*
|
|
2134
|
+
* Addons to include
|
|
1195
2135
|
*/
|
|
1196
|
-
|
|
1197
|
-
billingInformation?: SubscriptionCreateParams.BillingInformation;
|
|
2136
|
+
addons?: Array<SubscriptionPreviewParams.Addon>;
|
|
1198
2137
|
/**
|
|
1199
|
-
*
|
|
2138
|
+
* Coupon or discount to apply
|
|
1200
2139
|
*/
|
|
1201
|
-
|
|
1202
|
-
budget?: SubscriptionCreateParams.Budget | null;
|
|
1203
|
-
charges?: Array<SubscriptionCreateParams.Charge>;
|
|
2140
|
+
appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
|
|
1204
2141
|
/**
|
|
1205
|
-
*
|
|
2142
|
+
* Billable features with quantities
|
|
1206
2143
|
*/
|
|
1207
|
-
|
|
2144
|
+
billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
|
|
1208
2145
|
/**
|
|
1209
|
-
*
|
|
2146
|
+
* ISO 3166-1 country code for localization
|
|
1210
2147
|
*/
|
|
1211
|
-
|
|
1212
|
-
[key: string]: string;
|
|
1213
|
-
};
|
|
1214
|
-
minimumSpend?: SubscriptionCreateParams.MinimumSpend | null;
|
|
2148
|
+
billingCountryCode?: string;
|
|
1215
2149
|
/**
|
|
1216
|
-
*
|
|
2150
|
+
* Billing cycle anchor behavior for the subscription
|
|
1217
2151
|
*/
|
|
1218
|
-
|
|
2152
|
+
billingCycleAnchor?: 'UNCHANGED' | 'NOW';
|
|
1219
2153
|
/**
|
|
1220
|
-
*
|
|
2154
|
+
* Billing and tax configuration
|
|
1221
2155
|
*/
|
|
1222
|
-
|
|
1223
|
-
priceOverrides?: Array<SubscriptionCreateParams.PriceOverride>;
|
|
2156
|
+
billingInformation?: SubscriptionPreviewParams.BillingInformation;
|
|
1224
2157
|
/**
|
|
1225
|
-
*
|
|
2158
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
1226
2159
|
*/
|
|
1227
|
-
|
|
2160
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
1228
2161
|
/**
|
|
1229
|
-
*
|
|
2162
|
+
* One-time or recurring charges
|
|
1230
2163
|
*/
|
|
1231
|
-
|
|
2164
|
+
charges?: Array<SubscriptionPreviewParams.Charge>;
|
|
1232
2165
|
/**
|
|
1233
|
-
*
|
|
2166
|
+
* Paying customer ID for delegated billing
|
|
2167
|
+
*/
|
|
2168
|
+
payingCustomerId?: string;
|
|
2169
|
+
/**
|
|
2170
|
+
* Resource ID for multi-instance subscriptions
|
|
2171
|
+
*/
|
|
2172
|
+
resourceId?: string;
|
|
2173
|
+
/**
|
|
2174
|
+
* When to apply subscription changes
|
|
1234
2175
|
*/
|
|
1235
2176
|
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
1236
2177
|
/**
|
|
1237
2178
|
* Subscription start date
|
|
1238
2179
|
*/
|
|
1239
2180
|
startDate?: string;
|
|
1240
|
-
subscriptionEntitlements?: Array<SubscriptionCreateParams.SubscriptionEntitlement>;
|
|
1241
2181
|
/**
|
|
1242
2182
|
* Trial period override settings
|
|
1243
2183
|
*/
|
|
1244
|
-
trialOverrideConfiguration?:
|
|
2184
|
+
trialOverrideConfiguration?: SubscriptionPreviewParams.TrialOverrideConfiguration;
|
|
2185
|
+
/**
|
|
2186
|
+
* Unit quantity for per-unit pricing
|
|
2187
|
+
*/
|
|
1245
2188
|
unitQuantity?: number;
|
|
1246
2189
|
}
|
|
1247
|
-
export declare namespace
|
|
2190
|
+
export declare namespace SubscriptionPreviewParams {
|
|
2191
|
+
/**
|
|
2192
|
+
* Addon configuration
|
|
2193
|
+
*/
|
|
1248
2194
|
interface Addon {
|
|
1249
2195
|
/**
|
|
1250
|
-
* Addon
|
|
2196
|
+
* Addon ID
|
|
1251
2197
|
*/
|
|
1252
|
-
|
|
2198
|
+
id: string;
|
|
1253
2199
|
/**
|
|
1254
|
-
* Number of addon
|
|
2200
|
+
* Number of addon instances
|
|
1255
2201
|
*/
|
|
1256
|
-
quantity
|
|
2202
|
+
quantity: number;
|
|
1257
2203
|
}
|
|
1258
2204
|
/**
|
|
1259
|
-
* Coupon
|
|
2205
|
+
* Coupon or discount to apply
|
|
1260
2206
|
*/
|
|
1261
2207
|
interface AppliedCoupon {
|
|
1262
2208
|
/**
|
|
@@ -1322,376 +2268,212 @@ export declare namespace SubscriptionCreateParams {
|
|
|
1322
2268
|
*/
|
|
1323
2269
|
amount: number;
|
|
1324
2270
|
/**
|
|
1325
|
-
*
|
|
2271
|
+
* ISO 4217 currency code
|
|
1326
2272
|
*/
|
|
1327
2273
|
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1328
2274
|
}
|
|
1329
2275
|
}
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
billingAddress?: BillingInformation.BillingAddress;
|
|
1336
|
-
/**
|
|
1337
|
-
* Stripe Connect account to charge on behalf of
|
|
1338
|
-
*/
|
|
1339
|
-
chargeOnBehalfOfAccount?: string | null;
|
|
1340
|
-
/**
|
|
1341
|
-
* Billing integration identifier
|
|
1342
|
-
*/
|
|
1343
|
-
integrationId?: string | null;
|
|
1344
|
-
/**
|
|
1345
|
-
* Number of days until invoice is due
|
|
1346
|
-
*/
|
|
1347
|
-
invoiceDaysUntilDue?: number;
|
|
1348
|
-
/**
|
|
1349
|
-
* Whether the subscription is backdated
|
|
1350
|
-
*/
|
|
1351
|
-
isBackdated?: boolean;
|
|
1352
|
-
/**
|
|
1353
|
-
* Whether the invoice is marked as paid
|
|
1354
|
-
*/
|
|
1355
|
-
isInvoicePaid?: boolean;
|
|
1356
|
-
/**
|
|
1357
|
-
* Additional metadata for the subscription
|
|
1358
|
-
*/
|
|
1359
|
-
metadata?: {
|
|
1360
|
-
[key: string]: string;
|
|
1361
|
-
};
|
|
1362
|
-
/**
|
|
1363
|
-
* How to handle proration for billing changes
|
|
1364
|
-
*/
|
|
1365
|
-
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1366
|
-
/**
|
|
1367
|
-
* Customer tax identification numbers
|
|
1368
|
-
*/
|
|
1369
|
-
taxIds?: Array<BillingInformation.TaxID>;
|
|
1370
|
-
/**
|
|
1371
|
-
* Tax percentage (0-100)
|
|
1372
|
-
*/
|
|
1373
|
-
taxPercentage?: number;
|
|
1374
|
-
/**
|
|
1375
|
-
* Tax rate identifiers to apply
|
|
1376
|
-
*/
|
|
1377
|
-
taxRateIds?: Array<string>;
|
|
1378
|
-
}
|
|
1379
|
-
namespace BillingInformation {
|
|
1380
|
-
/**
|
|
1381
|
-
* Billing address for the subscription
|
|
1382
|
-
*/
|
|
1383
|
-
interface BillingAddress {
|
|
1384
|
-
city?: string;
|
|
1385
|
-
country?: string;
|
|
1386
|
-
line1?: string;
|
|
1387
|
-
line2?: string;
|
|
1388
|
-
postalCode?: string;
|
|
1389
|
-
state?: string;
|
|
1390
|
-
}
|
|
1391
|
-
interface TaxID {
|
|
1392
|
-
/**
|
|
1393
|
-
* The type of tax exemption identifier, such as VAT.
|
|
1394
|
-
*/
|
|
1395
|
-
type: string;
|
|
1396
|
-
/**
|
|
1397
|
-
* The actual tax identifier value
|
|
1398
|
-
*/
|
|
1399
|
-
value: string;
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
interface Budget {
|
|
1403
|
-
/**
|
|
1404
|
-
* Whether the budget is a soft limit
|
|
1405
|
-
*/
|
|
1406
|
-
hasSoftLimit: boolean;
|
|
1407
|
-
/**
|
|
1408
|
-
* Maximum spending limit
|
|
1409
|
-
*/
|
|
1410
|
-
limit: number;
|
|
1411
|
-
}
|
|
1412
|
-
/**
|
|
1413
|
-
* Charge item
|
|
1414
|
-
*/
|
|
1415
|
-
interface Charge {
|
|
1416
|
-
/**
|
|
1417
|
-
* Charge ID
|
|
1418
|
-
*/
|
|
1419
|
-
id: string;
|
|
1420
|
-
/**
|
|
1421
|
-
* Charge quantity
|
|
1422
|
-
*/
|
|
1423
|
-
quantity: number;
|
|
1424
|
-
/**
|
|
1425
|
-
* Charge type
|
|
1426
|
-
*/
|
|
1427
|
-
type: 'FEATURE' | 'CREDIT';
|
|
1428
|
-
}
|
|
1429
|
-
/**
|
|
1430
|
-
* Checkout page configuration for payment collection
|
|
1431
|
-
*/
|
|
1432
|
-
interface CheckoutOptions {
|
|
1433
|
-
/**
|
|
1434
|
-
* URL to redirect to if checkout is canceled
|
|
1435
|
-
*/
|
|
1436
|
-
cancelUrl: string;
|
|
2276
|
+
}
|
|
2277
|
+
/**
|
|
2278
|
+
* Feature with quantity
|
|
2279
|
+
*/
|
|
2280
|
+
interface BillableFeature {
|
|
1437
2281
|
/**
|
|
1438
|
-
*
|
|
2282
|
+
* Feature ID
|
|
1439
2283
|
*/
|
|
1440
|
-
|
|
2284
|
+
featureId: string;
|
|
1441
2285
|
/**
|
|
1442
|
-
*
|
|
2286
|
+
* Quantity of feature units
|
|
1443
2287
|
*/
|
|
1444
|
-
|
|
2288
|
+
quantity: number;
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Billing and tax configuration
|
|
2292
|
+
*/
|
|
2293
|
+
interface BillingInformation {
|
|
1445
2294
|
/**
|
|
1446
|
-
*
|
|
2295
|
+
* Billing address
|
|
1447
2296
|
*/
|
|
1448
|
-
|
|
2297
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
1449
2298
|
/**
|
|
1450
|
-
*
|
|
2299
|
+
* Connected account ID for platform billing
|
|
1451
2300
|
*/
|
|
1452
|
-
|
|
2301
|
+
chargeOnBehalfOfAccount?: string;
|
|
1453
2302
|
/**
|
|
1454
|
-
*
|
|
2303
|
+
* Billing integration ID
|
|
1455
2304
|
*/
|
|
1456
|
-
|
|
2305
|
+
integrationId?: string;
|
|
1457
2306
|
/**
|
|
1458
|
-
*
|
|
2307
|
+
* Days until invoice is due
|
|
1459
2308
|
*/
|
|
1460
|
-
|
|
1461
|
-
}
|
|
1462
|
-
interface MinimumSpend {
|
|
2309
|
+
invoiceDaysUntilDue?: number;
|
|
1463
2310
|
/**
|
|
1464
|
-
*
|
|
2311
|
+
* Whether subscription is backdated
|
|
1465
2312
|
*/
|
|
1466
|
-
|
|
1467
|
-
}
|
|
1468
|
-
namespace MinimumSpend {
|
|
2313
|
+
isBackdated?: boolean;
|
|
1469
2314
|
/**
|
|
1470
|
-
*
|
|
2315
|
+
* Whether invoice is already paid
|
|
1471
2316
|
*/
|
|
1472
|
-
|
|
1473
|
-
/**
|
|
1474
|
-
* The price amount
|
|
1475
|
-
*/
|
|
1476
|
-
amount?: number;
|
|
1477
|
-
/**
|
|
1478
|
-
* The billing country code of the price
|
|
1479
|
-
*/
|
|
1480
|
-
billingCountryCode?: string | null;
|
|
1481
|
-
/**
|
|
1482
|
-
* The price currency
|
|
1483
|
-
*/
|
|
1484
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
interface PriceOverride {
|
|
2317
|
+
isInvoicePaid?: boolean;
|
|
1488
2318
|
/**
|
|
1489
|
-
*
|
|
2319
|
+
* Additional billing metadata
|
|
1490
2320
|
*/
|
|
1491
|
-
|
|
2321
|
+
metadata?: {
|
|
2322
|
+
[key: string]: string;
|
|
2323
|
+
};
|
|
1492
2324
|
/**
|
|
1493
|
-
*
|
|
2325
|
+
* Proration behavior
|
|
1494
2326
|
*/
|
|
1495
|
-
|
|
2327
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1496
2328
|
/**
|
|
1497
|
-
*
|
|
2329
|
+
* Customer tax IDs
|
|
1498
2330
|
*/
|
|
1499
|
-
|
|
1500
|
-
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
1501
|
-
creditRate?: PriceOverride.CreditRate;
|
|
2331
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
1502
2332
|
/**
|
|
1503
|
-
*
|
|
2333
|
+
* Tax percentage to apply
|
|
1504
2334
|
*/
|
|
1505
|
-
|
|
2335
|
+
taxPercentage?: number;
|
|
1506
2336
|
/**
|
|
1507
|
-
*
|
|
2337
|
+
* Tax rate IDs from billing provider
|
|
1508
2338
|
*/
|
|
1509
|
-
|
|
2339
|
+
taxRateIds?: Array<string>;
|
|
2340
|
+
}
|
|
2341
|
+
namespace BillingInformation {
|
|
1510
2342
|
/**
|
|
1511
|
-
*
|
|
2343
|
+
* Billing address
|
|
1512
2344
|
*/
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
amount: number;
|
|
1521
|
-
/**
|
|
1522
|
-
* The custom currency refId for the credit rate
|
|
1523
|
-
*/
|
|
1524
|
-
currencyId: string;
|
|
1525
|
-
/**
|
|
1526
|
-
* A custom formula for calculating cost based on single event dimensions
|
|
1527
|
-
*/
|
|
1528
|
-
costFormula?: string | null;
|
|
2345
|
+
interface BillingAddress {
|
|
2346
|
+
city?: string;
|
|
2347
|
+
country?: string;
|
|
2348
|
+
line1?: string;
|
|
2349
|
+
line2?: string;
|
|
2350
|
+
postalCode?: string;
|
|
2351
|
+
state?: string;
|
|
1529
2352
|
}
|
|
1530
2353
|
/**
|
|
1531
|
-
*
|
|
2354
|
+
* Tax exemption identifier
|
|
1532
2355
|
*/
|
|
1533
|
-
interface
|
|
1534
|
-
/**
|
|
1535
|
-
* The price amount
|
|
1536
|
-
*/
|
|
1537
|
-
amount?: number;
|
|
1538
|
-
/**
|
|
1539
|
-
* The billing country code of the price
|
|
1540
|
-
*/
|
|
1541
|
-
billingCountryCode?: string | null;
|
|
1542
|
-
/**
|
|
1543
|
-
* The price currency
|
|
1544
|
-
*/
|
|
1545
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1546
|
-
}
|
|
1547
|
-
interface Tier {
|
|
1548
|
-
/**
|
|
1549
|
-
* The flat fee price of the price tier
|
|
1550
|
-
*/
|
|
1551
|
-
flatPrice?: Tier.FlatPrice;
|
|
1552
|
-
/**
|
|
1553
|
-
* The unit price of the price tier
|
|
1554
|
-
*/
|
|
1555
|
-
unitPrice?: Tier.UnitPrice;
|
|
1556
|
-
/**
|
|
1557
|
-
* The up to quantity of the price tier
|
|
1558
|
-
*/
|
|
1559
|
-
upTo?: number;
|
|
1560
|
-
}
|
|
1561
|
-
namespace Tier {
|
|
2356
|
+
interface TaxID {
|
|
1562
2357
|
/**
|
|
1563
|
-
*
|
|
2358
|
+
* Tax exemption type (e.g., vat, gst)
|
|
1564
2359
|
*/
|
|
1565
|
-
|
|
1566
|
-
/**
|
|
1567
|
-
* The price amount
|
|
1568
|
-
*/
|
|
1569
|
-
amount?: number;
|
|
1570
|
-
/**
|
|
1571
|
-
* The billing country code of the price
|
|
1572
|
-
*/
|
|
1573
|
-
billingCountryCode?: string | null;
|
|
1574
|
-
/**
|
|
1575
|
-
* The price currency
|
|
1576
|
-
*/
|
|
1577
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1578
|
-
}
|
|
2360
|
+
type: string;
|
|
1579
2361
|
/**
|
|
1580
|
-
*
|
|
2362
|
+
* Tax exemption identifier value
|
|
1581
2363
|
*/
|
|
1582
|
-
|
|
1583
|
-
/**
|
|
1584
|
-
* The price amount
|
|
1585
|
-
*/
|
|
1586
|
-
amount?: number;
|
|
1587
|
-
/**
|
|
1588
|
-
* The billing country code of the price
|
|
1589
|
-
*/
|
|
1590
|
-
billingCountryCode?: string | null;
|
|
1591
|
-
/**
|
|
1592
|
-
* The price currency
|
|
1593
|
-
*/
|
|
1594
|
-
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1595
|
-
}
|
|
2364
|
+
value: string;
|
|
1596
2365
|
}
|
|
1597
2366
|
}
|
|
1598
|
-
|
|
2367
|
+
/**
|
|
2368
|
+
* Charge item
|
|
2369
|
+
*/
|
|
2370
|
+
interface Charge {
|
|
1599
2371
|
/**
|
|
1600
|
-
*
|
|
2372
|
+
* Charge ID
|
|
1601
2373
|
*/
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
2374
|
+
id: string;
|
|
2375
|
+
/**
|
|
2376
|
+
* Charge quantity
|
|
2377
|
+
*/
|
|
2378
|
+
quantity: number;
|
|
2379
|
+
/**
|
|
2380
|
+
* Charge type
|
|
2381
|
+
*/
|
|
2382
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1605
2383
|
}
|
|
1606
2384
|
/**
|
|
1607
2385
|
* Trial period override settings
|
|
1608
2386
|
*/
|
|
1609
2387
|
interface TrialOverrideConfiguration {
|
|
1610
2388
|
/**
|
|
1611
|
-
* Whether
|
|
2389
|
+
* Whether to start as trial
|
|
1612
2390
|
*/
|
|
1613
2391
|
isTrial: boolean;
|
|
1614
2392
|
/**
|
|
1615
|
-
* Behavior when trial ends
|
|
2393
|
+
* Behavior when trial ends
|
|
1616
2394
|
*/
|
|
1617
2395
|
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
1618
2396
|
/**
|
|
1619
|
-
*
|
|
2397
|
+
* Trial end date
|
|
1620
2398
|
*/
|
|
1621
2399
|
trialEndDate?: string;
|
|
1622
2400
|
}
|
|
1623
2401
|
}
|
|
1624
|
-
export interface
|
|
2402
|
+
export interface SubscriptionProvisionParams {
|
|
1625
2403
|
/**
|
|
1626
|
-
*
|
|
2404
|
+
* Customer ID to provision the subscription for
|
|
1627
2405
|
*/
|
|
1628
|
-
customerId
|
|
2406
|
+
customerId: string;
|
|
1629
2407
|
/**
|
|
1630
|
-
*
|
|
2408
|
+
* Plan ID to provision
|
|
1631
2409
|
*/
|
|
1632
|
-
|
|
1633
|
-
}
|
|
1634
|
-
export interface SubscriptionDelegateParams {
|
|
2410
|
+
planId: string;
|
|
1635
2411
|
/**
|
|
1636
|
-
*
|
|
1637
|
-
* this subscription. This customer must already exist in your Stigg account and
|
|
1638
|
-
* have a valid payment method if the subscription requires payment.
|
|
2412
|
+
* Unique identifier for the subscription
|
|
1639
2413
|
*/
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
export interface SubscriptionMigrateParams {
|
|
2414
|
+
id?: string;
|
|
2415
|
+
addons?: Array<SubscriptionProvisionParams.Addon>;
|
|
1643
2416
|
/**
|
|
1644
|
-
*
|
|
2417
|
+
* Coupon configuration
|
|
1645
2418
|
*/
|
|
1646
|
-
|
|
1647
|
-
}
|
|
1648
|
-
export interface SubscriptionPreviewParams {
|
|
2419
|
+
appliedCoupon?: SubscriptionProvisionParams.AppliedCoupon;
|
|
1649
2420
|
/**
|
|
1650
|
-
*
|
|
2421
|
+
* Whether to wait for payment confirmation before returning the subscription
|
|
1651
2422
|
*/
|
|
1652
|
-
|
|
2423
|
+
awaitPaymentConfirmation?: boolean;
|
|
1653
2424
|
/**
|
|
1654
|
-
*
|
|
2425
|
+
* The ISO 3166-1 alpha-2 country code for billing
|
|
1655
2426
|
*/
|
|
1656
|
-
|
|
2427
|
+
billingCountryCode?: string | null;
|
|
1657
2428
|
/**
|
|
1658
|
-
*
|
|
2429
|
+
* Billing cycle anchor behavior for the subscription
|
|
1659
2430
|
*/
|
|
1660
|
-
|
|
2431
|
+
billingCycleAnchor?: 'UNCHANGED' | 'NOW';
|
|
1661
2432
|
/**
|
|
1662
|
-
*
|
|
2433
|
+
* External billing system identifier
|
|
1663
2434
|
*/
|
|
1664
|
-
|
|
2435
|
+
billingId?: string | null;
|
|
2436
|
+
billingInformation?: SubscriptionProvisionParams.BillingInformation;
|
|
1665
2437
|
/**
|
|
1666
|
-
*
|
|
2438
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
1667
2439
|
*/
|
|
1668
|
-
|
|
2440
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
2441
|
+
budget?: SubscriptionProvisionParams.Budget | null;
|
|
2442
|
+
charges?: Array<SubscriptionProvisionParams.Charge>;
|
|
1669
2443
|
/**
|
|
1670
|
-
*
|
|
2444
|
+
* Checkout page configuration for payment collection
|
|
1671
2445
|
*/
|
|
1672
|
-
|
|
2446
|
+
checkoutOptions?: SubscriptionProvisionParams.CheckoutOptions;
|
|
2447
|
+
entitlements?: Array<SubscriptionProvisionParams.Feature | SubscriptionProvisionParams.Credit>;
|
|
1673
2448
|
/**
|
|
1674
|
-
*
|
|
2449
|
+
* Additional metadata for the subscription
|
|
1675
2450
|
*/
|
|
1676
|
-
|
|
2451
|
+
metadata?: {
|
|
2452
|
+
[key: string]: string;
|
|
2453
|
+
};
|
|
1677
2454
|
/**
|
|
1678
|
-
*
|
|
2455
|
+
* Minimum spend amount
|
|
1679
2456
|
*/
|
|
1680
|
-
|
|
2457
|
+
minimumSpend?: SubscriptionProvisionParams.MinimumSpend | null;
|
|
1681
2458
|
/**
|
|
1682
|
-
*
|
|
2459
|
+
* Optional paying customer ID for split billing scenarios
|
|
1683
2460
|
*/
|
|
1684
|
-
|
|
2461
|
+
payingCustomerId?: string | null;
|
|
1685
2462
|
/**
|
|
1686
|
-
*
|
|
2463
|
+
* How payments should be collected for this subscription
|
|
1687
2464
|
*/
|
|
1688
|
-
|
|
2465
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
|
|
2466
|
+
priceOverrides?: Array<SubscriptionProvisionParams.PriceOverride>;
|
|
1689
2467
|
/**
|
|
1690
|
-
*
|
|
2468
|
+
* Optional resource ID for multi-instance subscriptions
|
|
1691
2469
|
*/
|
|
1692
|
-
resourceId?: string;
|
|
2470
|
+
resourceId?: string | null;
|
|
2471
|
+
/**
|
|
2472
|
+
* Salesforce ID
|
|
2473
|
+
*/
|
|
2474
|
+
salesforceId?: string | null;
|
|
1693
2475
|
/**
|
|
1694
|
-
*
|
|
2476
|
+
* Strategy for scheduling subscription changes
|
|
1695
2477
|
*/
|
|
1696
2478
|
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
1697
2479
|
/**
|
|
@@ -1701,13 +2483,13 @@ export interface SubscriptionPreviewParams {
|
|
|
1701
2483
|
/**
|
|
1702
2484
|
* Trial period override settings
|
|
1703
2485
|
*/
|
|
1704
|
-
trialOverrideConfiguration?:
|
|
2486
|
+
trialOverrideConfiguration?: SubscriptionProvisionParams.TrialOverrideConfiguration;
|
|
1705
2487
|
/**
|
|
1706
|
-
* Unit quantity
|
|
2488
|
+
* Unit quantity
|
|
1707
2489
|
*/
|
|
1708
2490
|
unitQuantity?: number;
|
|
1709
2491
|
}
|
|
1710
|
-
export declare namespace
|
|
2492
|
+
export declare namespace SubscriptionProvisionParams {
|
|
1711
2493
|
/**
|
|
1712
2494
|
* Addon configuration
|
|
1713
2495
|
*/
|
|
@@ -1715,14 +2497,14 @@ export declare namespace SubscriptionPreviewParams {
|
|
|
1715
2497
|
/**
|
|
1716
2498
|
* Addon ID
|
|
1717
2499
|
*/
|
|
1718
|
-
|
|
2500
|
+
id: string;
|
|
1719
2501
|
/**
|
|
1720
2502
|
* Number of addon instances
|
|
1721
2503
|
*/
|
|
1722
|
-
quantity
|
|
2504
|
+
quantity: number;
|
|
1723
2505
|
}
|
|
1724
2506
|
/**
|
|
1725
|
-
* Coupon
|
|
2507
|
+
* Coupon configuration
|
|
1726
2508
|
*/
|
|
1727
2509
|
interface AppliedCoupon {
|
|
1728
2510
|
/**
|
|
@@ -1788,77 +2570,63 @@ export declare namespace SubscriptionPreviewParams {
|
|
|
1788
2570
|
*/
|
|
1789
2571
|
amount: number;
|
|
1790
2572
|
/**
|
|
1791
|
-
*
|
|
2573
|
+
* ISO 4217 currency code
|
|
1792
2574
|
*/
|
|
1793
2575
|
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
1794
2576
|
}
|
|
1795
2577
|
}
|
|
1796
2578
|
}
|
|
1797
|
-
/**
|
|
1798
|
-
* Feature with quantity
|
|
1799
|
-
*/
|
|
1800
|
-
interface BillableFeature {
|
|
1801
|
-
/**
|
|
1802
|
-
* Feature ID
|
|
1803
|
-
*/
|
|
1804
|
-
featureId: string;
|
|
1805
|
-
/**
|
|
1806
|
-
* Quantity of feature units
|
|
1807
|
-
*/
|
|
1808
|
-
quantity: number;
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* Billing and tax configuration
|
|
1812
|
-
*/
|
|
1813
2579
|
interface BillingInformation {
|
|
1814
2580
|
/**
|
|
1815
|
-
* Billing address
|
|
2581
|
+
* Billing address for the subscription
|
|
1816
2582
|
*/
|
|
1817
2583
|
billingAddress?: BillingInformation.BillingAddress;
|
|
1818
2584
|
/**
|
|
1819
|
-
*
|
|
2585
|
+
* Stripe Connect account to charge on behalf of
|
|
1820
2586
|
*/
|
|
1821
|
-
chargeOnBehalfOfAccount?: string;
|
|
2587
|
+
chargeOnBehalfOfAccount?: string | null;
|
|
1822
2588
|
/**
|
|
1823
|
-
* Billing integration
|
|
2589
|
+
* Billing integration identifier
|
|
1824
2590
|
*/
|
|
1825
|
-
integrationId?: string;
|
|
2591
|
+
integrationId?: string | null;
|
|
1826
2592
|
/**
|
|
1827
|
-
*
|
|
2593
|
+
* Number of days until invoice is due
|
|
1828
2594
|
*/
|
|
1829
2595
|
invoiceDaysUntilDue?: number;
|
|
1830
2596
|
/**
|
|
1831
|
-
* Whether subscription is backdated
|
|
2597
|
+
* Whether the subscription is backdated
|
|
1832
2598
|
*/
|
|
1833
2599
|
isBackdated?: boolean;
|
|
1834
2600
|
/**
|
|
1835
|
-
* Whether invoice is
|
|
2601
|
+
* Whether the invoice is marked as paid
|
|
1836
2602
|
*/
|
|
1837
2603
|
isInvoicePaid?: boolean;
|
|
1838
2604
|
/**
|
|
1839
|
-
* Additional
|
|
2605
|
+
* Additional metadata for the subscription
|
|
1840
2606
|
*/
|
|
1841
|
-
metadata?:
|
|
2607
|
+
metadata?: {
|
|
2608
|
+
[key: string]: string;
|
|
2609
|
+
};
|
|
1842
2610
|
/**
|
|
1843
|
-
*
|
|
2611
|
+
* How to handle proration for billing changes
|
|
1844
2612
|
*/
|
|
1845
2613
|
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1846
2614
|
/**
|
|
1847
|
-
* Customer tax
|
|
2615
|
+
* Customer tax identification numbers
|
|
1848
2616
|
*/
|
|
1849
2617
|
taxIds?: Array<BillingInformation.TaxID>;
|
|
1850
2618
|
/**
|
|
1851
|
-
* Tax percentage
|
|
2619
|
+
* Tax percentage (0-100)
|
|
1852
2620
|
*/
|
|
1853
2621
|
taxPercentage?: number;
|
|
1854
2622
|
/**
|
|
1855
|
-
* Tax rate
|
|
2623
|
+
* Tax rate identifiers to apply
|
|
1856
2624
|
*/
|
|
1857
2625
|
taxRateIds?: Array<string>;
|
|
1858
2626
|
}
|
|
1859
2627
|
namespace BillingInformation {
|
|
1860
2628
|
/**
|
|
1861
|
-
* Billing address
|
|
2629
|
+
* Billing address for the subscription
|
|
1862
2630
|
*/
|
|
1863
2631
|
interface BillingAddress {
|
|
1864
2632
|
city?: string;
|
|
@@ -1869,19 +2637,29 @@ export declare namespace SubscriptionPreviewParams {
|
|
|
1869
2637
|
state?: string;
|
|
1870
2638
|
}
|
|
1871
2639
|
/**
|
|
1872
|
-
* Tax
|
|
2640
|
+
* Tax identifier with type and value for customer tax exemptions.
|
|
1873
2641
|
*/
|
|
1874
2642
|
interface TaxID {
|
|
1875
2643
|
/**
|
|
1876
|
-
*
|
|
2644
|
+
* The type of tax exemption identifier, such as VAT.
|
|
1877
2645
|
*/
|
|
1878
2646
|
type: string;
|
|
1879
2647
|
/**
|
|
1880
|
-
*
|
|
2648
|
+
* The actual tax identifier value
|
|
1881
2649
|
*/
|
|
1882
2650
|
value: string;
|
|
1883
2651
|
}
|
|
1884
2652
|
}
|
|
2653
|
+
interface Budget {
|
|
2654
|
+
/**
|
|
2655
|
+
* Whether the budget is a soft limit
|
|
2656
|
+
*/
|
|
2657
|
+
hasSoftLimit: boolean;
|
|
2658
|
+
/**
|
|
2659
|
+
* Maximum spending limit
|
|
2660
|
+
*/
|
|
2661
|
+
limit: number;
|
|
2662
|
+
}
|
|
1885
2663
|
/**
|
|
1886
2664
|
* Charge item
|
|
1887
2665
|
*/
|
|
@@ -1899,20 +2677,251 @@ export declare namespace SubscriptionPreviewParams {
|
|
|
1899
2677
|
*/
|
|
1900
2678
|
type: 'FEATURE' | 'CREDIT';
|
|
1901
2679
|
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Checkout page configuration for payment collection
|
|
2682
|
+
*/
|
|
2683
|
+
interface CheckoutOptions {
|
|
2684
|
+
/**
|
|
2685
|
+
* URL to redirect to if checkout is canceled
|
|
2686
|
+
*/
|
|
2687
|
+
cancelUrl: string;
|
|
2688
|
+
/**
|
|
2689
|
+
* URL to redirect to after successful checkout
|
|
2690
|
+
*/
|
|
2691
|
+
successUrl: string;
|
|
2692
|
+
/**
|
|
2693
|
+
* Allow promotional codes during checkout
|
|
2694
|
+
*/
|
|
2695
|
+
allowPromoCodes?: boolean;
|
|
2696
|
+
/**
|
|
2697
|
+
* Allow tax ID collection during checkout
|
|
2698
|
+
*/
|
|
2699
|
+
allowTaxIdCollection?: boolean;
|
|
2700
|
+
/**
|
|
2701
|
+
* Collect billing address during checkout
|
|
2702
|
+
*/
|
|
2703
|
+
collectBillingAddress?: boolean;
|
|
2704
|
+
/**
|
|
2705
|
+
* Collect phone number during checkout
|
|
2706
|
+
*/
|
|
2707
|
+
collectPhoneNumber?: boolean;
|
|
2708
|
+
/**
|
|
2709
|
+
* Optional reference ID for the checkout session
|
|
2710
|
+
*/
|
|
2711
|
+
referenceId?: string | null;
|
|
2712
|
+
}
|
|
2713
|
+
/**
|
|
2714
|
+
* Feature entitlement configuration for a subscription
|
|
2715
|
+
*/
|
|
2716
|
+
interface Feature {
|
|
2717
|
+
/**
|
|
2718
|
+
* The feature ID to attach the entitlement to
|
|
2719
|
+
*/
|
|
2720
|
+
id: string;
|
|
2721
|
+
/**
|
|
2722
|
+
* SubscriptionFeatureEntitlementRequest
|
|
2723
|
+
*/
|
|
2724
|
+
type: 'FEATURE';
|
|
2725
|
+
/**
|
|
2726
|
+
* Whether the usage limit is a soft limit
|
|
2727
|
+
*/
|
|
2728
|
+
hasSoftLimit?: boolean;
|
|
2729
|
+
/**
|
|
2730
|
+
* Whether usage is unlimited
|
|
2731
|
+
*/
|
|
2732
|
+
hasUnlimitedUsage?: boolean;
|
|
2733
|
+
/**
|
|
2734
|
+
* Configuration for monthly reset period
|
|
2735
|
+
*/
|
|
2736
|
+
monthlyResetPeriodConfiguration?: Feature.MonthlyResetPeriodConfiguration | null;
|
|
2737
|
+
/**
|
|
2738
|
+
* Period at which usage resets
|
|
2739
|
+
*/
|
|
2740
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
2741
|
+
/**
|
|
2742
|
+
* Maximum allowed usage for the feature
|
|
2743
|
+
*/
|
|
2744
|
+
usageLimit?: number;
|
|
2745
|
+
/**
|
|
2746
|
+
* Configuration for weekly reset period
|
|
2747
|
+
*/
|
|
2748
|
+
weeklyResetPeriodConfiguration?: Feature.WeeklyResetPeriodConfiguration | null;
|
|
2749
|
+
/**
|
|
2750
|
+
* Configuration for yearly reset period
|
|
2751
|
+
*/
|
|
2752
|
+
yearlyResetPeriodConfiguration?: Feature.YearlyResetPeriodConfiguration | null;
|
|
2753
|
+
}
|
|
2754
|
+
namespace Feature {
|
|
2755
|
+
/**
|
|
2756
|
+
* Configuration for monthly reset period
|
|
2757
|
+
*/
|
|
2758
|
+
interface MonthlyResetPeriodConfiguration {
|
|
2759
|
+
/**
|
|
2760
|
+
* Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
2761
|
+
*/
|
|
2762
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Configuration for weekly reset period
|
|
2766
|
+
*/
|
|
2767
|
+
interface WeeklyResetPeriodConfiguration {
|
|
2768
|
+
/**
|
|
2769
|
+
* Reset anchor (SubscriptionStart or specific day)
|
|
2770
|
+
*/
|
|
2771
|
+
accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Configuration for yearly reset period
|
|
2775
|
+
*/
|
|
2776
|
+
interface YearlyResetPeriodConfiguration {
|
|
2777
|
+
/**
|
|
2778
|
+
* Reset anchor (SubscriptionStart)
|
|
2779
|
+
*/
|
|
2780
|
+
accordingTo: 'SubscriptionStart';
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
/**
|
|
2784
|
+
* Credit entitlement configuration for a subscription
|
|
2785
|
+
*/
|
|
2786
|
+
interface Credit {
|
|
2787
|
+
/**
|
|
2788
|
+
* The custom currency ID for the credit entitlement
|
|
2789
|
+
*/
|
|
2790
|
+
id: string;
|
|
2791
|
+
/**
|
|
2792
|
+
* Credit grant amount
|
|
2793
|
+
*/
|
|
2794
|
+
amount: number;
|
|
2795
|
+
/**
|
|
2796
|
+
* Credit grant cadence (MONTH or YEAR)
|
|
2797
|
+
*/
|
|
2798
|
+
cadence: 'MONTH' | 'YEAR';
|
|
2799
|
+
/**
|
|
2800
|
+
* SubscriptionCreditEntitlementRequest
|
|
2801
|
+
*/
|
|
2802
|
+
type: 'CREDIT';
|
|
2803
|
+
}
|
|
2804
|
+
/**
|
|
2805
|
+
* Minimum spend amount
|
|
2806
|
+
*/
|
|
2807
|
+
interface MinimumSpend {
|
|
2808
|
+
/**
|
|
2809
|
+
* The price amount
|
|
2810
|
+
*/
|
|
2811
|
+
amount?: number;
|
|
2812
|
+
/**
|
|
2813
|
+
* The price currency
|
|
2814
|
+
*/
|
|
2815
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
2816
|
+
}
|
|
2817
|
+
interface PriceOverride {
|
|
2818
|
+
/**
|
|
2819
|
+
* Addon identifier for the price override
|
|
2820
|
+
*/
|
|
2821
|
+
addonId?: string | null;
|
|
2822
|
+
/**
|
|
2823
|
+
* The price amount
|
|
2824
|
+
*/
|
|
2825
|
+
amount?: number;
|
|
2826
|
+
/**
|
|
2827
|
+
* Whether this is a base charge override
|
|
2828
|
+
*/
|
|
2829
|
+
baseCharge?: boolean;
|
|
2830
|
+
/**
|
|
2831
|
+
* The billing country code of the price
|
|
2832
|
+
*/
|
|
2833
|
+
billingCountryCode?: string;
|
|
2834
|
+
/**
|
|
2835
|
+
* Block size for pricing
|
|
2836
|
+
*/
|
|
2837
|
+
blockSize?: number;
|
|
2838
|
+
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
2839
|
+
creditRate?: PriceOverride.CreditRate;
|
|
2840
|
+
/**
|
|
2841
|
+
* The price currency
|
|
2842
|
+
*/
|
|
2843
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
2844
|
+
/**
|
|
2845
|
+
* Feature identifier for the price override
|
|
2846
|
+
*/
|
|
2847
|
+
featureId?: string | null;
|
|
2848
|
+
/**
|
|
2849
|
+
* Pricing tiers configuration
|
|
2850
|
+
*/
|
|
2851
|
+
tiers?: Array<PriceOverride.Tier>;
|
|
2852
|
+
}
|
|
2853
|
+
namespace PriceOverride {
|
|
2854
|
+
interface CreditRate {
|
|
2855
|
+
/**
|
|
2856
|
+
* The credit rate amount
|
|
2857
|
+
*/
|
|
2858
|
+
amount: number;
|
|
2859
|
+
/**
|
|
2860
|
+
* The custom currency refId for the credit rate
|
|
2861
|
+
*/
|
|
2862
|
+
currencyId: string;
|
|
2863
|
+
/**
|
|
2864
|
+
* A custom formula for calculating cost based on single event dimensions
|
|
2865
|
+
*/
|
|
2866
|
+
costFormula?: string | null;
|
|
2867
|
+
}
|
|
2868
|
+
interface Tier {
|
|
2869
|
+
/**
|
|
2870
|
+
* The flat fee price of the price tier
|
|
2871
|
+
*/
|
|
2872
|
+
flatPrice?: Tier.FlatPrice;
|
|
2873
|
+
/**
|
|
2874
|
+
* The unit price of the price tier
|
|
2875
|
+
*/
|
|
2876
|
+
unitPrice?: Tier.UnitPrice;
|
|
2877
|
+
/**
|
|
2878
|
+
* The up to quantity of the price tier
|
|
2879
|
+
*/
|
|
2880
|
+
upTo?: number;
|
|
2881
|
+
}
|
|
2882
|
+
namespace Tier {
|
|
2883
|
+
/**
|
|
2884
|
+
* The flat fee price of the price tier
|
|
2885
|
+
*/
|
|
2886
|
+
interface FlatPrice {
|
|
2887
|
+
/**
|
|
2888
|
+
* The price amount
|
|
2889
|
+
*/
|
|
2890
|
+
amount: number;
|
|
2891
|
+
/**
|
|
2892
|
+
* ISO 4217 currency code
|
|
2893
|
+
*/
|
|
2894
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
2895
|
+
}
|
|
2896
|
+
/**
|
|
2897
|
+
* The unit price of the price tier
|
|
2898
|
+
*/
|
|
2899
|
+
interface UnitPrice {
|
|
2900
|
+
/**
|
|
2901
|
+
* The price amount
|
|
2902
|
+
*/
|
|
2903
|
+
amount: number;
|
|
2904
|
+
/**
|
|
2905
|
+
* ISO 4217 currency code
|
|
2906
|
+
*/
|
|
2907
|
+
currency: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
1902
2911
|
/**
|
|
1903
2912
|
* Trial period override settings
|
|
1904
2913
|
*/
|
|
1905
2914
|
interface TrialOverrideConfiguration {
|
|
1906
2915
|
/**
|
|
1907
|
-
* Whether
|
|
2916
|
+
* Whether the subscription should start with a trial period
|
|
1908
2917
|
*/
|
|
1909
2918
|
isTrial: boolean;
|
|
1910
2919
|
/**
|
|
1911
|
-
* Behavior when trial ends
|
|
2920
|
+
* Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
1912
2921
|
*/
|
|
1913
2922
|
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
1914
2923
|
/**
|
|
1915
|
-
*
|
|
2924
|
+
* Custom trial end date
|
|
1916
2925
|
*/
|
|
1917
2926
|
trialEndDate?: string;
|
|
1918
2927
|
}
|
|
@@ -1924,7 +2933,9 @@ export interface SubscriptionTransferParams {
|
|
|
1924
2933
|
destinationResourceId: string;
|
|
1925
2934
|
}
|
|
1926
2935
|
export declare namespace Subscriptions {
|
|
1927
|
-
export { type
|
|
1928
|
-
export {
|
|
2936
|
+
export { type Subscription as Subscription, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionImportResponse as SubscriptionImportResponse, type SubscriptionPreviewResponse as SubscriptionPreviewResponse, type SubscriptionProvisionResponse as SubscriptionProvisionResponse, type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionDelegateParams as SubscriptionDelegateParams, type SubscriptionImportParams as SubscriptionImportParams, type SubscriptionMigrateParams as SubscriptionMigrateParams, type SubscriptionPreviewParams as SubscriptionPreviewParams, type SubscriptionProvisionParams as SubscriptionProvisionParams, type SubscriptionTransferParams as SubscriptionTransferParams, };
|
|
2937
|
+
export { FutureUpdateAPIFutureUpdate as FutureUpdate, type CancelSubscription as CancelSubscription };
|
|
2938
|
+
export { Usage as Usage, type UsageChargeUsageResponse as UsageChargeUsageResponse, type UsageSyncResponse as UsageSyncResponse, type UsageChargeUsageParams as UsageChargeUsageParams, };
|
|
2939
|
+
export { Invoice as Invoice, type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse };
|
|
1929
2940
|
}
|
|
1930
2941
|
//# sourceMappingURL=subscriptions.d.ts.map
|