@stigg/typescript 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +148 -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/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/addons/addons.d.mts +605 -0
- package/resources/v1/events/addons/addons.d.mts.map +1 -0
- package/resources/v1/events/addons/addons.d.ts +605 -0
- package/resources/v1/events/addons/addons.d.ts.map +1 -0
- package/resources/v1/events/addons/addons.js +60 -0
- package/resources/v1/events/addons/addons.js.map +1 -0
- package/resources/v1/events/addons/addons.mjs +55 -0
- package/resources/v1/events/addons/addons.mjs.map +1 -0
- package/resources/v1/events/addons/draft.d.mts +121 -0
- package/resources/v1/events/addons/draft.d.mts.map +1 -0
- package/resources/v1/events/addons/draft.d.ts +121 -0
- package/resources/v1/events/addons/draft.d.ts.map +1 -0
- package/resources/v1/events/addons/draft.js +22 -0
- package/resources/v1/events/addons/draft.js.map +1 -0
- package/resources/v1/events/addons/draft.mjs +18 -0
- package/resources/v1/events/addons/draft.mjs.map +1 -0
- package/resources/v1/events/addons/index.d.mts +3 -0
- package/resources/v1/events/addons/index.d.mts.map +1 -0
- package/resources/v1/events/addons/index.d.ts +3 -0
- package/resources/v1/events/addons/index.d.ts.map +1 -0
- package/resources/v1/events/addons/index.js +9 -0
- package/resources/v1/events/addons/index.js.map +1 -0
- package/resources/v1/events/addons/index.mjs +4 -0
- package/resources/v1/events/addons/index.mjs.map +1 -0
- package/resources/v1/events/addons.d.mts +2 -0
- package/resources/v1/events/addons.d.mts.map +1 -0
- package/resources/v1/events/addons.d.ts +2 -0
- package/resources/v1/events/addons.d.ts.map +1 -0
- package/resources/v1/events/addons.js +6 -0
- package/resources/v1/events/addons.js.map +1 -0
- package/resources/v1/events/addons.mjs +3 -0
- package/resources/v1/events/addons.mjs.map +1 -0
- package/resources/v1/events/events.d.mts +75 -0
- package/resources/v1/events/events.d.mts.map +1 -0
- package/resources/v1/events/events.d.ts +75 -0
- package/resources/v1/events/events.d.ts.map +1 -0
- package/resources/v1/events/events.js +32 -0
- package/resources/v1/events/events.js.map +1 -0
- package/resources/v1/events/events.mjs +27 -0
- package/resources/v1/events/events.mjs.map +1 -0
- package/resources/v1/events/features.d.mts +856 -0
- package/resources/v1/events/features.d.mts.map +1 -0
- package/resources/v1/events/features.d.ts +856 -0
- package/resources/v1/events/features.d.ts.map +1 -0
- package/resources/v1/events/features.js +51 -0
- package/resources/v1/events/features.js.map +1 -0
- package/resources/v1/events/features.mjs +47 -0
- package/resources/v1/events/features.mjs.map +1 -0
- package/resources/v1/events/index.d.mts +5 -0
- package/resources/v1/events/index.d.mts.map +1 -0
- package/resources/v1/events/index.d.ts +5 -0
- package/resources/v1/events/index.d.ts.map +1 -0
- package/resources/v1/events/index.js +13 -0
- package/resources/v1/events/index.js.map +1 -0
- package/resources/v1/events/index.mjs +6 -0
- package/resources/v1/events/index.mjs.map +1 -0
- package/resources/v1/events/plans.d.mts +348 -0
- package/resources/v1/events/plans.d.mts.map +1 -0
- package/resources/v1/events/plans.d.ts +348 -0
- package/resources/v1/events/plans.d.ts.map +1 -0
- package/resources/v1/events/plans.js +30 -0
- package/resources/v1/events/plans.js.map +1 -0
- package/resources/v1/events/plans.mjs +26 -0
- package/resources/v1/events/plans.mjs.map +1 -0
- package/resources/v1/events.d.mts +2 -0
- package/resources/v1/events.d.mts.map +1 -0
- package/resources/v1/events.d.ts +2 -0
- package/resources/v1/events.d.ts.map +1 -0
- package/resources/v1/events.js +6 -0
- package/resources/v1/events.js.map +1 -0
- package/resources/v1/events.mjs +3 -0
- package/resources/v1/events.mjs.map +1 -0
- package/resources/v1/index.d.mts +7 -4
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +7 -4
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +9 -3
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +4 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/products.d.mts +676 -0
- package/resources/v1/products.d.mts.map +1 -0
- package/resources/v1/products.d.ts +676 -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 +1545 -518
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1545 -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 +18 -149
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +18 -149
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +12 -12
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +12 -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/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/addons/addons.ts +761 -0
- package/src/resources/v1/events/addons/draft.ts +151 -0
- package/src/resources/v1/events/addons/index.ts +17 -0
- package/src/resources/v1/events/addons.ts +3 -0
- package/src/resources/v1/events/events.ts +160 -0
- package/src/resources/v1/events/features.ts +1066 -0
- package/src/resources/v1/events/index.ts +39 -0
- package/src/resources/v1/events/plans.ts +429 -0
- package/src/resources/v1/events.ts +3 -0
- package/src/resources/v1/index.ts +40 -15
- package/src/resources/v1/products.ts +834 -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 +3316 -832
- package/src/resources/v1/subscriptions/usage.ts +126 -0
- package/src/resources/v1/usage.ts +284 -0
- package/src/resources/v1/v1.ts +96 -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
|
@@ -2,66 +2,86 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as FutureUpdateAPI from './future-update';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from './
|
|
5
|
+
import { CancelSubscription, FutureUpdate } from './future-update';
|
|
6
|
+
import * as InvoiceAPI from './invoice';
|
|
7
|
+
import { Invoice, InvoiceMarkAsPaidResponse } from './invoice';
|
|
8
|
+
import * as UsageAPI from './usage';
|
|
9
|
+
import { Usage, UsageChargeUsageParams, UsageChargeUsageResponse, UsageSyncResponse } from './usage';
|
|
10
10
|
import { APIPromise } from '../../../core/api-promise';
|
|
11
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
|
|
11
12
|
import { RequestOptions } from '../../../internal/request-options';
|
|
12
13
|
import { path } from '../../../internal/utils/path';
|
|
13
14
|
|
|
14
15
|
export class Subscriptions extends APIResource {
|
|
15
16
|
futureUpdate: FutureUpdateAPI.FutureUpdate = new FutureUpdateAPI.FutureUpdate(this._client);
|
|
17
|
+
usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
|
|
18
|
+
invoice: InvoiceAPI.Invoice = new InvoiceAPI.Invoice(this._client);
|
|
16
19
|
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* Retrieves a subscription by its unique identifier, including plan details,
|
|
22
|
+
* billing period, status, and add-ons.
|
|
19
23
|
*/
|
|
20
|
-
|
|
21
|
-
return this._client.
|
|
24
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Subscription> {
|
|
25
|
+
return this._client.get(path`/api/v1/subscriptions/${id}`, options);
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
/**
|
|
25
|
-
*
|
|
29
|
+
* Updates an active subscription's properties including billing period, add-ons,
|
|
30
|
+
* unit quantities, and discounts.
|
|
26
31
|
*/
|
|
27
|
-
|
|
28
|
-
return this._client.
|
|
32
|
+
update(id: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
33
|
+
return this._client.patch(path`/api/v1/subscriptions/${id}`, { body, ...options });
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
* Retrieves a paginated list of subscriptions, with optional filters for customer,
|
|
38
|
+
* status, and plan.
|
|
33
39
|
*/
|
|
34
40
|
list(
|
|
35
41
|
query: SubscriptionListParams | null | undefined = {},
|
|
36
42
|
options?: RequestOptions,
|
|
37
|
-
):
|
|
38
|
-
return this._client.
|
|
43
|
+
): PagePromise<SubscriptionListResponsesMyCursorIDPage, SubscriptionListResponse> {
|
|
44
|
+
return this._client.getAPIList('/api/v1/subscriptions', MyCursorIDPage<SubscriptionListResponse>, {
|
|
45
|
+
query,
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
/**
|
|
42
|
-
*
|
|
51
|
+
* Cancels an active subscription, either immediately or at a specified time such
|
|
52
|
+
* as end of billing period.
|
|
43
53
|
*/
|
|
44
|
-
|
|
45
|
-
id
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
cancel(id: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
55
|
+
return this._client.post(path`/api/v1/subscriptions/${id}/cancel`, { body, ...options });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Delegates the payment responsibility of a subscription to a different customer.
|
|
60
|
+
* The delegated customer will be billed for this subscription.
|
|
61
|
+
*/
|
|
62
|
+
delegate(id: string, body: SubscriptionDelegateParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
49
63
|
return this._client.post(path`/api/v1/subscriptions/${id}/delegate`, { body, ...options });
|
|
50
64
|
}
|
|
51
65
|
|
|
52
66
|
/**
|
|
53
|
-
*
|
|
67
|
+
* Imports multiple subscriptions in bulk. Used for migrating subscription data
|
|
68
|
+
* from external systems.
|
|
54
69
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
import(body: SubscriptionImportParams, options?: RequestOptions): APIPromise<SubscriptionImportResponse> {
|
|
71
|
+
return this._client.post('/api/v1/subscriptions/import', { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Migrates a subscription to the latest published version of its plan or add-ons.
|
|
76
|
+
* Handles prorated charges or credits automatically.
|
|
77
|
+
*/
|
|
78
|
+
migrate(id: string, body: SubscriptionMigrateParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
60
79
|
return this._client.post(path`/api/v1/subscriptions/${id}/migrate`, { body, ...options });
|
|
61
80
|
}
|
|
62
81
|
|
|
63
82
|
/**
|
|
64
|
-
*
|
|
83
|
+
* Previews the pricing impact of creating or updating a subscription without
|
|
84
|
+
* making changes. Returns estimated costs, taxes, and proration details.
|
|
65
85
|
*/
|
|
66
86
|
preview(
|
|
67
87
|
body: SubscriptionPreviewParams,
|
|
@@ -71,173 +91,41 @@ export class Subscriptions extends APIResource {
|
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
/**
|
|
74
|
-
*
|
|
94
|
+
* Creates a new subscription for an existing customer. When payment is required
|
|
95
|
+
* and no payment method exists, returns a checkout URL.
|
|
75
96
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
body: SubscriptionTransferParams,
|
|
97
|
+
provision(
|
|
98
|
+
body: SubscriptionProvisionParams,
|
|
79
99
|
options?: RequestOptions,
|
|
80
|
-
): APIPromise<
|
|
81
|
-
return this._client.post(
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface SubscriptionCreateResponse {
|
|
86
|
-
data: SubscriptionCreateResponse.Data;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export namespace SubscriptionCreateResponse {
|
|
90
|
-
export interface Data {
|
|
91
|
-
/**
|
|
92
|
-
* Unique identifier for the provisioned subscription
|
|
93
|
-
*/
|
|
94
|
-
id: string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
98
|
-
*/
|
|
99
|
-
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Checkout billing ID when payment is required
|
|
103
|
-
*/
|
|
104
|
-
checkoutBillingId?: string | null;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* URL to complete payment when PAYMENT_REQUIRED
|
|
108
|
-
*/
|
|
109
|
-
checkoutUrl?: string | null;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Whether the subscription is scheduled for future activation
|
|
113
|
-
*/
|
|
114
|
-
isScheduled?: boolean;
|
|
115
|
-
|
|
116
|
-
subscription?: Data.Subscription;
|
|
100
|
+
): APIPromise<SubscriptionProvisionResponse> {
|
|
101
|
+
return this._client.post('/api/v1/subscriptions', { body, ...options });
|
|
117
102
|
}
|
|
118
103
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Billing ID
|
|
128
|
-
*/
|
|
129
|
-
billingId: string | null;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Created at
|
|
133
|
-
*/
|
|
134
|
-
createdAt: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Customer ID
|
|
138
|
-
*/
|
|
139
|
-
customerId: string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Payment collection
|
|
143
|
-
*/
|
|
144
|
-
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Plan ID
|
|
148
|
-
*/
|
|
149
|
-
planId: string;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Pricing type
|
|
153
|
-
*/
|
|
154
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Subscription start date
|
|
158
|
-
*/
|
|
159
|
-
startDate: string;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Subscription status
|
|
163
|
-
*/
|
|
164
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Subscription cancellation date
|
|
168
|
-
*/
|
|
169
|
-
cancellationDate?: string | null;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Subscription cancel reason
|
|
173
|
-
*/
|
|
174
|
-
cancelReason?:
|
|
175
|
-
| 'UPGRADE_OR_DOWNGRADE'
|
|
176
|
-
| 'CANCELLED_BY_BILLING'
|
|
177
|
-
| 'EXPIRED'
|
|
178
|
-
| 'DETACH_BILLING'
|
|
179
|
-
| 'TRIAL_ENDED'
|
|
180
|
-
| 'Immediate'
|
|
181
|
-
| 'TRIAL_CONVERTED'
|
|
182
|
-
| 'PENDING_PAYMENT_EXPIRED'
|
|
183
|
-
| 'ScheduledCancellation'
|
|
184
|
-
| 'CustomerArchived'
|
|
185
|
-
| 'AutoCancellationRule'
|
|
186
|
-
| null;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* End of the current billing period
|
|
190
|
-
*/
|
|
191
|
-
currentBillingPeriodEnd?: string | null;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Start of the current billing period
|
|
195
|
-
*/
|
|
196
|
-
currentBillingPeriodStart?: string | null;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Subscription effective end date
|
|
200
|
-
*/
|
|
201
|
-
effectiveEndDate?: string | null;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Subscription end date
|
|
205
|
-
*/
|
|
206
|
-
endDate?: string | null;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Additional metadata for the subscription
|
|
210
|
-
*/
|
|
211
|
-
metadata?: { [key: string]: string };
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Paying customer ID for delegated billing
|
|
215
|
-
*/
|
|
216
|
-
payingCustomerId?: string | null;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* The method used to collect payments for a subscription
|
|
220
|
-
*/
|
|
221
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Resource ID
|
|
225
|
-
*/
|
|
226
|
-
resourceId?: string | null;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Subscription trial end date
|
|
230
|
-
*/
|
|
231
|
-
trialEndDate?: string | null;
|
|
232
|
-
}
|
|
104
|
+
/**
|
|
105
|
+
* Transfers a subscription to a different resource ID. Used for multi-resource
|
|
106
|
+
* products where subscriptions apply to specific entities like websites or apps.
|
|
107
|
+
*/
|
|
108
|
+
transfer(id: string, body: SubscriptionTransferParams, options?: RequestOptions): APIPromise<Subscription> {
|
|
109
|
+
return this._client.post(path`/api/v1/subscriptions/${id}/transfer`, { body, ...options });
|
|
233
110
|
}
|
|
234
111
|
}
|
|
235
112
|
|
|
236
|
-
export
|
|
237
|
-
|
|
113
|
+
export type SubscriptionListResponsesMyCursorIDPage = MyCursorIDPage<SubscriptionListResponse>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Response object
|
|
117
|
+
*/
|
|
118
|
+
export interface Subscription {
|
|
119
|
+
/**
|
|
120
|
+
* Customer subscription to a plan
|
|
121
|
+
*/
|
|
122
|
+
data: Subscription.Data;
|
|
238
123
|
}
|
|
239
124
|
|
|
240
|
-
export namespace
|
|
125
|
+
export namespace Subscription {
|
|
126
|
+
/**
|
|
127
|
+
* Customer subscription to a plan
|
|
128
|
+
*/
|
|
241
129
|
export interface Data {
|
|
242
130
|
/**
|
|
243
131
|
* Subscription ID
|
|
@@ -341,6 +229,8 @@ export namespace SubscriptionRetrieveResponse {
|
|
|
341
229
|
*/
|
|
342
230
|
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
343
231
|
|
|
232
|
+
prices?: Array<Data.Price>;
|
|
233
|
+
|
|
344
234
|
/**
|
|
345
235
|
* Resource ID
|
|
346
236
|
*/
|
|
@@ -351,455 +241,372 @@ export namespace SubscriptionRetrieveResponse {
|
|
|
351
241
|
*/
|
|
352
242
|
trialEndDate?: string | null;
|
|
353
243
|
}
|
|
244
|
+
|
|
245
|
+
export namespace Data {
|
|
246
|
+
export interface Price {
|
|
247
|
+
/**
|
|
248
|
+
* Price ID
|
|
249
|
+
*/
|
|
250
|
+
id: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Creation timestamp
|
|
254
|
+
*/
|
|
255
|
+
createdAt: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Last update timestamp
|
|
259
|
+
*/
|
|
260
|
+
updatedAt: string;
|
|
261
|
+
|
|
262
|
+
[k: string]: unknown;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
354
265
|
}
|
|
355
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Customer subscription to a plan
|
|
269
|
+
*/
|
|
356
270
|
export interface SubscriptionListResponse {
|
|
357
|
-
|
|
358
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Subscription ID
|
|
273
|
+
*/
|
|
274
|
+
id: string;
|
|
359
275
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
*/
|
|
365
|
-
id: string;
|
|
276
|
+
/**
|
|
277
|
+
* Billing ID
|
|
278
|
+
*/
|
|
279
|
+
billingId: string | null;
|
|
366
280
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Created at
|
|
283
|
+
*/
|
|
284
|
+
createdAt: string;
|
|
371
285
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Customer ID
|
|
288
|
+
*/
|
|
289
|
+
customerId: string;
|
|
376
290
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Payment collection
|
|
293
|
+
*/
|
|
294
|
+
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
381
295
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Plan ID
|
|
298
|
+
*/
|
|
299
|
+
planId: string;
|
|
386
300
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Pricing type
|
|
303
|
+
*/
|
|
304
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
391
305
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Subscription start date
|
|
308
|
+
*/
|
|
309
|
+
startDate: string;
|
|
396
310
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Subscription status
|
|
313
|
+
*/
|
|
314
|
+
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
401
315
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Subscription cancellation date
|
|
318
|
+
*/
|
|
319
|
+
cancellationDate?: string | null;
|
|
406
320
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
321
|
+
/**
|
|
322
|
+
* Subscription cancel reason
|
|
323
|
+
*/
|
|
324
|
+
cancelReason?:
|
|
325
|
+
| 'UPGRADE_OR_DOWNGRADE'
|
|
326
|
+
| 'CANCELLED_BY_BILLING'
|
|
327
|
+
| 'EXPIRED'
|
|
328
|
+
| 'DETACH_BILLING'
|
|
329
|
+
| 'TRIAL_ENDED'
|
|
330
|
+
| 'Immediate'
|
|
331
|
+
| 'TRIAL_CONVERTED'
|
|
332
|
+
| 'PENDING_PAYMENT_EXPIRED'
|
|
333
|
+
| 'ScheduledCancellation'
|
|
334
|
+
| 'CustomerArchived'
|
|
335
|
+
| 'AutoCancellationRule'
|
|
336
|
+
| null;
|
|
411
337
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
338
|
+
/**
|
|
339
|
+
* End of the current billing period
|
|
340
|
+
*/
|
|
341
|
+
currentBillingPeriodEnd?: string | null;
|
|
416
342
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
| 'UPGRADE_OR_DOWNGRADE'
|
|
422
|
-
| 'CANCELLED_BY_BILLING'
|
|
423
|
-
| 'EXPIRED'
|
|
424
|
-
| 'DETACH_BILLING'
|
|
425
|
-
| 'TRIAL_ENDED'
|
|
426
|
-
| 'Immediate'
|
|
427
|
-
| 'TRIAL_CONVERTED'
|
|
428
|
-
| 'PENDING_PAYMENT_EXPIRED'
|
|
429
|
-
| 'ScheduledCancellation'
|
|
430
|
-
| 'CustomerArchived'
|
|
431
|
-
| 'AutoCancellationRule'
|
|
432
|
-
| null;
|
|
343
|
+
/**
|
|
344
|
+
* Start of the current billing period
|
|
345
|
+
*/
|
|
346
|
+
currentBillingPeriodStart?: string | null;
|
|
433
347
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
348
|
+
/**
|
|
349
|
+
* Subscription effective end date
|
|
350
|
+
*/
|
|
351
|
+
effectiveEndDate?: string | null;
|
|
438
352
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
353
|
+
/**
|
|
354
|
+
* Subscription end date
|
|
355
|
+
*/
|
|
356
|
+
endDate?: string | null;
|
|
443
357
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Additional metadata for the subscription
|
|
360
|
+
*/
|
|
361
|
+
metadata?: { [key: string]: string };
|
|
448
362
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
363
|
+
/**
|
|
364
|
+
* Paying customer ID for delegated billing
|
|
365
|
+
*/
|
|
366
|
+
payingCustomerId?: string | null;
|
|
453
367
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
368
|
+
/**
|
|
369
|
+
* The method used to collect payments for a subscription
|
|
370
|
+
*/
|
|
371
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
458
372
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
373
|
+
prices?: Array<SubscriptionListResponse.Price>;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Resource ID
|
|
377
|
+
*/
|
|
378
|
+
resourceId?: string | null;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Subscription trial end date
|
|
382
|
+
*/
|
|
383
|
+
trialEndDate?: string | null;
|
|
384
|
+
}
|
|
463
385
|
|
|
386
|
+
export namespace SubscriptionListResponse {
|
|
387
|
+
export interface Price {
|
|
464
388
|
/**
|
|
465
|
-
*
|
|
389
|
+
* Price ID
|
|
466
390
|
*/
|
|
467
|
-
|
|
391
|
+
id: string;
|
|
468
392
|
|
|
469
393
|
/**
|
|
470
|
-
*
|
|
394
|
+
* Creation timestamp
|
|
471
395
|
*/
|
|
472
|
-
|
|
396
|
+
createdAt: string;
|
|
473
397
|
|
|
474
398
|
/**
|
|
475
|
-
*
|
|
399
|
+
* Last update timestamp
|
|
476
400
|
*/
|
|
477
|
-
|
|
401
|
+
updatedAt: string;
|
|
402
|
+
|
|
403
|
+
[k: string]: unknown;
|
|
478
404
|
}
|
|
479
405
|
}
|
|
480
406
|
|
|
481
|
-
|
|
482
|
-
|
|
407
|
+
/**
|
|
408
|
+
* Response object
|
|
409
|
+
*/
|
|
410
|
+
export interface SubscriptionImportResponse {
|
|
411
|
+
data: SubscriptionImportResponse.Data;
|
|
483
412
|
}
|
|
484
413
|
|
|
485
|
-
export namespace
|
|
414
|
+
export namespace SubscriptionImportResponse {
|
|
486
415
|
export interface Data {
|
|
487
416
|
/**
|
|
488
|
-
*
|
|
417
|
+
* Unique identifier for the import task
|
|
489
418
|
*/
|
|
490
|
-
|
|
419
|
+
taskId: string;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
491
422
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
423
|
+
/**
|
|
424
|
+
* Response object
|
|
425
|
+
*/
|
|
426
|
+
export interface SubscriptionPreviewResponse {
|
|
427
|
+
/**
|
|
428
|
+
* Pricing preview with invoices
|
|
429
|
+
*/
|
|
430
|
+
data: SubscriptionPreviewResponse.Data;
|
|
431
|
+
}
|
|
496
432
|
|
|
433
|
+
export namespace SubscriptionPreviewResponse {
|
|
434
|
+
/**
|
|
435
|
+
* Pricing preview with invoices
|
|
436
|
+
*/
|
|
437
|
+
export interface Data {
|
|
497
438
|
/**
|
|
498
|
-
*
|
|
439
|
+
* Invoice due immediately
|
|
499
440
|
*/
|
|
500
|
-
|
|
441
|
+
immediateInvoice: Data.ImmediateInvoice;
|
|
501
442
|
|
|
502
443
|
/**
|
|
503
|
-
*
|
|
444
|
+
* Billing period range
|
|
504
445
|
*/
|
|
505
|
-
|
|
446
|
+
billingPeriodRange?: Data.BillingPeriodRange;
|
|
506
447
|
|
|
507
448
|
/**
|
|
508
|
-
*
|
|
449
|
+
* Free items included
|
|
509
450
|
*/
|
|
510
|
-
|
|
451
|
+
freeItems?: Array<Data.FreeItem>;
|
|
511
452
|
|
|
512
453
|
/**
|
|
513
|
-
*
|
|
454
|
+
* Whether updates are scheduled
|
|
514
455
|
*/
|
|
515
|
-
|
|
456
|
+
hasScheduledUpdates?: boolean;
|
|
516
457
|
|
|
517
458
|
/**
|
|
518
|
-
*
|
|
459
|
+
* Whether this is a downgrade
|
|
519
460
|
*/
|
|
520
|
-
|
|
461
|
+
isPlanDowngrade?: boolean;
|
|
521
462
|
|
|
522
463
|
/**
|
|
523
|
-
*
|
|
464
|
+
* Recurring invoice preview
|
|
524
465
|
*/
|
|
525
|
-
|
|
466
|
+
recurringInvoice?: Data.RecurringInvoice;
|
|
467
|
+
}
|
|
526
468
|
|
|
469
|
+
export namespace Data {
|
|
527
470
|
/**
|
|
528
|
-
*
|
|
471
|
+
* Invoice due immediately
|
|
529
472
|
*/
|
|
530
|
-
|
|
473
|
+
export interface ImmediateInvoice {
|
|
474
|
+
/**
|
|
475
|
+
* Subtotal before discounts
|
|
476
|
+
*/
|
|
477
|
+
subTotal: number;
|
|
531
478
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
479
|
+
/**
|
|
480
|
+
* Invoice total
|
|
481
|
+
*/
|
|
482
|
+
total: number;
|
|
536
483
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
| 'UPGRADE_OR_DOWNGRADE'
|
|
542
|
-
| 'CANCELLED_BY_BILLING'
|
|
543
|
-
| 'EXPIRED'
|
|
544
|
-
| 'DETACH_BILLING'
|
|
545
|
-
| 'TRIAL_ENDED'
|
|
546
|
-
| 'Immediate'
|
|
547
|
-
| 'TRIAL_CONVERTED'
|
|
548
|
-
| 'PENDING_PAYMENT_EXPIRED'
|
|
549
|
-
| 'ScheduledCancellation'
|
|
550
|
-
| 'CustomerArchived'
|
|
551
|
-
| 'AutoCancellationRule'
|
|
552
|
-
| null;
|
|
484
|
+
/**
|
|
485
|
+
* Billing period covered
|
|
486
|
+
*/
|
|
487
|
+
billingPeriodRange?: ImmediateInvoice.BillingPeriodRange;
|
|
553
488
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
489
|
+
/**
|
|
490
|
+
* Currency code
|
|
491
|
+
*/
|
|
492
|
+
currency?: string | null;
|
|
558
493
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Total discount amount
|
|
496
|
+
*/
|
|
497
|
+
discount?: number;
|
|
563
498
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
499
|
+
/**
|
|
500
|
+
* Discount breakdown
|
|
501
|
+
*/
|
|
502
|
+
discountDetails?: ImmediateInvoice.DiscountDetails;
|
|
568
503
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
504
|
+
/**
|
|
505
|
+
* Applied discounts
|
|
506
|
+
*/
|
|
507
|
+
discounts?: Array<ImmediateInvoice.Discount>;
|
|
573
508
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Line items
|
|
511
|
+
*/
|
|
512
|
+
lines?: Array<ImmediateInvoice.Line>;
|
|
578
513
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
514
|
+
/**
|
|
515
|
+
* Tax amount
|
|
516
|
+
*/
|
|
517
|
+
tax?: number;
|
|
518
|
+
}
|
|
583
519
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
520
|
+
export namespace ImmediateInvoice {
|
|
521
|
+
/**
|
|
522
|
+
* Billing period covered
|
|
523
|
+
*/
|
|
524
|
+
export interface BillingPeriodRange {
|
|
525
|
+
/**
|
|
526
|
+
* Billing period end date
|
|
527
|
+
*/
|
|
528
|
+
end: string;
|
|
588
529
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
530
|
+
/**
|
|
531
|
+
* Billing period start date
|
|
532
|
+
*/
|
|
533
|
+
start: string;
|
|
534
|
+
}
|
|
593
535
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
536
|
+
/**
|
|
537
|
+
* Discount breakdown
|
|
538
|
+
*/
|
|
539
|
+
export interface DiscountDetails {
|
|
540
|
+
/**
|
|
541
|
+
* Promo code used
|
|
542
|
+
*/
|
|
543
|
+
code?: string;
|
|
600
544
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
545
|
+
/**
|
|
546
|
+
* Fixed discount amount
|
|
547
|
+
*/
|
|
548
|
+
fixedAmount?: number;
|
|
604
549
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
id: string;
|
|
550
|
+
/**
|
|
551
|
+
* Percentage discount
|
|
552
|
+
*/
|
|
553
|
+
percentage?: number;
|
|
554
|
+
}
|
|
611
555
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
556
|
+
/**
|
|
557
|
+
* Applied discount amount
|
|
558
|
+
*/
|
|
559
|
+
export interface Discount {
|
|
560
|
+
/**
|
|
561
|
+
* Discount amount
|
|
562
|
+
*/
|
|
563
|
+
amount: number;
|
|
616
564
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
565
|
+
/**
|
|
566
|
+
* Currency code
|
|
567
|
+
*/
|
|
568
|
+
currency: string;
|
|
621
569
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
570
|
+
/**
|
|
571
|
+
* Discount description
|
|
572
|
+
*/
|
|
573
|
+
description: string;
|
|
574
|
+
}
|
|
626
575
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* Plan ID
|
|
634
|
-
*/
|
|
635
|
-
planId: string;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Pricing type
|
|
639
|
-
*/
|
|
640
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Subscription start date
|
|
644
|
-
*/
|
|
645
|
-
startDate: string;
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* Subscription status
|
|
649
|
-
*/
|
|
650
|
-
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Subscription cancellation date
|
|
654
|
-
*/
|
|
655
|
-
cancellationDate?: string | null;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Subscription cancel reason
|
|
659
|
-
*/
|
|
660
|
-
cancelReason?:
|
|
661
|
-
| 'UPGRADE_OR_DOWNGRADE'
|
|
662
|
-
| 'CANCELLED_BY_BILLING'
|
|
663
|
-
| 'EXPIRED'
|
|
664
|
-
| 'DETACH_BILLING'
|
|
665
|
-
| 'TRIAL_ENDED'
|
|
666
|
-
| 'Immediate'
|
|
667
|
-
| 'TRIAL_CONVERTED'
|
|
668
|
-
| 'PENDING_PAYMENT_EXPIRED'
|
|
669
|
-
| 'ScheduledCancellation'
|
|
670
|
-
| 'CustomerArchived'
|
|
671
|
-
| 'AutoCancellationRule'
|
|
672
|
-
| null;
|
|
673
|
-
|
|
674
|
-
/**
|
|
675
|
-
* End of the current billing period
|
|
676
|
-
*/
|
|
677
|
-
currentBillingPeriodEnd?: string | null;
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Start of the current billing period
|
|
681
|
-
*/
|
|
682
|
-
currentBillingPeriodStart?: string | null;
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Subscription effective end date
|
|
686
|
-
*/
|
|
687
|
-
effectiveEndDate?: string | null;
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Subscription end date
|
|
691
|
-
*/
|
|
692
|
-
endDate?: string | null;
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* Additional metadata for the subscription
|
|
696
|
-
*/
|
|
697
|
-
metadata?: { [key: string]: string };
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
* Paying customer ID for delegated billing
|
|
701
|
-
*/
|
|
702
|
-
payingCustomerId?: string | null;
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
* The method used to collect payments for a subscription
|
|
706
|
-
*/
|
|
707
|
-
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Resource ID
|
|
711
|
-
*/
|
|
712
|
-
resourceId?: string | null;
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Subscription trial end date
|
|
716
|
-
*/
|
|
717
|
-
trialEndDate?: string | null;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export interface SubscriptionPreviewResponse {
|
|
722
|
-
data: SubscriptionPreviewResponse.Data;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
export namespace SubscriptionPreviewResponse {
|
|
726
|
-
export interface Data {
|
|
727
|
-
immediateInvoice: Data.ImmediateInvoice;
|
|
728
|
-
|
|
729
|
-
billingPeriodRange?: Data.BillingPeriodRange;
|
|
730
|
-
|
|
731
|
-
freeItems?: Array<Data.FreeItem>;
|
|
732
|
-
|
|
733
|
-
hasScheduledUpdates?: boolean;
|
|
734
|
-
|
|
735
|
-
isPlanDowngrade?: boolean;
|
|
736
|
-
|
|
737
|
-
recurringInvoice?: Data.RecurringInvoice;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
export namespace Data {
|
|
741
|
-
export interface ImmediateInvoice {
|
|
742
|
-
subTotal: number;
|
|
743
|
-
|
|
744
|
-
total: number;
|
|
745
|
-
|
|
746
|
-
billingPeriodRange?: ImmediateInvoice.BillingPeriodRange;
|
|
747
|
-
|
|
748
|
-
currency?: string | null;
|
|
749
|
-
|
|
750
|
-
discount?: number;
|
|
751
|
-
|
|
752
|
-
discountDetails?: ImmediateInvoice.DiscountDetails;
|
|
753
|
-
|
|
754
|
-
discounts?: Array<ImmediateInvoice.Discount>;
|
|
755
|
-
|
|
756
|
-
lines?: Array<ImmediateInvoice.Line>;
|
|
757
|
-
|
|
758
|
-
tax?: number;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
export namespace ImmediateInvoice {
|
|
762
|
-
export interface BillingPeriodRange {
|
|
576
|
+
/**
|
|
577
|
+
* Invoice line item
|
|
578
|
+
*/
|
|
579
|
+
export interface Line {
|
|
763
580
|
/**
|
|
764
|
-
*
|
|
581
|
+
* Currency code
|
|
765
582
|
*/
|
|
766
|
-
|
|
583
|
+
currency: string;
|
|
767
584
|
|
|
768
585
|
/**
|
|
769
|
-
*
|
|
586
|
+
* Line item description
|
|
770
587
|
*/
|
|
771
|
-
start: string;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
export interface DiscountDetails {
|
|
775
|
-
code?: string;
|
|
776
|
-
|
|
777
|
-
fixedAmount?: number;
|
|
778
|
-
|
|
779
|
-
percentage?: number;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
export interface Discount {
|
|
783
|
-
amount: number;
|
|
784
|
-
|
|
785
|
-
currency: string;
|
|
786
|
-
|
|
787
|
-
description: string;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
export interface Line {
|
|
791
|
-
currency: string;
|
|
792
|
-
|
|
793
588
|
description: string;
|
|
794
589
|
|
|
590
|
+
/**
|
|
591
|
+
* Line subtotal
|
|
592
|
+
*/
|
|
795
593
|
subTotal: number;
|
|
796
594
|
|
|
595
|
+
/**
|
|
596
|
+
* Price per unit
|
|
597
|
+
*/
|
|
797
598
|
unitPrice: number;
|
|
798
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Quantity
|
|
602
|
+
*/
|
|
799
603
|
quantity?: number;
|
|
800
604
|
}
|
|
801
605
|
}
|
|
802
606
|
|
|
607
|
+
/**
|
|
608
|
+
* Billing period range
|
|
609
|
+
*/
|
|
803
610
|
export interface BillingPeriodRange {
|
|
804
611
|
/**
|
|
805
612
|
* Billing period end date
|
|
@@ -812,33 +619,75 @@ export namespace SubscriptionPreviewResponse {
|
|
|
812
619
|
start?: string;
|
|
813
620
|
}
|
|
814
621
|
|
|
622
|
+
/**
|
|
623
|
+
* Free item in subscription
|
|
624
|
+
*/
|
|
815
625
|
export interface FreeItem {
|
|
626
|
+
/**
|
|
627
|
+
* Addon ID
|
|
628
|
+
*/
|
|
816
629
|
addonId: string;
|
|
817
630
|
|
|
631
|
+
/**
|
|
632
|
+
* Quantity
|
|
633
|
+
*/
|
|
818
634
|
quantity: number;
|
|
819
635
|
}
|
|
820
636
|
|
|
637
|
+
/**
|
|
638
|
+
* Recurring invoice preview
|
|
639
|
+
*/
|
|
821
640
|
export interface RecurringInvoice {
|
|
641
|
+
/**
|
|
642
|
+
* Subtotal before discounts
|
|
643
|
+
*/
|
|
822
644
|
subTotal: number;
|
|
823
645
|
|
|
646
|
+
/**
|
|
647
|
+
* Invoice total
|
|
648
|
+
*/
|
|
824
649
|
total: number;
|
|
825
650
|
|
|
651
|
+
/**
|
|
652
|
+
* Billing period covered
|
|
653
|
+
*/
|
|
826
654
|
billingPeriodRange?: RecurringInvoice.BillingPeriodRange;
|
|
827
655
|
|
|
656
|
+
/**
|
|
657
|
+
* Currency code
|
|
658
|
+
*/
|
|
828
659
|
currency?: string | null;
|
|
829
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Total discount amount
|
|
663
|
+
*/
|
|
830
664
|
discount?: number;
|
|
831
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Discount breakdown
|
|
668
|
+
*/
|
|
832
669
|
discountDetails?: RecurringInvoice.DiscountDetails;
|
|
833
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Applied discounts
|
|
673
|
+
*/
|
|
834
674
|
discounts?: Array<RecurringInvoice.Discount>;
|
|
835
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Line items
|
|
678
|
+
*/
|
|
836
679
|
lines?: Array<RecurringInvoice.Line>;
|
|
837
680
|
|
|
681
|
+
/**
|
|
682
|
+
* Tax amount
|
|
683
|
+
*/
|
|
838
684
|
tax?: number;
|
|
839
685
|
}
|
|
840
686
|
|
|
841
687
|
export namespace RecurringInvoice {
|
|
688
|
+
/**
|
|
689
|
+
* Billing period covered
|
|
690
|
+
*/
|
|
842
691
|
export interface BillingPeriodRange {
|
|
843
692
|
/**
|
|
844
693
|
* Billing period end date
|
|
@@ -851,201 +700,2515 @@ export namespace SubscriptionPreviewResponse {
|
|
|
851
700
|
start: string;
|
|
852
701
|
}
|
|
853
702
|
|
|
703
|
+
/**
|
|
704
|
+
* Discount breakdown
|
|
705
|
+
*/
|
|
854
706
|
export interface DiscountDetails {
|
|
707
|
+
/**
|
|
708
|
+
* Promo code used
|
|
709
|
+
*/
|
|
855
710
|
code?: string;
|
|
856
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Fixed discount amount
|
|
714
|
+
*/
|
|
857
715
|
fixedAmount?: number;
|
|
858
716
|
|
|
717
|
+
/**
|
|
718
|
+
* Percentage discount
|
|
719
|
+
*/
|
|
859
720
|
percentage?: number;
|
|
860
721
|
}
|
|
861
722
|
|
|
723
|
+
/**
|
|
724
|
+
* Applied discount amount
|
|
725
|
+
*/
|
|
862
726
|
export interface Discount {
|
|
727
|
+
/**
|
|
728
|
+
* Discount amount
|
|
729
|
+
*/
|
|
863
730
|
amount: number;
|
|
864
731
|
|
|
732
|
+
/**
|
|
733
|
+
* Currency code
|
|
734
|
+
*/
|
|
865
735
|
currency: string;
|
|
866
736
|
|
|
737
|
+
/**
|
|
738
|
+
* Discount description
|
|
739
|
+
*/
|
|
867
740
|
description: string;
|
|
868
741
|
}
|
|
869
742
|
|
|
743
|
+
/**
|
|
744
|
+
* Invoice line item
|
|
745
|
+
*/
|
|
870
746
|
export interface Line {
|
|
747
|
+
/**
|
|
748
|
+
* Currency code
|
|
749
|
+
*/
|
|
871
750
|
currency: string;
|
|
872
751
|
|
|
752
|
+
/**
|
|
753
|
+
* Line item description
|
|
754
|
+
*/
|
|
873
755
|
description: string;
|
|
874
756
|
|
|
757
|
+
/**
|
|
758
|
+
* Line subtotal
|
|
759
|
+
*/
|
|
875
760
|
subTotal: number;
|
|
876
761
|
|
|
762
|
+
/**
|
|
763
|
+
* Price per unit
|
|
764
|
+
*/
|
|
877
765
|
unitPrice: number;
|
|
878
766
|
|
|
767
|
+
/**
|
|
768
|
+
* Quantity
|
|
769
|
+
*/
|
|
879
770
|
quantity?: number;
|
|
880
771
|
}
|
|
881
772
|
}
|
|
882
773
|
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Response object
|
|
778
|
+
*/
|
|
779
|
+
export interface SubscriptionProvisionResponse {
|
|
780
|
+
/**
|
|
781
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
782
|
+
*/
|
|
783
|
+
data: SubscriptionProvisionResponse.Data;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export namespace SubscriptionProvisionResponse {
|
|
787
|
+
/**
|
|
788
|
+
* Provisioning result with status and subscription or checkout URL.
|
|
789
|
+
*/
|
|
790
|
+
export interface Data {
|
|
791
|
+
/**
|
|
792
|
+
* Unique identifier for the provisioned subscription
|
|
793
|
+
*/
|
|
794
|
+
id: string;
|
|
795
|
+
|
|
796
|
+
entitlements: Array<Data.UnionObjectVariant0 | Data.UnionObjectVariant1> | null;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Provision status: SUCCESS or PAYMENT_REQUIRED
|
|
800
|
+
*/
|
|
801
|
+
status: 'SUCCESS' | 'PAYMENT_REQUIRED';
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Created subscription (when status is SUCCESS)
|
|
805
|
+
*/
|
|
806
|
+
subscription: Data.Subscription | null;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Checkout billing ID when payment is required
|
|
810
|
+
*/
|
|
811
|
+
checkoutBillingId?: string;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* URL to complete payment when PAYMENT_REQUIRED
|
|
815
|
+
*/
|
|
816
|
+
checkoutUrl?: string;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Whether the subscription is scheduled for future activation
|
|
820
|
+
*/
|
|
821
|
+
isScheduled?: boolean;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export namespace Data {
|
|
825
|
+
export interface UnionObjectVariant0 {
|
|
826
|
+
accessDeniedReason:
|
|
827
|
+
| 'FeatureNotFound'
|
|
828
|
+
| 'CustomerNotFound'
|
|
829
|
+
| 'CustomerIsArchived'
|
|
830
|
+
| 'CustomerResourceNotFound'
|
|
831
|
+
| 'NoActiveSubscription'
|
|
832
|
+
| 'NoFeatureEntitlementInSubscription'
|
|
833
|
+
| 'RequestedUsageExceedingLimit'
|
|
834
|
+
| 'RequestedValuesMismatch'
|
|
835
|
+
| 'BudgetExceeded'
|
|
836
|
+
| 'Unknown'
|
|
837
|
+
| 'FeatureTypeMismatch'
|
|
838
|
+
| 'Revoked'
|
|
839
|
+
| 'InsufficientCredits'
|
|
840
|
+
| 'EntitlementNotFound'
|
|
841
|
+
| null;
|
|
842
|
+
|
|
843
|
+
isGranted: boolean;
|
|
844
|
+
|
|
845
|
+
type: 'FEATURE';
|
|
846
|
+
|
|
847
|
+
currentUsage?: number;
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
851
|
+
*/
|
|
852
|
+
entitlementUpdatedAt?: string;
|
|
853
|
+
|
|
854
|
+
feature?: UnionObjectVariant0.Feature;
|
|
855
|
+
|
|
856
|
+
hasUnlimitedUsage?: boolean;
|
|
857
|
+
|
|
858
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
|
|
859
|
+
|
|
860
|
+
usageLimit?: number | null;
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* The anchor for calculating the usage period for metered entitlements with a
|
|
864
|
+
* reset period configured
|
|
865
|
+
*/
|
|
866
|
+
usagePeriodAnchor?: string;
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* The end date of the usage period for metered entitlements with a reset period
|
|
870
|
+
* configured
|
|
871
|
+
*/
|
|
872
|
+
usagePeriodEnd?: string;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* The start date of the usage period for metered entitlements with a reset period
|
|
876
|
+
* configured
|
|
877
|
+
*/
|
|
878
|
+
usagePeriodStart?: string;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* The next time the entitlement should be recalculated
|
|
882
|
+
*/
|
|
883
|
+
validUntil?: string;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export namespace UnionObjectVariant0 {
|
|
887
|
+
export interface Feature {
|
|
888
|
+
/**
|
|
889
|
+
* The human-readable name of the entitlement, shown in UI elements.
|
|
890
|
+
*/
|
|
891
|
+
displayName: string;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* The current status of the feature.
|
|
895
|
+
*/
|
|
896
|
+
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* The type of feature associated with the entitlement.
|
|
900
|
+
*/
|
|
901
|
+
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* The unique reference ID of the entitlement.
|
|
905
|
+
*/
|
|
906
|
+
refId: string;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
export interface UnionObjectVariant1 {
|
|
911
|
+
accessDeniedReason:
|
|
912
|
+
| 'FeatureNotFound'
|
|
913
|
+
| 'CustomerNotFound'
|
|
914
|
+
| 'CustomerIsArchived'
|
|
915
|
+
| 'CustomerResourceNotFound'
|
|
916
|
+
| 'NoActiveSubscription'
|
|
917
|
+
| 'NoFeatureEntitlementInSubscription'
|
|
918
|
+
| 'RequestedUsageExceedingLimit'
|
|
919
|
+
| 'RequestedValuesMismatch'
|
|
920
|
+
| 'BudgetExceeded'
|
|
921
|
+
| 'Unknown'
|
|
922
|
+
| 'FeatureTypeMismatch'
|
|
923
|
+
| 'Revoked'
|
|
924
|
+
| 'InsufficientCredits'
|
|
925
|
+
| 'EntitlementNotFound'
|
|
926
|
+
| null;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* The currency associated with a credit entitlement.
|
|
930
|
+
*/
|
|
931
|
+
currency: UnionObjectVariant1.Currency;
|
|
932
|
+
|
|
933
|
+
currentUsage: number;
|
|
934
|
+
|
|
935
|
+
isGranted: boolean;
|
|
936
|
+
|
|
937
|
+
type: 'CREDIT';
|
|
938
|
+
|
|
939
|
+
usageLimit: number;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Timestamp of the last update to the credit usage.
|
|
943
|
+
*/
|
|
944
|
+
usageUpdatedAt: string;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Timestamp of the last update to the entitlement grant or configuration.
|
|
948
|
+
*/
|
|
949
|
+
entitlementUpdatedAt?: string;
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* The end date of the current billing period for recurring credit grants.
|
|
953
|
+
*/
|
|
954
|
+
usagePeriodEnd?: string;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* The next time the entitlement should be recalculated
|
|
958
|
+
*/
|
|
959
|
+
validUntil?: string;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export namespace UnionObjectVariant1 {
|
|
963
|
+
/**
|
|
964
|
+
* The currency associated with a credit entitlement.
|
|
965
|
+
*/
|
|
966
|
+
export interface Currency {
|
|
967
|
+
/**
|
|
968
|
+
* The unique identifier of the custom currency.
|
|
969
|
+
*/
|
|
970
|
+
currencyId: string;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Created subscription (when status is SUCCESS)
|
|
976
|
+
*/
|
|
977
|
+
export interface Subscription {
|
|
978
|
+
/**
|
|
979
|
+
* Subscription ID
|
|
980
|
+
*/
|
|
981
|
+
id: string;
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Billing ID
|
|
985
|
+
*/
|
|
986
|
+
billingId: string | null;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Created at
|
|
990
|
+
*/
|
|
991
|
+
createdAt: string;
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Customer ID
|
|
995
|
+
*/
|
|
996
|
+
customerId: string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Payment collection
|
|
1000
|
+
*/
|
|
1001
|
+
paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED';
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Plan ID
|
|
1005
|
+
*/
|
|
1006
|
+
planId: string;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Pricing type
|
|
1010
|
+
*/
|
|
1011
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Subscription start date
|
|
1015
|
+
*/
|
|
1016
|
+
startDate: string;
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Subscription status
|
|
1020
|
+
*/
|
|
1021
|
+
status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'IN_TRIAL' | 'CANCELED' | 'NOT_STARTED';
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Subscription cancellation date
|
|
1025
|
+
*/
|
|
1026
|
+
cancellationDate?: string | null;
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Subscription cancel reason
|
|
1030
|
+
*/
|
|
1031
|
+
cancelReason?:
|
|
1032
|
+
| 'UPGRADE_OR_DOWNGRADE'
|
|
1033
|
+
| 'CANCELLED_BY_BILLING'
|
|
1034
|
+
| 'EXPIRED'
|
|
1035
|
+
| 'DETACH_BILLING'
|
|
1036
|
+
| 'TRIAL_ENDED'
|
|
1037
|
+
| 'Immediate'
|
|
1038
|
+
| 'TRIAL_CONVERTED'
|
|
1039
|
+
| 'PENDING_PAYMENT_EXPIRED'
|
|
1040
|
+
| 'ScheduledCancellation'
|
|
1041
|
+
| 'CustomerArchived'
|
|
1042
|
+
| 'AutoCancellationRule'
|
|
1043
|
+
| null;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* End of the current billing period
|
|
1047
|
+
*/
|
|
1048
|
+
currentBillingPeriodEnd?: string | null;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Start of the current billing period
|
|
1052
|
+
*/
|
|
1053
|
+
currentBillingPeriodStart?: string | null;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Subscription effective end date
|
|
1057
|
+
*/
|
|
1058
|
+
effectiveEndDate?: string | null;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Subscription end date
|
|
1062
|
+
*/
|
|
1063
|
+
endDate?: string | null;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Additional metadata for the subscription
|
|
1067
|
+
*/
|
|
1068
|
+
metadata?: { [key: string]: string };
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* Paying customer ID for delegated billing
|
|
1072
|
+
*/
|
|
1073
|
+
payingCustomerId?: string | null;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* The method used to collect payments for a subscription
|
|
1077
|
+
*/
|
|
1078
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE' | null;
|
|
1079
|
+
|
|
1080
|
+
prices?: Array<Subscription.Price>;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Resource ID
|
|
1084
|
+
*/
|
|
1085
|
+
resourceId?: string | null;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* Subscription trial end date
|
|
1089
|
+
*/
|
|
1090
|
+
trialEndDate?: string | null;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
export namespace Subscription {
|
|
1094
|
+
export interface Price {
|
|
1095
|
+
/**
|
|
1096
|
+
* Addon identifier for the price override
|
|
1097
|
+
*/
|
|
1098
|
+
addonId?: string | null;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Whether this is a base charge override
|
|
1102
|
+
*/
|
|
1103
|
+
baseCharge?: boolean;
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Block size for pricing
|
|
1107
|
+
*/
|
|
1108
|
+
blockSize?: number;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Feature identifier for the price override
|
|
1112
|
+
*/
|
|
1113
|
+
featureId?: string | null;
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* Override price amount
|
|
1117
|
+
*/
|
|
1118
|
+
price?: Price.Price;
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Pricing tiers configuration
|
|
1122
|
+
*/
|
|
1123
|
+
tiers?: Array<Price.Tier>;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export namespace Price {
|
|
1127
|
+
/**
|
|
1128
|
+
* Override price amount
|
|
1129
|
+
*/
|
|
1130
|
+
export interface Price {
|
|
1131
|
+
/**
|
|
1132
|
+
* The price amount
|
|
1133
|
+
*/
|
|
1134
|
+
amount?: number;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* The billing country code of the price
|
|
1138
|
+
*/
|
|
1139
|
+
billingCountryCode?: string | null;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* The price currency
|
|
1143
|
+
*/
|
|
1144
|
+
currency?:
|
|
1145
|
+
| 'usd'
|
|
1146
|
+
| 'aed'
|
|
1147
|
+
| 'all'
|
|
1148
|
+
| 'amd'
|
|
1149
|
+
| 'ang'
|
|
1150
|
+
| 'aud'
|
|
1151
|
+
| 'awg'
|
|
1152
|
+
| 'azn'
|
|
1153
|
+
| 'bam'
|
|
1154
|
+
| 'bbd'
|
|
1155
|
+
| 'bdt'
|
|
1156
|
+
| 'bgn'
|
|
1157
|
+
| 'bif'
|
|
1158
|
+
| 'bmd'
|
|
1159
|
+
| 'bnd'
|
|
1160
|
+
| 'bsd'
|
|
1161
|
+
| 'bwp'
|
|
1162
|
+
| 'byn'
|
|
1163
|
+
| 'bzd'
|
|
1164
|
+
| 'brl'
|
|
1165
|
+
| 'cad'
|
|
1166
|
+
| 'cdf'
|
|
1167
|
+
| 'chf'
|
|
1168
|
+
| 'cny'
|
|
1169
|
+
| 'czk'
|
|
1170
|
+
| 'dkk'
|
|
1171
|
+
| 'dop'
|
|
1172
|
+
| 'dzd'
|
|
1173
|
+
| 'egp'
|
|
1174
|
+
| 'etb'
|
|
1175
|
+
| 'eur'
|
|
1176
|
+
| 'fjd'
|
|
1177
|
+
| 'gbp'
|
|
1178
|
+
| 'gel'
|
|
1179
|
+
| 'gip'
|
|
1180
|
+
| 'gmd'
|
|
1181
|
+
| 'gyd'
|
|
1182
|
+
| 'hkd'
|
|
1183
|
+
| 'hrk'
|
|
1184
|
+
| 'htg'
|
|
1185
|
+
| 'idr'
|
|
1186
|
+
| 'ils'
|
|
1187
|
+
| 'inr'
|
|
1188
|
+
| 'isk'
|
|
1189
|
+
| 'jmd'
|
|
1190
|
+
| 'jpy'
|
|
1191
|
+
| 'kes'
|
|
1192
|
+
| 'kgs'
|
|
1193
|
+
| 'khr'
|
|
1194
|
+
| 'kmf'
|
|
1195
|
+
| 'krw'
|
|
1196
|
+
| 'kyd'
|
|
1197
|
+
| 'kzt'
|
|
1198
|
+
| 'lbp'
|
|
1199
|
+
| 'lkr'
|
|
1200
|
+
| 'lrd'
|
|
1201
|
+
| 'lsl'
|
|
1202
|
+
| 'mad'
|
|
1203
|
+
| 'mdl'
|
|
1204
|
+
| 'mga'
|
|
1205
|
+
| 'mkd'
|
|
1206
|
+
| 'mmk'
|
|
1207
|
+
| 'mnt'
|
|
1208
|
+
| 'mop'
|
|
1209
|
+
| 'mro'
|
|
1210
|
+
| 'mvr'
|
|
1211
|
+
| 'mwk'
|
|
1212
|
+
| 'mxn'
|
|
1213
|
+
| 'myr'
|
|
1214
|
+
| 'mzn'
|
|
1215
|
+
| 'nad'
|
|
1216
|
+
| 'ngn'
|
|
1217
|
+
| 'nok'
|
|
1218
|
+
| 'npr'
|
|
1219
|
+
| 'nzd'
|
|
1220
|
+
| 'pgk'
|
|
1221
|
+
| 'php'
|
|
1222
|
+
| 'pkr'
|
|
1223
|
+
| 'pln'
|
|
1224
|
+
| 'qar'
|
|
1225
|
+
| 'ron'
|
|
1226
|
+
| 'rsd'
|
|
1227
|
+
| 'rub'
|
|
1228
|
+
| 'rwf'
|
|
1229
|
+
| 'sar'
|
|
1230
|
+
| 'sbd'
|
|
1231
|
+
| 'scr'
|
|
1232
|
+
| 'sek'
|
|
1233
|
+
| 'sgd'
|
|
1234
|
+
| 'sle'
|
|
1235
|
+
| 'sll'
|
|
1236
|
+
| 'sos'
|
|
1237
|
+
| 'szl'
|
|
1238
|
+
| 'thb'
|
|
1239
|
+
| 'tjs'
|
|
1240
|
+
| 'top'
|
|
1241
|
+
| 'try'
|
|
1242
|
+
| 'ttd'
|
|
1243
|
+
| 'tzs'
|
|
1244
|
+
| 'uah'
|
|
1245
|
+
| 'uzs'
|
|
1246
|
+
| 'vnd'
|
|
1247
|
+
| 'vuv'
|
|
1248
|
+
| 'wst'
|
|
1249
|
+
| 'xaf'
|
|
1250
|
+
| 'xcd'
|
|
1251
|
+
| 'yer'
|
|
1252
|
+
| 'zar'
|
|
1253
|
+
| 'zmw'
|
|
1254
|
+
| 'clp'
|
|
1255
|
+
| 'djf'
|
|
1256
|
+
| 'gnf'
|
|
1257
|
+
| 'ugx'
|
|
1258
|
+
| 'pyg'
|
|
1259
|
+
| 'xof'
|
|
1260
|
+
| 'xpf';
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
export interface Tier {
|
|
1264
|
+
/**
|
|
1265
|
+
* The flat fee price of the price tier
|
|
1266
|
+
*/
|
|
1267
|
+
flatPrice?: Tier.FlatPrice;
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* The unit price of the price tier
|
|
1271
|
+
*/
|
|
1272
|
+
unitPrice?: Tier.UnitPrice;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* The up to quantity of the price tier
|
|
1276
|
+
*/
|
|
1277
|
+
upTo?: number;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
export namespace Tier {
|
|
1281
|
+
/**
|
|
1282
|
+
* The flat fee price of the price tier
|
|
1283
|
+
*/
|
|
1284
|
+
export interface FlatPrice {
|
|
1285
|
+
/**
|
|
1286
|
+
* The price amount
|
|
1287
|
+
*/
|
|
1288
|
+
amount?: number;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* The billing country code of the price
|
|
1292
|
+
*/
|
|
1293
|
+
billingCountryCode?: string | null;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* The price currency
|
|
1297
|
+
*/
|
|
1298
|
+
currency?:
|
|
1299
|
+
| 'usd'
|
|
1300
|
+
| 'aed'
|
|
1301
|
+
| 'all'
|
|
1302
|
+
| 'amd'
|
|
1303
|
+
| 'ang'
|
|
1304
|
+
| 'aud'
|
|
1305
|
+
| 'awg'
|
|
1306
|
+
| 'azn'
|
|
1307
|
+
| 'bam'
|
|
1308
|
+
| 'bbd'
|
|
1309
|
+
| 'bdt'
|
|
1310
|
+
| 'bgn'
|
|
1311
|
+
| 'bif'
|
|
1312
|
+
| 'bmd'
|
|
1313
|
+
| 'bnd'
|
|
1314
|
+
| 'bsd'
|
|
1315
|
+
| 'bwp'
|
|
1316
|
+
| 'byn'
|
|
1317
|
+
| 'bzd'
|
|
1318
|
+
| 'brl'
|
|
1319
|
+
| 'cad'
|
|
1320
|
+
| 'cdf'
|
|
1321
|
+
| 'chf'
|
|
1322
|
+
| 'cny'
|
|
1323
|
+
| 'czk'
|
|
1324
|
+
| 'dkk'
|
|
1325
|
+
| 'dop'
|
|
1326
|
+
| 'dzd'
|
|
1327
|
+
| 'egp'
|
|
1328
|
+
| 'etb'
|
|
1329
|
+
| 'eur'
|
|
1330
|
+
| 'fjd'
|
|
1331
|
+
| 'gbp'
|
|
1332
|
+
| 'gel'
|
|
1333
|
+
| 'gip'
|
|
1334
|
+
| 'gmd'
|
|
1335
|
+
| 'gyd'
|
|
1336
|
+
| 'hkd'
|
|
1337
|
+
| 'hrk'
|
|
1338
|
+
| 'htg'
|
|
1339
|
+
| 'idr'
|
|
1340
|
+
| 'ils'
|
|
1341
|
+
| 'inr'
|
|
1342
|
+
| 'isk'
|
|
1343
|
+
| 'jmd'
|
|
1344
|
+
| 'jpy'
|
|
1345
|
+
| 'kes'
|
|
1346
|
+
| 'kgs'
|
|
1347
|
+
| 'khr'
|
|
1348
|
+
| 'kmf'
|
|
1349
|
+
| 'krw'
|
|
1350
|
+
| 'kyd'
|
|
1351
|
+
| 'kzt'
|
|
1352
|
+
| 'lbp'
|
|
1353
|
+
| 'lkr'
|
|
1354
|
+
| 'lrd'
|
|
1355
|
+
| 'lsl'
|
|
1356
|
+
| 'mad'
|
|
1357
|
+
| 'mdl'
|
|
1358
|
+
| 'mga'
|
|
1359
|
+
| 'mkd'
|
|
1360
|
+
| 'mmk'
|
|
1361
|
+
| 'mnt'
|
|
1362
|
+
| 'mop'
|
|
1363
|
+
| 'mro'
|
|
1364
|
+
| 'mvr'
|
|
1365
|
+
| 'mwk'
|
|
1366
|
+
| 'mxn'
|
|
1367
|
+
| 'myr'
|
|
1368
|
+
| 'mzn'
|
|
1369
|
+
| 'nad'
|
|
1370
|
+
| 'ngn'
|
|
1371
|
+
| 'nok'
|
|
1372
|
+
| 'npr'
|
|
1373
|
+
| 'nzd'
|
|
1374
|
+
| 'pgk'
|
|
1375
|
+
| 'php'
|
|
1376
|
+
| 'pkr'
|
|
1377
|
+
| 'pln'
|
|
1378
|
+
| 'qar'
|
|
1379
|
+
| 'ron'
|
|
1380
|
+
| 'rsd'
|
|
1381
|
+
| 'rub'
|
|
1382
|
+
| 'rwf'
|
|
1383
|
+
| 'sar'
|
|
1384
|
+
| 'sbd'
|
|
1385
|
+
| 'scr'
|
|
1386
|
+
| 'sek'
|
|
1387
|
+
| 'sgd'
|
|
1388
|
+
| 'sle'
|
|
1389
|
+
| 'sll'
|
|
1390
|
+
| 'sos'
|
|
1391
|
+
| 'szl'
|
|
1392
|
+
| 'thb'
|
|
1393
|
+
| 'tjs'
|
|
1394
|
+
| 'top'
|
|
1395
|
+
| 'try'
|
|
1396
|
+
| 'ttd'
|
|
1397
|
+
| 'tzs'
|
|
1398
|
+
| 'uah'
|
|
1399
|
+
| 'uzs'
|
|
1400
|
+
| 'vnd'
|
|
1401
|
+
| 'vuv'
|
|
1402
|
+
| 'wst'
|
|
1403
|
+
| 'xaf'
|
|
1404
|
+
| 'xcd'
|
|
1405
|
+
| 'yer'
|
|
1406
|
+
| 'zar'
|
|
1407
|
+
| 'zmw'
|
|
1408
|
+
| 'clp'
|
|
1409
|
+
| 'djf'
|
|
1410
|
+
| 'gnf'
|
|
1411
|
+
| 'ugx'
|
|
1412
|
+
| 'pyg'
|
|
1413
|
+
| 'xof'
|
|
1414
|
+
| 'xpf';
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* The unit price of the price tier
|
|
1419
|
+
*/
|
|
1420
|
+
export interface UnitPrice {
|
|
1421
|
+
/**
|
|
1422
|
+
* The price amount
|
|
1423
|
+
*/
|
|
1424
|
+
amount?: number;
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* The billing country code of the price
|
|
1428
|
+
*/
|
|
1429
|
+
billingCountryCode?: string | null;
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* The price currency
|
|
1433
|
+
*/
|
|
1434
|
+
currency?:
|
|
1435
|
+
| 'usd'
|
|
1436
|
+
| 'aed'
|
|
1437
|
+
| 'all'
|
|
1438
|
+
| 'amd'
|
|
1439
|
+
| 'ang'
|
|
1440
|
+
| 'aud'
|
|
1441
|
+
| 'awg'
|
|
1442
|
+
| 'azn'
|
|
1443
|
+
| 'bam'
|
|
1444
|
+
| 'bbd'
|
|
1445
|
+
| 'bdt'
|
|
1446
|
+
| 'bgn'
|
|
1447
|
+
| 'bif'
|
|
1448
|
+
| 'bmd'
|
|
1449
|
+
| 'bnd'
|
|
1450
|
+
| 'bsd'
|
|
1451
|
+
| 'bwp'
|
|
1452
|
+
| 'byn'
|
|
1453
|
+
| 'bzd'
|
|
1454
|
+
| 'brl'
|
|
1455
|
+
| 'cad'
|
|
1456
|
+
| 'cdf'
|
|
1457
|
+
| 'chf'
|
|
1458
|
+
| 'cny'
|
|
1459
|
+
| 'czk'
|
|
1460
|
+
| 'dkk'
|
|
1461
|
+
| 'dop'
|
|
1462
|
+
| 'dzd'
|
|
1463
|
+
| 'egp'
|
|
1464
|
+
| 'etb'
|
|
1465
|
+
| 'eur'
|
|
1466
|
+
| 'fjd'
|
|
1467
|
+
| 'gbp'
|
|
1468
|
+
| 'gel'
|
|
1469
|
+
| 'gip'
|
|
1470
|
+
| 'gmd'
|
|
1471
|
+
| 'gyd'
|
|
1472
|
+
| 'hkd'
|
|
1473
|
+
| 'hrk'
|
|
1474
|
+
| 'htg'
|
|
1475
|
+
| 'idr'
|
|
1476
|
+
| 'ils'
|
|
1477
|
+
| 'inr'
|
|
1478
|
+
| 'isk'
|
|
1479
|
+
| 'jmd'
|
|
1480
|
+
| 'jpy'
|
|
1481
|
+
| 'kes'
|
|
1482
|
+
| 'kgs'
|
|
1483
|
+
| 'khr'
|
|
1484
|
+
| 'kmf'
|
|
1485
|
+
| 'krw'
|
|
1486
|
+
| 'kyd'
|
|
1487
|
+
| 'kzt'
|
|
1488
|
+
| 'lbp'
|
|
1489
|
+
| 'lkr'
|
|
1490
|
+
| 'lrd'
|
|
1491
|
+
| 'lsl'
|
|
1492
|
+
| 'mad'
|
|
1493
|
+
| 'mdl'
|
|
1494
|
+
| 'mga'
|
|
1495
|
+
| 'mkd'
|
|
1496
|
+
| 'mmk'
|
|
1497
|
+
| 'mnt'
|
|
1498
|
+
| 'mop'
|
|
1499
|
+
| 'mro'
|
|
1500
|
+
| 'mvr'
|
|
1501
|
+
| 'mwk'
|
|
1502
|
+
| 'mxn'
|
|
1503
|
+
| 'myr'
|
|
1504
|
+
| 'mzn'
|
|
1505
|
+
| 'nad'
|
|
1506
|
+
| 'ngn'
|
|
1507
|
+
| 'nok'
|
|
1508
|
+
| 'npr'
|
|
1509
|
+
| 'nzd'
|
|
1510
|
+
| 'pgk'
|
|
1511
|
+
| 'php'
|
|
1512
|
+
| 'pkr'
|
|
1513
|
+
| 'pln'
|
|
1514
|
+
| 'qar'
|
|
1515
|
+
| 'ron'
|
|
1516
|
+
| 'rsd'
|
|
1517
|
+
| 'rub'
|
|
1518
|
+
| 'rwf'
|
|
1519
|
+
| 'sar'
|
|
1520
|
+
| 'sbd'
|
|
1521
|
+
| 'scr'
|
|
1522
|
+
| 'sek'
|
|
1523
|
+
| 'sgd'
|
|
1524
|
+
| 'sle'
|
|
1525
|
+
| 'sll'
|
|
1526
|
+
| 'sos'
|
|
1527
|
+
| 'szl'
|
|
1528
|
+
| 'thb'
|
|
1529
|
+
| 'tjs'
|
|
1530
|
+
| 'top'
|
|
1531
|
+
| 'try'
|
|
1532
|
+
| 'ttd'
|
|
1533
|
+
| 'tzs'
|
|
1534
|
+
| 'uah'
|
|
1535
|
+
| 'uzs'
|
|
1536
|
+
| 'vnd'
|
|
1537
|
+
| 'vuv'
|
|
1538
|
+
| 'wst'
|
|
1539
|
+
| 'xaf'
|
|
1540
|
+
| 'xcd'
|
|
1541
|
+
| 'yer'
|
|
1542
|
+
| 'zar'
|
|
1543
|
+
| 'zmw'
|
|
1544
|
+
| 'clp'
|
|
1545
|
+
| 'djf'
|
|
1546
|
+
| 'gnf'
|
|
1547
|
+
| 'ugx'
|
|
1548
|
+
| 'pyg'
|
|
1549
|
+
| 'xof'
|
|
1550
|
+
| 'xpf';
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
export interface SubscriptionUpdateParams {
|
|
1559
|
+
addons?: Array<SubscriptionUpdateParams.Addon>;
|
|
1560
|
+
|
|
1561
|
+
appliedCoupon?: SubscriptionUpdateParams.AppliedCoupon;
|
|
1562
|
+
|
|
1563
|
+
awaitPaymentConfirmation?: boolean;
|
|
1564
|
+
|
|
1565
|
+
billingInformation?: SubscriptionUpdateParams.BillingInformation;
|
|
1566
|
+
|
|
1567
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
1568
|
+
|
|
1569
|
+
budget?: SubscriptionUpdateParams.Budget | null;
|
|
1570
|
+
|
|
1571
|
+
charges?: Array<SubscriptionUpdateParams.Charge>;
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* Additional metadata for the subscription
|
|
1575
|
+
*/
|
|
1576
|
+
metadata?: { [key: string]: string };
|
|
1577
|
+
|
|
1578
|
+
minimumSpend?: SubscriptionUpdateParams.MinimumSpend | null;
|
|
1579
|
+
|
|
1580
|
+
priceOverrides?: Array<SubscriptionUpdateParams.PriceOverride>;
|
|
1581
|
+
|
|
1582
|
+
promotionCode?: string;
|
|
1583
|
+
|
|
1584
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
1585
|
+
|
|
1586
|
+
subscriptionEntitlements?: Array<SubscriptionUpdateParams.SubscriptionEntitlement>;
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Subscription trial end date
|
|
1590
|
+
*/
|
|
1591
|
+
trialEndDate?: string;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
export namespace SubscriptionUpdateParams {
|
|
1595
|
+
export interface Addon {
|
|
1596
|
+
/**
|
|
1597
|
+
* Addon ID
|
|
1598
|
+
*/
|
|
1599
|
+
addonId: string;
|
|
1600
|
+
|
|
1601
|
+
quantity: number;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
export interface AppliedCoupon {
|
|
1605
|
+
billingCouponId?: string;
|
|
1606
|
+
|
|
1607
|
+
configuration?: AppliedCoupon.Configuration;
|
|
1608
|
+
|
|
1609
|
+
couponId?: string;
|
|
1610
|
+
|
|
1611
|
+
discount?: AppliedCoupon.Discount;
|
|
1612
|
+
|
|
1613
|
+
promotionCode?: string | null;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
export namespace AppliedCoupon {
|
|
1617
|
+
export interface Configuration {
|
|
1618
|
+
/**
|
|
1619
|
+
* Coupon start date
|
|
1620
|
+
*/
|
|
1621
|
+
startDate?: string;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
export interface Discount {
|
|
1625
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
1626
|
+
|
|
1627
|
+
description?: string;
|
|
1628
|
+
|
|
1629
|
+
durationInMonths?: number;
|
|
1630
|
+
|
|
1631
|
+
name?: string;
|
|
1632
|
+
|
|
1633
|
+
percentOff?: number;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
export namespace Discount {
|
|
1637
|
+
export interface AmountsOff {
|
|
1638
|
+
amount: number;
|
|
1639
|
+
|
|
1640
|
+
currency?:
|
|
1641
|
+
| 'usd'
|
|
1642
|
+
| 'aed'
|
|
1643
|
+
| 'all'
|
|
1644
|
+
| 'amd'
|
|
1645
|
+
| 'ang'
|
|
1646
|
+
| 'aud'
|
|
1647
|
+
| 'awg'
|
|
1648
|
+
| 'azn'
|
|
1649
|
+
| 'bam'
|
|
1650
|
+
| 'bbd'
|
|
1651
|
+
| 'bdt'
|
|
1652
|
+
| 'bgn'
|
|
1653
|
+
| 'bif'
|
|
1654
|
+
| 'bmd'
|
|
1655
|
+
| 'bnd'
|
|
1656
|
+
| 'bsd'
|
|
1657
|
+
| 'bwp'
|
|
1658
|
+
| 'byn'
|
|
1659
|
+
| 'bzd'
|
|
1660
|
+
| 'brl'
|
|
1661
|
+
| 'cad'
|
|
1662
|
+
| 'cdf'
|
|
1663
|
+
| 'chf'
|
|
1664
|
+
| 'cny'
|
|
1665
|
+
| 'czk'
|
|
1666
|
+
| 'dkk'
|
|
1667
|
+
| 'dop'
|
|
1668
|
+
| 'dzd'
|
|
1669
|
+
| 'egp'
|
|
1670
|
+
| 'etb'
|
|
1671
|
+
| 'eur'
|
|
1672
|
+
| 'fjd'
|
|
1673
|
+
| 'gbp'
|
|
1674
|
+
| 'gel'
|
|
1675
|
+
| 'gip'
|
|
1676
|
+
| 'gmd'
|
|
1677
|
+
| 'gyd'
|
|
1678
|
+
| 'hkd'
|
|
1679
|
+
| 'hrk'
|
|
1680
|
+
| 'htg'
|
|
1681
|
+
| 'idr'
|
|
1682
|
+
| 'ils'
|
|
1683
|
+
| 'inr'
|
|
1684
|
+
| 'isk'
|
|
1685
|
+
| 'jmd'
|
|
1686
|
+
| 'jpy'
|
|
1687
|
+
| 'kes'
|
|
1688
|
+
| 'kgs'
|
|
1689
|
+
| 'khr'
|
|
1690
|
+
| 'kmf'
|
|
1691
|
+
| 'krw'
|
|
1692
|
+
| 'kyd'
|
|
1693
|
+
| 'kzt'
|
|
1694
|
+
| 'lbp'
|
|
1695
|
+
| 'lkr'
|
|
1696
|
+
| 'lrd'
|
|
1697
|
+
| 'lsl'
|
|
1698
|
+
| 'mad'
|
|
1699
|
+
| 'mdl'
|
|
1700
|
+
| 'mga'
|
|
1701
|
+
| 'mkd'
|
|
1702
|
+
| 'mmk'
|
|
1703
|
+
| 'mnt'
|
|
1704
|
+
| 'mop'
|
|
1705
|
+
| 'mro'
|
|
1706
|
+
| 'mvr'
|
|
1707
|
+
| 'mwk'
|
|
1708
|
+
| 'mxn'
|
|
1709
|
+
| 'myr'
|
|
1710
|
+
| 'mzn'
|
|
1711
|
+
| 'nad'
|
|
1712
|
+
| 'ngn'
|
|
1713
|
+
| 'nok'
|
|
1714
|
+
| 'npr'
|
|
1715
|
+
| 'nzd'
|
|
1716
|
+
| 'pgk'
|
|
1717
|
+
| 'php'
|
|
1718
|
+
| 'pkr'
|
|
1719
|
+
| 'pln'
|
|
1720
|
+
| 'qar'
|
|
1721
|
+
| 'ron'
|
|
1722
|
+
| 'rsd'
|
|
1723
|
+
| 'rub'
|
|
1724
|
+
| 'rwf'
|
|
1725
|
+
| 'sar'
|
|
1726
|
+
| 'sbd'
|
|
1727
|
+
| 'scr'
|
|
1728
|
+
| 'sek'
|
|
1729
|
+
| 'sgd'
|
|
1730
|
+
| 'sle'
|
|
1731
|
+
| 'sll'
|
|
1732
|
+
| 'sos'
|
|
1733
|
+
| 'szl'
|
|
1734
|
+
| 'thb'
|
|
1735
|
+
| 'tjs'
|
|
1736
|
+
| 'top'
|
|
1737
|
+
| 'try'
|
|
1738
|
+
| 'ttd'
|
|
1739
|
+
| 'tzs'
|
|
1740
|
+
| 'uah'
|
|
1741
|
+
| 'uzs'
|
|
1742
|
+
| 'vnd'
|
|
1743
|
+
| 'vuv'
|
|
1744
|
+
| 'wst'
|
|
1745
|
+
| 'xaf'
|
|
1746
|
+
| 'xcd'
|
|
1747
|
+
| 'yer'
|
|
1748
|
+
| 'zar'
|
|
1749
|
+
| 'zmw'
|
|
1750
|
+
| 'clp'
|
|
1751
|
+
| 'djf'
|
|
1752
|
+
| 'gnf'
|
|
1753
|
+
| 'ugx'
|
|
1754
|
+
| 'pyg'
|
|
1755
|
+
| 'xof'
|
|
1756
|
+
| 'xpf';
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
export interface BillingInformation {
|
|
1762
|
+
/**
|
|
1763
|
+
* Physical address
|
|
1764
|
+
*/
|
|
1765
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
1766
|
+
|
|
1767
|
+
chargeOnBehalfOfAccount?: string;
|
|
1768
|
+
|
|
1769
|
+
couponId?: string;
|
|
1770
|
+
|
|
1771
|
+
integrationId?: string;
|
|
1772
|
+
|
|
1773
|
+
invoiceDaysUntilDue?: number;
|
|
1774
|
+
|
|
1775
|
+
isBackdated?: boolean;
|
|
1776
|
+
|
|
1777
|
+
isInvoicePaid?: boolean;
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* Additional metadata for the subscription
|
|
1781
|
+
*/
|
|
1782
|
+
metadata?: { [key: string]: unknown };
|
|
1783
|
+
|
|
1784
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1785
|
+
|
|
1786
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
1787
|
+
|
|
1788
|
+
taxPercentage?: number;
|
|
1789
|
+
|
|
1790
|
+
taxRateIds?: Array<string>;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export namespace BillingInformation {
|
|
1794
|
+
/**
|
|
1795
|
+
* Physical address
|
|
1796
|
+
*/
|
|
1797
|
+
export interface BillingAddress {
|
|
1798
|
+
/**
|
|
1799
|
+
* City name
|
|
1800
|
+
*/
|
|
1801
|
+
city?: string;
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Country code or name
|
|
1805
|
+
*/
|
|
1806
|
+
country?: string;
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* Street address line 1
|
|
1810
|
+
*/
|
|
1811
|
+
line1?: string;
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Street address line 2
|
|
1815
|
+
*/
|
|
1816
|
+
line2?: string;
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* Postal or ZIP code
|
|
1820
|
+
*/
|
|
1821
|
+
postalCode?: string;
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* State or province
|
|
1825
|
+
*/
|
|
1826
|
+
state?: string;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
export interface TaxID {
|
|
1830
|
+
type: string;
|
|
1831
|
+
|
|
1832
|
+
value: string;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
export interface Budget {
|
|
1837
|
+
hasSoftLimit: boolean;
|
|
1838
|
+
|
|
1839
|
+
limit: number;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
export interface Charge {
|
|
1843
|
+
/**
|
|
1844
|
+
* Charge ID
|
|
1845
|
+
*/
|
|
1846
|
+
id: string;
|
|
1847
|
+
|
|
1848
|
+
quantity: number;
|
|
1849
|
+
|
|
1850
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
export interface MinimumSpend {
|
|
1854
|
+
minimum?: MinimumSpend.Minimum | null;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
export namespace MinimumSpend {
|
|
1858
|
+
export interface Minimum {
|
|
1859
|
+
amount: number;
|
|
1860
|
+
|
|
1861
|
+
currency?:
|
|
1862
|
+
| 'usd'
|
|
1863
|
+
| 'aed'
|
|
1864
|
+
| 'all'
|
|
1865
|
+
| 'amd'
|
|
1866
|
+
| 'ang'
|
|
1867
|
+
| 'aud'
|
|
1868
|
+
| 'awg'
|
|
1869
|
+
| 'azn'
|
|
1870
|
+
| 'bam'
|
|
1871
|
+
| 'bbd'
|
|
1872
|
+
| 'bdt'
|
|
1873
|
+
| 'bgn'
|
|
1874
|
+
| 'bif'
|
|
1875
|
+
| 'bmd'
|
|
1876
|
+
| 'bnd'
|
|
1877
|
+
| 'bsd'
|
|
1878
|
+
| 'bwp'
|
|
1879
|
+
| 'byn'
|
|
1880
|
+
| 'bzd'
|
|
1881
|
+
| 'brl'
|
|
1882
|
+
| 'cad'
|
|
1883
|
+
| 'cdf'
|
|
1884
|
+
| 'chf'
|
|
1885
|
+
| 'cny'
|
|
1886
|
+
| 'czk'
|
|
1887
|
+
| 'dkk'
|
|
1888
|
+
| 'dop'
|
|
1889
|
+
| 'dzd'
|
|
1890
|
+
| 'egp'
|
|
1891
|
+
| 'etb'
|
|
1892
|
+
| 'eur'
|
|
1893
|
+
| 'fjd'
|
|
1894
|
+
| 'gbp'
|
|
1895
|
+
| 'gel'
|
|
1896
|
+
| 'gip'
|
|
1897
|
+
| 'gmd'
|
|
1898
|
+
| 'gyd'
|
|
1899
|
+
| 'hkd'
|
|
1900
|
+
| 'hrk'
|
|
1901
|
+
| 'htg'
|
|
1902
|
+
| 'idr'
|
|
1903
|
+
| 'ils'
|
|
1904
|
+
| 'inr'
|
|
1905
|
+
| 'isk'
|
|
1906
|
+
| 'jmd'
|
|
1907
|
+
| 'jpy'
|
|
1908
|
+
| 'kes'
|
|
1909
|
+
| 'kgs'
|
|
1910
|
+
| 'khr'
|
|
1911
|
+
| 'kmf'
|
|
1912
|
+
| 'krw'
|
|
1913
|
+
| 'kyd'
|
|
1914
|
+
| 'kzt'
|
|
1915
|
+
| 'lbp'
|
|
1916
|
+
| 'lkr'
|
|
1917
|
+
| 'lrd'
|
|
1918
|
+
| 'lsl'
|
|
1919
|
+
| 'mad'
|
|
1920
|
+
| 'mdl'
|
|
1921
|
+
| 'mga'
|
|
1922
|
+
| 'mkd'
|
|
1923
|
+
| 'mmk'
|
|
1924
|
+
| 'mnt'
|
|
1925
|
+
| 'mop'
|
|
1926
|
+
| 'mro'
|
|
1927
|
+
| 'mvr'
|
|
1928
|
+
| 'mwk'
|
|
1929
|
+
| 'mxn'
|
|
1930
|
+
| 'myr'
|
|
1931
|
+
| 'mzn'
|
|
1932
|
+
| 'nad'
|
|
1933
|
+
| 'ngn'
|
|
1934
|
+
| 'nok'
|
|
1935
|
+
| 'npr'
|
|
1936
|
+
| 'nzd'
|
|
1937
|
+
| 'pgk'
|
|
1938
|
+
| 'php'
|
|
1939
|
+
| 'pkr'
|
|
1940
|
+
| 'pln'
|
|
1941
|
+
| 'qar'
|
|
1942
|
+
| 'ron'
|
|
1943
|
+
| 'rsd'
|
|
1944
|
+
| 'rub'
|
|
1945
|
+
| 'rwf'
|
|
1946
|
+
| 'sar'
|
|
1947
|
+
| 'sbd'
|
|
1948
|
+
| 'scr'
|
|
1949
|
+
| 'sek'
|
|
1950
|
+
| 'sgd'
|
|
1951
|
+
| 'sle'
|
|
1952
|
+
| 'sll'
|
|
1953
|
+
| 'sos'
|
|
1954
|
+
| 'szl'
|
|
1955
|
+
| 'thb'
|
|
1956
|
+
| 'tjs'
|
|
1957
|
+
| 'top'
|
|
1958
|
+
| 'try'
|
|
1959
|
+
| 'ttd'
|
|
1960
|
+
| 'tzs'
|
|
1961
|
+
| 'uah'
|
|
1962
|
+
| 'uzs'
|
|
1963
|
+
| 'vnd'
|
|
1964
|
+
| 'vuv'
|
|
1965
|
+
| 'wst'
|
|
1966
|
+
| 'xaf'
|
|
1967
|
+
| 'xcd'
|
|
1968
|
+
| 'yer'
|
|
1969
|
+
| 'zar'
|
|
1970
|
+
| 'zmw'
|
|
1971
|
+
| 'clp'
|
|
1972
|
+
| 'djf'
|
|
1973
|
+
| 'gnf'
|
|
1974
|
+
| 'ugx'
|
|
1975
|
+
| 'pyg'
|
|
1976
|
+
| 'xof'
|
|
1977
|
+
| 'xpf';
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
export interface PriceOverride {
|
|
1982
|
+
/**
|
|
1983
|
+
* Addon ID
|
|
1984
|
+
*/
|
|
1985
|
+
addonId?: string;
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* Whether this is a base charge override
|
|
1989
|
+
*/
|
|
1990
|
+
baseCharge?: boolean;
|
|
1991
|
+
|
|
1992
|
+
/**
|
|
1993
|
+
* The corresponding custom currency id of the recurring credits price
|
|
1994
|
+
*/
|
|
1995
|
+
currencyId?: string;
|
|
1996
|
+
|
|
1997
|
+
/**
|
|
1998
|
+
* Feature ID
|
|
1999
|
+
*/
|
|
2000
|
+
featureId?: string;
|
|
2001
|
+
|
|
2002
|
+
price?: PriceOverride.Price;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
export namespace PriceOverride {
|
|
2006
|
+
export interface Price {
|
|
2007
|
+
amount: number;
|
|
2008
|
+
|
|
2009
|
+
currency?:
|
|
2010
|
+
| 'usd'
|
|
2011
|
+
| 'aed'
|
|
2012
|
+
| 'all'
|
|
2013
|
+
| 'amd'
|
|
2014
|
+
| 'ang'
|
|
2015
|
+
| 'aud'
|
|
2016
|
+
| 'awg'
|
|
2017
|
+
| 'azn'
|
|
2018
|
+
| 'bam'
|
|
2019
|
+
| 'bbd'
|
|
2020
|
+
| 'bdt'
|
|
2021
|
+
| 'bgn'
|
|
2022
|
+
| 'bif'
|
|
2023
|
+
| 'bmd'
|
|
2024
|
+
| 'bnd'
|
|
2025
|
+
| 'bsd'
|
|
2026
|
+
| 'bwp'
|
|
2027
|
+
| 'byn'
|
|
2028
|
+
| 'bzd'
|
|
2029
|
+
| 'brl'
|
|
2030
|
+
| 'cad'
|
|
2031
|
+
| 'cdf'
|
|
2032
|
+
| 'chf'
|
|
2033
|
+
| 'cny'
|
|
2034
|
+
| 'czk'
|
|
2035
|
+
| 'dkk'
|
|
2036
|
+
| 'dop'
|
|
2037
|
+
| 'dzd'
|
|
2038
|
+
| 'egp'
|
|
2039
|
+
| 'etb'
|
|
2040
|
+
| 'eur'
|
|
2041
|
+
| 'fjd'
|
|
2042
|
+
| 'gbp'
|
|
2043
|
+
| 'gel'
|
|
2044
|
+
| 'gip'
|
|
2045
|
+
| 'gmd'
|
|
2046
|
+
| 'gyd'
|
|
2047
|
+
| 'hkd'
|
|
2048
|
+
| 'hrk'
|
|
2049
|
+
| 'htg'
|
|
2050
|
+
| 'idr'
|
|
2051
|
+
| 'ils'
|
|
2052
|
+
| 'inr'
|
|
2053
|
+
| 'isk'
|
|
2054
|
+
| 'jmd'
|
|
2055
|
+
| 'jpy'
|
|
2056
|
+
| 'kes'
|
|
2057
|
+
| 'kgs'
|
|
2058
|
+
| 'khr'
|
|
2059
|
+
| 'kmf'
|
|
2060
|
+
| 'krw'
|
|
2061
|
+
| 'kyd'
|
|
2062
|
+
| 'kzt'
|
|
2063
|
+
| 'lbp'
|
|
2064
|
+
| 'lkr'
|
|
2065
|
+
| 'lrd'
|
|
2066
|
+
| 'lsl'
|
|
2067
|
+
| 'mad'
|
|
2068
|
+
| 'mdl'
|
|
2069
|
+
| 'mga'
|
|
2070
|
+
| 'mkd'
|
|
2071
|
+
| 'mmk'
|
|
2072
|
+
| 'mnt'
|
|
2073
|
+
| 'mop'
|
|
2074
|
+
| 'mro'
|
|
2075
|
+
| 'mvr'
|
|
2076
|
+
| 'mwk'
|
|
2077
|
+
| 'mxn'
|
|
2078
|
+
| 'myr'
|
|
2079
|
+
| 'mzn'
|
|
2080
|
+
| 'nad'
|
|
2081
|
+
| 'ngn'
|
|
2082
|
+
| 'nok'
|
|
2083
|
+
| 'npr'
|
|
2084
|
+
| 'nzd'
|
|
2085
|
+
| 'pgk'
|
|
2086
|
+
| 'php'
|
|
2087
|
+
| 'pkr'
|
|
2088
|
+
| 'pln'
|
|
2089
|
+
| 'qar'
|
|
2090
|
+
| 'ron'
|
|
2091
|
+
| 'rsd'
|
|
2092
|
+
| 'rub'
|
|
2093
|
+
| 'rwf'
|
|
2094
|
+
| 'sar'
|
|
2095
|
+
| 'sbd'
|
|
2096
|
+
| 'scr'
|
|
2097
|
+
| 'sek'
|
|
2098
|
+
| 'sgd'
|
|
2099
|
+
| 'sle'
|
|
2100
|
+
| 'sll'
|
|
2101
|
+
| 'sos'
|
|
2102
|
+
| 'szl'
|
|
2103
|
+
| 'thb'
|
|
2104
|
+
| 'tjs'
|
|
2105
|
+
| 'top'
|
|
2106
|
+
| 'try'
|
|
2107
|
+
| 'ttd'
|
|
2108
|
+
| 'tzs'
|
|
2109
|
+
| 'uah'
|
|
2110
|
+
| 'uzs'
|
|
2111
|
+
| 'vnd'
|
|
2112
|
+
| 'vuv'
|
|
2113
|
+
| 'wst'
|
|
2114
|
+
| 'xaf'
|
|
2115
|
+
| 'xcd'
|
|
2116
|
+
| 'yer'
|
|
2117
|
+
| 'zar'
|
|
2118
|
+
| 'zmw'
|
|
2119
|
+
| 'clp'
|
|
2120
|
+
| 'djf'
|
|
2121
|
+
| 'gnf'
|
|
2122
|
+
| 'ugx'
|
|
2123
|
+
| 'pyg'
|
|
2124
|
+
| 'xof'
|
|
2125
|
+
| 'xpf';
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
export interface SubscriptionEntitlement {
|
|
2130
|
+
id?: string;
|
|
2131
|
+
|
|
2132
|
+
featureId?: string;
|
|
2133
|
+
|
|
2134
|
+
hasSoftLimit?: boolean;
|
|
2135
|
+
|
|
2136
|
+
hasUnlimitedUsage?: boolean;
|
|
2137
|
+
|
|
2138
|
+
monthlyResetPeriodConfiguration?: SubscriptionEntitlement.MonthlyResetPeriodConfiguration;
|
|
2139
|
+
|
|
2140
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
2141
|
+
|
|
2142
|
+
usageLimit?: number;
|
|
2143
|
+
|
|
2144
|
+
weeklyResetPeriodConfiguration?: SubscriptionEntitlement.WeeklyResetPeriodConfiguration;
|
|
2145
|
+
|
|
2146
|
+
yearlyResetPeriodConfiguration?: SubscriptionEntitlement.YearlyResetPeriodConfiguration;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
export namespace SubscriptionEntitlement {
|
|
2150
|
+
export interface MonthlyResetPeriodConfiguration {
|
|
2151
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
export interface WeeklyResetPeriodConfiguration {
|
|
2155
|
+
accordingTo:
|
|
2156
|
+
| 'SubscriptionStart'
|
|
2157
|
+
| 'EverySunday'
|
|
2158
|
+
| 'EveryMonday'
|
|
2159
|
+
| 'EveryTuesday'
|
|
2160
|
+
| 'EveryWednesday'
|
|
2161
|
+
| 'EveryThursday'
|
|
2162
|
+
| 'EveryFriday'
|
|
2163
|
+
| 'EverySaturday';
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
export interface YearlyResetPeriodConfiguration {
|
|
2167
|
+
accordingTo: 'SubscriptionStart';
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
export interface SubscriptionListParams extends MyCursorIDPageParams {
|
|
2173
|
+
/**
|
|
2174
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
2175
|
+
*/
|
|
2176
|
+
createdAt?: SubscriptionListParams.CreatedAt;
|
|
2177
|
+
|
|
2178
|
+
/**
|
|
2179
|
+
* Filter by customer ID
|
|
2180
|
+
*/
|
|
2181
|
+
customerId?: string;
|
|
2182
|
+
|
|
2183
|
+
/**
|
|
2184
|
+
* Filter by plan ID
|
|
2185
|
+
*/
|
|
2186
|
+
planId?: string;
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* Filter by pricing type. Supports comma-separated values for multiple types
|
|
2190
|
+
*/
|
|
2191
|
+
pricingType?: string;
|
|
2192
|
+
|
|
2193
|
+
/**
|
|
2194
|
+
* Filter by resource ID
|
|
2195
|
+
*/
|
|
2196
|
+
resourceId?: string;
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* Filter by subscription status. Supports comma-separated values for multiple
|
|
2200
|
+
* statuses
|
|
2201
|
+
*/
|
|
2202
|
+
status?: string;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
export namespace SubscriptionListParams {
|
|
2206
|
+
/**
|
|
2207
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
2208
|
+
*/
|
|
2209
|
+
export interface CreatedAt {
|
|
2210
|
+
/**
|
|
2211
|
+
* Greater than the specified createdAt value
|
|
2212
|
+
*/
|
|
2213
|
+
gt?: string;
|
|
2214
|
+
|
|
2215
|
+
/**
|
|
2216
|
+
* Greater than or equal to the specified createdAt value
|
|
2217
|
+
*/
|
|
2218
|
+
gte?: string;
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Less than the specified createdAt value
|
|
2222
|
+
*/
|
|
2223
|
+
lt?: string;
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Less than or equal to the specified createdAt value
|
|
2227
|
+
*/
|
|
2228
|
+
lte?: string;
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
export interface SubscriptionCancelParams {
|
|
2233
|
+
/**
|
|
2234
|
+
* Action on cancellation (downgrade or revoke)
|
|
2235
|
+
*/
|
|
2236
|
+
cancellationAction?: 'DEFAULT' | 'REVOKE_ENTITLEMENTS';
|
|
2237
|
+
|
|
2238
|
+
/**
|
|
2239
|
+
* When to cancel (immediate, period end, or date)
|
|
2240
|
+
*/
|
|
2241
|
+
cancellationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE' | 'SPECIFIC_DATE';
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* Subscription end date
|
|
2245
|
+
*/
|
|
2246
|
+
endDate?: string;
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* If set, enables or disables prorating of credits on subscription cancellation.
|
|
2250
|
+
*/
|
|
2251
|
+
prorate?: boolean;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
export interface SubscriptionDelegateParams {
|
|
2255
|
+
/**
|
|
2256
|
+
* The unique identifier of the customer who will assume payment responsibility for
|
|
2257
|
+
* this subscription. This customer must already exist in your Stigg account and
|
|
2258
|
+
* have a valid payment method if the subscription requires payment.
|
|
2259
|
+
*/
|
|
2260
|
+
targetCustomerId: string;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
export interface SubscriptionImportParams {
|
|
2264
|
+
/**
|
|
2265
|
+
* List of subscription objects to import
|
|
2266
|
+
*/
|
|
2267
|
+
subscriptions: Array<SubscriptionImportParams.Subscription>;
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* Integration ID to use for importing subscriptions
|
|
2271
|
+
*/
|
|
2272
|
+
integrationId?: string | null;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
export namespace SubscriptionImportParams {
|
|
2276
|
+
export interface Subscription {
|
|
2277
|
+
/**
|
|
2278
|
+
* Subscription ID
|
|
2279
|
+
*/
|
|
2280
|
+
id: string;
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Customer ID
|
|
2284
|
+
*/
|
|
2285
|
+
customerId: string;
|
|
2286
|
+
|
|
2287
|
+
/**
|
|
2288
|
+
* Plan ID
|
|
2289
|
+
*/
|
|
2290
|
+
planId: string;
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* Billing ID
|
|
2294
|
+
*/
|
|
2295
|
+
billingId?: string | null;
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Subscription end date
|
|
2299
|
+
*/
|
|
2300
|
+
endDate?: string | null;
|
|
2301
|
+
|
|
2302
|
+
/**
|
|
2303
|
+
* Additional metadata for the subscription
|
|
2304
|
+
*/
|
|
2305
|
+
metadata?: { [key: string]: string };
|
|
2306
|
+
|
|
2307
|
+
/**
|
|
2308
|
+
* Resource ID
|
|
2309
|
+
*/
|
|
2310
|
+
resourceId?: string | null;
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Subscription start date
|
|
2314
|
+
*/
|
|
2315
|
+
startDate?: string;
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
export interface SubscriptionMigrateParams {
|
|
2320
|
+
/**
|
|
2321
|
+
* When to migrate (immediate or period end)
|
|
2322
|
+
*/
|
|
2323
|
+
subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
export interface SubscriptionPreviewParams {
|
|
2327
|
+
/**
|
|
2328
|
+
* Customer ID
|
|
2329
|
+
*/
|
|
2330
|
+
customerId: string;
|
|
2331
|
+
|
|
2332
|
+
/**
|
|
2333
|
+
* Plan ID
|
|
2334
|
+
*/
|
|
2335
|
+
planId: string;
|
|
2336
|
+
|
|
2337
|
+
/**
|
|
2338
|
+
* Addons to include
|
|
2339
|
+
*/
|
|
2340
|
+
addons?: Array<SubscriptionPreviewParams.Addon>;
|
|
2341
|
+
|
|
2342
|
+
/**
|
|
2343
|
+
* Coupon or discount to apply
|
|
2344
|
+
*/
|
|
2345
|
+
appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
|
|
2346
|
+
|
|
2347
|
+
/**
|
|
2348
|
+
* Billable features with quantities
|
|
2349
|
+
*/
|
|
2350
|
+
billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* ISO 3166-1 country code for localization
|
|
2354
|
+
*/
|
|
2355
|
+
billingCountryCode?: string;
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Billing and tax configuration
|
|
2359
|
+
*/
|
|
2360
|
+
billingInformation?: SubscriptionPreviewParams.BillingInformation;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
2364
|
+
*/
|
|
2365
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
2366
|
+
|
|
2367
|
+
/**
|
|
2368
|
+
* One-time or recurring charges
|
|
2369
|
+
*/
|
|
2370
|
+
charges?: Array<SubscriptionPreviewParams.Charge>;
|
|
2371
|
+
|
|
2372
|
+
/**
|
|
2373
|
+
* Paying customer ID for delegated billing
|
|
2374
|
+
*/
|
|
2375
|
+
payingCustomerId?: string;
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Resource ID for multi-instance subscriptions
|
|
2379
|
+
*/
|
|
2380
|
+
resourceId?: string;
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* When to apply subscription changes
|
|
2384
|
+
*/
|
|
2385
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
2386
|
+
|
|
2387
|
+
/**
|
|
2388
|
+
* Subscription start date
|
|
2389
|
+
*/
|
|
2390
|
+
startDate?: string;
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Trial period override settings
|
|
2394
|
+
*/
|
|
2395
|
+
trialOverrideConfiguration?: SubscriptionPreviewParams.TrialOverrideConfiguration;
|
|
2396
|
+
|
|
2397
|
+
/**
|
|
2398
|
+
* Unit quantity for per-unit pricing
|
|
2399
|
+
*/
|
|
2400
|
+
unitQuantity?: number;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
export namespace SubscriptionPreviewParams {
|
|
2404
|
+
/**
|
|
2405
|
+
* Addon configuration
|
|
2406
|
+
*/
|
|
2407
|
+
export interface Addon {
|
|
2408
|
+
/**
|
|
2409
|
+
* Addon ID
|
|
2410
|
+
*/
|
|
2411
|
+
addonId: string;
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Number of addon instances
|
|
2415
|
+
*/
|
|
2416
|
+
quantity?: number;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* Coupon or discount to apply
|
|
2421
|
+
*/
|
|
2422
|
+
export interface AppliedCoupon {
|
|
2423
|
+
/**
|
|
2424
|
+
* Billing provider coupon ID
|
|
2425
|
+
*/
|
|
2426
|
+
billingCouponId?: string;
|
|
2427
|
+
|
|
2428
|
+
/**
|
|
2429
|
+
* Coupon timing configuration
|
|
2430
|
+
*/
|
|
2431
|
+
configuration?: AppliedCoupon.Configuration;
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* Stigg coupon ID
|
|
2435
|
+
*/
|
|
2436
|
+
couponId?: string;
|
|
2437
|
+
|
|
2438
|
+
/**
|
|
2439
|
+
* Ad-hoc discount configuration
|
|
2440
|
+
*/
|
|
2441
|
+
discount?: AppliedCoupon.Discount;
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* Promotion code to apply
|
|
2445
|
+
*/
|
|
2446
|
+
promotionCode?: string;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
export namespace AppliedCoupon {
|
|
2450
|
+
/**
|
|
2451
|
+
* Coupon timing configuration
|
|
2452
|
+
*/
|
|
2453
|
+
export interface Configuration {
|
|
2454
|
+
/**
|
|
2455
|
+
* Coupon start date
|
|
2456
|
+
*/
|
|
2457
|
+
startDate?: string;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* Ad-hoc discount configuration
|
|
2462
|
+
*/
|
|
2463
|
+
export interface Discount {
|
|
2464
|
+
/**
|
|
2465
|
+
* Fixed amounts off by currency
|
|
2466
|
+
*/
|
|
2467
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* Ad-hoc discount
|
|
2471
|
+
*/
|
|
2472
|
+
description?: string;
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* Duration in months
|
|
2476
|
+
*/
|
|
2477
|
+
durationInMonths?: number;
|
|
2478
|
+
|
|
2479
|
+
/**
|
|
2480
|
+
* Discount name
|
|
2481
|
+
*/
|
|
2482
|
+
name?: string;
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* Percentage discount
|
|
2486
|
+
*/
|
|
2487
|
+
percentOff?: number;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
export namespace Discount {
|
|
2491
|
+
export interface AmountsOff {
|
|
2492
|
+
/**
|
|
2493
|
+
* The price amount
|
|
2494
|
+
*/
|
|
2495
|
+
amount: number;
|
|
2496
|
+
|
|
2497
|
+
/**
|
|
2498
|
+
* The price currency
|
|
2499
|
+
*/
|
|
2500
|
+
currency:
|
|
2501
|
+
| 'usd'
|
|
2502
|
+
| 'aed'
|
|
2503
|
+
| 'all'
|
|
2504
|
+
| 'amd'
|
|
2505
|
+
| 'ang'
|
|
2506
|
+
| 'aud'
|
|
2507
|
+
| 'awg'
|
|
2508
|
+
| 'azn'
|
|
2509
|
+
| 'bam'
|
|
2510
|
+
| 'bbd'
|
|
2511
|
+
| 'bdt'
|
|
2512
|
+
| 'bgn'
|
|
2513
|
+
| 'bif'
|
|
2514
|
+
| 'bmd'
|
|
2515
|
+
| 'bnd'
|
|
2516
|
+
| 'bsd'
|
|
2517
|
+
| 'bwp'
|
|
2518
|
+
| 'byn'
|
|
2519
|
+
| 'bzd'
|
|
2520
|
+
| 'brl'
|
|
2521
|
+
| 'cad'
|
|
2522
|
+
| 'cdf'
|
|
2523
|
+
| 'chf'
|
|
2524
|
+
| 'cny'
|
|
2525
|
+
| 'czk'
|
|
2526
|
+
| 'dkk'
|
|
2527
|
+
| 'dop'
|
|
2528
|
+
| 'dzd'
|
|
2529
|
+
| 'egp'
|
|
2530
|
+
| 'etb'
|
|
2531
|
+
| 'eur'
|
|
2532
|
+
| 'fjd'
|
|
2533
|
+
| 'gbp'
|
|
2534
|
+
| 'gel'
|
|
2535
|
+
| 'gip'
|
|
2536
|
+
| 'gmd'
|
|
2537
|
+
| 'gyd'
|
|
2538
|
+
| 'hkd'
|
|
2539
|
+
| 'hrk'
|
|
2540
|
+
| 'htg'
|
|
2541
|
+
| 'idr'
|
|
2542
|
+
| 'ils'
|
|
2543
|
+
| 'inr'
|
|
2544
|
+
| 'isk'
|
|
2545
|
+
| 'jmd'
|
|
2546
|
+
| 'jpy'
|
|
2547
|
+
| 'kes'
|
|
2548
|
+
| 'kgs'
|
|
2549
|
+
| 'khr'
|
|
2550
|
+
| 'kmf'
|
|
2551
|
+
| 'krw'
|
|
2552
|
+
| 'kyd'
|
|
2553
|
+
| 'kzt'
|
|
2554
|
+
| 'lbp'
|
|
2555
|
+
| 'lkr'
|
|
2556
|
+
| 'lrd'
|
|
2557
|
+
| 'lsl'
|
|
2558
|
+
| 'mad'
|
|
2559
|
+
| 'mdl'
|
|
2560
|
+
| 'mga'
|
|
2561
|
+
| 'mkd'
|
|
2562
|
+
| 'mmk'
|
|
2563
|
+
| 'mnt'
|
|
2564
|
+
| 'mop'
|
|
2565
|
+
| 'mro'
|
|
2566
|
+
| 'mvr'
|
|
2567
|
+
| 'mwk'
|
|
2568
|
+
| 'mxn'
|
|
2569
|
+
| 'myr'
|
|
2570
|
+
| 'mzn'
|
|
2571
|
+
| 'nad'
|
|
2572
|
+
| 'ngn'
|
|
2573
|
+
| 'nok'
|
|
2574
|
+
| 'npr'
|
|
2575
|
+
| 'nzd'
|
|
2576
|
+
| 'pgk'
|
|
2577
|
+
| 'php'
|
|
2578
|
+
| 'pkr'
|
|
2579
|
+
| 'pln'
|
|
2580
|
+
| 'qar'
|
|
2581
|
+
| 'ron'
|
|
2582
|
+
| 'rsd'
|
|
2583
|
+
| 'rub'
|
|
2584
|
+
| 'rwf'
|
|
2585
|
+
| 'sar'
|
|
2586
|
+
| 'sbd'
|
|
2587
|
+
| 'scr'
|
|
2588
|
+
| 'sek'
|
|
2589
|
+
| 'sgd'
|
|
2590
|
+
| 'sle'
|
|
2591
|
+
| 'sll'
|
|
2592
|
+
| 'sos'
|
|
2593
|
+
| 'szl'
|
|
2594
|
+
| 'thb'
|
|
2595
|
+
| 'tjs'
|
|
2596
|
+
| 'top'
|
|
2597
|
+
| 'try'
|
|
2598
|
+
| 'ttd'
|
|
2599
|
+
| 'tzs'
|
|
2600
|
+
| 'uah'
|
|
2601
|
+
| 'uzs'
|
|
2602
|
+
| 'vnd'
|
|
2603
|
+
| 'vuv'
|
|
2604
|
+
| 'wst'
|
|
2605
|
+
| 'xaf'
|
|
2606
|
+
| 'xcd'
|
|
2607
|
+
| 'yer'
|
|
2608
|
+
| 'zar'
|
|
2609
|
+
| 'zmw'
|
|
2610
|
+
| 'clp'
|
|
2611
|
+
| 'djf'
|
|
2612
|
+
| 'gnf'
|
|
2613
|
+
| 'ugx'
|
|
2614
|
+
| 'pyg'
|
|
2615
|
+
| 'xof'
|
|
2616
|
+
| 'xpf';
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
/**
|
|
2622
|
+
* Feature with quantity
|
|
2623
|
+
*/
|
|
2624
|
+
export interface BillableFeature {
|
|
2625
|
+
/**
|
|
2626
|
+
* Feature ID
|
|
2627
|
+
*/
|
|
2628
|
+
featureId: string;
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* Quantity of feature units
|
|
2632
|
+
*/
|
|
2633
|
+
quantity: number;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* Billing and tax configuration
|
|
2638
|
+
*/
|
|
2639
|
+
export interface BillingInformation {
|
|
2640
|
+
/**
|
|
2641
|
+
* Billing address
|
|
2642
|
+
*/
|
|
2643
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Connected account ID for platform billing
|
|
2647
|
+
*/
|
|
2648
|
+
chargeOnBehalfOfAccount?: string;
|
|
2649
|
+
|
|
2650
|
+
/**
|
|
2651
|
+
* Billing integration ID
|
|
2652
|
+
*/
|
|
2653
|
+
integrationId?: string;
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Days until invoice is due
|
|
2657
|
+
*/
|
|
2658
|
+
invoiceDaysUntilDue?: number;
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Whether subscription is backdated
|
|
2662
|
+
*/
|
|
2663
|
+
isBackdated?: boolean;
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Whether invoice is already paid
|
|
2667
|
+
*/
|
|
2668
|
+
isInvoicePaid?: boolean;
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* Additional billing metadata
|
|
2672
|
+
*/
|
|
2673
|
+
metadata?: unknown;
|
|
2674
|
+
|
|
2675
|
+
/**
|
|
2676
|
+
* Proration behavior
|
|
2677
|
+
*/
|
|
2678
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
2679
|
+
|
|
2680
|
+
/**
|
|
2681
|
+
* Customer tax IDs
|
|
2682
|
+
*/
|
|
2683
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Tax percentage to apply
|
|
2687
|
+
*/
|
|
2688
|
+
taxPercentage?: number;
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* Tax rate IDs from billing provider
|
|
2692
|
+
*/
|
|
2693
|
+
taxRateIds?: Array<string>;
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
export namespace BillingInformation {
|
|
2697
|
+
/**
|
|
2698
|
+
* Billing address
|
|
2699
|
+
*/
|
|
2700
|
+
export interface BillingAddress {
|
|
2701
|
+
city?: string;
|
|
2702
|
+
|
|
2703
|
+
country?: string;
|
|
2704
|
+
|
|
2705
|
+
line1?: string;
|
|
2706
|
+
|
|
2707
|
+
line2?: string;
|
|
2708
|
+
|
|
2709
|
+
postalCode?: string;
|
|
2710
|
+
|
|
2711
|
+
state?: string;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* Tax exemption identifier
|
|
2716
|
+
*/
|
|
2717
|
+
export interface TaxID {
|
|
2718
|
+
/**
|
|
2719
|
+
* Tax exemption type (e.g., vat, gst)
|
|
2720
|
+
*/
|
|
2721
|
+
type: string;
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* Tax exemption identifier value
|
|
2725
|
+
*/
|
|
2726
|
+
value: string;
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* Charge item
|
|
2732
|
+
*/
|
|
2733
|
+
export interface Charge {
|
|
2734
|
+
/**
|
|
2735
|
+
* Charge ID
|
|
2736
|
+
*/
|
|
2737
|
+
id: string;
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* Charge quantity
|
|
2741
|
+
*/
|
|
2742
|
+
quantity: number;
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* Charge type
|
|
2746
|
+
*/
|
|
2747
|
+
type: 'FEATURE' | 'CREDIT';
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* Trial period override settings
|
|
2752
|
+
*/
|
|
2753
|
+
export interface TrialOverrideConfiguration {
|
|
2754
|
+
/**
|
|
2755
|
+
* Whether to start as trial
|
|
2756
|
+
*/
|
|
2757
|
+
isTrial: boolean;
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* Behavior when trial ends
|
|
2761
|
+
*/
|
|
2762
|
+
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Trial end date
|
|
2766
|
+
*/
|
|
2767
|
+
trialEndDate?: string;
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
export interface SubscriptionProvisionParams {
|
|
2772
|
+
/**
|
|
2773
|
+
* Customer ID to provision the subscription for
|
|
2774
|
+
*/
|
|
2775
|
+
customerId: string;
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* Plan ID to provision
|
|
2779
|
+
*/
|
|
2780
|
+
planId: string;
|
|
2781
|
+
|
|
2782
|
+
/**
|
|
2783
|
+
* Unique identifier for the subscription
|
|
2784
|
+
*/
|
|
2785
|
+
id?: string;
|
|
2786
|
+
|
|
2787
|
+
addons?: Array<SubscriptionProvisionParams.Addon>;
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Coupon configuration
|
|
2791
|
+
*/
|
|
2792
|
+
appliedCoupon?: SubscriptionProvisionParams.AppliedCoupon;
|
|
2793
|
+
|
|
2794
|
+
/**
|
|
2795
|
+
* Whether to wait for payment confirmation before returning the subscription
|
|
2796
|
+
*/
|
|
2797
|
+
awaitPaymentConfirmation?: boolean;
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* The ISO 3166-1 alpha-2 country code for billing
|
|
2801
|
+
*/
|
|
2802
|
+
billingCountryCode?: string | null;
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* External billing system identifier
|
|
2806
|
+
*/
|
|
2807
|
+
billingId?: string | null;
|
|
2808
|
+
|
|
2809
|
+
billingInformation?: SubscriptionProvisionParams.BillingInformation;
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* Billing period (MONTHLY or ANNUALLY)
|
|
2813
|
+
*/
|
|
2814
|
+
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
2815
|
+
|
|
2816
|
+
budget?: SubscriptionProvisionParams.Budget | null;
|
|
2817
|
+
|
|
2818
|
+
charges?: Array<SubscriptionProvisionParams.Charge>;
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Checkout page configuration for payment collection
|
|
2822
|
+
*/
|
|
2823
|
+
checkoutOptions?: SubscriptionProvisionParams.CheckoutOptions;
|
|
2824
|
+
|
|
2825
|
+
/**
|
|
2826
|
+
* Additional metadata for the subscription
|
|
2827
|
+
*/
|
|
2828
|
+
metadata?: { [key: string]: string };
|
|
2829
|
+
|
|
2830
|
+
minimumSpend?: SubscriptionProvisionParams.MinimumSpend | null;
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* Optional paying customer ID for split billing scenarios
|
|
2834
|
+
*/
|
|
2835
|
+
payingCustomerId?: string | null;
|
|
2836
|
+
|
|
2837
|
+
/**
|
|
2838
|
+
* How payments should be collected for this subscription
|
|
2839
|
+
*/
|
|
2840
|
+
paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
|
|
2841
|
+
|
|
2842
|
+
priceOverrides?: Array<SubscriptionProvisionParams.PriceOverride>;
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* Optional resource ID for multi-instance subscriptions
|
|
2846
|
+
*/
|
|
2847
|
+
resourceId?: string | null;
|
|
2848
|
+
|
|
2849
|
+
/**
|
|
2850
|
+
* Salesforce ID
|
|
2851
|
+
*/
|
|
2852
|
+
salesforceId?: string | null;
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* Strategy for scheduling subscription changes
|
|
2856
|
+
*/
|
|
2857
|
+
scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
|
|
2858
|
+
|
|
2859
|
+
/**
|
|
2860
|
+
* Subscription start date
|
|
2861
|
+
*/
|
|
2862
|
+
startDate?: string;
|
|
2863
|
+
|
|
2864
|
+
subscriptionEntitlements?: Array<SubscriptionProvisionParams.SubscriptionEntitlement>;
|
|
2865
|
+
|
|
2866
|
+
/**
|
|
2867
|
+
* Trial period override settings
|
|
2868
|
+
*/
|
|
2869
|
+
trialOverrideConfiguration?: SubscriptionProvisionParams.TrialOverrideConfiguration;
|
|
2870
|
+
|
|
2871
|
+
unitQuantity?: number;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
export namespace SubscriptionProvisionParams {
|
|
2875
|
+
export interface Addon {
|
|
2876
|
+
/**
|
|
2877
|
+
* Addon identifier
|
|
2878
|
+
*/
|
|
2879
|
+
addonId: string;
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* Number of addon units
|
|
2883
|
+
*/
|
|
2884
|
+
quantity?: number;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
/**
|
|
2888
|
+
* Coupon configuration
|
|
2889
|
+
*/
|
|
2890
|
+
export interface AppliedCoupon {
|
|
2891
|
+
/**
|
|
2892
|
+
* Billing provider coupon ID
|
|
2893
|
+
*/
|
|
2894
|
+
billingCouponId?: string;
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* Coupon timing configuration
|
|
2898
|
+
*/
|
|
2899
|
+
configuration?: AppliedCoupon.Configuration;
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Stigg coupon ID
|
|
2903
|
+
*/
|
|
2904
|
+
couponId?: string;
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* Ad-hoc discount configuration
|
|
2908
|
+
*/
|
|
2909
|
+
discount?: AppliedCoupon.Discount;
|
|
2910
|
+
|
|
2911
|
+
/**
|
|
2912
|
+
* Promotion code to apply
|
|
2913
|
+
*/
|
|
2914
|
+
promotionCode?: string;
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
export namespace AppliedCoupon {
|
|
2918
|
+
/**
|
|
2919
|
+
* Coupon timing configuration
|
|
2920
|
+
*/
|
|
2921
|
+
export interface Configuration {
|
|
2922
|
+
/**
|
|
2923
|
+
* Coupon start date
|
|
2924
|
+
*/
|
|
2925
|
+
startDate?: string;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
/**
|
|
2929
|
+
* Ad-hoc discount configuration
|
|
2930
|
+
*/
|
|
2931
|
+
export interface Discount {
|
|
2932
|
+
/**
|
|
2933
|
+
* Fixed amounts off by currency
|
|
2934
|
+
*/
|
|
2935
|
+
amountsOff?: Array<Discount.AmountsOff> | null;
|
|
2936
|
+
|
|
2937
|
+
/**
|
|
2938
|
+
* Ad-hoc discount
|
|
2939
|
+
*/
|
|
2940
|
+
description?: string;
|
|
2941
|
+
|
|
2942
|
+
/**
|
|
2943
|
+
* Duration in months
|
|
2944
|
+
*/
|
|
2945
|
+
durationInMonths?: number;
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* Discount name
|
|
2949
|
+
*/
|
|
2950
|
+
name?: string;
|
|
2951
|
+
|
|
2952
|
+
/**
|
|
2953
|
+
* Percentage discount
|
|
2954
|
+
*/
|
|
2955
|
+
percentOff?: number;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
export namespace Discount {
|
|
2959
|
+
export interface AmountsOff {
|
|
2960
|
+
/**
|
|
2961
|
+
* The price amount
|
|
2962
|
+
*/
|
|
2963
|
+
amount: number;
|
|
2964
|
+
|
|
2965
|
+
/**
|
|
2966
|
+
* The price currency
|
|
2967
|
+
*/
|
|
2968
|
+
currency:
|
|
2969
|
+
| 'usd'
|
|
2970
|
+
| 'aed'
|
|
2971
|
+
| 'all'
|
|
2972
|
+
| 'amd'
|
|
2973
|
+
| 'ang'
|
|
2974
|
+
| 'aud'
|
|
2975
|
+
| 'awg'
|
|
2976
|
+
| 'azn'
|
|
2977
|
+
| 'bam'
|
|
2978
|
+
| 'bbd'
|
|
2979
|
+
| 'bdt'
|
|
2980
|
+
| 'bgn'
|
|
2981
|
+
| 'bif'
|
|
2982
|
+
| 'bmd'
|
|
2983
|
+
| 'bnd'
|
|
2984
|
+
| 'bsd'
|
|
2985
|
+
| 'bwp'
|
|
2986
|
+
| 'byn'
|
|
2987
|
+
| 'bzd'
|
|
2988
|
+
| 'brl'
|
|
2989
|
+
| 'cad'
|
|
2990
|
+
| 'cdf'
|
|
2991
|
+
| 'chf'
|
|
2992
|
+
| 'cny'
|
|
2993
|
+
| 'czk'
|
|
2994
|
+
| 'dkk'
|
|
2995
|
+
| 'dop'
|
|
2996
|
+
| 'dzd'
|
|
2997
|
+
| 'egp'
|
|
2998
|
+
| 'etb'
|
|
2999
|
+
| 'eur'
|
|
3000
|
+
| 'fjd'
|
|
3001
|
+
| 'gbp'
|
|
3002
|
+
| 'gel'
|
|
3003
|
+
| 'gip'
|
|
3004
|
+
| 'gmd'
|
|
3005
|
+
| 'gyd'
|
|
3006
|
+
| 'hkd'
|
|
3007
|
+
| 'hrk'
|
|
3008
|
+
| 'htg'
|
|
3009
|
+
| 'idr'
|
|
3010
|
+
| 'ils'
|
|
3011
|
+
| 'inr'
|
|
3012
|
+
| 'isk'
|
|
3013
|
+
| 'jmd'
|
|
3014
|
+
| 'jpy'
|
|
3015
|
+
| 'kes'
|
|
3016
|
+
| 'kgs'
|
|
3017
|
+
| 'khr'
|
|
3018
|
+
| 'kmf'
|
|
3019
|
+
| 'krw'
|
|
3020
|
+
| 'kyd'
|
|
3021
|
+
| 'kzt'
|
|
3022
|
+
| 'lbp'
|
|
3023
|
+
| 'lkr'
|
|
3024
|
+
| 'lrd'
|
|
3025
|
+
| 'lsl'
|
|
3026
|
+
| 'mad'
|
|
3027
|
+
| 'mdl'
|
|
3028
|
+
| 'mga'
|
|
3029
|
+
| 'mkd'
|
|
3030
|
+
| 'mmk'
|
|
3031
|
+
| 'mnt'
|
|
3032
|
+
| 'mop'
|
|
3033
|
+
| 'mro'
|
|
3034
|
+
| 'mvr'
|
|
3035
|
+
| 'mwk'
|
|
3036
|
+
| 'mxn'
|
|
3037
|
+
| 'myr'
|
|
3038
|
+
| 'mzn'
|
|
3039
|
+
| 'nad'
|
|
3040
|
+
| 'ngn'
|
|
3041
|
+
| 'nok'
|
|
3042
|
+
| 'npr'
|
|
3043
|
+
| 'nzd'
|
|
3044
|
+
| 'pgk'
|
|
3045
|
+
| 'php'
|
|
3046
|
+
| 'pkr'
|
|
3047
|
+
| 'pln'
|
|
3048
|
+
| 'qar'
|
|
3049
|
+
| 'ron'
|
|
3050
|
+
| 'rsd'
|
|
3051
|
+
| 'rub'
|
|
3052
|
+
| 'rwf'
|
|
3053
|
+
| 'sar'
|
|
3054
|
+
| 'sbd'
|
|
3055
|
+
| 'scr'
|
|
3056
|
+
| 'sek'
|
|
3057
|
+
| 'sgd'
|
|
3058
|
+
| 'sle'
|
|
3059
|
+
| 'sll'
|
|
3060
|
+
| 'sos'
|
|
3061
|
+
| 'szl'
|
|
3062
|
+
| 'thb'
|
|
3063
|
+
| 'tjs'
|
|
3064
|
+
| 'top'
|
|
3065
|
+
| 'try'
|
|
3066
|
+
| 'ttd'
|
|
3067
|
+
| 'tzs'
|
|
3068
|
+
| 'uah'
|
|
3069
|
+
| 'uzs'
|
|
3070
|
+
| 'vnd'
|
|
3071
|
+
| 'vuv'
|
|
3072
|
+
| 'wst'
|
|
3073
|
+
| 'xaf'
|
|
3074
|
+
| 'xcd'
|
|
3075
|
+
| 'yer'
|
|
3076
|
+
| 'zar'
|
|
3077
|
+
| 'zmw'
|
|
3078
|
+
| 'clp'
|
|
3079
|
+
| 'djf'
|
|
3080
|
+
| 'gnf'
|
|
3081
|
+
| 'ugx'
|
|
3082
|
+
| 'pyg'
|
|
3083
|
+
| 'xof'
|
|
3084
|
+
| 'xpf';
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
888
3088
|
|
|
889
|
-
export
|
|
890
|
-
export interface Data {
|
|
3089
|
+
export interface BillingInformation {
|
|
891
3090
|
/**
|
|
892
|
-
*
|
|
3091
|
+
* Billing address for the subscription
|
|
893
3092
|
*/
|
|
894
|
-
|
|
3093
|
+
billingAddress?: BillingInformation.BillingAddress;
|
|
895
3094
|
|
|
896
3095
|
/**
|
|
897
|
-
*
|
|
3096
|
+
* Stripe Connect account to charge on behalf of
|
|
898
3097
|
*/
|
|
899
|
-
|
|
3098
|
+
chargeOnBehalfOfAccount?: string | null;
|
|
900
3099
|
|
|
901
3100
|
/**
|
|
902
|
-
*
|
|
3101
|
+
* Billing integration identifier
|
|
903
3102
|
*/
|
|
904
|
-
|
|
3103
|
+
integrationId?: string | null;
|
|
905
3104
|
|
|
906
3105
|
/**
|
|
907
|
-
*
|
|
3106
|
+
* Number of days until invoice is due
|
|
908
3107
|
*/
|
|
909
|
-
|
|
3108
|
+
invoiceDaysUntilDue?: number;
|
|
910
3109
|
|
|
911
3110
|
/**
|
|
912
|
-
*
|
|
3111
|
+
* Whether the subscription is backdated
|
|
913
3112
|
*/
|
|
914
|
-
|
|
3113
|
+
isBackdated?: boolean;
|
|
915
3114
|
|
|
916
3115
|
/**
|
|
917
|
-
*
|
|
3116
|
+
* Whether the invoice is marked as paid
|
|
918
3117
|
*/
|
|
919
|
-
|
|
3118
|
+
isInvoicePaid?: boolean;
|
|
920
3119
|
|
|
921
3120
|
/**
|
|
922
|
-
*
|
|
3121
|
+
* Additional metadata for the subscription
|
|
923
3122
|
*/
|
|
924
|
-
|
|
3123
|
+
metadata?: { [key: string]: string };
|
|
925
3124
|
|
|
926
3125
|
/**
|
|
927
|
-
*
|
|
3126
|
+
* How to handle proration for billing changes
|
|
928
3127
|
*/
|
|
929
|
-
|
|
3128
|
+
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
930
3129
|
|
|
931
3130
|
/**
|
|
932
|
-
*
|
|
3131
|
+
* Customer tax identification numbers
|
|
933
3132
|
*/
|
|
934
|
-
|
|
3133
|
+
taxIds?: Array<BillingInformation.TaxID>;
|
|
935
3134
|
|
|
936
3135
|
/**
|
|
937
|
-
*
|
|
3136
|
+
* Tax percentage (0-100)
|
|
938
3137
|
*/
|
|
939
|
-
|
|
3138
|
+
taxPercentage?: number;
|
|
940
3139
|
|
|
941
3140
|
/**
|
|
942
|
-
*
|
|
3141
|
+
* Tax rate identifiers to apply
|
|
943
3142
|
*/
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
| 'CANCELLED_BY_BILLING'
|
|
947
|
-
| 'EXPIRED'
|
|
948
|
-
| 'DETACH_BILLING'
|
|
949
|
-
| 'TRIAL_ENDED'
|
|
950
|
-
| 'Immediate'
|
|
951
|
-
| 'TRIAL_CONVERTED'
|
|
952
|
-
| 'PENDING_PAYMENT_EXPIRED'
|
|
953
|
-
| 'ScheduledCancellation'
|
|
954
|
-
| 'CustomerArchived'
|
|
955
|
-
| 'AutoCancellationRule'
|
|
956
|
-
| null;
|
|
3143
|
+
taxRateIds?: Array<string>;
|
|
3144
|
+
}
|
|
957
3145
|
|
|
3146
|
+
export namespace BillingInformation {
|
|
958
3147
|
/**
|
|
959
|
-
*
|
|
3148
|
+
* Billing address for the subscription
|
|
960
3149
|
*/
|
|
961
|
-
|
|
3150
|
+
export interface BillingAddress {
|
|
3151
|
+
city?: string;
|
|
962
3152
|
|
|
963
|
-
|
|
964
|
-
* Start of the current billing period
|
|
965
|
-
*/
|
|
966
|
-
currentBillingPeriodStart?: string | null;
|
|
3153
|
+
country?: string;
|
|
967
3154
|
|
|
968
|
-
|
|
969
|
-
* Subscription effective end date
|
|
970
|
-
*/
|
|
971
|
-
effectiveEndDate?: string | null;
|
|
3155
|
+
line1?: string;
|
|
972
3156
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
3157
|
+
line2?: string;
|
|
3158
|
+
|
|
3159
|
+
postalCode?: string;
|
|
3160
|
+
|
|
3161
|
+
state?: string;
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
export interface TaxID {
|
|
3165
|
+
/**
|
|
3166
|
+
* The type of tax exemption identifier, such as VAT.
|
|
3167
|
+
*/
|
|
3168
|
+
type: string;
|
|
3169
|
+
|
|
3170
|
+
/**
|
|
3171
|
+
* The actual tax identifier value
|
|
3172
|
+
*/
|
|
3173
|
+
value: string;
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
977
3176
|
|
|
3177
|
+
export interface Budget {
|
|
978
3178
|
/**
|
|
979
|
-
*
|
|
3179
|
+
* Whether the budget is a soft limit
|
|
980
3180
|
*/
|
|
981
|
-
|
|
3181
|
+
hasSoftLimit: boolean;
|
|
982
3182
|
|
|
983
3183
|
/**
|
|
984
|
-
*
|
|
3184
|
+
* Maximum spending limit
|
|
985
3185
|
*/
|
|
986
|
-
|
|
3186
|
+
limit: number;
|
|
3187
|
+
}
|
|
987
3188
|
|
|
3189
|
+
/**
|
|
3190
|
+
* Charge item
|
|
3191
|
+
*/
|
|
3192
|
+
export interface Charge {
|
|
988
3193
|
/**
|
|
989
|
-
*
|
|
3194
|
+
* Charge ID
|
|
990
3195
|
*/
|
|
991
|
-
|
|
3196
|
+
id: string;
|
|
992
3197
|
|
|
993
3198
|
/**
|
|
994
|
-
*
|
|
3199
|
+
* Charge quantity
|
|
995
3200
|
*/
|
|
996
|
-
|
|
3201
|
+
quantity: number;
|
|
997
3202
|
|
|
998
3203
|
/**
|
|
999
|
-
*
|
|
3204
|
+
* Charge type
|
|
1000
3205
|
*/
|
|
1001
|
-
|
|
3206
|
+
type: 'FEATURE' | 'CREDIT';
|
|
1002
3207
|
}
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
export interface SubscriptionCreateParams {
|
|
1006
|
-
/**
|
|
1007
|
-
* Customer ID to provision the subscription for
|
|
1008
|
-
*/
|
|
1009
|
-
customerId: string;
|
|
1010
|
-
|
|
1011
|
-
/**
|
|
1012
|
-
* Plan ID to provision
|
|
1013
|
-
*/
|
|
1014
|
-
planId: string;
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* Unique identifier for the subscription
|
|
1018
|
-
*/
|
|
1019
|
-
id?: string | null;
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* Whether to wait for payment confirmation before returning the subscription
|
|
1023
|
-
*/
|
|
1024
|
-
awaitPaymentConfirmation?: boolean;
|
|
1025
|
-
|
|
1026
|
-
billingPeriod?: 'MONTHLY' | 'ANNUALLY';
|
|
1027
|
-
|
|
1028
|
-
checkoutOptions?: SubscriptionCreateParams.CheckoutOptions;
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* Additional metadata for the subscription
|
|
1032
|
-
*/
|
|
1033
|
-
metadata?: { [key: string]: string };
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* Optional paying customer ID for split billing scenarios
|
|
1037
|
-
*/
|
|
1038
|
-
payingCustomerId?: string | null;
|
|
1039
3208
|
|
|
1040
3209
|
/**
|
|
1041
|
-
*
|
|
3210
|
+
* Checkout page configuration for payment collection
|
|
1042
3211
|
*/
|
|
1043
|
-
resourceId?: string | null;
|
|
1044
|
-
|
|
1045
|
-
trialOverrideConfiguration?: SubscriptionCreateParams.TrialOverrideConfiguration;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
export namespace SubscriptionCreateParams {
|
|
1049
3212
|
export interface CheckoutOptions {
|
|
1050
3213
|
/**
|
|
1051
3214
|
* URL to redirect to if checkout is canceled
|
|
@@ -1083,153 +3246,512 @@ export namespace SubscriptionCreateParams {
|
|
|
1083
3246
|
referenceId?: string | null;
|
|
1084
3247
|
}
|
|
1085
3248
|
|
|
1086
|
-
export interface
|
|
1087
|
-
/**
|
|
1088
|
-
* Whether the subscription should start with a trial period
|
|
1089
|
-
*/
|
|
1090
|
-
isTrial: boolean;
|
|
1091
|
-
|
|
3249
|
+
export interface MinimumSpend {
|
|
1092
3250
|
/**
|
|
1093
|
-
*
|
|
3251
|
+
* Minimum spend amount
|
|
1094
3252
|
*/
|
|
1095
|
-
|
|
3253
|
+
minimum?: MinimumSpend.Minimum | null;
|
|
3254
|
+
}
|
|
1096
3255
|
|
|
3256
|
+
export namespace MinimumSpend {
|
|
1097
3257
|
/**
|
|
1098
|
-
*
|
|
3258
|
+
* Minimum spend amount
|
|
1099
3259
|
*/
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Filter by customer ID
|
|
1107
|
-
*/
|
|
1108
|
-
customerId?: string;
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* Ending before this UUID for pagination
|
|
1112
|
-
*/
|
|
1113
|
-
endingBefore?: string;
|
|
1114
|
-
|
|
1115
|
-
/**
|
|
1116
|
-
* Items per page
|
|
1117
|
-
*/
|
|
1118
|
-
limit?: number;
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* Starting after this UUID for pagination
|
|
1122
|
-
*/
|
|
1123
|
-
startingAfter?: string;
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* Filter by subscription status (comma-separated for multiple statuses, e.g.,
|
|
1127
|
-
* ACTIVE,IN_TRIAL)
|
|
1128
|
-
*/
|
|
1129
|
-
status?: string;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
export interface SubscriptionDelegateParams {
|
|
1133
|
-
/**
|
|
1134
|
-
* The customer ID to delegate the subscription to
|
|
1135
|
-
*/
|
|
1136
|
-
targetCustomerId: string;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
export interface SubscriptionMigrateParams {
|
|
1140
|
-
/**
|
|
1141
|
-
* When to migrate the subscription: IMMEDIATE or END_OF_BILLING_PERIOD
|
|
1142
|
-
*/
|
|
1143
|
-
subscriptionMigrationTime?: 'END_OF_BILLING_PERIOD' | 'IMMEDIATE';
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
export interface SubscriptionPreviewParams {
|
|
1147
|
-
/**
|
|
1148
|
-
* Customer ID
|
|
1149
|
-
*/
|
|
1150
|
-
customerId: string;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* Plan ID
|
|
1154
|
-
*/
|
|
1155
|
-
planId: string;
|
|
1156
|
-
|
|
1157
|
-
addons?: Array<SubscriptionPreviewParams.Addon>;
|
|
1158
|
-
|
|
1159
|
-
appliedCoupon?: SubscriptionPreviewParams.AppliedCoupon;
|
|
1160
|
-
|
|
1161
|
-
billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
|
|
1162
|
-
|
|
1163
|
-
billingCountryCode?: string;
|
|
1164
|
-
|
|
1165
|
-
billingInformation?: SubscriptionPreviewParams.BillingInformation;
|
|
3260
|
+
export interface Minimum {
|
|
3261
|
+
/**
|
|
3262
|
+
* The price amount
|
|
3263
|
+
*/
|
|
3264
|
+
amount?: number;
|
|
1166
3265
|
|
|
1167
|
-
|
|
3266
|
+
/**
|
|
3267
|
+
* The billing country code of the price
|
|
3268
|
+
*/
|
|
3269
|
+
billingCountryCode?: string | null;
|
|
1168
3270
|
|
|
1169
|
-
|
|
3271
|
+
/**
|
|
3272
|
+
* The price currency
|
|
3273
|
+
*/
|
|
3274
|
+
currency?:
|
|
3275
|
+
| 'usd'
|
|
3276
|
+
| 'aed'
|
|
3277
|
+
| 'all'
|
|
3278
|
+
| 'amd'
|
|
3279
|
+
| 'ang'
|
|
3280
|
+
| 'aud'
|
|
3281
|
+
| 'awg'
|
|
3282
|
+
| 'azn'
|
|
3283
|
+
| 'bam'
|
|
3284
|
+
| 'bbd'
|
|
3285
|
+
| 'bdt'
|
|
3286
|
+
| 'bgn'
|
|
3287
|
+
| 'bif'
|
|
3288
|
+
| 'bmd'
|
|
3289
|
+
| 'bnd'
|
|
3290
|
+
| 'bsd'
|
|
3291
|
+
| 'bwp'
|
|
3292
|
+
| 'byn'
|
|
3293
|
+
| 'bzd'
|
|
3294
|
+
| 'brl'
|
|
3295
|
+
| 'cad'
|
|
3296
|
+
| 'cdf'
|
|
3297
|
+
| 'chf'
|
|
3298
|
+
| 'cny'
|
|
3299
|
+
| 'czk'
|
|
3300
|
+
| 'dkk'
|
|
3301
|
+
| 'dop'
|
|
3302
|
+
| 'dzd'
|
|
3303
|
+
| 'egp'
|
|
3304
|
+
| 'etb'
|
|
3305
|
+
| 'eur'
|
|
3306
|
+
| 'fjd'
|
|
3307
|
+
| 'gbp'
|
|
3308
|
+
| 'gel'
|
|
3309
|
+
| 'gip'
|
|
3310
|
+
| 'gmd'
|
|
3311
|
+
| 'gyd'
|
|
3312
|
+
| 'hkd'
|
|
3313
|
+
| 'hrk'
|
|
3314
|
+
| 'htg'
|
|
3315
|
+
| 'idr'
|
|
3316
|
+
| 'ils'
|
|
3317
|
+
| 'inr'
|
|
3318
|
+
| 'isk'
|
|
3319
|
+
| 'jmd'
|
|
3320
|
+
| 'jpy'
|
|
3321
|
+
| 'kes'
|
|
3322
|
+
| 'kgs'
|
|
3323
|
+
| 'khr'
|
|
3324
|
+
| 'kmf'
|
|
3325
|
+
| 'krw'
|
|
3326
|
+
| 'kyd'
|
|
3327
|
+
| 'kzt'
|
|
3328
|
+
| 'lbp'
|
|
3329
|
+
| 'lkr'
|
|
3330
|
+
| 'lrd'
|
|
3331
|
+
| 'lsl'
|
|
3332
|
+
| 'mad'
|
|
3333
|
+
| 'mdl'
|
|
3334
|
+
| 'mga'
|
|
3335
|
+
| 'mkd'
|
|
3336
|
+
| 'mmk'
|
|
3337
|
+
| 'mnt'
|
|
3338
|
+
| 'mop'
|
|
3339
|
+
| 'mro'
|
|
3340
|
+
| 'mvr'
|
|
3341
|
+
| 'mwk'
|
|
3342
|
+
| 'mxn'
|
|
3343
|
+
| 'myr'
|
|
3344
|
+
| 'mzn'
|
|
3345
|
+
| 'nad'
|
|
3346
|
+
| 'ngn'
|
|
3347
|
+
| 'nok'
|
|
3348
|
+
| 'npr'
|
|
3349
|
+
| 'nzd'
|
|
3350
|
+
| 'pgk'
|
|
3351
|
+
| 'php'
|
|
3352
|
+
| 'pkr'
|
|
3353
|
+
| 'pln'
|
|
3354
|
+
| 'qar'
|
|
3355
|
+
| 'ron'
|
|
3356
|
+
| 'rsd'
|
|
3357
|
+
| 'rub'
|
|
3358
|
+
| 'rwf'
|
|
3359
|
+
| 'sar'
|
|
3360
|
+
| 'sbd'
|
|
3361
|
+
| 'scr'
|
|
3362
|
+
| 'sek'
|
|
3363
|
+
| 'sgd'
|
|
3364
|
+
| 'sle'
|
|
3365
|
+
| 'sll'
|
|
3366
|
+
| 'sos'
|
|
3367
|
+
| 'szl'
|
|
3368
|
+
| 'thb'
|
|
3369
|
+
| 'tjs'
|
|
3370
|
+
| 'top'
|
|
3371
|
+
| 'try'
|
|
3372
|
+
| 'ttd'
|
|
3373
|
+
| 'tzs'
|
|
3374
|
+
| 'uah'
|
|
3375
|
+
| 'uzs'
|
|
3376
|
+
| 'vnd'
|
|
3377
|
+
| 'vuv'
|
|
3378
|
+
| 'wst'
|
|
3379
|
+
| 'xaf'
|
|
3380
|
+
| 'xcd'
|
|
3381
|
+
| 'yer'
|
|
3382
|
+
| 'zar'
|
|
3383
|
+
| 'zmw'
|
|
3384
|
+
| 'clp'
|
|
3385
|
+
| 'djf'
|
|
3386
|
+
| 'gnf'
|
|
3387
|
+
| 'ugx'
|
|
3388
|
+
| 'pyg'
|
|
3389
|
+
| 'xof'
|
|
3390
|
+
| 'xpf';
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
1170
3393
|
|
|
1171
|
-
|
|
3394
|
+
export interface PriceOverride {
|
|
3395
|
+
/**
|
|
3396
|
+
* Addon identifier for the price override
|
|
3397
|
+
*/
|
|
3398
|
+
addonId?: string | null;
|
|
1172
3399
|
|
|
1173
|
-
|
|
3400
|
+
/**
|
|
3401
|
+
* Whether this is a base charge override
|
|
3402
|
+
*/
|
|
3403
|
+
baseCharge?: boolean;
|
|
1174
3404
|
|
|
1175
|
-
|
|
3405
|
+
/**
|
|
3406
|
+
* Block size for pricing
|
|
3407
|
+
*/
|
|
3408
|
+
blockSize?: number;
|
|
1176
3409
|
|
|
1177
|
-
|
|
1178
|
-
* Subscription start date
|
|
1179
|
-
*/
|
|
1180
|
-
startDate?: string;
|
|
3410
|
+
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
1181
3411
|
|
|
1182
|
-
|
|
3412
|
+
creditRate?: PriceOverride.CreditRate;
|
|
1183
3413
|
|
|
1184
|
-
|
|
1185
|
-
|
|
3414
|
+
/**
|
|
3415
|
+
* Feature identifier for the price override
|
|
3416
|
+
*/
|
|
3417
|
+
featureId?: string | null;
|
|
1186
3418
|
|
|
1187
|
-
export namespace SubscriptionPreviewParams {
|
|
1188
|
-
export interface Addon {
|
|
1189
3419
|
/**
|
|
1190
|
-
*
|
|
3420
|
+
* Override price amount
|
|
1191
3421
|
*/
|
|
1192
|
-
|
|
3422
|
+
price?: PriceOverride.Price;
|
|
1193
3423
|
|
|
1194
|
-
|
|
3424
|
+
/**
|
|
3425
|
+
* Pricing tiers configuration
|
|
3426
|
+
*/
|
|
3427
|
+
tiers?: Array<PriceOverride.Tier>;
|
|
1195
3428
|
}
|
|
1196
3429
|
|
|
1197
|
-
export
|
|
1198
|
-
|
|
3430
|
+
export namespace PriceOverride {
|
|
3431
|
+
export interface CreditRate {
|
|
3432
|
+
/**
|
|
3433
|
+
* The credit rate amount
|
|
3434
|
+
*/
|
|
3435
|
+
amount: number;
|
|
1199
3436
|
|
|
1200
|
-
|
|
3437
|
+
/**
|
|
3438
|
+
* The custom currency refId for the credit rate
|
|
3439
|
+
*/
|
|
3440
|
+
currencyId: string;
|
|
1201
3441
|
|
|
1202
|
-
|
|
3442
|
+
/**
|
|
3443
|
+
* A custom formula for calculating cost based on single event dimensions
|
|
3444
|
+
*/
|
|
3445
|
+
costFormula?: string | null;
|
|
3446
|
+
}
|
|
1203
3447
|
|
|
1204
|
-
|
|
3448
|
+
/**
|
|
3449
|
+
* Override price amount
|
|
3450
|
+
*/
|
|
3451
|
+
export interface Price {
|
|
3452
|
+
/**
|
|
3453
|
+
* The price amount
|
|
3454
|
+
*/
|
|
3455
|
+
amount?: number;
|
|
1205
3456
|
|
|
1206
|
-
|
|
1207
|
-
|
|
3457
|
+
/**
|
|
3458
|
+
* The billing country code of the price
|
|
3459
|
+
*/
|
|
3460
|
+
billingCountryCode?: string | null;
|
|
1208
3461
|
|
|
1209
|
-
export namespace AppliedCoupon {
|
|
1210
|
-
export interface Configuration {
|
|
1211
3462
|
/**
|
|
1212
|
-
*
|
|
3463
|
+
* The price currency
|
|
1213
3464
|
*/
|
|
1214
|
-
|
|
3465
|
+
currency?:
|
|
3466
|
+
| 'usd'
|
|
3467
|
+
| 'aed'
|
|
3468
|
+
| 'all'
|
|
3469
|
+
| 'amd'
|
|
3470
|
+
| 'ang'
|
|
3471
|
+
| 'aud'
|
|
3472
|
+
| 'awg'
|
|
3473
|
+
| 'azn'
|
|
3474
|
+
| 'bam'
|
|
3475
|
+
| 'bbd'
|
|
3476
|
+
| 'bdt'
|
|
3477
|
+
| 'bgn'
|
|
3478
|
+
| 'bif'
|
|
3479
|
+
| 'bmd'
|
|
3480
|
+
| 'bnd'
|
|
3481
|
+
| 'bsd'
|
|
3482
|
+
| 'bwp'
|
|
3483
|
+
| 'byn'
|
|
3484
|
+
| 'bzd'
|
|
3485
|
+
| 'brl'
|
|
3486
|
+
| 'cad'
|
|
3487
|
+
| 'cdf'
|
|
3488
|
+
| 'chf'
|
|
3489
|
+
| 'cny'
|
|
3490
|
+
| 'czk'
|
|
3491
|
+
| 'dkk'
|
|
3492
|
+
| 'dop'
|
|
3493
|
+
| 'dzd'
|
|
3494
|
+
| 'egp'
|
|
3495
|
+
| 'etb'
|
|
3496
|
+
| 'eur'
|
|
3497
|
+
| 'fjd'
|
|
3498
|
+
| 'gbp'
|
|
3499
|
+
| 'gel'
|
|
3500
|
+
| 'gip'
|
|
3501
|
+
| 'gmd'
|
|
3502
|
+
| 'gyd'
|
|
3503
|
+
| 'hkd'
|
|
3504
|
+
| 'hrk'
|
|
3505
|
+
| 'htg'
|
|
3506
|
+
| 'idr'
|
|
3507
|
+
| 'ils'
|
|
3508
|
+
| 'inr'
|
|
3509
|
+
| 'isk'
|
|
3510
|
+
| 'jmd'
|
|
3511
|
+
| 'jpy'
|
|
3512
|
+
| 'kes'
|
|
3513
|
+
| 'kgs'
|
|
3514
|
+
| 'khr'
|
|
3515
|
+
| 'kmf'
|
|
3516
|
+
| 'krw'
|
|
3517
|
+
| 'kyd'
|
|
3518
|
+
| 'kzt'
|
|
3519
|
+
| 'lbp'
|
|
3520
|
+
| 'lkr'
|
|
3521
|
+
| 'lrd'
|
|
3522
|
+
| 'lsl'
|
|
3523
|
+
| 'mad'
|
|
3524
|
+
| 'mdl'
|
|
3525
|
+
| 'mga'
|
|
3526
|
+
| 'mkd'
|
|
3527
|
+
| 'mmk'
|
|
3528
|
+
| 'mnt'
|
|
3529
|
+
| 'mop'
|
|
3530
|
+
| 'mro'
|
|
3531
|
+
| 'mvr'
|
|
3532
|
+
| 'mwk'
|
|
3533
|
+
| 'mxn'
|
|
3534
|
+
| 'myr'
|
|
3535
|
+
| 'mzn'
|
|
3536
|
+
| 'nad'
|
|
3537
|
+
| 'ngn'
|
|
3538
|
+
| 'nok'
|
|
3539
|
+
| 'npr'
|
|
3540
|
+
| 'nzd'
|
|
3541
|
+
| 'pgk'
|
|
3542
|
+
| 'php'
|
|
3543
|
+
| 'pkr'
|
|
3544
|
+
| 'pln'
|
|
3545
|
+
| 'qar'
|
|
3546
|
+
| 'ron'
|
|
3547
|
+
| 'rsd'
|
|
3548
|
+
| 'rub'
|
|
3549
|
+
| 'rwf'
|
|
3550
|
+
| 'sar'
|
|
3551
|
+
| 'sbd'
|
|
3552
|
+
| 'scr'
|
|
3553
|
+
| 'sek'
|
|
3554
|
+
| 'sgd'
|
|
3555
|
+
| 'sle'
|
|
3556
|
+
| 'sll'
|
|
3557
|
+
| 'sos'
|
|
3558
|
+
| 'szl'
|
|
3559
|
+
| 'thb'
|
|
3560
|
+
| 'tjs'
|
|
3561
|
+
| 'top'
|
|
3562
|
+
| 'try'
|
|
3563
|
+
| 'ttd'
|
|
3564
|
+
| 'tzs'
|
|
3565
|
+
| 'uah'
|
|
3566
|
+
| 'uzs'
|
|
3567
|
+
| 'vnd'
|
|
3568
|
+
| 'vuv'
|
|
3569
|
+
| 'wst'
|
|
3570
|
+
| 'xaf'
|
|
3571
|
+
| 'xcd'
|
|
3572
|
+
| 'yer'
|
|
3573
|
+
| 'zar'
|
|
3574
|
+
| 'zmw'
|
|
3575
|
+
| 'clp'
|
|
3576
|
+
| 'djf'
|
|
3577
|
+
| 'gnf'
|
|
3578
|
+
| 'ugx'
|
|
3579
|
+
| 'pyg'
|
|
3580
|
+
| 'xof'
|
|
3581
|
+
| 'xpf';
|
|
1215
3582
|
}
|
|
1216
3583
|
|
|
1217
|
-
export interface
|
|
1218
|
-
|
|
3584
|
+
export interface Tier {
|
|
3585
|
+
/**
|
|
3586
|
+
* The flat fee price of the price tier
|
|
3587
|
+
*/
|
|
3588
|
+
flatPrice?: Tier.FlatPrice;
|
|
1219
3589
|
|
|
1220
|
-
|
|
3590
|
+
/**
|
|
3591
|
+
* The unit price of the price tier
|
|
3592
|
+
*/
|
|
3593
|
+
unitPrice?: Tier.UnitPrice;
|
|
1221
3594
|
|
|
1222
|
-
|
|
3595
|
+
/**
|
|
3596
|
+
* The up to quantity of the price tier
|
|
3597
|
+
*/
|
|
3598
|
+
upTo?: number;
|
|
3599
|
+
}
|
|
1223
3600
|
|
|
1224
|
-
|
|
3601
|
+
export namespace Tier {
|
|
3602
|
+
/**
|
|
3603
|
+
* The flat fee price of the price tier
|
|
3604
|
+
*/
|
|
3605
|
+
export interface FlatPrice {
|
|
3606
|
+
/**
|
|
3607
|
+
* The price amount
|
|
3608
|
+
*/
|
|
3609
|
+
amount?: number;
|
|
1225
3610
|
|
|
1226
|
-
|
|
1227
|
-
|
|
3611
|
+
/**
|
|
3612
|
+
* The billing country code of the price
|
|
3613
|
+
*/
|
|
3614
|
+
billingCountryCode?: string | null;
|
|
1228
3615
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
3616
|
+
/**
|
|
3617
|
+
* The price currency
|
|
3618
|
+
*/
|
|
3619
|
+
currency?:
|
|
3620
|
+
| 'usd'
|
|
3621
|
+
| 'aed'
|
|
3622
|
+
| 'all'
|
|
3623
|
+
| 'amd'
|
|
3624
|
+
| 'ang'
|
|
3625
|
+
| 'aud'
|
|
3626
|
+
| 'awg'
|
|
3627
|
+
| 'azn'
|
|
3628
|
+
| 'bam'
|
|
3629
|
+
| 'bbd'
|
|
3630
|
+
| 'bdt'
|
|
3631
|
+
| 'bgn'
|
|
3632
|
+
| 'bif'
|
|
3633
|
+
| 'bmd'
|
|
3634
|
+
| 'bnd'
|
|
3635
|
+
| 'bsd'
|
|
3636
|
+
| 'bwp'
|
|
3637
|
+
| 'byn'
|
|
3638
|
+
| 'bzd'
|
|
3639
|
+
| 'brl'
|
|
3640
|
+
| 'cad'
|
|
3641
|
+
| 'cdf'
|
|
3642
|
+
| 'chf'
|
|
3643
|
+
| 'cny'
|
|
3644
|
+
| 'czk'
|
|
3645
|
+
| 'dkk'
|
|
3646
|
+
| 'dop'
|
|
3647
|
+
| 'dzd'
|
|
3648
|
+
| 'egp'
|
|
3649
|
+
| 'etb'
|
|
3650
|
+
| 'eur'
|
|
3651
|
+
| 'fjd'
|
|
3652
|
+
| 'gbp'
|
|
3653
|
+
| 'gel'
|
|
3654
|
+
| 'gip'
|
|
3655
|
+
| 'gmd'
|
|
3656
|
+
| 'gyd'
|
|
3657
|
+
| 'hkd'
|
|
3658
|
+
| 'hrk'
|
|
3659
|
+
| 'htg'
|
|
3660
|
+
| 'idr'
|
|
3661
|
+
| 'ils'
|
|
3662
|
+
| 'inr'
|
|
3663
|
+
| 'isk'
|
|
3664
|
+
| 'jmd'
|
|
3665
|
+
| 'jpy'
|
|
3666
|
+
| 'kes'
|
|
3667
|
+
| 'kgs'
|
|
3668
|
+
| 'khr'
|
|
3669
|
+
| 'kmf'
|
|
3670
|
+
| 'krw'
|
|
3671
|
+
| 'kyd'
|
|
3672
|
+
| 'kzt'
|
|
3673
|
+
| 'lbp'
|
|
3674
|
+
| 'lkr'
|
|
3675
|
+
| 'lrd'
|
|
3676
|
+
| 'lsl'
|
|
3677
|
+
| 'mad'
|
|
3678
|
+
| 'mdl'
|
|
3679
|
+
| 'mga'
|
|
3680
|
+
| 'mkd'
|
|
3681
|
+
| 'mmk'
|
|
3682
|
+
| 'mnt'
|
|
3683
|
+
| 'mop'
|
|
3684
|
+
| 'mro'
|
|
3685
|
+
| 'mvr'
|
|
3686
|
+
| 'mwk'
|
|
3687
|
+
| 'mxn'
|
|
3688
|
+
| 'myr'
|
|
3689
|
+
| 'mzn'
|
|
3690
|
+
| 'nad'
|
|
3691
|
+
| 'ngn'
|
|
3692
|
+
| 'nok'
|
|
3693
|
+
| 'npr'
|
|
3694
|
+
| 'nzd'
|
|
3695
|
+
| 'pgk'
|
|
3696
|
+
| 'php'
|
|
3697
|
+
| 'pkr'
|
|
3698
|
+
| 'pln'
|
|
3699
|
+
| 'qar'
|
|
3700
|
+
| 'ron'
|
|
3701
|
+
| 'rsd'
|
|
3702
|
+
| 'rub'
|
|
3703
|
+
| 'rwf'
|
|
3704
|
+
| 'sar'
|
|
3705
|
+
| 'sbd'
|
|
3706
|
+
| 'scr'
|
|
3707
|
+
| 'sek'
|
|
3708
|
+
| 'sgd'
|
|
3709
|
+
| 'sle'
|
|
3710
|
+
| 'sll'
|
|
3711
|
+
| 'sos'
|
|
3712
|
+
| 'szl'
|
|
3713
|
+
| 'thb'
|
|
3714
|
+
| 'tjs'
|
|
3715
|
+
| 'top'
|
|
3716
|
+
| 'try'
|
|
3717
|
+
| 'ttd'
|
|
3718
|
+
| 'tzs'
|
|
3719
|
+
| 'uah'
|
|
3720
|
+
| 'uzs'
|
|
3721
|
+
| 'vnd'
|
|
3722
|
+
| 'vuv'
|
|
3723
|
+
| 'wst'
|
|
3724
|
+
| 'xaf'
|
|
3725
|
+
| 'xcd'
|
|
3726
|
+
| 'yer'
|
|
3727
|
+
| 'zar'
|
|
3728
|
+
| 'zmw'
|
|
3729
|
+
| 'clp'
|
|
3730
|
+
| 'djf'
|
|
3731
|
+
| 'gnf'
|
|
3732
|
+
| 'ugx'
|
|
3733
|
+
| 'pyg'
|
|
3734
|
+
| 'xof'
|
|
3735
|
+
| 'xpf';
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
/**
|
|
3739
|
+
* The unit price of the price tier
|
|
3740
|
+
*/
|
|
3741
|
+
export interface UnitPrice {
|
|
3742
|
+
/**
|
|
3743
|
+
* The price amount
|
|
3744
|
+
*/
|
|
3745
|
+
amount?: number;
|
|
3746
|
+
|
|
3747
|
+
/**
|
|
3748
|
+
* The billing country code of the price
|
|
3749
|
+
*/
|
|
3750
|
+
billingCountryCode?: string | null;
|
|
1232
3751
|
|
|
3752
|
+
/**
|
|
3753
|
+
* The price currency
|
|
3754
|
+
*/
|
|
1233
3755
|
currency?:
|
|
1234
3756
|
| 'usd'
|
|
1235
3757
|
| 'aed'
|
|
@@ -1351,79 +3873,33 @@ export namespace SubscriptionPreviewParams {
|
|
|
1351
3873
|
}
|
|
1352
3874
|
}
|
|
1353
3875
|
|
|
1354
|
-
export interface
|
|
3876
|
+
export interface SubscriptionEntitlement {
|
|
1355
3877
|
/**
|
|
1356
3878
|
* Feature ID
|
|
1357
3879
|
*/
|
|
1358
3880
|
featureId: string;
|
|
1359
3881
|
|
|
1360
|
-
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
export interface BillingInformation {
|
|
1364
|
-
billingAddress?: BillingInformation.BillingAddress;
|
|
1365
|
-
|
|
1366
|
-
chargeOnBehalfOfAccount?: string;
|
|
1367
|
-
|
|
1368
|
-
integrationId?: string;
|
|
1369
|
-
|
|
1370
|
-
invoiceDaysUntilDue?: number;
|
|
1371
|
-
|
|
1372
|
-
isBackdated?: boolean;
|
|
1373
|
-
|
|
1374
|
-
isInvoicePaid?: boolean;
|
|
1375
|
-
|
|
1376
|
-
metadata?: unknown;
|
|
1377
|
-
|
|
1378
|
-
prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
|
|
1379
|
-
|
|
1380
|
-
taxIds?: Array<BillingInformation.TaxID>;
|
|
1381
|
-
|
|
1382
|
-
taxPercentage?: number;
|
|
1383
|
-
|
|
1384
|
-
taxRateIds?: Array<string>;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
export namespace BillingInformation {
|
|
1388
|
-
export interface BillingAddress {
|
|
1389
|
-
city?: string;
|
|
1390
|
-
|
|
1391
|
-
country?: string;
|
|
1392
|
-
|
|
1393
|
-
line1?: string;
|
|
1394
|
-
|
|
1395
|
-
line2?: string;
|
|
1396
|
-
|
|
1397
|
-
postalCode?: string;
|
|
1398
|
-
|
|
1399
|
-
state?: string;
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
export interface TaxID {
|
|
1403
|
-
type: string;
|
|
3882
|
+
usageLimit: number;
|
|
1404
3883
|
|
|
1405
|
-
|
|
1406
|
-
}
|
|
3884
|
+
isGranted?: boolean;
|
|
1407
3885
|
}
|
|
1408
3886
|
|
|
1409
|
-
|
|
3887
|
+
/**
|
|
3888
|
+
* Trial period override settings
|
|
3889
|
+
*/
|
|
3890
|
+
export interface TrialOverrideConfiguration {
|
|
1410
3891
|
/**
|
|
1411
|
-
*
|
|
3892
|
+
* Whether the subscription should start with a trial period
|
|
1412
3893
|
*/
|
|
1413
|
-
id: string;
|
|
1414
|
-
|
|
1415
|
-
quantity: number;
|
|
1416
|
-
|
|
1417
|
-
type: 'FEATURE' | 'CREDIT';
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
export interface TrialOverrideConfiguration {
|
|
1421
3894
|
isTrial: boolean;
|
|
1422
3895
|
|
|
3896
|
+
/**
|
|
3897
|
+
* Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
|
|
3898
|
+
*/
|
|
1423
3899
|
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
|
|
1424
3900
|
|
|
1425
3901
|
/**
|
|
1426
|
-
*
|
|
3902
|
+
* Custom trial end date
|
|
1427
3903
|
*/
|
|
1428
3904
|
trialEndDate?: string;
|
|
1429
3905
|
}
|
|
@@ -1431,34 +3907,42 @@ export namespace SubscriptionPreviewParams {
|
|
|
1431
3907
|
|
|
1432
3908
|
export interface SubscriptionTransferParams {
|
|
1433
3909
|
/**
|
|
1434
|
-
*
|
|
1435
|
-
* belong to the same customer.
|
|
3910
|
+
* Resource ID to transfer the subscription to
|
|
1436
3911
|
*/
|
|
1437
3912
|
destinationResourceId: string;
|
|
1438
3913
|
}
|
|
1439
3914
|
|
|
1440
3915
|
Subscriptions.FutureUpdate = FutureUpdate;
|
|
3916
|
+
Subscriptions.Usage = Usage;
|
|
3917
|
+
Subscriptions.Invoice = Invoice;
|
|
1441
3918
|
|
|
1442
3919
|
export declare namespace Subscriptions {
|
|
1443
3920
|
export {
|
|
1444
|
-
type
|
|
1445
|
-
type SubscriptionRetrieveResponse as SubscriptionRetrieveResponse,
|
|
3921
|
+
type Subscription as Subscription,
|
|
1446
3922
|
type SubscriptionListResponse as SubscriptionListResponse,
|
|
1447
|
-
type
|
|
1448
|
-
type SubscriptionMigrateResponse as SubscriptionMigrateResponse,
|
|
3923
|
+
type SubscriptionImportResponse as SubscriptionImportResponse,
|
|
1449
3924
|
type SubscriptionPreviewResponse as SubscriptionPreviewResponse,
|
|
1450
|
-
type
|
|
1451
|
-
type
|
|
3925
|
+
type SubscriptionProvisionResponse as SubscriptionProvisionResponse,
|
|
3926
|
+
type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage,
|
|
3927
|
+
type SubscriptionUpdateParams as SubscriptionUpdateParams,
|
|
1452
3928
|
type SubscriptionListParams as SubscriptionListParams,
|
|
3929
|
+
type SubscriptionCancelParams as SubscriptionCancelParams,
|
|
1453
3930
|
type SubscriptionDelegateParams as SubscriptionDelegateParams,
|
|
3931
|
+
type SubscriptionImportParams as SubscriptionImportParams,
|
|
1454
3932
|
type SubscriptionMigrateParams as SubscriptionMigrateParams,
|
|
1455
3933
|
type SubscriptionPreviewParams as SubscriptionPreviewParams,
|
|
3934
|
+
type SubscriptionProvisionParams as SubscriptionProvisionParams,
|
|
1456
3935
|
type SubscriptionTransferParams as SubscriptionTransferParams,
|
|
1457
3936
|
};
|
|
1458
3937
|
|
|
3938
|
+
export { FutureUpdate as FutureUpdate, type CancelSubscription as CancelSubscription };
|
|
3939
|
+
|
|
1459
3940
|
export {
|
|
1460
|
-
|
|
1461
|
-
type
|
|
1462
|
-
type
|
|
3941
|
+
Usage as Usage,
|
|
3942
|
+
type UsageChargeUsageResponse as UsageChargeUsageResponse,
|
|
3943
|
+
type UsageSyncResponse as UsageSyncResponse,
|
|
3944
|
+
type UsageChargeUsageParams as UsageChargeUsageParams,
|
|
1463
3945
|
};
|
|
3946
|
+
|
|
3947
|
+
export { Invoice as Invoice, type InvoiceMarkAsPaidResponse as InvoiceMarkAsPaidResponse };
|
|
1464
3948
|
}
|