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