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