@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.11
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 +158 -0
- package/README.md +40 -0
- package/client.d.mts +6 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -8
- package/client.d.ts.map +1 -1
- package/client.js +23 -21
- package/client.js.map +1 -1
- package/client.mjs +24 -22
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +11 -5
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +11 -5
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +9 -9
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +9 -9
- package/core/pagination.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/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/addons/addons.d.mts +1298 -0
- package/resources/v1/addons/addons.d.mts.map +1 -0
- package/resources/v1/addons/addons.d.ts +1298 -0
- package/resources/v1/addons/addons.d.ts.map +1 -0
- package/resources/v1/addons/addons.js +78 -0
- package/resources/v1/addons/addons.js.map +1 -0
- package/resources/v1/addons/addons.mjs +73 -0
- package/resources/v1/addons/addons.mjs.map +1 -0
- package/resources/v1/addons/entitlements.d.mts +747 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -0
- package/resources/v1/addons/entitlements.d.ts +747 -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 +154 -157
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +154 -157
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/coupons.js +21 -4
- package/resources/v1/coupons.js.map +1 -1
- package/resources/v1/coupons.mjs +21 -4
- package/resources/v1/coupons.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +247 -118
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +247 -118
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +37 -16
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +37 -16
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -3
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- 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 +4 -2
- package/resources/v1/customers/payment-method.js.map +1 -1
- package/resources/v1/customers/payment-method.mjs +4 -2
- package/resources/v1/customers/payment-method.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +498 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.d.ts +498 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.js +32 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -0
- package/resources/v1/customers/promotional-entitlements.mjs +28 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
- package/resources/v1/events.d.mts +63 -0
- package/resources/v1/events.d.mts.map +1 -0
- package/resources/v1/events.d.ts +63 -0
- package/resources/v1/events.d.ts.map +1 -0
- package/resources/v1/events.js +16 -0
- package/resources/v1/events.js.map +1 -0
- package/resources/v1/events.mjs +12 -0
- package/resources/v1/events.mjs.map +1 -0
- package/resources/v1/features.d.mts +444 -0
- package/resources/v1/features.d.mts.map +1 -0
- package/resources/v1/features.d.ts +444 -0
- package/resources/v1/features.d.ts.map +1 -0
- package/resources/v1/features.js +51 -0
- package/resources/v1/features.js.map +1 -0
- package/resources/v1/features.mjs +47 -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 +747 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -0
- package/resources/v1/plans/entitlements.d.ts +747 -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 +973 -0
- package/resources/v1/plans/plans.d.mts.map +1 -0
- package/resources/v1/plans/plans.d.ts +973 -0
- package/resources/v1/plans/plans.d.ts.map +1 -0
- package/resources/v1/plans/plans.js +76 -0
- package/resources/v1/plans/plans.js.map +1 -0
- package/resources/v1/plans/plans.mjs +71 -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 +332 -0
- package/resources/v1/products.d.mts.map +1 -0
- package/resources/v1/products.d.ts +332 -0
- package/resources/v1/products.d.ts.map +1 -0
- package/resources/v1/products.js +52 -0
- package/resources/v1/products.js.map +1 -0
- package/resources/v1/products.mjs +48 -0
- package/resources/v1/products.mjs.map +1 -0
- package/resources/v1/subscriptions/future-update.d.mts +12 -19
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +12 -19
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js +3 -2
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs +3 -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 +34 -0
- package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
- package/resources/v1/subscriptions/invoice.d.ts +34 -0
- package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
- package/resources/v1/subscriptions/invoice.js +17 -0
- package/resources/v1/subscriptions/invoice.js.map +1 -0
- package/resources/v1/subscriptions/invoice.mjs +13 -0
- package/resources/v1/subscriptions/invoice.mjs.map +1 -0
- package/resources/v1/subscriptions/subscriptions.d.mts +1565 -518
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1565 -518
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +52 -12
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +53 -13
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/subscriptions/usage.d.mts +98 -0
- package/resources/v1/subscriptions/usage.d.mts.map +1 -0
- package/resources/v1/subscriptions/usage.d.ts +98 -0
- package/resources/v1/subscriptions/usage.d.ts.map +1 -0
- package/resources/v1/subscriptions/usage.js +24 -0
- package/resources/v1/subscriptions/usage.js.map +1 -0
- package/resources/v1/subscriptions/usage.mjs +20 -0
- package/resources/v1/subscriptions/usage.mjs.map +1 -0
- package/resources/v1/usage.d.mts +230 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +230 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +24 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +20 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.mts +30 -149
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +30 -149
- 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 +33 -40
- package/src/core/pagination.ts +24 -18
- 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/resources/index.ts +1 -7
- package/src/resources/v1/addons/addons.ts +3245 -0
- package/src/resources/v1/addons/entitlements.ts +976 -0
- package/src/resources/v1/addons/index.ts +26 -0
- package/src/resources/v1/addons.ts +3 -0
- package/src/resources/v1/coupons.ts +311 -436
- package/src/resources/v1/customers/customers.ts +334 -153
- package/src/resources/v1/customers/index.ts +17 -2
- package/src/resources/v1/customers/payment-method.ts +7 -2
- package/src/resources/v1/customers/promotional-entitlements.ts +669 -0
- package/src/resources/v1/events.ts +74 -0
- package/src/resources/v1/features.ts +571 -0
- package/src/resources/v1/index.ts +73 -15
- package/src/resources/v1/plans/entitlements.ts +968 -0
- package/src/resources/v1/plans/index.ts +24 -0
- package/src/resources/v1/plans/plans.ts +2032 -0
- package/src/resources/v1/plans.ts +3 -0
- package/src/resources/v1/products.ts +423 -0
- package/src/resources/v1/subscriptions/future-update.ts +12 -27
- package/src/resources/v1/subscriptions/index.ts +16 -11
- package/src/resources/v1/subscriptions/invoice.ts +42 -0
- package/src/resources/v1/subscriptions/subscriptions.ts +3341 -832
- package/src/resources/v1/subscriptions/usage.ts +126 -0
- package/src/resources/v1/usage.ts +284 -0
- package/src/resources/v1/v1.ts +174 -197
- 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 -98
- package/resources/v1/customers/usage.d.mts.map +0 -1
- package/resources/v1/customers/usage.d.ts +0 -98
- package/resources/v1/customers/usage.d.ts.map +0 -1
- package/resources/v1/customers/usage.js +0 -20
- package/resources/v1/customers/usage.js.map +0 -1
- package/resources/v1/customers/usage.mjs +0 -16
- package/resources/v1/customers/usage.mjs.map +0 -1
- package/src/resources/v1/customers/usage.ts +0 -132
|
@@ -1,157 +1,82 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as FutureUpdateAPI from "./future-update.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { CancelSubscription, FutureUpdate } from "./future-update.mjs";
|
|
4
|
+
import * as InvoiceAPI from "./invoice.mjs";
|
|
5
|
+
import { Invoice, InvoiceMarkAsPaidResponse } from "./invoice.mjs";
|
|
6
|
+
import * as UsageAPI from "./usage.mjs";
|
|
7
|
+
import { Usage, UsageChargeUsageParams, UsageChargeUsageResponse, UsageSyncResponse } from "./usage.mjs";
|
|
4
8
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
9
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
5
10
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
11
|
export declare class Subscriptions extends APIResource {
|
|
7
12
|
futureUpdate: FutureUpdateAPI.FutureUpdate;
|
|
13
|
+
usage: UsageAPI.Usage;
|
|
14
|
+
invoice: InvoiceAPI.Invoice;
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
16
|
+
* Retrieves a subscription by its unique identifier, including plan details,
|
|
17
|
+
* billing period, status, and add-ons.
|
|
10
18
|
*/
|
|
11
|
-
|
|
19
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Subscription>;
|
|
12
20
|
/**
|
|
13
|
-
*
|
|
21
|
+
* Updates an active subscription's properties including billing period, add-ons,
|
|
22
|
+
* unit quantities, and discounts.
|
|
14
23
|
*/
|
|
15
|
-
|
|
24
|
+
update(id: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
16
25
|
/**
|
|
17
|
-
*
|
|
26
|
+
* Retrieves a paginated list of subscriptions, with optional filters for customer,
|
|
27
|
+
* status, and plan.
|
|
18
28
|
*/
|
|
19
|
-
list(query?: SubscriptionListParams | null | undefined, options?: RequestOptions):
|
|
29
|
+
list(query?: SubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionListResponsesMyCursorIDPage, SubscriptionListResponse>;
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
31
|
+
* Cancels an active subscription, either immediately or at a specified time such
|
|
32
|
+
* as end of billing period.
|
|
22
33
|
*/
|
|
23
|
-
|
|
34
|
+
cancel(id: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
24
35
|
/**
|
|
25
|
-
*
|
|
36
|
+
* Delegates the payment responsibility of a subscription to a different customer.
|
|
37
|
+
* The delegated customer will be billed for this subscription.
|
|
26
38
|
*/
|
|
27
|
-
|
|
39
|
+
delegate(id: string, body: SubscriptionDelegateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
28
40
|
/**
|
|
29
|
-
*
|
|
41
|
+
* Imports multiple subscriptions in bulk. Used for migrating subscription data
|
|
42
|
+
* from external systems.
|
|
43
|
+
*/
|
|
44
|
+
import(body: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Migrates a subscription to the latest published version of its plan or add-ons.
|
|
47
|
+
* Handles prorated charges or credits automatically.
|
|
48
|
+
*/
|
|
49
|
+
migrate(id: string, body: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription>;
|
|
50
|
+
/**
|
|
51
|
+
* Previews the pricing impact of creating or updating a subscription without
|
|
52
|
+
* making changes. Returns estimated costs, taxes, and proration details.
|
|
30
53
|
*/
|
|
31
54
|
preview(body: SubscriptionPreviewParams, options?: RequestOptions): APIPromise<SubscriptionPreviewResponse>;
|
|
32
55
|
/**
|
|
33
|
-
*
|
|
56
|
+
* Creates a new subscription for an existing customer. When payment is required
|
|
57
|
+
* and no payment method exists, returns a checkout URL.
|
|
34
58
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
interface Data {
|
|
42
|
-
/**
|
|
43
|
-
* Unique identifier for the provisioned subscription
|
|
44
|
-
*/
|
|
45
|
-
id: string;
|
|
46
|
-
/**
|
|
47
|
-
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
48
|
-
*/
|
|
49
|
-
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
50
|
-
/**
|
|
51
|
-
* Checkout billing ID when payment is required
|
|
52
|
-
*/
|
|
53
|
-
checkoutBillingId?: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* URL to complete payment when PAYMENT_REQUIRED
|
|
56
|
-
*/
|
|
57
|
-
checkoutUrl?: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* Whether the subscription is scheduled for future activation
|
|
60
|
-
*/
|
|
61
|
-
isScheduled?: boolean;
|
|
62
|
-
subscription?: Data.Subscription;
|
|
63
|
-
}
|
|
64
|
-
namespace Data {
|
|
65
|
-
interface Subscription {
|
|
66
|
-
/**
|
|
67
|
-
* Subscription ID
|
|
68
|
-
*/
|
|
69
|
-
id: string;
|
|
70
|
-
/**
|
|
71
|
-
* Billing ID
|
|
72
|
-
*/
|
|
73
|
-
billingId: string | null;
|
|
74
|
-
/**
|
|
75
|
-
* Created at
|
|
76
|
-
*/
|
|
77
|
-
createdAt: string;
|
|
78
|
-
/**
|
|
79
|
-
* Customer ID
|
|
80
|
-
*/
|
|
81
|
-
customerId: string;
|
|
82
|
-
/**
|
|
83
|
-
* Payment collection
|
|
84
|
-
*/
|
|
85
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
86
|
-
/**
|
|
87
|
-
* Plan ID
|
|
88
|
-
*/
|
|
89
|
-
planId: string;
|
|
90
|
-
/**
|
|
91
|
-
* Pricing type
|
|
92
|
-
*/
|
|
93
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
94
|
-
/**
|
|
95
|
-
* Subscription start date
|
|
96
|
-
*/
|
|
97
|
-
startDate: string;
|
|
98
|
-
/**
|
|
99
|
-
* Subscription status
|
|
100
|
-
*/
|
|
101
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
102
|
-
/**
|
|
103
|
-
* Subscription cancellation date
|
|
104
|
-
*/
|
|
105
|
-
cancellationDate?: string | null;
|
|
106
|
-
/**
|
|
107
|
-
* Subscription cancel reason
|
|
108
|
-
*/
|
|
109
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
110
|
-
/**
|
|
111
|
-
* End of the current billing period
|
|
112
|
-
*/
|
|
113
|
-
currentBillingPeriodEnd?: string | null;
|
|
114
|
-
/**
|
|
115
|
-
* Start of the current billing period
|
|
116
|
-
*/
|
|
117
|
-
currentBillingPeriodStart?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* Subscription effective end date
|
|
120
|
-
*/
|
|
121
|
-
effectiveEndDate?: string | null;
|
|
122
|
-
/**
|
|
123
|
-
* Subscription end date
|
|
124
|
-
*/
|
|
125
|
-
endDate?: string | null;
|
|
126
|
-
/**
|
|
127
|
-
* Additional metadata for the subscription
|
|
128
|
-
*/
|
|
129
|
-
metadata?: {
|
|
130
|
-
[key: string]: string;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Paying customer ID for delegated billing
|
|
134
|
-
*/
|
|
135
|
-
payingCustomerId?: string | null;
|
|
136
|
-
/**
|
|
137
|
-
* The method used to collect payments for a subscription
|
|
138
|
-
*/
|
|
139
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
140
|
-
/**
|
|
141
|
-
* Resource ID
|
|
142
|
-
*/
|
|
143
|
-
resourceId?: string | null;
|
|
144
|
-
/**
|
|
145
|
-
* Subscription trial end date
|
|
146
|
-
*/
|
|
147
|
-
trialEndDate?: string | null;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
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>;
|
|
150
65
|
}
|
|
151
|
-
export
|
|
152
|
-
|
|
66
|
+
export type SubscriptionListResponsesMyCursorIDPage = MyCursorIDPage<SubscriptionListResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Response object
|
|
69
|
+
*/
|
|
70
|
+
export interface Subscription {
|
|
71
|
+
/**
|
|
72
|
+
* Customer subscription to a plan
|
|
73
|
+
*/
|
|
74
|
+
data: Subscription.Data;
|
|
153
75
|
}
|
|
154
|
-
export declare namespace
|
|
76
|
+
export declare namespace Subscription {
|
|
77
|
+
/**
|
|
78
|
+
* Customer subscription to a plan
|
|
79
|
+
*/
|
|
155
80
|
interface Data {
|
|
156
81
|
/**
|
|
157
82
|
* Subscription ID
|
|
@@ -227,6 +152,7 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
227
152
|
* The method used to collect payments for a subscription
|
|
228
153
|
*/
|
|
229
154
|
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
155
|
+
prices?: Array<Data.Price>;
|
|
230
156
|
/**
|
|
231
157
|
* Resource ID
|
|
232
158
|
*/
|
|
@@ -236,303 +162,228 @@ export declare namespace SubscriptionRetrieveResponse {
|
|
|
236
162
|
*/
|
|
237
163
|
trialEndDate?: string | null;
|
|
238
164
|
}
|
|
165
|
+
namespace Data {
|
|
166
|
+
interface Price {
|
|
167
|
+
/**
|
|
168
|
+
* Price ID
|
|
169
|
+
*/
|
|
170
|
+
id: string;
|
|
171
|
+
/**
|
|
172
|
+
* Creation timestamp
|
|
173
|
+
*/
|
|
174
|
+
createdAt: string;
|
|
175
|
+
/**
|
|
176
|
+
* Last update timestamp
|
|
177
|
+
*/
|
|
178
|
+
updatedAt: string;
|
|
179
|
+
[k: string]: unknown;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
239
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Customer subscription to a plan
|
|
185
|
+
*/
|
|
240
186
|
export interface SubscriptionListResponse {
|
|
241
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Subscription ID
|
|
189
|
+
*/
|
|
190
|
+
id: string;
|
|
191
|
+
/**
|
|
192
|
+
* Billing ID
|
|
193
|
+
*/
|
|
194
|
+
billingId: string | null;
|
|
195
|
+
/**
|
|
196
|
+
* Created at
|
|
197
|
+
*/
|
|
198
|
+
createdAt: string;
|
|
199
|
+
/**
|
|
200
|
+
* Customer ID
|
|
201
|
+
*/
|
|
202
|
+
customerId: string;
|
|
203
|
+
/**
|
|
204
|
+
* Payment collection
|
|
205
|
+
*/
|
|
206
|
+
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
207
|
+
/**
|
|
208
|
+
* Plan ID
|
|
209
|
+
*/
|
|
210
|
+
planId: string;
|
|
211
|
+
/**
|
|
212
|
+
* Pricing type
|
|
213
|
+
*/
|
|
214
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
215
|
+
/**
|
|
216
|
+
* Subscription start date
|
|
217
|
+
*/
|
|
218
|
+
startDate: string;
|
|
219
|
+
/**
|
|
220
|
+
* Subscription status
|
|
221
|
+
*/
|
|
222
|
+
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
223
|
+
/**
|
|
224
|
+
* Subscription cancellation date
|
|
225
|
+
*/
|
|
226
|
+
cancellationDate?: string | null;
|
|
227
|
+
/**
|
|
228
|
+
* Subscription cancel reason
|
|
229
|
+
*/
|
|
230
|
+
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
231
|
+
/**
|
|
232
|
+
* End of the current billing period
|
|
233
|
+
*/
|
|
234
|
+
currentBillingPeriodEnd?: string | null;
|
|
235
|
+
/**
|
|
236
|
+
* Start of the current billing period
|
|
237
|
+
*/
|
|
238
|
+
currentBillingPeriodStart?: string | null;
|
|
239
|
+
/**
|
|
240
|
+
* Subscription effective end date
|
|
241
|
+
*/
|
|
242
|
+
effectiveEndDate?: string | null;
|
|
243
|
+
/**
|
|
244
|
+
* Subscription end date
|
|
245
|
+
*/
|
|
246
|
+
endDate?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* Additional metadata for the subscription
|
|
249
|
+
*/
|
|
250
|
+
metadata?: {
|
|
251
|
+
[key: string]: string;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Paying customer ID for delegated billing
|
|
255
|
+
*/
|
|
256
|
+
payingCustomerId?: string | null;
|
|
257
|
+
/**
|
|
258
|
+
* The method used to collect payments for a subscription
|
|
259
|
+
*/
|
|
260
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
261
|
+
prices?: Array<SubscriptionListResponse.Price>;
|
|
262
|
+
/**
|
|
263
|
+
* Resource ID
|
|
264
|
+
*/
|
|
265
|
+
resourceId?: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* Subscription trial end date
|
|
268
|
+
*/
|
|
269
|
+
trialEndDate?: string | null;
|
|
242
270
|
}
|
|
243
271
|
export declare namespace SubscriptionListResponse {
|
|
244
|
-
interface
|
|
272
|
+
interface Price {
|
|
245
273
|
/**
|
|
246
|
-
*
|
|
274
|
+
* Price ID
|
|
247
275
|
*/
|
|
248
276
|
id: string;
|
|
249
277
|
/**
|
|
250
|
-
*
|
|
251
|
-
*/
|
|
252
|
-
billingId: string | null;
|
|
253
|
-
/**
|
|
254
|
-
* Created at
|
|
278
|
+
* Creation timestamp
|
|
255
279
|
*/
|
|
256
280
|
createdAt: string;
|
|
257
281
|
/**
|
|
258
|
-
*
|
|
259
|
-
*/
|
|
260
|
-
cursorId: string;
|
|
261
|
-
/**
|
|
262
|
-
* Customer ID
|
|
263
|
-
*/
|
|
264
|
-
customerId: string;
|
|
265
|
-
/**
|
|
266
|
-
* Payment collection
|
|
267
|
-
*/
|
|
268
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
269
|
-
/**
|
|
270
|
-
* Plan ID
|
|
271
|
-
*/
|
|
272
|
-
planId: string;
|
|
273
|
-
/**
|
|
274
|
-
* Pricing type
|
|
275
|
-
*/
|
|
276
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
277
|
-
/**
|
|
278
|
-
* Subscription start date
|
|
279
|
-
*/
|
|
280
|
-
startDate: string;
|
|
281
|
-
/**
|
|
282
|
-
* Subscription status
|
|
283
|
-
*/
|
|
284
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
285
|
-
/**
|
|
286
|
-
* Subscription cancellation date
|
|
282
|
+
* Last update timestamp
|
|
287
283
|
*/
|
|
288
|
-
|
|
284
|
+
updatedAt: string;
|
|
285
|
+
[k: string]: unknown;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Response object
|
|
290
|
+
*/
|
|
291
|
+
export interface SubscriptionImportResponse {
|
|
292
|
+
data: SubscriptionImportResponse.Data;
|
|
293
|
+
}
|
|
294
|
+
export declare namespace SubscriptionImportResponse {
|
|
295
|
+
interface Data {
|
|
289
296
|
/**
|
|
290
|
-
*
|
|
297
|
+
* Unique identifier for the import task
|
|
291
298
|
*/
|
|
292
|
-
|
|
299
|
+
taskId: string;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Response object
|
|
304
|
+
*/
|
|
305
|
+
export interface SubscriptionPreviewResponse {
|
|
306
|
+
/**
|
|
307
|
+
* Pricing preview with invoices
|
|
308
|
+
*/
|
|
309
|
+
data: SubscriptionPreviewResponse.Data;
|
|
310
|
+
}
|
|
311
|
+
export declare namespace SubscriptionPreviewResponse {
|
|
312
|
+
/**
|
|
313
|
+
* Pricing preview with invoices
|
|
314
|
+
*/
|
|
315
|
+
interface Data {
|
|
293
316
|
/**
|
|
294
|
-
*
|
|
317
|
+
* Invoice due immediately
|
|
295
318
|
*/
|
|
296
|
-
|
|
319
|
+
immediateInvoice: Data.ImmediateInvoice;
|
|
297
320
|
/**
|
|
298
|
-
*
|
|
321
|
+
* Billing period range
|
|
299
322
|
*/
|
|
300
|
-
|
|
323
|
+
billingPeriodRange?: Data.BillingPeriodRange;
|
|
301
324
|
/**
|
|
302
|
-
*
|
|
325
|
+
* Free items included
|
|
303
326
|
*/
|
|
304
|
-
|
|
327
|
+
freeItems?: Array<Data.FreeItem>;
|
|
305
328
|
/**
|
|
306
|
-
*
|
|
329
|
+
* Whether updates are scheduled
|
|
307
330
|
*/
|
|
308
|
-
|
|
331
|
+
hasScheduledUpdates?: boolean;
|
|
309
332
|
/**
|
|
310
|
-
*
|
|
333
|
+
* Whether this is a downgrade
|
|
311
334
|
*/
|
|
312
|
-
|
|
313
|
-
[key: string]: string;
|
|
314
|
-
};
|
|
335
|
+
isPlanDowngrade?: boolean;
|
|
315
336
|
/**
|
|
316
|
-
*
|
|
337
|
+
* Recurring invoice preview
|
|
317
338
|
*/
|
|
318
|
-
|
|
339
|
+
recurringInvoice?: Data.RecurringInvoice;
|
|
340
|
+
}
|
|
341
|
+
namespace Data {
|
|
319
342
|
/**
|
|
320
|
-
*
|
|
343
|
+
* Invoice due immediately
|
|
321
344
|
*/
|
|
322
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
323
|
-
/**
|
|
324
|
-
* Resource ID
|
|
325
|
-
*/
|
|
326
|
-
resourceId?: string | null;
|
|
327
|
-
/**
|
|
328
|
-
* Subscription trial end date
|
|
329
|
-
*/
|
|
330
|
-
trialEndDate?: string | null;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
export interface SubscriptionDelegateResponse {
|
|
334
|
-
data: SubscriptionDelegateResponse.Data;
|
|
335
|
-
}
|
|
336
|
-
export declare namespace SubscriptionDelegateResponse {
|
|
337
|
-
interface Data {
|
|
338
|
-
/**
|
|
339
|
-
* Subscription ID
|
|
340
|
-
*/
|
|
341
|
-
id: string;
|
|
342
|
-
/**
|
|
343
|
-
* Billing ID
|
|
344
|
-
*/
|
|
345
|
-
billingId: string | null;
|
|
346
|
-
/**
|
|
347
|
-
* Created at
|
|
348
|
-
*/
|
|
349
|
-
createdAt: string;
|
|
350
|
-
/**
|
|
351
|
-
* Customer ID
|
|
352
|
-
*/
|
|
353
|
-
customerId: string;
|
|
354
|
-
/**
|
|
355
|
-
* Payment collection
|
|
356
|
-
*/
|
|
357
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
358
|
-
/**
|
|
359
|
-
* Plan ID
|
|
360
|
-
*/
|
|
361
|
-
planId: string;
|
|
362
|
-
/**
|
|
363
|
-
* Pricing type
|
|
364
|
-
*/
|
|
365
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
366
|
-
/**
|
|
367
|
-
* Subscription start date
|
|
368
|
-
*/
|
|
369
|
-
startDate: string;
|
|
370
|
-
/**
|
|
371
|
-
* Subscription status
|
|
372
|
-
*/
|
|
373
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
374
|
-
/**
|
|
375
|
-
* Subscription cancellation date
|
|
376
|
-
*/
|
|
377
|
-
cancellationDate?: string | null;
|
|
378
|
-
/**
|
|
379
|
-
* Subscription cancel reason
|
|
380
|
-
*/
|
|
381
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
382
|
-
/**
|
|
383
|
-
* End of the current billing period
|
|
384
|
-
*/
|
|
385
|
-
currentBillingPeriodEnd?: string | null;
|
|
386
|
-
/**
|
|
387
|
-
* Start of the current billing period
|
|
388
|
-
*/
|
|
389
|
-
currentBillingPeriodStart?: string | null;
|
|
390
|
-
/**
|
|
391
|
-
* Subscription effective end date
|
|
392
|
-
*/
|
|
393
|
-
effectiveEndDate?: string | null;
|
|
394
|
-
/**
|
|
395
|
-
* Subscription end date
|
|
396
|
-
*/
|
|
397
|
-
endDate?: string | null;
|
|
398
|
-
/**
|
|
399
|
-
* Additional metadata for the subscription
|
|
400
|
-
*/
|
|
401
|
-
metadata?: {
|
|
402
|
-
[key: string]: string;
|
|
403
|
-
};
|
|
404
|
-
/**
|
|
405
|
-
* Paying customer ID for delegated billing
|
|
406
|
-
*/
|
|
407
|
-
payingCustomerId?: string | null;
|
|
408
|
-
/**
|
|
409
|
-
* The method used to collect payments for a subscription
|
|
410
|
-
*/
|
|
411
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
412
|
-
/**
|
|
413
|
-
* Resource ID
|
|
414
|
-
*/
|
|
415
|
-
resourceId?: string | null;
|
|
416
|
-
/**
|
|
417
|
-
* Subscription trial end date
|
|
418
|
-
*/
|
|
419
|
-
trialEndDate?: string | null;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
export interface SubscriptionMigrateResponse {
|
|
423
|
-
data: SubscriptionMigrateResponse.Data;
|
|
424
|
-
}
|
|
425
|
-
export declare namespace SubscriptionMigrateResponse {
|
|
426
|
-
interface Data {
|
|
427
|
-
/**
|
|
428
|
-
* Subscription ID
|
|
429
|
-
*/
|
|
430
|
-
id: string;
|
|
431
|
-
/**
|
|
432
|
-
* Billing ID
|
|
433
|
-
*/
|
|
434
|
-
billingId: string | null;
|
|
435
|
-
/**
|
|
436
|
-
* Created at
|
|
437
|
-
*/
|
|
438
|
-
createdAt: string;
|
|
439
|
-
/**
|
|
440
|
-
* Customer ID
|
|
441
|
-
*/
|
|
442
|
-
customerId: string;
|
|
443
|
-
/**
|
|
444
|
-
* Payment collection
|
|
445
|
-
*/
|
|
446
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
447
|
-
/**
|
|
448
|
-
* Plan ID
|
|
449
|
-
*/
|
|
450
|
-
planId: string;
|
|
451
|
-
/**
|
|
452
|
-
* Pricing type
|
|
453
|
-
*/
|
|
454
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
455
|
-
/**
|
|
456
|
-
* Subscription start date
|
|
457
|
-
*/
|
|
458
|
-
startDate: string;
|
|
459
|
-
/**
|
|
460
|
-
* Subscription status
|
|
461
|
-
*/
|
|
462
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
463
|
-
/**
|
|
464
|
-
* Subscription cancellation date
|
|
465
|
-
*/
|
|
466
|
-
cancellationDate?: string | null;
|
|
467
|
-
/**
|
|
468
|
-
* Subscription cancel reason
|
|
469
|
-
*/
|
|
470
|
-
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
471
|
-
/**
|
|
472
|
-
* End of the current billing period
|
|
473
|
-
*/
|
|
474
|
-
currentBillingPeriodEnd?: string | null;
|
|
475
|
-
/**
|
|
476
|
-
* Start of the current billing period
|
|
477
|
-
*/
|
|
478
|
-
currentBillingPeriodStart?: string | null;
|
|
479
|
-
/**
|
|
480
|
-
* Subscription effective end date
|
|
481
|
-
*/
|
|
482
|
-
effectiveEndDate?: string | null;
|
|
483
|
-
/**
|
|
484
|
-
* Subscription end date
|
|
485
|
-
*/
|
|
486
|
-
endDate?: string | null;
|
|
487
|
-
/**
|
|
488
|
-
* Additional metadata for the subscription
|
|
489
|
-
*/
|
|
490
|
-
metadata?: {
|
|
491
|
-
[key: string]: string;
|
|
492
|
-
};
|
|
493
|
-
/**
|
|
494
|
-
* Paying customer ID for delegated billing
|
|
495
|
-
*/
|
|
496
|
-
payingCustomerId?: string | null;
|
|
497
|
-
/**
|
|
498
|
-
* The method used to collect payments for a subscription
|
|
499
|
-
*/
|
|
500
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
501
|
-
/**
|
|
502
|
-
* Resource ID
|
|
503
|
-
*/
|
|
504
|
-
resourceId?: string | null;
|
|
505
|
-
/**
|
|
506
|
-
* Subscription trial end date
|
|
507
|
-
*/
|
|
508
|
-
trialEndDate?: string | null;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
export interface SubscriptionPreviewResponse {
|
|
512
|
-
data: SubscriptionPreviewResponse.Data;
|
|
513
|
-
}
|
|
514
|
-
export declare namespace SubscriptionPreviewResponse {
|
|
515
|
-
interface Data {
|
|
516
|
-
immediateInvoice: Data.ImmediateInvoice;
|
|
517
|
-
billingPeriodRange?: Data.BillingPeriodRange;
|
|
518
|
-
freeItems?: Array<Data.FreeItem>;
|
|
519
|
-
hasScheduledUpdates?: boolean;
|
|
520
|
-
isPlanDowngrade?: boolean;
|
|
521
|
-
recurringInvoice?: Data.RecurringInvoice;
|
|
522
|
-
}
|
|
523
|
-
namespace Data {
|
|
524
345
|
interface ImmediateInvoice {
|
|
346
|
+
/**
|
|
347
|
+
* Subtotal before discounts
|
|
348
|
+
*/
|
|
525
349
|
subTotal: number;
|
|
350
|
+
/**
|
|
351
|
+
* Invoice total
|
|
352
|
+
*/
|
|
526
353
|
total: number;
|
|
354
|
+
/**
|
|
355
|
+
* Billing period covered
|
|
356
|
+
*/
|
|
527
357
|
billingPeriodRange?: ImmediateInvoice.BillingPeriodRange;
|
|
358
|
+
/**
|
|
359
|
+
* Currency code
|
|
360
|
+
*/
|
|
528
361
|
currency?: string | null;
|
|
362
|
+
/**
|
|
363
|
+
* Total discount amount
|
|
364
|
+
*/
|
|
529
365
|
discount?: number;
|
|
366
|
+
/**
|
|
367
|
+
* Discount breakdown
|
|
368
|
+
*/
|
|
530
369
|
discountDetails?: ImmediateInvoice.DiscountDetails;
|
|
370
|
+
/**
|
|
371
|
+
* Applied discounts
|
|
372
|
+
*/
|
|
531
373
|
discounts?: Array<ImmediateInvoice.Discount>;
|
|
374
|
+
/**
|
|
375
|
+
* Line items
|
|
376
|
+
*/
|
|
532
377
|
lines?: Array<ImmediateInvoice.Line>;
|
|
378
|
+
/**
|
|
379
|
+
* Tax amount
|
|
380
|
+
*/
|
|
533
381
|
tax?: number;
|
|
534
382
|
}
|
|
535
383
|
namespace ImmediateInvoice {
|
|
384
|
+
/**
|
|
385
|
+
* Billing period covered
|
|
386
|
+
*/
|
|
536
387
|
interface BillingPeriodRange {
|
|
537
388
|
/**
|
|
538
389
|
* Billing period end date
|
|
@@ -543,24 +394,69 @@ export declare namespace SubscriptionPreviewResponse {
|
|
|
543
394
|
*/
|
|
544
395
|
start: string;
|
|
545
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Discount breakdown
|
|
399
|
+
*/
|
|
546
400
|
interface DiscountDetails {
|
|
401
|
+
/**
|
|
402
|
+
* Promo code used
|
|
403
|
+
*/
|
|
547
404
|
code?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Fixed discount amount
|
|
407
|
+
*/
|
|
548
408
|
fixedAmount?: number;
|
|
409
|
+
/**
|
|
410
|
+
* Percentage discount
|
|
411
|
+
*/
|
|
549
412
|
percentage?: number;
|
|
550
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Applied discount amount
|
|
416
|
+
*/
|
|
551
417
|
interface Discount {
|
|
418
|
+
/**
|
|
419
|
+
* Discount amount
|
|
420
|
+
*/
|
|
552
421
|
amount: number;
|
|
422
|
+
/**
|
|
423
|
+
* Currency code
|
|
424
|
+
*/
|
|
553
425
|
currency: string;
|
|
426
|
+
/**
|
|
427
|
+
* Discount description
|
|
428
|
+
*/
|
|
554
429
|
description: string;
|
|
555
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* Invoice line item
|
|
433
|
+
*/
|
|
556
434
|
interface Line {
|
|
435
|
+
/**
|
|
436
|
+
* Currency code
|
|
437
|
+
*/
|
|
557
438
|
currency: string;
|
|
439
|
+
/**
|
|
440
|
+
* Line item description
|
|
441
|
+
*/
|
|
558
442
|
description: string;
|
|
443
|
+
/**
|
|
444
|
+
* Line subtotal
|
|
445
|
+
*/
|
|
559
446
|
subTotal: number;
|
|
447
|
+
/**
|
|
448
|
+
* Price per unit
|
|
449
|
+
*/
|
|
560
450
|
unitPrice: number;
|
|
451
|
+
/**
|
|
452
|
+
* Quantity
|
|
453
|
+
*/
|
|
561
454
|
quantity?: number;
|
|
562
455
|
}
|
|
563
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* Billing period range
|
|
459
|
+
*/
|
|
564
460
|
interface BillingPeriodRange {
|
|
565
461
|
/**
|
|
566
462
|
* Billing period end date
|
|
@@ -571,22 +467,64 @@ export declare namespace SubscriptionPreviewResponse {
|
|
|
571
467
|
*/
|
|
572
468
|
start?: string;
|
|
573
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* Free item in subscription
|
|
472
|
+
*/
|
|
574
473
|
interface FreeItem {
|
|
474
|
+
/**
|
|
475
|
+
* Addon ID
|
|
476
|
+
*/
|
|
575
477
|
addonId: string;
|
|
478
|
+
/**
|
|
479
|
+
* Quantity
|
|
480
|
+
*/
|
|
576
481
|
quantity: number;
|
|
577
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* Recurring invoice preview
|
|
485
|
+
*/
|
|
578
486
|
interface RecurringInvoice {
|
|
487
|
+
/**
|
|
488
|
+
* Subtotal before discounts
|
|
489
|
+
*/
|
|
579
490
|
subTotal: number;
|
|
580
|
-
|
|
491
|
+
/**
|
|
492
|
+
* Invoice total
|
|
493
|
+
*/
|
|
494
|
+
total: number;
|
|
495
|
+
/**
|
|
496
|
+
* Billing period covered
|
|
497
|
+
*/
|
|
581
498
|
billingPeriodRange?: RecurringInvoice.BillingPeriodRange;
|
|
499
|
+
/**
|
|
500
|
+
* Currency code
|
|
501
|
+
*/
|
|
582
502
|
currency?: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* Total discount amount
|
|
505
|
+
*/
|
|
583
506
|
discount?: number;
|
|
507
|
+
/**
|
|
508
|
+
* Discount breakdown
|
|
509
|
+
*/
|
|
584
510
|
discountDetails?: RecurringInvoice.DiscountDetails;
|
|
511
|
+
/**
|
|
512
|
+
* Applied discounts
|
|
513
|
+
*/
|
|
585
514
|
discounts?: Array<RecurringInvoice.Discount>;
|
|
515
|
+
/**
|
|
516
|
+
* Line items
|
|
517
|
+
*/
|
|
586
518
|
lines?: Array<RecurringInvoice.Line>;
|
|
519
|
+
/**
|
|
520
|
+
* Tax amount
|
|
521
|
+
*/
|
|
587
522
|
tax?: number;
|
|
588
523
|
}
|
|
589
524
|
namespace RecurringInvoice {
|
|
525
|
+
/**
|
|
526
|
+
* Billing period covered
|
|
527
|
+
*/
|
|
590
528
|
interface BillingPeriodRange {
|
|
591
529
|
/**
|
|
592
530
|
* Billing period end date
|
|
@@ -597,87 +535,697 @@ export declare namespace SubscriptionPreviewResponse {
|
|
|
597
535
|
*/
|
|
598
536
|
start: string;
|
|
599
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Discount breakdown
|
|
540
|
+
*/
|
|
600
541
|
interface DiscountDetails {
|
|
542
|
+
/**
|
|
543
|
+
* Promo code used
|
|
544
|
+
*/
|
|
601
545
|
code?: string;
|
|
546
|
+
/**
|
|
547
|
+
* Fixed discount amount
|
|
548
|
+
*/
|
|
602
549
|
fixedAmount?: number;
|
|
550
|
+
/**
|
|
551
|
+
* Percentage discount
|
|
552
|
+
*/
|
|
603
553
|
percentage?: number;
|
|
604
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* Applied discount amount
|
|
557
|
+
*/
|
|
605
558
|
interface Discount {
|
|
559
|
+
/**
|
|
560
|
+
* Discount amount
|
|
561
|
+
*/
|
|
606
562
|
amount: number;
|
|
563
|
+
/**
|
|
564
|
+
* Currency code
|
|
565
|
+
*/
|
|
607
566
|
currency: string;
|
|
567
|
+
/**
|
|
568
|
+
* Discount description
|
|
569
|
+
*/
|
|
608
570
|
description: string;
|
|
609
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* Invoice line item
|
|
574
|
+
*/
|
|
610
575
|
interface Line {
|
|
576
|
+
/**
|
|
577
|
+
* Currency code
|
|
578
|
+
*/
|
|
611
579
|
currency: string;
|
|
580
|
+
/**
|
|
581
|
+
* Line item description
|
|
582
|
+
*/
|
|
612
583
|
description: string;
|
|
584
|
+
/**
|
|
585
|
+
* Line subtotal
|
|
586
|
+
*/
|
|
613
587
|
subTotal: number;
|
|
588
|
+
/**
|
|
589
|
+
* Price per unit
|
|
590
|
+
*/
|
|
614
591
|
unitPrice: number;
|
|
592
|
+
/**
|
|
593
|
+
* Quantity
|
|
594
|
+
*/
|
|
615
595
|
quantity?: number;
|
|
616
596
|
}
|
|
617
597
|
}
|
|
618
598
|
}
|
|
619
599
|
}
|
|
620
|
-
|
|
621
|
-
|
|
600
|
+
/**
|
|
601
|
+
* Response object
|
|
602
|
+
*/
|
|
603
|
+
export interface SubscriptionProvisionResponse {
|
|
604
|
+
/**
|
|
605
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
606
|
+
*/
|
|
607
|
+
data: SubscriptionProvisionResponse.Data;
|
|
622
608
|
}
|
|
623
|
-
export declare namespace
|
|
609
|
+
export declare namespace SubscriptionProvisionResponse {
|
|
610
|
+
/**
|
|
611
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
612
|
+
*/
|
|
624
613
|
interface Data {
|
|
625
614
|
/**
|
|
626
|
-
*
|
|
615
|
+
* Unique identifier for the provisioned subscription
|
|
627
616
|
*/
|
|
628
617
|
id: string;
|
|
618
|
+
entitlements: Array<Data.UnionObjectVariant0 | Data.UnionObjectVariant1> | null;
|
|
629
619
|
/**
|
|
630
|
-
*
|
|
620
|
+
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
631
621
|
*/
|
|
632
|
-
|
|
622
|
+
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
633
623
|
/**
|
|
634
|
-
* Created
|
|
624
|
+
* Created subscription (when status is SUCCESS)
|
|
635
625
|
*/
|
|
636
|
-
|
|
626
|
+
subscription: Data.Subscription | null;
|
|
637
627
|
/**
|
|
638
|
-
*
|
|
628
|
+
* Checkout billing ID when payment is required
|
|
639
629
|
*/
|
|
640
|
-
|
|
630
|
+
checkoutBillingId?: string;
|
|
641
631
|
/**
|
|
642
|
-
*
|
|
632
|
+
* URL to complete payment when PAYMENT_REQUIRED
|
|
643
633
|
*/
|
|
644
|
-
|
|
634
|
+
checkoutUrl?: string;
|
|
645
635
|
/**
|
|
646
|
-
*
|
|
636
|
+
* Whether the subscription is scheduled for future activation
|
|
647
637
|
*/
|
|
648
|
-
|
|
638
|
+
isScheduled?: boolean;
|
|
639
|
+
}
|
|
640
|
+
namespace Data {
|
|
641
|
+
interface UnionObjectVariant0 {
|
|
642
|
+
accessDeniedReason: 'FeatureNotFound' | 'CustomerNotFound' | 'CustomerIsArchived' | 'CustomerResourceNotFound' | 'NoActiveSubscription' | 'NoFeatureEntitlementInSubscription' | 'RequestedUsageExceedingLimit' | 'RequestedValuesMismatch' | 'BudgetExceeded' | 'Unknown' | 'FeatureTypeMismatch' | 'Revoked' | 'InsufficientCredits' | 'EntitlementNotFound' | null;
|
|
643
|
+
isGranted: boolean;
|
|
644
|
+
type: 'FEATURE';
|
|
645
|
+
currentUsage?: number;
|
|
646
|
+
/**
|
|
647
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
648
|
+
*/
|
|
649
|
+
entitlementUpdatedAt?: string;
|
|
650
|
+
feature?: UnionObjectVariant0.Feature;
|
|
651
|
+
hasUnlimitedUsage?: boolean;
|
|
652
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
|
|
653
|
+
usageLimit?: number | null;
|
|
654
|
+
/**
|
|
655
|
+
* The anchor for calculating the usage period for metered entitlements with a
|
|
656
|
+
* reset period configured
|
|
657
|
+
*/
|
|
658
|
+
usagePeriodAnchor?: string;
|
|
659
|
+
/**
|
|
660
|
+
* The end date of the usage period for metered entitlements with a reset period
|
|
661
|
+
* configured
|
|
662
|
+
*/
|
|
663
|
+
usagePeriodEnd?: string;
|
|
664
|
+
/**
|
|
665
|
+
* The start date of the usage period for metered entitlements with a reset period
|
|
666
|
+
* configured
|
|
667
|
+
*/
|
|
668
|
+
usagePeriodStart?: string;
|
|
669
|
+
/**
|
|
670
|
+
* The next time the entitlement should be recalculated
|
|
671
|
+
*/
|
|
672
|
+
validUntil?: string;
|
|
673
|
+
}
|
|
674
|
+
namespace UnionObjectVariant0 {
|
|
675
|
+
interface Feature {
|
|
676
|
+
/**
|
|
677
|
+
* The human-readable name of the entitlement, shown in UI elements.
|
|
678
|
+
*/
|
|
679
|
+
displayName: string;
|
|
680
|
+
/**
|
|
681
|
+
* The current status of the feature.
|
|
682
|
+
*/
|
|
683
|
+
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
684
|
+
/**
|
|
685
|
+
* The type of feature associated with the entitlement.
|
|
686
|
+
*/
|
|
687
|
+
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
688
|
+
/**
|
|
689
|
+
* The unique reference ID of the entitlement.
|
|
690
|
+
*/
|
|
691
|
+
refId: string;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
interface UnionObjectVariant1 {
|
|
695
|
+
accessDeniedReason: 'FeatureNotFound' | 'CustomerNotFound' | 'CustomerIsArchived' | 'CustomerResourceNotFound' | 'NoActiveSubscription' | 'NoFeatureEntitlementInSubscription' | 'RequestedUsageExceedingLimit' | 'RequestedValuesMismatch' | 'BudgetExceeded' | 'Unknown' | 'FeatureTypeMismatch' | 'Revoked' | 'InsufficientCredits' | 'EntitlementNotFound' | null;
|
|
696
|
+
/**
|
|
697
|
+
* The currency associated with a credit entitlement.
|
|
698
|
+
*/
|
|
699
|
+
currency: UnionObjectVariant1.Currency;
|
|
700
|
+
currentUsage: number;
|
|
701
|
+
isGranted: boolean;
|
|
702
|
+
type: 'CREDIT';
|
|
703
|
+
usageLimit: number;
|
|
704
|
+
/**
|
|
705
|
+
* Timestamp of the last update to the credit usage.
|
|
706
|
+
*/
|
|
707
|
+
usageUpdatedAt: string;
|
|
708
|
+
/**
|
|
709
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
710
|
+
*/
|
|
711
|
+
entitlementUpdatedAt?: string;
|
|
712
|
+
/**
|
|
713
|
+
* The end date of the current billing period for recurring credit grants.
|
|
714
|
+
*/
|
|
715
|
+
usagePeriodEnd?: string;
|
|
716
|
+
/**
|
|
717
|
+
* The next time the entitlement should be recalculated
|
|
718
|
+
*/
|
|
719
|
+
validUntil?: string;
|
|
720
|
+
}
|
|
721
|
+
namespace UnionObjectVariant1 {
|
|
722
|
+
/**
|
|
723
|
+
* The currency associated with a credit entitlement.
|
|
724
|
+
*/
|
|
725
|
+
interface Currency {
|
|
726
|
+
/**
|
|
727
|
+
* The unique identifier of the custom currency.
|
|
728
|
+
*/
|
|
729
|
+
currencyId: string;
|
|
730
|
+
/**
|
|
731
|
+
* The display name of the currency.
|
|
732
|
+
*/
|
|
733
|
+
displayName: string;
|
|
734
|
+
/**
|
|
735
|
+
* Additional metadata associated with the currency.
|
|
736
|
+
*/
|
|
737
|
+
additionalMetaData?: unknown;
|
|
738
|
+
/**
|
|
739
|
+
* A description of the currency.
|
|
740
|
+
*/
|
|
741
|
+
description?: string | null;
|
|
742
|
+
/**
|
|
743
|
+
* The plural form of the currency unit.
|
|
744
|
+
*/
|
|
745
|
+
unitPlural?: string | null;
|
|
746
|
+
/**
|
|
747
|
+
* The singular form of the currency unit.
|
|
748
|
+
*/
|
|
749
|
+
unitSingular?: string | null;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
649
752
|
/**
|
|
650
|
-
*
|
|
753
|
+
* Created subscription (when status is SUCCESS)
|
|
651
754
|
*/
|
|
652
|
-
|
|
755
|
+
interface Subscription {
|
|
756
|
+
/**
|
|
757
|
+
* Subscription ID
|
|
758
|
+
*/
|
|
759
|
+
id: string;
|
|
760
|
+
/**
|
|
761
|
+
* Billing ID
|
|
762
|
+
*/
|
|
763
|
+
billingId: string | null;
|
|
764
|
+
/**
|
|
765
|
+
* Created at
|
|
766
|
+
*/
|
|
767
|
+
createdAt: string;
|
|
768
|
+
/**
|
|
769
|
+
* Customer ID
|
|
770
|
+
*/
|
|
771
|
+
customerId: string;
|
|
772
|
+
/**
|
|
773
|
+
* Payment collection
|
|
774
|
+
*/
|
|
775
|
+
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
776
|
+
/**
|
|
777
|
+
* Plan ID
|
|
778
|
+
*/
|
|
779
|
+
planId: string;
|
|
780
|
+
/**
|
|
781
|
+
* Pricing type
|
|
782
|
+
*/
|
|
783
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
784
|
+
/**
|
|
785
|
+
* Subscription start date
|
|
786
|
+
*/
|
|
787
|
+
startDate: string;
|
|
788
|
+
/**
|
|
789
|
+
* Subscription status
|
|
790
|
+
*/
|
|
791
|
+
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
792
|
+
/**
|
|
793
|
+
* Subscription cancellation date
|
|
794
|
+
*/
|
|
795
|
+
cancellationDate?: string | null;
|
|
796
|
+
/**
|
|
797
|
+
* Subscription cancel reason
|
|
798
|
+
*/
|
|
799
|
+
cancelReason?: 'UPGRADE_OR_DOWNGRADE' | 'CANCELLED_BY_BILLING' | 'EXPIRED' | 'DETACH_BILLING' | 'TRIAL_ENDED' | 'Immediate' | 'TRIAL_CONVERTED' | 'PENDING_PAYMENT_EXPIRED' | 'ScheduledCancellation' | 'CustomerArchived' | 'AutoCancellationRule' | null;
|
|
800
|
+
/**
|
|
801
|
+
* End of the current billing period
|
|
802
|
+
*/
|
|
803
|
+
currentBillingPeriodEnd?: string | null;
|
|
804
|
+
/**
|
|
805
|
+
* Start of the current billing period
|
|
806
|
+
*/
|
|
807
|
+
currentBillingPeriodStart?: string | null;
|
|
808
|
+
/**
|
|
809
|
+
* Subscription effective end date
|
|
810
|
+
*/
|
|
811
|
+
effectiveEndDate?: string | null;
|
|
812
|
+
/**
|
|
813
|
+
* Subscription end date
|
|
814
|
+
*/
|
|
815
|
+
endDate?: string | null;
|
|
816
|
+
/**
|
|
817
|
+
* Additional metadata for the subscription
|
|
818
|
+
*/
|
|
819
|
+
metadata?: {
|
|
820
|
+
[key: string]: string;
|
|
821
|
+
};
|
|
822
|
+
/**
|
|
823
|
+
* Paying customer ID for delegated billing
|
|
824
|
+
*/
|
|
825
|
+
payingCustomerId?: string | null;
|
|
826
|
+
/**
|
|
827
|
+
* The method used to collect payments for a subscription
|
|
828
|
+
*/
|
|
829
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
830
|
+
prices?: Array<Subscription.Price>;
|
|
831
|
+
/**
|
|
832
|
+
* Resource ID
|
|
833
|
+
*/
|
|
834
|
+
resourceId?: string | null;
|
|
835
|
+
/**
|
|
836
|
+
* Subscription trial end date
|
|
837
|
+
*/
|
|
838
|
+
trialEndDate?: string | null;
|
|
839
|
+
}
|
|
840
|
+
namespace Subscription {
|
|
841
|
+
interface Price {
|
|
842
|
+
/**
|
|
843
|
+
* Addon identifier for the price override
|
|
844
|
+
*/
|
|
845
|
+
addonId?: string | null;
|
|
846
|
+
/**
|
|
847
|
+
* Whether this is a base charge override
|
|
848
|
+
*/
|
|
849
|
+
baseCharge?: boolean;
|
|
850
|
+
/**
|
|
851
|
+
* Block size for pricing
|
|
852
|
+
*/
|
|
853
|
+
blockSize?: number;
|
|
854
|
+
/**
|
|
855
|
+
* Feature identifier for the price override
|
|
856
|
+
*/
|
|
857
|
+
featureId?: string | null;
|
|
858
|
+
/**
|
|
859
|
+
* Override price amount
|
|
860
|
+
*/
|
|
861
|
+
price?: Price.Price;
|
|
862
|
+
/**
|
|
863
|
+
* Pricing tiers configuration
|
|
864
|
+
*/
|
|
865
|
+
tiers?: Array<Price.Tier>;
|
|
866
|
+
}
|
|
867
|
+
namespace Price {
|
|
868
|
+
/**
|
|
869
|
+
* Override price amount
|
|
870
|
+
*/
|
|
871
|
+
interface Price {
|
|
872
|
+
/**
|
|
873
|
+
* The price amount
|
|
874
|
+
*/
|
|
875
|
+
amount?: number;
|
|
876
|
+
/**
|
|
877
|
+
* The billing country code of the price
|
|
878
|
+
*/
|
|
879
|
+
billingCountryCode?: string | null;
|
|
880
|
+
/**
|
|
881
|
+
* The price currency
|
|
882
|
+
*/
|
|
883
|
+
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';
|
|
884
|
+
}
|
|
885
|
+
interface Tier {
|
|
886
|
+
/**
|
|
887
|
+
* The flat fee price of the price tier
|
|
888
|
+
*/
|
|
889
|
+
flatPrice?: Tier.FlatPrice;
|
|
890
|
+
/**
|
|
891
|
+
* The unit price of the price tier
|
|
892
|
+
*/
|
|
893
|
+
unitPrice?: Tier.UnitPrice;
|
|
894
|
+
/**
|
|
895
|
+
* The up to quantity of the price tier
|
|
896
|
+
*/
|
|
897
|
+
upTo?: number;
|
|
898
|
+
}
|
|
899
|
+
namespace Tier {
|
|
900
|
+
/**
|
|
901
|
+
* The flat fee price of the price tier
|
|
902
|
+
*/
|
|
903
|
+
interface FlatPrice {
|
|
904
|
+
/**
|
|
905
|
+
* The price amount
|
|
906
|
+
*/
|
|
907
|
+
amount?: number;
|
|
908
|
+
/**
|
|
909
|
+
* The billing country code of the price
|
|
910
|
+
*/
|
|
911
|
+
billingCountryCode?: string | null;
|
|
912
|
+
/**
|
|
913
|
+
* The price currency
|
|
914
|
+
*/
|
|
915
|
+
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';
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* The unit price of the price tier
|
|
919
|
+
*/
|
|
920
|
+
interface UnitPrice {
|
|
921
|
+
/**
|
|
922
|
+
* The price amount
|
|
923
|
+
*/
|
|
924
|
+
amount?: number;
|
|
925
|
+
/**
|
|
926
|
+
* The billing country code of the price
|
|
927
|
+
*/
|
|
928
|
+
billingCountryCode?: string | null;
|
|
929
|
+
/**
|
|
930
|
+
* The price currency
|
|
931
|
+
*/
|
|
932
|
+
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';
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
export interface SubscriptionUpdateParams {
|
|
940
|
+
addons?: Array<SubscriptionUpdateParams.Addon>;
|
|
941
|
+
appliedCoupon?: SubscriptionUpdateParams.AppliedCoupon;
|
|
942
|
+
awaitPaymentConfirmation?: boolean;
|
|
943
|
+
billingInformation?: SubscriptionUpdateParams.BillingInformation;
|
|
944
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
945
|
+
budget?: SubscriptionUpdateParams.Budget | null;
|
|
946
|
+
charges?: Array<SubscriptionUpdateParams.Charge>;
|
|
947
|
+
/**
|
|
948
|
+
* Additional metadata for the subscription
|
|
949
|
+
*/
|
|
950
|
+
metadata?: {
|
|
951
|
+
[key: string]: string;
|
|
952
|
+
};
|
|
953
|
+
minimumSpend?: SubscriptionUpdateParams.MinimumSpend | null;
|
|
954
|
+
priceOverrides?: Array<SubscriptionUpdateParams.PriceOverride>;
|
|
955
|
+
promotionCode?: string;
|
|
956
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
957
|
+
subscriptionEntitlements?: Array<SubscriptionUpdateParams.SubscriptionEntitlement>;
|
|
958
|
+
/**
|
|
959
|
+
* Subscription trial end date
|
|
960
|
+
*/
|
|
961
|
+
trialEndDate?: string;
|
|
962
|
+
}
|
|
963
|
+
export declare namespace SubscriptionUpdateParams {
|
|
964
|
+
interface Addon {
|
|
653
965
|
/**
|
|
654
|
-
*
|
|
966
|
+
* Addon ID
|
|
655
967
|
*/
|
|
656
|
-
|
|
968
|
+
addonId: string;
|
|
969
|
+
quantity: number;
|
|
970
|
+
}
|
|
971
|
+
interface AppliedCoupon {
|
|
972
|
+
billingCouponId?: string;
|
|
973
|
+
configuration?: AppliedCoupon.Configuration;
|
|
974
|
+
couponId?: string;
|
|
975
|
+
discount?: AppliedCoupon.Discount;
|
|
976
|
+
promotionCode?: string | null;
|
|
977
|
+
}
|
|
978
|
+
namespace AppliedCoupon {
|
|
979
|
+
interface Configuration {
|
|
980
|
+
/**
|
|
981
|
+
* Coupon start date
|
|
982
|
+
*/
|
|
983
|
+
startDate?: string;
|
|
984
|
+
}
|
|
985
|
+
interface Discount {
|
|
986
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
987
|
+
description?: string;
|
|
988
|
+
durationInMonths?: number;
|
|
989
|
+
name?: string;
|
|
990
|
+
percentOff?: number;
|
|
991
|
+
}
|
|
992
|
+
namespace Discount {
|
|
993
|
+
interface AmountsOff {
|
|
994
|
+
amount: number;
|
|
995
|
+
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';
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
interface BillingInformation {
|
|
657
1000
|
/**
|
|
658
|
-
*
|
|
1001
|
+
* Physical address
|
|
659
1002
|
*/
|
|
660
|
-
|
|
1003
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
1004
|
+
chargeOnBehalfOfAccount?: string;
|
|
1005
|
+
couponId?: string;
|
|
1006
|
+
integrationId?: string;
|
|
1007
|
+
invoiceDaysUntilDue?: number;
|
|
1008
|
+
isBackdated?: boolean;
|
|
1009
|
+
isInvoicePaid?: boolean;
|
|
661
1010
|
/**
|
|
662
|
-
*
|
|
1011
|
+
* Additional metadata for the subscription
|
|
663
1012
|
*/
|
|
664
|
-
|
|
1013
|
+
metadata?: {
|
|
1014
|
+
[key: string]: unknown;
|
|
1015
|
+
};
|
|
1016
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1017
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
1018
|
+
taxPercentage?: number;
|
|
1019
|
+
taxRateIds?: Array<string>;
|
|
1020
|
+
}
|
|
1021
|
+
namespace BillingInformation {
|
|
1022
|
+
/**
|
|
1023
|
+
* Physical address
|
|
1024
|
+
*/
|
|
1025
|
+
interface BillingAddress {
|
|
1026
|
+
/**
|
|
1027
|
+
* City name
|
|
1028
|
+
*/
|
|
1029
|
+
city?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Country code or name
|
|
1032
|
+
*/
|
|
1033
|
+
country?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* Street address line 1
|
|
1036
|
+
*/
|
|
1037
|
+
line1?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Street address line 2
|
|
1040
|
+
*/
|
|
1041
|
+
line2?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* Postal or ZIP code
|
|
1044
|
+
*/
|
|
1045
|
+
postalCode?: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* State or province
|
|
1048
|
+
*/
|
|
1049
|
+
state?: string;
|
|
1050
|
+
}
|
|
1051
|
+
interface TaxID {
|
|
1052
|
+
type: string;
|
|
1053
|
+
value: string;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
interface Budget {
|
|
1057
|
+
hasSoftLimit: boolean;
|
|
1058
|
+
limit: number;
|
|
1059
|
+
}
|
|
1060
|
+
interface Charge {
|
|
1061
|
+
/**
|
|
1062
|
+
* Charge ID
|
|
1063
|
+
*/
|
|
1064
|
+
id: string;
|
|
1065
|
+
quantity: number;
|
|
1066
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1067
|
+
}
|
|
1068
|
+
interface MinimumSpend {
|
|
1069
|
+
minimum?: MinimumSpend.Minimum | null;
|
|
1070
|
+
}
|
|
1071
|
+
namespace MinimumSpend {
|
|
1072
|
+
interface Minimum {
|
|
1073
|
+
amount: number;
|
|
1074
|
+
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';
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
interface PriceOverride {
|
|
1078
|
+
/**
|
|
1079
|
+
* Addon ID
|
|
1080
|
+
*/
|
|
1081
|
+
addonId?: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* Whether this is a base charge override
|
|
1084
|
+
*/
|
|
1085
|
+
baseCharge?: boolean;
|
|
1086
|
+
/**
|
|
1087
|
+
* The corresponding custom currency id of the recurring credits price
|
|
1088
|
+
*/
|
|
1089
|
+
currencyId?: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* Feature ID
|
|
1092
|
+
*/
|
|
1093
|
+
featureId?: string;
|
|
1094
|
+
price?: PriceOverride.Price;
|
|
1095
|
+
}
|
|
1096
|
+
namespace PriceOverride {
|
|
1097
|
+
interface Price {
|
|
1098
|
+
amount: number;
|
|
1099
|
+
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';
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
interface SubscriptionEntitlement {
|
|
1103
|
+
id?: string;
|
|
1104
|
+
featureId?: string;
|
|
1105
|
+
hasSoftLimit?: boolean;
|
|
1106
|
+
hasUnlimitedUsage?: boolean;
|
|
1107
|
+
monthlyResetPeriodConfiguration?: SubscriptionEntitlement.MonthlyResetPeriodConfiguration;
|
|
1108
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
1109
|
+
usageLimit?: number;
|
|
1110
|
+
weeklyResetPeriodConfiguration?: SubscriptionEntitlement.WeeklyResetPeriodConfiguration;
|
|
1111
|
+
yearlyResetPeriodConfiguration?: SubscriptionEntitlement.YearlyResetPeriodConfiguration;
|
|
1112
|
+
}
|
|
1113
|
+
namespace SubscriptionEntitlement {
|
|
1114
|
+
interface MonthlyResetPeriodConfiguration {
|
|
1115
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
1116
|
+
}
|
|
1117
|
+
interface WeeklyResetPeriodConfiguration {
|
|
1118
|
+
accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
|
|
1119
|
+
}
|
|
1120
|
+
interface YearlyResetPeriodConfiguration {
|
|
1121
|
+
accordingTo: 'SubscriptionStart';
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
export interface SubscriptionListParams extends MyCursorIDPageParams {
|
|
1126
|
+
/**
|
|
1127
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
1128
|
+
*/
|
|
1129
|
+
createdAt?: SubscriptionListParams.CreatedAt;
|
|
1130
|
+
/**
|
|
1131
|
+
* Filter by customer ID
|
|
1132
|
+
*/
|
|
1133
|
+
customerId?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Filter by plan ID
|
|
1136
|
+
*/
|
|
1137
|
+
planId?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Filter by pricing type. Supports comma-separated values for multiple types
|
|
1140
|
+
*/
|
|
1141
|
+
pricingType?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Filter by resource ID
|
|
1144
|
+
*/
|
|
1145
|
+
resourceId?: string;
|
|
1146
|
+
/**
|
|
1147
|
+
* Filter by subscription status. Supports comma-separated values for multiple
|
|
1148
|
+
* statuses
|
|
1149
|
+
*/
|
|
1150
|
+
status?: string;
|
|
1151
|
+
}
|
|
1152
|
+
export declare namespace SubscriptionListParams {
|
|
1153
|
+
/**
|
|
1154
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
1155
|
+
*/
|
|
1156
|
+
interface CreatedAt {
|
|
1157
|
+
/**
|
|
1158
|
+
* Greater than the specified createdAt value
|
|
1159
|
+
*/
|
|
1160
|
+
gt?: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* Greater than or equal to the specified createdAt value
|
|
1163
|
+
*/
|
|
1164
|
+
gte?: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Less than the specified createdAt value
|
|
1167
|
+
*/
|
|
1168
|
+
lt?: string;
|
|
1169
|
+
/**
|
|
1170
|
+
* Less than or equal to the specified createdAt value
|
|
1171
|
+
*/
|
|
1172
|
+
lte?: string;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
export interface SubscriptionCancelParams {
|
|
1176
|
+
/**
|
|
1177
|
+
* Action on cancellation (downgrade or revoke)
|
|
1178
|
+
*/
|
|
1179
|
+
cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS';
|
|
1180
|
+
/**
|
|
1181
|
+
* When to cancel (immediate, period end, or date)
|
|
1182
|
+
*/
|
|
1183
|
+
cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE';
|
|
1184
|
+
/**
|
|
1185
|
+
* Subscription end date
|
|
1186
|
+
*/
|
|
1187
|
+
endDate?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* If set, enables or disables prorating of credits on subscription cancellation.
|
|
1190
|
+
*/
|
|
1191
|
+
prorate?: boolean;
|
|
1192
|
+
}
|
|
1193
|
+
export interface SubscriptionDelegateParams {
|
|
1194
|
+
/**
|
|
1195
|
+
* The unique identifier of the customer who will assume payment responsibility for
|
|
1196
|
+
* this subscription. This customer must already exist in your Stigg account and
|
|
1197
|
+
* have a valid payment method if the subscription requires payment.
|
|
1198
|
+
*/
|
|
1199
|
+
targetCustomerId: string;
|
|
1200
|
+
}
|
|
1201
|
+
export interface SubscriptionImportParams {
|
|
1202
|
+
/**
|
|
1203
|
+
* List of subscription objects to import
|
|
1204
|
+
*/
|
|
1205
|
+
subscriptions: Array<SubscriptionImportParams.Subscription>;
|
|
1206
|
+
/**
|
|
1207
|
+
* Integration ID to use for importing subscriptions
|
|
1208
|
+
*/
|
|
1209
|
+
integrationId?: string | null;
|
|
1210
|
+
}
|
|
1211
|
+
export declare namespace SubscriptionImportParams {
|
|
1212
|
+
interface Subscription {
|
|
665
1213
|
/**
|
|
666
|
-
* Subscription
|
|
1214
|
+
* Subscription ID
|
|
667
1215
|
*/
|
|
668
|
-
|
|
1216
|
+
id: string;
|
|
669
1217
|
/**
|
|
670
|
-
*
|
|
1218
|
+
* Customer ID
|
|
671
1219
|
*/
|
|
672
|
-
|
|
1220
|
+
customerId: string;
|
|
673
1221
|
/**
|
|
674
|
-
*
|
|
1222
|
+
* Plan ID
|
|
675
1223
|
*/
|
|
676
|
-
|
|
1224
|
+
planId: string;
|
|
677
1225
|
/**
|
|
678
|
-
*
|
|
1226
|
+
* Billing ID
|
|
679
1227
|
*/
|
|
680
|
-
|
|
1228
|
+
billingId?: string | null;
|
|
681
1229
|
/**
|
|
682
1230
|
* Subscription end date
|
|
683
1231
|
*/
|
|
@@ -688,223 +1236,510 @@ export declare namespace SubscriptionTransferResponse {
|
|
|
688
1236
|
metadata?: {
|
|
689
1237
|
[key: string]: string;
|
|
690
1238
|
};
|
|
691
|
-
/**
|
|
692
|
-
* Paying customer ID for delegated billing
|
|
693
|
-
*/
|
|
694
|
-
payingCustomerId?: string | null;
|
|
695
|
-
/**
|
|
696
|
-
* The method used to collect payments for a subscription
|
|
697
|
-
*/
|
|
698
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
699
1239
|
/**
|
|
700
1240
|
* Resource ID
|
|
701
1241
|
*/
|
|
702
1242
|
resourceId?: string | null;
|
|
703
1243
|
/**
|
|
704
|
-
* Subscription
|
|
1244
|
+
* Subscription start date
|
|
705
1245
|
*/
|
|
706
|
-
|
|
1246
|
+
startDate?: string;
|
|
707
1247
|
}
|
|
708
1248
|
}
|
|
709
|
-
export interface
|
|
1249
|
+
export interface SubscriptionMigrateParams {
|
|
710
1250
|
/**
|
|
711
|
-
*
|
|
1251
|
+
* When to migrate (immediate or period end)
|
|
1252
|
+
*/
|
|
1253
|
+
subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';
|
|
1254
|
+
}
|
|
1255
|
+
export interface SubscriptionPreviewParams {
|
|
1256
|
+
/**
|
|
1257
|
+
* Customer ID
|
|
712
1258
|
*/
|
|
713
1259
|
customerId: string;
|
|
714
1260
|
/**
|
|
715
|
-
* Plan ID
|
|
1261
|
+
* Plan ID
|
|
716
1262
|
*/
|
|
717
1263
|
planId: string;
|
|
718
1264
|
/**
|
|
719
|
-
*
|
|
1265
|
+
* Addons to include
|
|
1266
|
+
*/
|
|
1267
|
+
addons?: Array<SubscriptionPreviewParams.Addon>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Coupon or discount to apply
|
|
720
1270
|
*/
|
|
721
|
-
|
|
1271
|
+
appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
|
|
722
1272
|
/**
|
|
723
|
-
*
|
|
1273
|
+
* Billable features with quantities
|
|
1274
|
+
*/
|
|
1275
|
+
billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
|
|
1276
|
+
/**
|
|
1277
|
+
* ISO 3166-1 country code for localization
|
|
1278
|
+
*/
|
|
1279
|
+
billingCountryCode?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* Billing and tax configuration
|
|
1282
|
+
*/
|
|
1283
|
+
billingInformation?: SubscriptionPreviewParams.BillingInformation;
|
|
1284
|
+
/**
|
|
1285
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
724
1286
|
*/
|
|
725
|
-
awaitPaymentConfirmation?: boolean;
|
|
726
1287
|
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
727
|
-
checkoutOptions?: SubscriptionCreateParams.CheckoutOptions;
|
|
728
1288
|
/**
|
|
729
|
-
*
|
|
1289
|
+
* One-time or recurring charges
|
|
730
1290
|
*/
|
|
731
|
-
|
|
732
|
-
[key: string]: string;
|
|
733
|
-
};
|
|
1291
|
+
charges?: Array<SubscriptionPreviewParams.Charge>;
|
|
734
1292
|
/**
|
|
735
|
-
*
|
|
1293
|
+
* Paying customer ID for delegated billing
|
|
736
1294
|
*/
|
|
737
|
-
payingCustomerId?: string
|
|
1295
|
+
payingCustomerId?: string;
|
|
738
1296
|
/**
|
|
739
|
-
*
|
|
1297
|
+
* Resource ID for multi-instance subscriptions
|
|
740
1298
|
*/
|
|
741
|
-
resourceId?: string
|
|
742
|
-
|
|
1299
|
+
resourceId?: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* When to apply subscription changes
|
|
1302
|
+
*/
|
|
1303
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
1304
|
+
/**
|
|
1305
|
+
* Subscription start date
|
|
1306
|
+
*/
|
|
1307
|
+
startDate?: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Trial period override settings
|
|
1310
|
+
*/
|
|
1311
|
+
trialOverrideConfiguration?: SubscriptionPreviewParams.TrialOverrideConfiguration;
|
|
1312
|
+
/**
|
|
1313
|
+
* Unit quantity for per-unit pricing
|
|
1314
|
+
*/
|
|
1315
|
+
unitQuantity?: number;
|
|
743
1316
|
}
|
|
744
|
-
export declare namespace
|
|
745
|
-
|
|
1317
|
+
export declare namespace SubscriptionPreviewParams {
|
|
1318
|
+
/**
|
|
1319
|
+
* Addon configuration
|
|
1320
|
+
*/
|
|
1321
|
+
interface Addon {
|
|
746
1322
|
/**
|
|
747
|
-
*
|
|
1323
|
+
* Addon ID
|
|
748
1324
|
*/
|
|
749
|
-
|
|
1325
|
+
addonId: string;
|
|
750
1326
|
/**
|
|
751
|
-
*
|
|
1327
|
+
* Number of addon instances
|
|
752
1328
|
*/
|
|
753
|
-
|
|
1329
|
+
quantity?: number;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Coupon or discount to apply
|
|
1333
|
+
*/
|
|
1334
|
+
interface AppliedCoupon {
|
|
754
1335
|
/**
|
|
755
|
-
*
|
|
1336
|
+
* Billing provider coupon ID
|
|
756
1337
|
*/
|
|
757
|
-
|
|
1338
|
+
billingCouponId?: string;
|
|
758
1339
|
/**
|
|
759
|
-
*
|
|
1340
|
+
* Coupon timing configuration
|
|
760
1341
|
*/
|
|
761
|
-
|
|
1342
|
+
configuration?: AppliedCoupon.Configuration;
|
|
762
1343
|
/**
|
|
763
|
-
*
|
|
1344
|
+
* Stigg coupon ID
|
|
764
1345
|
*/
|
|
765
|
-
|
|
1346
|
+
couponId?: string;
|
|
766
1347
|
/**
|
|
767
|
-
*
|
|
1348
|
+
* Ad-hoc discount configuration
|
|
768
1349
|
*/
|
|
769
|
-
|
|
1350
|
+
discount?: AppliedCoupon.Discount;
|
|
770
1351
|
/**
|
|
771
|
-
*
|
|
1352
|
+
* Promotion code to apply
|
|
772
1353
|
*/
|
|
773
|
-
|
|
1354
|
+
promotionCode?: string;
|
|
1355
|
+
}
|
|
1356
|
+
namespace AppliedCoupon {
|
|
1357
|
+
/**
|
|
1358
|
+
* Coupon timing configuration
|
|
1359
|
+
*/
|
|
1360
|
+
interface Configuration {
|
|
1361
|
+
/**
|
|
1362
|
+
* Coupon start date
|
|
1363
|
+
*/
|
|
1364
|
+
startDate?: string;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Ad-hoc discount configuration
|
|
1368
|
+
*/
|
|
1369
|
+
interface Discount {
|
|
1370
|
+
/**
|
|
1371
|
+
* Fixed amounts off by currency
|
|
1372
|
+
*/
|
|
1373
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
1374
|
+
/**
|
|
1375
|
+
* Ad-hoc discount
|
|
1376
|
+
*/
|
|
1377
|
+
description?: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* Duration in months
|
|
1380
|
+
*/
|
|
1381
|
+
durationInMonths?: number;
|
|
1382
|
+
/**
|
|
1383
|
+
* Discount name
|
|
1384
|
+
*/
|
|
1385
|
+
name?: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* Percentage discount
|
|
1388
|
+
*/
|
|
1389
|
+
percentOff?: number;
|
|
1390
|
+
}
|
|
1391
|
+
namespace Discount {
|
|
1392
|
+
interface AmountsOff {
|
|
1393
|
+
/**
|
|
1394
|
+
* The price amount
|
|
1395
|
+
*/
|
|
1396
|
+
amount: number;
|
|
1397
|
+
/**
|
|
1398
|
+
* The price currency
|
|
1399
|
+
*/
|
|
1400
|
+
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';
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Feature with quantity
|
|
1406
|
+
*/
|
|
1407
|
+
interface BillableFeature {
|
|
1408
|
+
/**
|
|
1409
|
+
* Feature ID
|
|
1410
|
+
*/
|
|
1411
|
+
featureId: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Quantity of feature units
|
|
1414
|
+
*/
|
|
1415
|
+
quantity: number;
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Billing and tax configuration
|
|
1419
|
+
*/
|
|
1420
|
+
interface BillingInformation {
|
|
1421
|
+
/**
|
|
1422
|
+
* Billing address
|
|
1423
|
+
*/
|
|
1424
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
1425
|
+
/**
|
|
1426
|
+
* Connected account ID for platform billing
|
|
1427
|
+
*/
|
|
1428
|
+
chargeOnBehalfOfAccount?: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Billing integration ID
|
|
1431
|
+
*/
|
|
1432
|
+
integrationId?: string;
|
|
1433
|
+
/**
|
|
1434
|
+
* Days until invoice is due
|
|
1435
|
+
*/
|
|
1436
|
+
invoiceDaysUntilDue?: number;
|
|
1437
|
+
/**
|
|
1438
|
+
* Whether subscription is backdated
|
|
1439
|
+
*/
|
|
1440
|
+
isBackdated?: boolean;
|
|
1441
|
+
/**
|
|
1442
|
+
* Whether invoice is already paid
|
|
1443
|
+
*/
|
|
1444
|
+
isInvoicePaid?: boolean;
|
|
1445
|
+
/**
|
|
1446
|
+
* Additional billing metadata
|
|
1447
|
+
*/
|
|
1448
|
+
metadata?: unknown;
|
|
1449
|
+
/**
|
|
1450
|
+
* Proration behavior
|
|
1451
|
+
*/
|
|
1452
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1453
|
+
/**
|
|
1454
|
+
* Customer tax IDs
|
|
1455
|
+
*/
|
|
1456
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
1457
|
+
/**
|
|
1458
|
+
* Tax percentage to apply
|
|
1459
|
+
*/
|
|
1460
|
+
taxPercentage?: number;
|
|
1461
|
+
/**
|
|
1462
|
+
* Tax rate IDs from billing provider
|
|
1463
|
+
*/
|
|
1464
|
+
taxRateIds?: Array<string>;
|
|
1465
|
+
}
|
|
1466
|
+
namespace BillingInformation {
|
|
1467
|
+
/**
|
|
1468
|
+
* Billing address
|
|
1469
|
+
*/
|
|
1470
|
+
interface BillingAddress {
|
|
1471
|
+
city?: string;
|
|
1472
|
+
country?: string;
|
|
1473
|
+
line1?: string;
|
|
1474
|
+
line2?: string;
|
|
1475
|
+
postalCode?: string;
|
|
1476
|
+
state?: string;
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* Tax exemption identifier
|
|
1480
|
+
*/
|
|
1481
|
+
interface TaxID {
|
|
1482
|
+
/**
|
|
1483
|
+
* Tax exemption type (e.g., vat, gst)
|
|
1484
|
+
*/
|
|
1485
|
+
type: string;
|
|
1486
|
+
/**
|
|
1487
|
+
* Tax exemption identifier value
|
|
1488
|
+
*/
|
|
1489
|
+
value: string;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Charge item
|
|
1494
|
+
*/
|
|
1495
|
+
interface Charge {
|
|
1496
|
+
/**
|
|
1497
|
+
* Charge ID
|
|
1498
|
+
*/
|
|
1499
|
+
id: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* Charge quantity
|
|
1502
|
+
*/
|
|
1503
|
+
quantity: number;
|
|
1504
|
+
/**
|
|
1505
|
+
* Charge type
|
|
1506
|
+
*/
|
|
1507
|
+
type: 'FEATURE' | 'CREDIT';
|
|
774
1508
|
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Trial period override settings
|
|
1511
|
+
*/
|
|
775
1512
|
interface TrialOverrideConfiguration {
|
|
776
1513
|
/**
|
|
777
|
-
* Whether
|
|
1514
|
+
* Whether to start as trial
|
|
778
1515
|
*/
|
|
779
1516
|
isTrial: boolean;
|
|
780
1517
|
/**
|
|
781
|
-
* Behavior when trial ends
|
|
1518
|
+
* Behavior when trial ends
|
|
782
1519
|
*/
|
|
783
1520
|
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
784
1521
|
/**
|
|
785
|
-
*
|
|
1522
|
+
* Trial end date
|
|
786
1523
|
*/
|
|
787
1524
|
trialEndDate?: string;
|
|
788
1525
|
}
|
|
789
1526
|
}
|
|
790
|
-
export interface
|
|
1527
|
+
export interface SubscriptionProvisionParams {
|
|
1528
|
+
/**
|
|
1529
|
+
* Customer ID to provision the subscription for
|
|
1530
|
+
*/
|
|
1531
|
+
customerId: string;
|
|
791
1532
|
/**
|
|
792
|
-
*
|
|
1533
|
+
* Plan ID to provision
|
|
793
1534
|
*/
|
|
794
|
-
|
|
1535
|
+
planId: string;
|
|
795
1536
|
/**
|
|
796
|
-
*
|
|
1537
|
+
* Unique identifier for the subscription
|
|
797
1538
|
*/
|
|
798
|
-
|
|
1539
|
+
id?: string;
|
|
1540
|
+
addons?: Array<SubscriptionProvisionParams.Addon>;
|
|
799
1541
|
/**
|
|
800
|
-
*
|
|
1542
|
+
* Coupon configuration
|
|
801
1543
|
*/
|
|
802
|
-
|
|
1544
|
+
appliedCoupon?: SubscriptionProvisionParams.AppliedCoupon;
|
|
803
1545
|
/**
|
|
804
|
-
*
|
|
1546
|
+
* Whether to wait for payment confirmation before returning the subscription
|
|
805
1547
|
*/
|
|
806
|
-
|
|
1548
|
+
awaitPaymentConfirmation?: boolean;
|
|
807
1549
|
/**
|
|
808
|
-
*
|
|
809
|
-
* ACTIVE,IN_TRIAL)
|
|
1550
|
+
* The ISO 3166-1 alpha-2 country code for billing
|
|
810
1551
|
*/
|
|
811
|
-
|
|
812
|
-
}
|
|
813
|
-
export interface SubscriptionDelegateParams {
|
|
1552
|
+
billingCountryCode?: string | null;
|
|
814
1553
|
/**
|
|
815
|
-
*
|
|
1554
|
+
* External billing system identifier
|
|
816
1555
|
*/
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
export interface SubscriptionMigrateParams {
|
|
1556
|
+
billingId?: string | null;
|
|
1557
|
+
billingInformation?: SubscriptionProvisionParams.BillingInformation;
|
|
820
1558
|
/**
|
|
821
|
-
*
|
|
1559
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
822
1560
|
*/
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1561
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
1562
|
+
budget?: SubscriptionProvisionParams.Budget | null;
|
|
1563
|
+
charges?: Array<SubscriptionProvisionParams.Charge>;
|
|
826
1564
|
/**
|
|
827
|
-
*
|
|
1565
|
+
* Checkout page configuration for payment collection
|
|
828
1566
|
*/
|
|
829
|
-
|
|
1567
|
+
checkoutOptions?: SubscriptionProvisionParams.CheckoutOptions;
|
|
830
1568
|
/**
|
|
831
|
-
*
|
|
1569
|
+
* Additional metadata for the subscription
|
|
1570
|
+
*/
|
|
1571
|
+
metadata?: {
|
|
1572
|
+
[key: string]: string;
|
|
1573
|
+
};
|
|
1574
|
+
minimumSpend?: SubscriptionProvisionParams.MinimumSpend | null;
|
|
1575
|
+
/**
|
|
1576
|
+
* Optional paying customer ID for split billing scenarios
|
|
1577
|
+
*/
|
|
1578
|
+
payingCustomerId?: string | null;
|
|
1579
|
+
/**
|
|
1580
|
+
* How payments should be collected for this subscription
|
|
1581
|
+
*/
|
|
1582
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
|
|
1583
|
+
priceOverrides?: Array<SubscriptionProvisionParams.PriceOverride>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Optional resource ID for multi-instance subscriptions
|
|
1586
|
+
*/
|
|
1587
|
+
resourceId?: string | null;
|
|
1588
|
+
/**
|
|
1589
|
+
* Salesforce ID
|
|
1590
|
+
*/
|
|
1591
|
+
salesforceId?: string | null;
|
|
1592
|
+
/**
|
|
1593
|
+
* Strategy for scheduling subscription changes
|
|
832
1594
|
*/
|
|
833
|
-
planId: string;
|
|
834
|
-
addons?: Array<SubscriptionPreviewParams.Addon>;
|
|
835
|
-
appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
|
|
836
|
-
billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
|
|
837
|
-
billingCountryCode?: string;
|
|
838
|
-
billingInformation?: SubscriptionPreviewParams.BillingInformation;
|
|
839
|
-
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
840
|
-
charges?: Array<SubscriptionPreviewParams.Charge>;
|
|
841
|
-
payingCustomerId?: string;
|
|
842
|
-
resourceId?: string;
|
|
843
1595
|
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
844
1596
|
/**
|
|
845
1597
|
* Subscription start date
|
|
846
1598
|
*/
|
|
847
1599
|
startDate?: string;
|
|
848
|
-
|
|
1600
|
+
subscriptionEntitlements?: Array<SubscriptionProvisionParams.SubscriptionEntitlement>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Trial period override settings
|
|
1603
|
+
*/
|
|
1604
|
+
trialOverrideConfiguration?: SubscriptionProvisionParams.TrialOverrideConfiguration;
|
|
849
1605
|
unitQuantity?: number;
|
|
850
1606
|
}
|
|
851
|
-
export declare namespace
|
|
1607
|
+
export declare namespace SubscriptionProvisionParams {
|
|
852
1608
|
interface Addon {
|
|
853
1609
|
/**
|
|
854
|
-
* Addon
|
|
1610
|
+
* Addon identifier
|
|
855
1611
|
*/
|
|
856
1612
|
addonId: string;
|
|
1613
|
+
/**
|
|
1614
|
+
* Number of addon units
|
|
1615
|
+
*/
|
|
857
1616
|
quantity?: number;
|
|
858
1617
|
}
|
|
1618
|
+
/**
|
|
1619
|
+
* Coupon configuration
|
|
1620
|
+
*/
|
|
859
1621
|
interface AppliedCoupon {
|
|
1622
|
+
/**
|
|
1623
|
+
* Billing provider coupon ID
|
|
1624
|
+
*/
|
|
860
1625
|
billingCouponId?: string;
|
|
1626
|
+
/**
|
|
1627
|
+
* Coupon timing configuration
|
|
1628
|
+
*/
|
|
861
1629
|
configuration?: AppliedCoupon.Configuration;
|
|
1630
|
+
/**
|
|
1631
|
+
* Stigg coupon ID
|
|
1632
|
+
*/
|
|
862
1633
|
couponId?: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* Ad-hoc discount configuration
|
|
1636
|
+
*/
|
|
863
1637
|
discount?: AppliedCoupon.Discount;
|
|
1638
|
+
/**
|
|
1639
|
+
* Promotion code to apply
|
|
1640
|
+
*/
|
|
864
1641
|
promotionCode?: string;
|
|
865
1642
|
}
|
|
866
1643
|
namespace AppliedCoupon {
|
|
1644
|
+
/**
|
|
1645
|
+
* Coupon timing configuration
|
|
1646
|
+
*/
|
|
867
1647
|
interface Configuration {
|
|
868
1648
|
/**
|
|
869
1649
|
* Coupon start date
|
|
870
1650
|
*/
|
|
871
1651
|
startDate?: string;
|
|
872
1652
|
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Ad-hoc discount configuration
|
|
1655
|
+
*/
|
|
873
1656
|
interface Discount {
|
|
1657
|
+
/**
|
|
1658
|
+
* Fixed amounts off by currency
|
|
1659
|
+
*/
|
|
874
1660
|
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
1661
|
+
/**
|
|
1662
|
+
* Ad-hoc discount
|
|
1663
|
+
*/
|
|
875
1664
|
description?: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* Duration in months
|
|
1667
|
+
*/
|
|
876
1668
|
durationInMonths?: number;
|
|
1669
|
+
/**
|
|
1670
|
+
* Discount name
|
|
1671
|
+
*/
|
|
877
1672
|
name?: string;
|
|
1673
|
+
/**
|
|
1674
|
+
* Percentage discount
|
|
1675
|
+
*/
|
|
878
1676
|
percentOff?: number;
|
|
879
1677
|
}
|
|
880
1678
|
namespace Discount {
|
|
881
1679
|
interface AmountsOff {
|
|
1680
|
+
/**
|
|
1681
|
+
* The price amount
|
|
1682
|
+
*/
|
|
882
1683
|
amount: number;
|
|
883
|
-
|
|
1684
|
+
/**
|
|
1685
|
+
* The price currency
|
|
1686
|
+
*/
|
|
1687
|
+
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';
|
|
884
1688
|
}
|
|
885
1689
|
}
|
|
886
1690
|
}
|
|
887
|
-
interface
|
|
1691
|
+
interface BillingInformation {
|
|
888
1692
|
/**
|
|
889
|
-
*
|
|
1693
|
+
* Billing address for the subscription
|
|
890
1694
|
*/
|
|
891
|
-
featureId: string;
|
|
892
|
-
quantity: number;
|
|
893
|
-
}
|
|
894
|
-
interface BillingInformation {
|
|
895
1695
|
billingAddress?: BillingInformation.BillingAddress;
|
|
896
|
-
|
|
897
|
-
|
|
1696
|
+
/**
|
|
1697
|
+
* Stripe Connect account to charge on behalf of
|
|
1698
|
+
*/
|
|
1699
|
+
chargeOnBehalfOfAccount?: string | null;
|
|
1700
|
+
/**
|
|
1701
|
+
* Billing integration identifier
|
|
1702
|
+
*/
|
|
1703
|
+
integrationId?: string | null;
|
|
1704
|
+
/**
|
|
1705
|
+
* Number of days until invoice is due
|
|
1706
|
+
*/
|
|
898
1707
|
invoiceDaysUntilDue?: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* Whether the subscription is backdated
|
|
1710
|
+
*/
|
|
899
1711
|
isBackdated?: boolean;
|
|
1712
|
+
/**
|
|
1713
|
+
* Whether the invoice is marked as paid
|
|
1714
|
+
*/
|
|
900
1715
|
isInvoicePaid?: boolean;
|
|
901
|
-
|
|
1716
|
+
/**
|
|
1717
|
+
* Additional metadata for the subscription
|
|
1718
|
+
*/
|
|
1719
|
+
metadata?: {
|
|
1720
|
+
[key: string]: string;
|
|
1721
|
+
};
|
|
1722
|
+
/**
|
|
1723
|
+
* How to handle proration for billing changes
|
|
1724
|
+
*/
|
|
902
1725
|
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1726
|
+
/**
|
|
1727
|
+
* Customer tax identification numbers
|
|
1728
|
+
*/
|
|
903
1729
|
taxIds?: Array<BillingInformation.TaxID>;
|
|
1730
|
+
/**
|
|
1731
|
+
* Tax percentage (0-100)
|
|
1732
|
+
*/
|
|
904
1733
|
taxPercentage?: number;
|
|
1734
|
+
/**
|
|
1735
|
+
* Tax rate identifiers to apply
|
|
1736
|
+
*/
|
|
905
1737
|
taxRateIds?: Array<string>;
|
|
906
1738
|
}
|
|
907
1739
|
namespace BillingInformation {
|
|
1740
|
+
/**
|
|
1741
|
+
* Billing address for the subscription
|
|
1742
|
+
*/
|
|
908
1743
|
interface BillingAddress {
|
|
909
1744
|
city?: string;
|
|
910
1745
|
country?: string;
|
|
@@ -914,36 +1749,248 @@ export declare namespace SubscriptionPreviewParams {
|
|
|
914
1749
|
state?: string;
|
|
915
1750
|
}
|
|
916
1751
|
interface TaxID {
|
|
1752
|
+
/**
|
|
1753
|
+
* The type of tax exemption identifier, such as VAT.
|
|
1754
|
+
*/
|
|
917
1755
|
type: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* The actual tax identifier value
|
|
1758
|
+
*/
|
|
918
1759
|
value: string;
|
|
919
1760
|
}
|
|
920
1761
|
}
|
|
1762
|
+
interface Budget {
|
|
1763
|
+
/**
|
|
1764
|
+
* Whether the budget is a soft limit
|
|
1765
|
+
*/
|
|
1766
|
+
hasSoftLimit: boolean;
|
|
1767
|
+
/**
|
|
1768
|
+
* Maximum spending limit
|
|
1769
|
+
*/
|
|
1770
|
+
limit: number;
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* Charge item
|
|
1774
|
+
*/
|
|
921
1775
|
interface Charge {
|
|
922
1776
|
/**
|
|
923
1777
|
* Charge ID
|
|
924
1778
|
*/
|
|
925
1779
|
id: string;
|
|
1780
|
+
/**
|
|
1781
|
+
* Charge quantity
|
|
1782
|
+
*/
|
|
926
1783
|
quantity: number;
|
|
1784
|
+
/**
|
|
1785
|
+
* Charge type
|
|
1786
|
+
*/
|
|
927
1787
|
type: 'FEATURE' | 'CREDIT';
|
|
928
1788
|
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Checkout page configuration for payment collection
|
|
1791
|
+
*/
|
|
1792
|
+
interface CheckoutOptions {
|
|
1793
|
+
/**
|
|
1794
|
+
* URL to redirect to if checkout is canceled
|
|
1795
|
+
*/
|
|
1796
|
+
cancelUrl: string;
|
|
1797
|
+
/**
|
|
1798
|
+
* URL to redirect to after successful checkout
|
|
1799
|
+
*/
|
|
1800
|
+
successUrl: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* Allow promotional codes during checkout
|
|
1803
|
+
*/
|
|
1804
|
+
allowPromoCodes?: boolean;
|
|
1805
|
+
/**
|
|
1806
|
+
* Allow tax ID collection during checkout
|
|
1807
|
+
*/
|
|
1808
|
+
allowTaxIdCollection?: boolean;
|
|
1809
|
+
/**
|
|
1810
|
+
* Collect billing address during checkout
|
|
1811
|
+
*/
|
|
1812
|
+
collectBillingAddress?: boolean;
|
|
1813
|
+
/**
|
|
1814
|
+
* Collect phone number during checkout
|
|
1815
|
+
*/
|
|
1816
|
+
collectPhoneNumber?: boolean;
|
|
1817
|
+
/**
|
|
1818
|
+
* Optional reference ID for the checkout session
|
|
1819
|
+
*/
|
|
1820
|
+
referenceId?: string | null;
|
|
1821
|
+
}
|
|
1822
|
+
interface MinimumSpend {
|
|
1823
|
+
/**
|
|
1824
|
+
* Minimum spend amount
|
|
1825
|
+
*/
|
|
1826
|
+
minimum?: MinimumSpend.Minimum | null;
|
|
1827
|
+
}
|
|
1828
|
+
namespace MinimumSpend {
|
|
1829
|
+
/**
|
|
1830
|
+
* Minimum spend amount
|
|
1831
|
+
*/
|
|
1832
|
+
interface Minimum {
|
|
1833
|
+
/**
|
|
1834
|
+
* The price amount
|
|
1835
|
+
*/
|
|
1836
|
+
amount?: number;
|
|
1837
|
+
/**
|
|
1838
|
+
* The billing country code of the price
|
|
1839
|
+
*/
|
|
1840
|
+
billingCountryCode?: string | null;
|
|
1841
|
+
/**
|
|
1842
|
+
* The price currency
|
|
1843
|
+
*/
|
|
1844
|
+
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';
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
interface PriceOverride {
|
|
1848
|
+
/**
|
|
1849
|
+
* Addon identifier for the price override
|
|
1850
|
+
*/
|
|
1851
|
+
addonId?: string | null;
|
|
1852
|
+
/**
|
|
1853
|
+
* Whether this is a base charge override
|
|
1854
|
+
*/
|
|
1855
|
+
baseCharge?: boolean;
|
|
1856
|
+
/**
|
|
1857
|
+
* Block size for pricing
|
|
1858
|
+
*/
|
|
1859
|
+
blockSize?: number;
|
|
1860
|
+
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
1861
|
+
creditRate?: PriceOverride.CreditRate;
|
|
1862
|
+
/**
|
|
1863
|
+
* Feature identifier for the price override
|
|
1864
|
+
*/
|
|
1865
|
+
featureId?: string | null;
|
|
1866
|
+
/**
|
|
1867
|
+
* Override price amount
|
|
1868
|
+
*/
|
|
1869
|
+
price?: PriceOverride.Price;
|
|
1870
|
+
/**
|
|
1871
|
+
* Pricing tiers configuration
|
|
1872
|
+
*/
|
|
1873
|
+
tiers?: Array<PriceOverride.Tier>;
|
|
1874
|
+
}
|
|
1875
|
+
namespace PriceOverride {
|
|
1876
|
+
interface CreditRate {
|
|
1877
|
+
/**
|
|
1878
|
+
* The credit rate amount
|
|
1879
|
+
*/
|
|
1880
|
+
amount: number;
|
|
1881
|
+
/**
|
|
1882
|
+
* The custom currency refId for the credit rate
|
|
1883
|
+
*/
|
|
1884
|
+
currencyId: string;
|
|
1885
|
+
/**
|
|
1886
|
+
* A custom formula for calculating cost based on single event dimensions
|
|
1887
|
+
*/
|
|
1888
|
+
costFormula?: string | null;
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Override price amount
|
|
1892
|
+
*/
|
|
1893
|
+
interface Price {
|
|
1894
|
+
/**
|
|
1895
|
+
* The price amount
|
|
1896
|
+
*/
|
|
1897
|
+
amount?: number;
|
|
1898
|
+
/**
|
|
1899
|
+
* The billing country code of the price
|
|
1900
|
+
*/
|
|
1901
|
+
billingCountryCode?: string | null;
|
|
1902
|
+
/**
|
|
1903
|
+
* The price currency
|
|
1904
|
+
*/
|
|
1905
|
+
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';
|
|
1906
|
+
}
|
|
1907
|
+
interface Tier {
|
|
1908
|
+
/**
|
|
1909
|
+
* The flat fee price of the price tier
|
|
1910
|
+
*/
|
|
1911
|
+
flatPrice?: Tier.FlatPrice;
|
|
1912
|
+
/**
|
|
1913
|
+
* The unit price of the price tier
|
|
1914
|
+
*/
|
|
1915
|
+
unitPrice?: Tier.UnitPrice;
|
|
1916
|
+
/**
|
|
1917
|
+
* The up to quantity of the price tier
|
|
1918
|
+
*/
|
|
1919
|
+
upTo?: number;
|
|
1920
|
+
}
|
|
1921
|
+
namespace Tier {
|
|
1922
|
+
/**
|
|
1923
|
+
* The flat fee price of the price tier
|
|
1924
|
+
*/
|
|
1925
|
+
interface FlatPrice {
|
|
1926
|
+
/**
|
|
1927
|
+
* The price amount
|
|
1928
|
+
*/
|
|
1929
|
+
amount?: number;
|
|
1930
|
+
/**
|
|
1931
|
+
* The billing country code of the price
|
|
1932
|
+
*/
|
|
1933
|
+
billingCountryCode?: string | null;
|
|
1934
|
+
/**
|
|
1935
|
+
* The price currency
|
|
1936
|
+
*/
|
|
1937
|
+
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';
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* The unit price of the price tier
|
|
1941
|
+
*/
|
|
1942
|
+
interface UnitPrice {
|
|
1943
|
+
/**
|
|
1944
|
+
* The price amount
|
|
1945
|
+
*/
|
|
1946
|
+
amount?: number;
|
|
1947
|
+
/**
|
|
1948
|
+
* The billing country code of the price
|
|
1949
|
+
*/
|
|
1950
|
+
billingCountryCode?: string | null;
|
|
1951
|
+
/**
|
|
1952
|
+
* The price currency
|
|
1953
|
+
*/
|
|
1954
|
+
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';
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
interface SubscriptionEntitlement {
|
|
1959
|
+
/**
|
|
1960
|
+
* Feature ID
|
|
1961
|
+
*/
|
|
1962
|
+
featureId: string;
|
|
1963
|
+
usageLimit: number;
|
|
1964
|
+
isGranted?: boolean;
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Trial period override settings
|
|
1968
|
+
*/
|
|
929
1969
|
interface TrialOverrideConfiguration {
|
|
1970
|
+
/**
|
|
1971
|
+
* Whether the subscription should start with a trial period
|
|
1972
|
+
*/
|
|
930
1973
|
isTrial: boolean;
|
|
1974
|
+
/**
|
|
1975
|
+
* Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
1976
|
+
*/
|
|
931
1977
|
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
932
1978
|
/**
|
|
933
|
-
*
|
|
1979
|
+
* Custom trial end date
|
|
934
1980
|
*/
|
|
935
1981
|
trialEndDate?: string;
|
|
936
1982
|
}
|
|
937
1983
|
}
|
|
938
1984
|
export interface SubscriptionTransferParams {
|
|
939
1985
|
/**
|
|
940
|
-
*
|
|
941
|
-
* belong to the same customer.
|
|
1986
|
+
* Resource ID to transfer the subscription to
|
|
942
1987
|
*/
|
|
943
1988
|
destinationResourceId: string;
|
|
944
1989
|
}
|
|
945
1990
|
export declare namespace Subscriptions {
|
|
946
|
-
export { type
|
|
947
|
-
export { FutureUpdate as FutureUpdate, type
|
|
1991
|
+
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, };
|
|
1992
|
+
export { FutureUpdate as FutureUpdate, type CancelSubscription as CancelSubscription };
|
|
1993
|
+
export { Usage as Usage, type UsageChargeUsageResponse as UsageChargeUsageResponse, type UsageSyncResponse as UsageSyncResponse, type UsageChargeUsageParams as UsageChargeUsageParams, };
|
|
1994
|
+
export { Invoice as Invoice, type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse };
|
|
948
1995
|
}
|
|
949
1996
|
//# sourceMappingURL=subscriptions.d.mts.map
|