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