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