@usethrottle/api-client 4.4.1 → 5.1.0
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/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -0
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/ErrorEnvelope.d.ts +1 -1
- package/dist/generated/services/ApplicationsService.d.ts +12 -0
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/ApplicationsService.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +42 -0
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CheckoutService.d.ts +12 -0
- package/dist/generated/services/CheckoutService.d.ts.map +1 -0
- package/dist/generated/services/CheckoutService.js +24 -0
- package/dist/generated/services/CheckoutService.js.map +1 -0
- package/dist/generated/services/CustomersService.d.ts +39 -0
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/DiscountsService.d.ts +18 -0
- package/dist/generated/services/DiscountsService.d.ts.map +1 -1
- package/dist/generated/services/DiscountsService.js.map +1 -1
- package/dist/generated/services/EventsService.d.ts +6 -0
- package/dist/generated/services/EventsService.d.ts.map +1 -1
- package/dist/generated/services/EventsService.js.map +1 -1
- package/dist/generated/services/ExtensionsService.d.ts +66 -0
- package/dist/generated/services/ExtensionsService.d.ts.map +1 -1
- package/dist/generated/services/ExtensionsService.js.map +1 -1
- package/dist/generated/services/FulfillmentsService.d.ts +33 -0
- package/dist/generated/services/FulfillmentsService.d.ts.map +1 -1
- package/dist/generated/services/FulfillmentsService.js.map +1 -1
- package/dist/generated/services/OrdersService.d.ts +65 -14
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +30 -0
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +72 -0
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/StoresService.d.ts +12 -0
- package/dist/generated/services/StoresService.d.ts.map +1 -1
- package/dist/generated/services/StoresService.js.map +1 -1
- package/dist/generated/services/SubscriptionsService.d.ts +382 -29
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js +3 -1
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.d.ts +3 -3
- package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
- package/dist/generated/services/WebhooksService.d.ts +18 -0
- package/dist/generated/services/WebhooksService.d.ts.map +1 -1
- package/dist/generated/services/WebhooksService.js.map +1 -1
- package/dist/generated/services/WorkspaceEnvironmentsService.d.ts +9 -0
- package/dist/generated/services/WorkspaceEnvironmentsService.d.ts.map +1 -1
- package/dist/generated/services/WorkspaceEnvironmentsService.js.map +1 -1
- package/dist/generated/services/WorkspacesService.d.ts +12 -0
- package/dist/generated/services/WorkspacesService.d.ts.map +1 -1
- package/dist/generated/services/WorkspacesService.js.map +1 -1
- package/package.json +2 -2
|
@@ -27,7 +27,7 @@ export declare class SubscriptionsService {
|
|
|
27
27
|
/**
|
|
28
28
|
* Billing interval
|
|
29
29
|
*/
|
|
30
|
-
interval
|
|
30
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
31
31
|
/**
|
|
32
32
|
* Subscription amount in the smallest currency unit (e.g. cents)
|
|
33
33
|
*/
|
|
@@ -56,14 +56,26 @@ export declare class SubscriptionsService {
|
|
|
56
56
|
* The order that paid for the first period. Links the two in both directions: the order gets `subscriptionId` (and the legacy `metadata.subscription_id`), and this subscription's first invoice gets `orderId`. Use this when you charged the signup yourself and created the subscription afterwards. 404 if the order does not exist in this application and environment.
|
|
57
57
|
*/
|
|
58
58
|
orderId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Cadence unit. Send with intervalCount instead of, or together with, interval.
|
|
61
|
+
*/
|
|
62
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month';
|
|
63
|
+
/**
|
|
64
|
+
* Cadence count: every N units. At most one year (8760 hours, 365 days, 52 weeks, 12 months).
|
|
65
|
+
*/
|
|
66
|
+
intervalCount?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Makes this an installment plan of exactly this many payments (2 to 60). Cannot be combined with trialEnd or changed later.
|
|
69
|
+
*/
|
|
70
|
+
totalPayments?: number;
|
|
59
71
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
60
72
|
data?: {
|
|
61
73
|
id?: string;
|
|
62
74
|
customerId?: string;
|
|
63
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
75
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
64
76
|
planReference?: string;
|
|
65
77
|
planName?: string | null;
|
|
66
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
78
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
67
79
|
/**
|
|
68
80
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
69
81
|
*/
|
|
@@ -91,8 +103,35 @@ export declare class SubscriptionsService {
|
|
|
91
103
|
lastName?: string | null;
|
|
92
104
|
company?: string | null;
|
|
93
105
|
} | null;
|
|
106
|
+
/**
|
|
107
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
108
|
+
*/
|
|
109
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
110
|
+
intervalCount?: number | null;
|
|
111
|
+
billingAnchorAt?: string | null;
|
|
112
|
+
/**
|
|
113
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
114
|
+
*/
|
|
115
|
+
totalPayments?: number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
118
|
+
*/
|
|
119
|
+
paymentsMade?: number;
|
|
120
|
+
completedAt?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
123
|
+
*/
|
|
124
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
125
|
+
pendingIntervalCount?: number | null;
|
|
126
|
+
/**
|
|
127
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
128
|
+
*/
|
|
129
|
+
renewalIssue?: any | null;
|
|
94
130
|
};
|
|
95
131
|
meta?: {
|
|
132
|
+
/**
|
|
133
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
134
|
+
*/
|
|
96
135
|
requestId?: string;
|
|
97
136
|
pagination?: {
|
|
98
137
|
cursor?: string | null;
|
|
@@ -109,20 +148,21 @@ export declare class SubscriptionsService {
|
|
|
109
148
|
* @param externalCustomerId Filter by the merchant's own customer ID (the value passed as externalId on customer creation). Server resolves to the throttle customerId before filtering. Mutually exclusive with customerId.
|
|
110
149
|
* @param status
|
|
111
150
|
* @param interval
|
|
151
|
+
* @param installment true: only installment plans; false: only ongoing subscriptions
|
|
112
152
|
* @param q Search subscription id, customer id, plan reference, plan name, status, interval, and metadata.
|
|
113
153
|
* @param createdAfter ISO 8601 lower bound on creation time, EXCLUSIVE (created_at > value).
|
|
114
154
|
* @param createdBefore ISO 8601 upper bound on creation time, EXCLUSIVE (created_at < value).
|
|
115
155
|
* @returns any Default Response
|
|
116
156
|
* @throws ApiError
|
|
117
157
|
*/
|
|
118
|
-
static getApiV1Subscriptions(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, customerId?: string, externalCustomerId?: string, status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing', interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly', q?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
|
|
158
|
+
static getApiV1Subscriptions(xThrottleEnvironmentId?: string, cursor?: string, limit?: number, customerId?: string, externalCustomerId?: string, status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed', interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom', installment?: boolean, q?: string, createdAfter?: string, createdBefore?: string): CancelablePromise<{
|
|
119
159
|
data?: Array<{
|
|
120
160
|
id?: string;
|
|
121
161
|
customerId?: string;
|
|
122
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
162
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
123
163
|
planReference?: string;
|
|
124
164
|
planName?: string | null;
|
|
125
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
165
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
126
166
|
/**
|
|
127
167
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
128
168
|
*/
|
|
@@ -150,8 +190,35 @@ export declare class SubscriptionsService {
|
|
|
150
190
|
lastName?: string | null;
|
|
151
191
|
company?: string | null;
|
|
152
192
|
} | null;
|
|
193
|
+
/**
|
|
194
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
195
|
+
*/
|
|
196
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
197
|
+
intervalCount?: number | null;
|
|
198
|
+
billingAnchorAt?: string | null;
|
|
199
|
+
/**
|
|
200
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
201
|
+
*/
|
|
202
|
+
totalPayments?: number | null;
|
|
203
|
+
/**
|
|
204
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
205
|
+
*/
|
|
206
|
+
paymentsMade?: number;
|
|
207
|
+
completedAt?: string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
210
|
+
*/
|
|
211
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
212
|
+
pendingIntervalCount?: number | null;
|
|
213
|
+
/**
|
|
214
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
215
|
+
*/
|
|
216
|
+
renewalIssue?: any | null;
|
|
153
217
|
}>;
|
|
154
218
|
meta?: {
|
|
219
|
+
/**
|
|
220
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
221
|
+
*/
|
|
155
222
|
requestId?: string;
|
|
156
223
|
pagination?: {
|
|
157
224
|
cursor?: string | null;
|
|
@@ -170,10 +237,10 @@ export declare class SubscriptionsService {
|
|
|
170
237
|
data?: {
|
|
171
238
|
id?: string;
|
|
172
239
|
customerId?: string;
|
|
173
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
240
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
174
241
|
planReference?: string;
|
|
175
242
|
planName?: string | null;
|
|
176
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
243
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
177
244
|
/**
|
|
178
245
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
179
246
|
*/
|
|
@@ -201,8 +268,35 @@ export declare class SubscriptionsService {
|
|
|
201
268
|
lastName?: string | null;
|
|
202
269
|
company?: string | null;
|
|
203
270
|
} | null;
|
|
271
|
+
/**
|
|
272
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
273
|
+
*/
|
|
274
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
275
|
+
intervalCount?: number | null;
|
|
276
|
+
billingAnchorAt?: string | null;
|
|
277
|
+
/**
|
|
278
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
279
|
+
*/
|
|
280
|
+
totalPayments?: number | null;
|
|
281
|
+
/**
|
|
282
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
283
|
+
*/
|
|
284
|
+
paymentsMade?: number;
|
|
285
|
+
completedAt?: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
288
|
+
*/
|
|
289
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
290
|
+
pendingIntervalCount?: number | null;
|
|
291
|
+
/**
|
|
292
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
293
|
+
*/
|
|
294
|
+
renewalIssue?: any | null;
|
|
204
295
|
};
|
|
205
296
|
meta?: {
|
|
297
|
+
/**
|
|
298
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
299
|
+
*/
|
|
206
300
|
requestId?: string;
|
|
207
301
|
pagination?: {
|
|
208
302
|
cursor?: string | null;
|
|
@@ -221,21 +315,29 @@ export declare class SubscriptionsService {
|
|
|
221
315
|
static patchApiV1Subscriptions(id: string, requestBody: {
|
|
222
316
|
planReference?: string;
|
|
223
317
|
planName?: string;
|
|
224
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
318
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
225
319
|
/**
|
|
226
320
|
* Amount in cents
|
|
227
321
|
*/
|
|
228
322
|
amount?: number;
|
|
229
323
|
taxAddress?: any | null;
|
|
230
324
|
metadata?: Record<string, any>;
|
|
325
|
+
/**
|
|
326
|
+
* Cadence unit. Send with intervalCount instead of, or together with, interval.
|
|
327
|
+
*/
|
|
328
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month';
|
|
329
|
+
/**
|
|
330
|
+
* Cadence count: every N units. At most one year (8760 hours, 365 days, 52 weeks, 12 months).
|
|
331
|
+
*/
|
|
332
|
+
intervalCount?: number;
|
|
231
333
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
232
334
|
data?: {
|
|
233
335
|
id?: string;
|
|
234
336
|
customerId?: string;
|
|
235
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
337
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
236
338
|
planReference?: string;
|
|
237
339
|
planName?: string | null;
|
|
238
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
340
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
239
341
|
/**
|
|
240
342
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
241
343
|
*/
|
|
@@ -263,8 +365,35 @@ export declare class SubscriptionsService {
|
|
|
263
365
|
lastName?: string | null;
|
|
264
366
|
company?: string | null;
|
|
265
367
|
} | null;
|
|
368
|
+
/**
|
|
369
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
370
|
+
*/
|
|
371
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
372
|
+
intervalCount?: number | null;
|
|
373
|
+
billingAnchorAt?: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
376
|
+
*/
|
|
377
|
+
totalPayments?: number | null;
|
|
378
|
+
/**
|
|
379
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
380
|
+
*/
|
|
381
|
+
paymentsMade?: number;
|
|
382
|
+
completedAt?: string | null;
|
|
383
|
+
/**
|
|
384
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
385
|
+
*/
|
|
386
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
387
|
+
pendingIntervalCount?: number | null;
|
|
388
|
+
/**
|
|
389
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
390
|
+
*/
|
|
391
|
+
renewalIssue?: any | null;
|
|
266
392
|
};
|
|
267
393
|
meta?: {
|
|
394
|
+
/**
|
|
395
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
396
|
+
*/
|
|
268
397
|
requestId?: string;
|
|
269
398
|
pagination?: {
|
|
270
399
|
cursor?: string | null;
|
|
@@ -303,10 +432,10 @@ export declare class SubscriptionsService {
|
|
|
303
432
|
data?: {
|
|
304
433
|
id?: string;
|
|
305
434
|
customerId?: string;
|
|
306
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
435
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
307
436
|
planReference?: string;
|
|
308
437
|
planName?: string | null;
|
|
309
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
438
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
310
439
|
/**
|
|
311
440
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
312
441
|
*/
|
|
@@ -334,8 +463,35 @@ export declare class SubscriptionsService {
|
|
|
334
463
|
lastName?: string | null;
|
|
335
464
|
company?: string | null;
|
|
336
465
|
} | null;
|
|
466
|
+
/**
|
|
467
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
468
|
+
*/
|
|
469
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
470
|
+
intervalCount?: number | null;
|
|
471
|
+
billingAnchorAt?: string | null;
|
|
472
|
+
/**
|
|
473
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
474
|
+
*/
|
|
475
|
+
totalPayments?: number | null;
|
|
476
|
+
/**
|
|
477
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
478
|
+
*/
|
|
479
|
+
paymentsMade?: number;
|
|
480
|
+
completedAt?: string | null;
|
|
481
|
+
/**
|
|
482
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
483
|
+
*/
|
|
484
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
485
|
+
pendingIntervalCount?: number | null;
|
|
486
|
+
/**
|
|
487
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
488
|
+
*/
|
|
489
|
+
renewalIssue?: any | null;
|
|
337
490
|
};
|
|
338
491
|
meta?: {
|
|
492
|
+
/**
|
|
493
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
494
|
+
*/
|
|
339
495
|
requestId?: string;
|
|
340
496
|
pagination?: {
|
|
341
497
|
cursor?: string | null;
|
|
@@ -354,10 +510,10 @@ export declare class SubscriptionsService {
|
|
|
354
510
|
data?: {
|
|
355
511
|
id?: string;
|
|
356
512
|
customerId?: string;
|
|
357
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
513
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
358
514
|
planReference?: string;
|
|
359
515
|
planName?: string | null;
|
|
360
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
516
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
361
517
|
/**
|
|
362
518
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
363
519
|
*/
|
|
@@ -385,8 +541,35 @@ export declare class SubscriptionsService {
|
|
|
385
541
|
lastName?: string | null;
|
|
386
542
|
company?: string | null;
|
|
387
543
|
} | null;
|
|
544
|
+
/**
|
|
545
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
546
|
+
*/
|
|
547
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
548
|
+
intervalCount?: number | null;
|
|
549
|
+
billingAnchorAt?: string | null;
|
|
550
|
+
/**
|
|
551
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
552
|
+
*/
|
|
553
|
+
totalPayments?: number | null;
|
|
554
|
+
/**
|
|
555
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
556
|
+
*/
|
|
557
|
+
paymentsMade?: number;
|
|
558
|
+
completedAt?: string | null;
|
|
559
|
+
/**
|
|
560
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
561
|
+
*/
|
|
562
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
563
|
+
pendingIntervalCount?: number | null;
|
|
564
|
+
/**
|
|
565
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
566
|
+
*/
|
|
567
|
+
renewalIssue?: any | null;
|
|
388
568
|
};
|
|
389
569
|
meta?: {
|
|
570
|
+
/**
|
|
571
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
572
|
+
*/
|
|
390
573
|
requestId?: string;
|
|
391
574
|
pagination?: {
|
|
392
575
|
cursor?: string | null;
|
|
@@ -408,10 +591,10 @@ export declare class SubscriptionsService {
|
|
|
408
591
|
data?: {
|
|
409
592
|
id?: string;
|
|
410
593
|
customerId?: string;
|
|
411
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
594
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
412
595
|
planReference?: string;
|
|
413
596
|
planName?: string | null;
|
|
414
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
597
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
415
598
|
/**
|
|
416
599
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
417
600
|
*/
|
|
@@ -439,8 +622,35 @@ export declare class SubscriptionsService {
|
|
|
439
622
|
lastName?: string | null;
|
|
440
623
|
company?: string | null;
|
|
441
624
|
} | null;
|
|
625
|
+
/**
|
|
626
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
627
|
+
*/
|
|
628
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
629
|
+
intervalCount?: number | null;
|
|
630
|
+
billingAnchorAt?: string | null;
|
|
631
|
+
/**
|
|
632
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
633
|
+
*/
|
|
634
|
+
totalPayments?: number | null;
|
|
635
|
+
/**
|
|
636
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
637
|
+
*/
|
|
638
|
+
paymentsMade?: number;
|
|
639
|
+
completedAt?: string | null;
|
|
640
|
+
/**
|
|
641
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
642
|
+
*/
|
|
643
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
644
|
+
pendingIntervalCount?: number | null;
|
|
645
|
+
/**
|
|
646
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
647
|
+
*/
|
|
648
|
+
renewalIssue?: any | null;
|
|
442
649
|
};
|
|
443
650
|
meta?: {
|
|
651
|
+
/**
|
|
652
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
653
|
+
*/
|
|
444
654
|
requestId?: string;
|
|
445
655
|
pagination?: {
|
|
446
656
|
cursor?: string | null;
|
|
@@ -459,10 +669,10 @@ export declare class SubscriptionsService {
|
|
|
459
669
|
data?: {
|
|
460
670
|
id?: string;
|
|
461
671
|
customerId?: string;
|
|
462
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
672
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
463
673
|
planReference?: string;
|
|
464
674
|
planName?: string | null;
|
|
465
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
675
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
466
676
|
/**
|
|
467
677
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
468
678
|
*/
|
|
@@ -490,8 +700,35 @@ export declare class SubscriptionsService {
|
|
|
490
700
|
lastName?: string | null;
|
|
491
701
|
company?: string | null;
|
|
492
702
|
} | null;
|
|
703
|
+
/**
|
|
704
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
705
|
+
*/
|
|
706
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
707
|
+
intervalCount?: number | null;
|
|
708
|
+
billingAnchorAt?: string | null;
|
|
709
|
+
/**
|
|
710
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
711
|
+
*/
|
|
712
|
+
totalPayments?: number | null;
|
|
713
|
+
/**
|
|
714
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
715
|
+
*/
|
|
716
|
+
paymentsMade?: number;
|
|
717
|
+
completedAt?: string | null;
|
|
718
|
+
/**
|
|
719
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
720
|
+
*/
|
|
721
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
722
|
+
pendingIntervalCount?: number | null;
|
|
723
|
+
/**
|
|
724
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
725
|
+
*/
|
|
726
|
+
renewalIssue?: any | null;
|
|
493
727
|
};
|
|
494
728
|
meta?: {
|
|
729
|
+
/**
|
|
730
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
731
|
+
*/
|
|
495
732
|
requestId?: string;
|
|
496
733
|
pagination?: {
|
|
497
734
|
cursor?: string | null;
|
|
@@ -519,7 +756,7 @@ export declare class SubscriptionsService {
|
|
|
519
756
|
/**
|
|
520
757
|
* Billing interval for the new plan
|
|
521
758
|
*/
|
|
522
|
-
interval
|
|
759
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
523
760
|
/**
|
|
524
761
|
* Amount in the smallest currency unit (e.g. cents)
|
|
525
762
|
*/
|
|
@@ -528,14 +765,22 @@ export declare class SubscriptionsService {
|
|
|
528
765
|
* When the plan change takes effect
|
|
529
766
|
*/
|
|
530
767
|
effective: 'now' | 'period_end';
|
|
768
|
+
/**
|
|
769
|
+
* Cadence unit. Send with intervalCount instead of, or together with, interval.
|
|
770
|
+
*/
|
|
771
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month';
|
|
772
|
+
/**
|
|
773
|
+
* Cadence count: every N units. At most one year (8760 hours, 365 days, 52 weeks, 12 months).
|
|
774
|
+
*/
|
|
775
|
+
intervalCount?: number;
|
|
531
776
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
532
777
|
data?: {
|
|
533
778
|
id?: string;
|
|
534
779
|
customerId?: string;
|
|
535
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
780
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
536
781
|
planReference?: string;
|
|
537
782
|
planName?: string | null;
|
|
538
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
783
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
539
784
|
/**
|
|
540
785
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
541
786
|
*/
|
|
@@ -568,8 +813,35 @@ export declare class SubscriptionsService {
|
|
|
568
813
|
chargedCents?: number;
|
|
569
814
|
fullAmount?: number;
|
|
570
815
|
};
|
|
816
|
+
/**
|
|
817
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
818
|
+
*/
|
|
819
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
820
|
+
intervalCount?: number | null;
|
|
821
|
+
billingAnchorAt?: string | null;
|
|
822
|
+
/**
|
|
823
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
824
|
+
*/
|
|
825
|
+
totalPayments?: number | null;
|
|
826
|
+
/**
|
|
827
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
828
|
+
*/
|
|
829
|
+
paymentsMade?: number;
|
|
830
|
+
completedAt?: string | null;
|
|
831
|
+
/**
|
|
832
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
833
|
+
*/
|
|
834
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
835
|
+
pendingIntervalCount?: number | null;
|
|
836
|
+
/**
|
|
837
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
838
|
+
*/
|
|
839
|
+
renewalIssue?: any | null;
|
|
571
840
|
};
|
|
572
841
|
meta?: {
|
|
842
|
+
/**
|
|
843
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
844
|
+
*/
|
|
573
845
|
requestId?: string;
|
|
574
846
|
pagination?: {
|
|
575
847
|
cursor?: string | null;
|
|
@@ -598,10 +870,10 @@ export declare class SubscriptionsService {
|
|
|
598
870
|
data?: {
|
|
599
871
|
id?: string;
|
|
600
872
|
customerId?: string;
|
|
601
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
873
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
602
874
|
planReference?: string;
|
|
603
875
|
planName?: string | null;
|
|
604
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
876
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
605
877
|
/**
|
|
606
878
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
607
879
|
*/
|
|
@@ -634,8 +906,35 @@ export declare class SubscriptionsService {
|
|
|
634
906
|
chargedCents?: number;
|
|
635
907
|
fullAmount?: number;
|
|
636
908
|
};
|
|
909
|
+
/**
|
|
910
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
911
|
+
*/
|
|
912
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
913
|
+
intervalCount?: number | null;
|
|
914
|
+
billingAnchorAt?: string | null;
|
|
915
|
+
/**
|
|
916
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
917
|
+
*/
|
|
918
|
+
totalPayments?: number | null;
|
|
919
|
+
/**
|
|
920
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
921
|
+
*/
|
|
922
|
+
paymentsMade?: number;
|
|
923
|
+
completedAt?: string | null;
|
|
924
|
+
/**
|
|
925
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
926
|
+
*/
|
|
927
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
928
|
+
pendingIntervalCount?: number | null;
|
|
929
|
+
/**
|
|
930
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
931
|
+
*/
|
|
932
|
+
renewalIssue?: any | null;
|
|
637
933
|
};
|
|
638
934
|
meta?: {
|
|
935
|
+
/**
|
|
936
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
937
|
+
*/
|
|
639
938
|
requestId?: string;
|
|
640
939
|
pagination?: {
|
|
641
940
|
cursor?: string | null;
|
|
@@ -654,10 +953,10 @@ export declare class SubscriptionsService {
|
|
|
654
953
|
data?: {
|
|
655
954
|
id?: string;
|
|
656
955
|
customerId?: string;
|
|
657
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
956
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
658
957
|
planReference?: string;
|
|
659
958
|
planName?: string | null;
|
|
660
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
959
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
661
960
|
/**
|
|
662
961
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
663
962
|
*/
|
|
@@ -685,8 +984,35 @@ export declare class SubscriptionsService {
|
|
|
685
984
|
lastName?: string | null;
|
|
686
985
|
company?: string | null;
|
|
687
986
|
} | null;
|
|
987
|
+
/**
|
|
988
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
989
|
+
*/
|
|
990
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
991
|
+
intervalCount?: number | null;
|
|
992
|
+
billingAnchorAt?: string | null;
|
|
993
|
+
/**
|
|
994
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
995
|
+
*/
|
|
996
|
+
totalPayments?: number | null;
|
|
997
|
+
/**
|
|
998
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
999
|
+
*/
|
|
1000
|
+
paymentsMade?: number;
|
|
1001
|
+
completedAt?: string | null;
|
|
1002
|
+
/**
|
|
1003
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
1004
|
+
*/
|
|
1005
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
1006
|
+
pendingIntervalCount?: number | null;
|
|
1007
|
+
/**
|
|
1008
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
1009
|
+
*/
|
|
1010
|
+
renewalIssue?: any | null;
|
|
688
1011
|
};
|
|
689
1012
|
meta?: {
|
|
1013
|
+
/**
|
|
1014
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
1015
|
+
*/
|
|
690
1016
|
requestId?: string;
|
|
691
1017
|
pagination?: {
|
|
692
1018
|
cursor?: string | null;
|
|
@@ -708,17 +1034,17 @@ export declare class SubscriptionsService {
|
|
|
708
1034
|
*/
|
|
709
1035
|
atPeriodEnd?: boolean;
|
|
710
1036
|
/**
|
|
711
|
-
* Money to return alongside an immediate cancellation. `prorated` credits the unused part of the current period
|
|
1037
|
+
* Money to return alongside an immediate cancellation. `prorated` credits the unused part of the current period, capped at what was actually paid for it — returns 422 invalid_state if nothing was taken for the current period. `last_cycle` returns the whole last paid cycle. Rejected when atPeriodEnd is true.
|
|
712
1038
|
*/
|
|
713
1039
|
refund?: 'none' | 'prorated' | 'last_cycle';
|
|
714
1040
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
715
1041
|
data?: {
|
|
716
1042
|
id?: string;
|
|
717
1043
|
customerId?: string;
|
|
718
|
-
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing';
|
|
1044
|
+
status?: 'active' | 'paused' | 'cancelled' | 'past_due' | 'trialing' | 'unpaid' | 'completed';
|
|
719
1045
|
planReference?: string;
|
|
720
1046
|
planName?: string | null;
|
|
721
|
-
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
1047
|
+
interval?: 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'custom';
|
|
722
1048
|
/**
|
|
723
1049
|
* Amount in cents (e.g. 1999 = $19.99)
|
|
724
1050
|
*/
|
|
@@ -746,8 +1072,35 @@ export declare class SubscriptionsService {
|
|
|
746
1072
|
lastName?: string | null;
|
|
747
1073
|
company?: string | null;
|
|
748
1074
|
} | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* Cadence unit: every intervalCount of these. A named interval carries its shorthand (monthly → month).
|
|
1077
|
+
*/
|
|
1078
|
+
intervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
1079
|
+
intervalCount?: number | null;
|
|
1080
|
+
billingAnchorAt?: string | null;
|
|
1081
|
+
/**
|
|
1082
|
+
* Installment plans only: the fixed number of payments. null for an ongoing subscription.
|
|
1083
|
+
*/
|
|
1084
|
+
totalPayments?: number | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* Installment plans only: payments counted so far (charges and waived periods).
|
|
1087
|
+
*/
|
|
1088
|
+
paymentsMade?: number;
|
|
1089
|
+
completedAt?: string | null;
|
|
1090
|
+
/**
|
|
1091
|
+
* Cadence unit of the scheduled plan change; null when none is scheduled.
|
|
1092
|
+
*/
|
|
1093
|
+
pendingIntervalUnit?: 'hour' | 'day' | 'week' | 'month' | null;
|
|
1094
|
+
pendingIntervalCount?: number | null;
|
|
1095
|
+
/**
|
|
1096
|
+
* Read-only. Set by the renewal job when renewals are failing (system_error) or when a card was charged but the renewal could not be recorded (orphan_charge — renewals are paused until resolved).
|
|
1097
|
+
*/
|
|
1098
|
+
renewalIssue?: any | null;
|
|
749
1099
|
};
|
|
750
1100
|
meta?: {
|
|
1101
|
+
/**
|
|
1102
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
1103
|
+
*/
|
|
751
1104
|
requestId?: string;
|
|
752
1105
|
pagination?: {
|
|
753
1106
|
cursor?: string | null;
|