lark-billing 0.4.0 → 0.6.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/CHANGELOG.md +29 -0
- package/package.json +1 -1
- package/resources/pricing-metrics.d.mts +40 -22
- package/resources/pricing-metrics.d.mts.map +1 -1
- package/resources/pricing-metrics.d.ts +40 -22
- package/resources/pricing-metrics.d.ts.map +1 -1
- package/resources/pricing-metrics.js.map +1 -1
- package/resources/pricing-metrics.mjs.map +1 -1
- package/resources/rate-cards.d.mts +20 -0
- package/resources/rate-cards.d.mts.map +1 -1
- package/resources/rate-cards.d.ts +20 -0
- package/resources/rate-cards.d.ts.map +1 -1
- package/resources/rate-cards.js +2 -0
- package/resources/rate-cards.js.map +1 -1
- package/resources/rate-cards.mjs +2 -0
- package/resources/rate-cards.mjs.map +1 -1
- package/resources/subjects.d.mts +3 -3
- package/resources/subjects.d.mts.map +1 -1
- package/resources/subjects.d.ts +3 -3
- package/resources/subjects.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +47 -13
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +47 -13
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +5 -3
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +5 -3
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +2 -2
- package/resources/usage-events.d.ts +2 -2
- package/resources/usage-events.js +2 -2
- package/resources/usage-events.mjs +2 -2
- package/src/resources/pricing-metrics.ts +43 -22
- package/src/resources/rate-cards.ts +26 -0
- package/src/resources/subjects.ts +3 -3
- package/src/resources/subscriptions.ts +44 -14
- package/src/resources/usage-events.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -13,13 +13,15 @@ export class Subscriptions extends APIResource {
|
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
15
|
* const subscription = await client.subscriptions.create({
|
|
16
|
+
* rate_card_id: 'rc_AJWMxR81jxoRlli6p13uf3JB',
|
|
17
|
+
* subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
|
|
16
18
|
* checkout_callback_urls: {
|
|
17
19
|
* cancelled_url: 'https://example.com/try-again',
|
|
18
20
|
* success_url: 'https://example.com/welcome',
|
|
19
21
|
* },
|
|
20
|
-
*
|
|
21
|
-
* subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
|
|
22
|
+
* fixed_rate_quantities: { seats: '2', addon_storage: '0' },
|
|
22
23
|
* metadata: {},
|
|
24
|
+
* rate_price_multipliers: { seats: '0.5' },
|
|
23
25
|
* });
|
|
24
26
|
* ```
|
|
25
27
|
*/
|
|
@@ -82,11 +84,11 @@ export class Subscriptions extends APIResource {
|
|
|
82
84
|
* const response = await client.subscriptions.changeRateCard(
|
|
83
85
|
* 'subscription_id',
|
|
84
86
|
* {
|
|
87
|
+
* rate_card_id: 'rc_jQK2n0wutCj6bBcAIrL6o07g',
|
|
85
88
|
* checkout_callback_urls: {
|
|
86
89
|
* cancelled_url: 'https://example.com/try-again',
|
|
87
90
|
* success_url: 'https://example.com/completed',
|
|
88
91
|
* },
|
|
89
|
-
* rate_card_id: 'rc_jQK2n0wutCj6bBcAIrL6o07g',
|
|
90
92
|
* upgrade_behavior: 'prorate',
|
|
91
93
|
* },
|
|
92
94
|
* );
|
|
@@ -139,6 +141,11 @@ export interface SubscriptionResource {
|
|
|
139
141
|
*/
|
|
140
142
|
effective_at: string;
|
|
141
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The quantities of the fixed rates of the subscription.
|
|
146
|
+
*/
|
|
147
|
+
fixed_rate_quantities: { [key: string]: string };
|
|
148
|
+
|
|
142
149
|
metadata: { [key: string]: string };
|
|
143
150
|
|
|
144
151
|
/**
|
|
@@ -146,6 +153,11 @@ export interface SubscriptionResource {
|
|
|
146
153
|
*/
|
|
147
154
|
rate_card_id: string;
|
|
148
155
|
|
|
156
|
+
/**
|
|
157
|
+
* The price multipliers of the rates of the subscription.
|
|
158
|
+
*/
|
|
159
|
+
rate_price_multipliers: { [key: string]: string };
|
|
160
|
+
|
|
149
161
|
/**
|
|
150
162
|
* The status of the subscription.
|
|
151
163
|
*/
|
|
@@ -269,12 +281,6 @@ export namespace SubscriptionChangeRateCardResponse {
|
|
|
269
281
|
}
|
|
270
282
|
|
|
271
283
|
export interface SubscriptionCreateParams {
|
|
272
|
-
/**
|
|
273
|
-
* The URLs to redirect to after the checkout is completed or cancelled, if a
|
|
274
|
-
* checkout is required.
|
|
275
|
-
*/
|
|
276
|
-
checkout_callback_urls: CheckoutCallback;
|
|
277
|
-
|
|
278
284
|
/**
|
|
279
285
|
* The ID of the rate card to use for the subscription.
|
|
280
286
|
*/
|
|
@@ -285,6 +291,12 @@ export interface SubscriptionCreateParams {
|
|
|
285
291
|
*/
|
|
286
292
|
subject_id: string;
|
|
287
293
|
|
|
294
|
+
/**
|
|
295
|
+
* The URLs to redirect to after the checkout is completed or cancelled, if a
|
|
296
|
+
* checkout is required.
|
|
297
|
+
*/
|
|
298
|
+
checkout_callback_urls?: CheckoutCallback | null;
|
|
299
|
+
|
|
288
300
|
/**
|
|
289
301
|
* Determines whether a checkout session is always required even if the subject has
|
|
290
302
|
* a payment method on file. By default, if the subject has a payment method on
|
|
@@ -293,11 +305,29 @@ export interface SubscriptionCreateParams {
|
|
|
293
305
|
*/
|
|
294
306
|
create_checkout_session?: 'when_required' | 'always';
|
|
295
307
|
|
|
308
|
+
/**
|
|
309
|
+
* The quantities of the fixed rates to use for the subscription. Each quantity
|
|
310
|
+
* should be specified as a key-value pair, where the key is the `code` of the
|
|
311
|
+
* fixed rate and the value is the quantity. All fixed rates must have a quantity
|
|
312
|
+
* specified.
|
|
313
|
+
*/
|
|
314
|
+
fixed_rate_quantities?: { [key: string]: number | string };
|
|
315
|
+
|
|
296
316
|
/**
|
|
297
317
|
* Additional metadata about the subscription. You may use this to store any custom
|
|
298
318
|
* data about the subscription.
|
|
299
319
|
*/
|
|
300
320
|
metadata?: { [key: string]: string };
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Pricing multipliers to apply to the rate amounts. Each price multiplier should
|
|
324
|
+
* be specified as a key-value pair, where the key is the `code` of the rate and
|
|
325
|
+
* the value is the price multiplier. Typically, pricing multipliers are used to
|
|
326
|
+
* apply a discount to a rate. For example, if a rate is $10 per seat and the price
|
|
327
|
+
* multiplier for the `seats` rate is 0.5, the discounted rate amount will be $5
|
|
328
|
+
* per seat.
|
|
329
|
+
*/
|
|
330
|
+
rate_price_multipliers?: { [key: string]: number | string };
|
|
301
331
|
}
|
|
302
332
|
|
|
303
333
|
export interface SubscriptionListParams {
|
|
@@ -332,15 +362,15 @@ export interface SubscriptionCancelParams {
|
|
|
332
362
|
|
|
333
363
|
export interface SubscriptionChangeRateCardParams {
|
|
334
364
|
/**
|
|
335
|
-
* The
|
|
336
|
-
* checkout is required.
|
|
365
|
+
* The ID of the rate card to change the subscription to.
|
|
337
366
|
*/
|
|
338
|
-
|
|
367
|
+
rate_card_id: string;
|
|
339
368
|
|
|
340
369
|
/**
|
|
341
|
-
* The
|
|
370
|
+
* The URLs to redirect to after the checkout is completed or cancelled, if a
|
|
371
|
+
* checkout is required.
|
|
342
372
|
*/
|
|
343
|
-
|
|
373
|
+
checkout_callback_urls?: CheckoutCallback | null;
|
|
344
374
|
|
|
345
375
|
/**
|
|
346
376
|
* The behavior to use when upgrading the subscription. If 'prorate', the customer
|
|
@@ -17,9 +17,9 @@ export class UsageEvents extends APIResource {
|
|
|
17
17
|
* region: 'us-east-1',
|
|
18
18
|
* },
|
|
19
19
|
* event_name: 'job_completed',
|
|
20
|
-
* idempotency_key: '
|
|
20
|
+
* idempotency_key: '526f0753-bb0c-4eb5-9541-645bf2e023a8',
|
|
21
21
|
* subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
|
|
22
|
-
* timestamp: '2025-12-
|
|
22
|
+
* timestamp: '2025-12-18T07:07:32.616489+00:00',
|
|
23
23
|
* });
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|