lark-billing 0.0.7 → 0.0.9
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/README.md +3 -3
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +7 -2
- package/dist/cjs/api/resources/checkout/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/checkout/client/Client.js +3 -3
- package/dist/cjs/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.ts +9 -4
- package/dist/cjs/api/resources/customerPortal/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/customerPortal/client/Client.js +1 -1
- package/dist/cjs/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.ts +2 -1
- package/dist/cjs/api/resources/index.d.ts +4 -1
- package/dist/cjs/api/resources/index.js +5 -2
- package/dist/cjs/api/resources/invoices/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/invoices/client/Client.js +135 -0
- package/dist/cjs/api/resources/invoices/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/invoices/client/index.js +17 -0
- package/dist/cjs/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.d.ts +17 -0
- package/dist/cjs/api/resources/invoices/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/invoices/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/invoices/index.d.ts +1 -0
- package/dist/cjs/api/resources/invoices/index.js +17 -0
- package/dist/cjs/api/resources/pricingMetrics/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/pricingMetrics/client/Client.js +64 -0
- package/dist/cjs/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.d.ts +12 -0
- package/dist/cjs/api/resources/pricingMetrics/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/rateCards/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/rateCards/client/Client.js +1 -1
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.d.ts +9 -3
- package/dist/cjs/api/resources/rateCards/index.d.ts +1 -0
- package/dist/cjs/api/resources/rateCards/index.js +1 -0
- package/dist/cjs/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.ts +10 -0
- package/dist/cjs/api/resources/rateCards/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/rateCards/types/index.js +17 -0
- package/dist/cjs/api/resources/subjects/client/requests/CreateSubjectRequest.d.ts +4 -0
- package/dist/cjs/api/resources/subjects/client/requests/UpdateSubjectRequest.d.ts +3 -1
- package/dist/cjs/api/resources/subscriptions/client/Client.d.ts +28 -2
- package/dist/cjs/api/resources/subscriptions/client/Client.js +126 -2
- package/dist/cjs/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.d.ts +13 -0
- package/dist/cjs/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.ts +13 -0
- package/dist/cjs/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.ts +6 -3
- package/dist/cjs/api/resources/subscriptions/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +11 -1
- package/dist/cjs/api/types/Aggregation.d.ts +1 -10
- package/dist/cjs/api/types/Amount.d.ts +1 -0
- package/dist/cjs/api/types/CreateCustomerPortalSessionResponse.d.ts +2 -0
- package/dist/cjs/api/types/CreateFixedRateRequest.d.ts +11 -0
- package/dist/cjs/api/types/CreateFixedRateRequest.js +5 -0
- package/dist/cjs/api/types/CreateSimpleUsageBasedRateRequest.d.ts +15 -0
- package/dist/cjs/api/types/CreateSimpleUsageBasedRateRequest.js +5 -0
- package/dist/cjs/api/types/CreateSubjectResponse.d.ts +6 -0
- package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.d.ts +3 -0
- package/dist/cjs/api/types/FixedRateInterface.d.ts +1 -1
- package/dist/cjs/api/types/InvoiceLineItemResource.d.ts +10 -0
- package/dist/cjs/api/types/InvoiceLineItemResource.js +5 -0
- package/dist/cjs/api/types/InvoiceResource.d.ts +33 -0
- package/dist/cjs/api/types/InvoiceResource.js +16 -0
- package/dist/cjs/api/types/{CreateFixedRateInterface.d.ts → ListInvoicesResponse.d.ts} +3 -4
- package/dist/cjs/api/types/ListInvoicesResponse.js +5 -0
- package/dist/cjs/api/types/ListPricingMetricsResponse.d.ts +8 -0
- package/dist/cjs/api/types/ListPricingMetricsResponse.js +5 -0
- package/dist/cjs/api/types/PeriodResource.d.ts +9 -0
- package/dist/cjs/api/types/PeriodResource.js +5 -0
- package/dist/cjs/api/types/PricingMetricResource.d.ts +11 -0
- package/dist/cjs/api/types/PricingMetricResource.js +5 -0
- package/dist/cjs/api/types/RateCardResource.d.ts +8 -1
- package/dist/cjs/api/types/SimpleUsageBasedRateInterface.d.ts +1 -3
- package/dist/cjs/api/types/SubjectResource.d.ts +6 -0
- package/dist/cjs/api/types/SubscriptionResource.d.ts +17 -2
- package/dist/cjs/api/types/SubscriptionResource.js +1 -0
- package/dist/cjs/api/types/index.d.ts +8 -5
- package/dist/cjs/api/types/index.js +8 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/checkout/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/checkout/client/Client.mjs +3 -3
- package/dist/esm/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.mts +9 -4
- package/dist/esm/api/resources/customerPortal/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/customerPortal/client/Client.mjs +1 -1
- package/dist/esm/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.mts +2 -1
- package/dist/esm/api/resources/index.d.mts +4 -1
- package/dist/esm/api/resources/index.mjs +4 -1
- package/dist/esm/api/resources/invoices/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/invoices/client/Client.mjs +98 -0
- package/dist/esm/api/resources/invoices/client/index.d.mts +2 -0
- package/dist/esm/api/resources/invoices/client/index.mjs +1 -0
- package/dist/esm/api/resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.d.mts +17 -0
- package/dist/esm/api/resources/invoices/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/invoices/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/invoices/index.d.mts +1 -0
- package/dist/esm/api/resources/invoices/index.mjs +1 -0
- package/dist/esm/api/resources/pricingMetrics/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/pricingMetrics/client/Client.mjs +64 -0
- package/dist/esm/api/resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.d.mts +12 -0
- package/dist/esm/api/resources/pricingMetrics/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/rateCards/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/rateCards/client/Client.mjs +1 -1
- package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.d.mts +9 -3
- package/dist/esm/api/resources/rateCards/index.d.mts +1 -0
- package/dist/esm/api/resources/rateCards/index.mjs +1 -0
- package/dist/esm/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.mts +10 -0
- package/dist/esm/api/resources/rateCards/types/index.d.mts +1 -0
- package/dist/esm/api/resources/rateCards/types/index.mjs +1 -0
- package/dist/esm/api/resources/subjects/client/requests/CreateSubjectRequest.d.mts +4 -0
- package/dist/esm/api/resources/subjects/client/requests/UpdateSubjectRequest.d.mts +3 -1
- package/dist/esm/api/resources/subscriptions/client/Client.d.mts +28 -2
- package/dist/esm/api/resources/subscriptions/client/Client.mjs +126 -2
- package/dist/esm/api/resources/subscriptions/client/requests/CancelSubscriptionRequest.d.mts +13 -0
- package/dist/esm/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.mts +13 -0
- package/dist/esm/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.mts +6 -3
- package/dist/esm/api/resources/subscriptions/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +11 -1
- package/dist/esm/api/types/Aggregation.d.mts +1 -10
- package/dist/esm/api/types/Amount.d.mts +1 -0
- package/dist/esm/api/types/CreateCustomerPortalSessionResponse.d.mts +2 -0
- package/dist/esm/api/types/CreateFixedRateRequest.d.mts +11 -0
- package/dist/esm/api/types/CreateFixedRateRequest.mjs +4 -0
- package/dist/esm/api/types/CreateSimpleUsageBasedRateRequest.d.mts +15 -0
- package/dist/esm/api/types/CreateSimpleUsageBasedRateRequest.mjs +4 -0
- package/dist/esm/api/types/CreateSubjectResponse.d.mts +6 -0
- package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.d.mts +3 -0
- package/dist/esm/api/types/FixedRateInterface.d.mts +1 -1
- package/dist/esm/api/types/InvoiceLineItemResource.d.mts +10 -0
- package/dist/esm/api/types/InvoiceLineItemResource.mjs +4 -0
- package/dist/esm/api/types/InvoiceResource.d.mts +33 -0
- package/dist/esm/api/types/InvoiceResource.mjs +13 -0
- package/dist/esm/api/types/{CreateFixedRateInterface.d.mts → ListInvoicesResponse.d.mts} +3 -4
- package/dist/esm/api/types/ListInvoicesResponse.mjs +4 -0
- package/dist/esm/api/types/ListPricingMetricsResponse.d.mts +8 -0
- package/dist/esm/api/types/ListPricingMetricsResponse.mjs +4 -0
- package/dist/esm/api/types/PeriodResource.d.mts +9 -0
- package/dist/esm/api/types/PeriodResource.mjs +4 -0
- package/dist/esm/api/types/PricingMetricResource.d.mts +11 -0
- package/dist/esm/api/types/PricingMetricResource.mjs +4 -0
- package/dist/esm/api/types/RateCardResource.d.mts +8 -1
- package/dist/esm/api/types/SimpleUsageBasedRateInterface.d.mts +1 -3
- package/dist/esm/api/types/SubjectResource.d.mts +6 -0
- package/dist/esm/api/types/SubscriptionResource.d.mts +17 -2
- package/dist/esm/api/types/SubscriptionResource.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +8 -5
- package/dist/esm/api/types/index.mjs +8 -5
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +225 -7
- package/dist/cjs/api/types/CreateSimpleUsageBasedRateInterface.d.ts +0 -12
- package/dist/cjs/api/types/CustomPricingMetricResource.d.ts +0 -6
- package/dist/cjs/api/types/LastAggregationPricingMetricResource.d.ts +0 -6
- package/dist/cjs/api/types/MaxAggregationPricingMetricResource.d.ts +0 -6
- package/dist/esm/api/types/CreateSimpleUsageBasedRateInterface.d.mts +0 -12
- package/dist/esm/api/types/CustomPricingMetricResource.d.mts +0 -6
- package/dist/esm/api/types/LastAggregationPricingMetricResource.d.mts +0 -6
- package/dist/esm/api/types/MaxAggregationPricingMetricResource.d.mts +0 -6
- /package/dist/cjs/api/{types/CreateFixedRateInterface.js → resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/CreateSimpleUsageBasedRateInterface.js → resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/CustomPricingMetricResource.js → resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.js} +0 -0
- /package/dist/cjs/api/{types/LastAggregationPricingMetricResource.js → resources/subscriptions/client/requests/CancelSubscriptionRequest.js} +0 -0
- /package/dist/cjs/api/{types/MaxAggregationPricingMetricResource.js → resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.js} +0 -0
- /package/dist/esm/api/{types/CreateFixedRateInterface.mjs → resources/invoices/client/requests/ListInvoicesInvoicesGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/CreateSimpleUsageBasedRateInterface.mjs → resources/pricingMetrics/client/requests/ListPricingMetricsPricingMetricsGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/CustomPricingMetricResource.mjs → resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.mjs} +0 -0
- /package/dist/esm/api/{types/LastAggregationPricingMetricResource.mjs → resources/subscriptions/client/requests/CancelSubscriptionRequest.mjs} +0 -0
- /package/dist/esm/api/{types/MaxAggregationPricingMetricResource.mjs → resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.mjs} +0 -0
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface SubjectResource {
|
|
5
|
+
/** The ID of the subject. */
|
|
5
6
|
id: string;
|
|
7
|
+
/** The ID of the subject in your system. You may pass it to the API in place of the subject ID. */
|
|
6
8
|
external_id?: string;
|
|
9
|
+
/** The name of the subject. Used for display in the dashboard. */
|
|
7
10
|
name?: string;
|
|
11
|
+
/** The email of the subject. */
|
|
8
12
|
email?: string;
|
|
13
|
+
/** Additional metadata about the subject. You may use this to store any custom data about the subject. */
|
|
9
14
|
metadata: Record<string, string>;
|
|
15
|
+
/** The date and time the subject was created. */
|
|
10
16
|
created_at: string;
|
|
11
17
|
}
|
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Lark from "../index.mjs";
|
|
4
5
|
export interface SubscriptionResource {
|
|
6
|
+
/** The ID of the subscription. */
|
|
5
7
|
id: string;
|
|
8
|
+
/** The ID of the subject that the subscription is for. */
|
|
6
9
|
subject_id: string;
|
|
10
|
+
/** The ID of the rate card of the subscription. */
|
|
7
11
|
rate_card_id: string;
|
|
12
|
+
/** The date and time the subscription became effective. */
|
|
8
13
|
effective_at: string;
|
|
14
|
+
/** The date and time the next cycle of the subscription will start. */
|
|
9
15
|
cycles_next_at?: string;
|
|
10
|
-
|
|
16
|
+
/** The current period of the subscription if it is active. */
|
|
17
|
+
current_period?: Lark.PeriodResource;
|
|
18
|
+
metadata: Record<string, string>;
|
|
19
|
+
/** The status of the subscription. */
|
|
11
20
|
status: SubscriptionResource.Status;
|
|
21
|
+
/** Whether the subscription will be cancelled at the end of the current cycle. */
|
|
22
|
+
cancels_at_end_of_cycle: boolean;
|
|
12
23
|
}
|
|
13
24
|
export declare namespace SubscriptionResource {
|
|
14
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The status of the subscription.
|
|
27
|
+
*/
|
|
28
|
+
type Status = "active" | "cancelled" | "paused";
|
|
15
29
|
const Status: {
|
|
16
30
|
readonly Active: "active";
|
|
17
31
|
readonly Cancelled: "cancelled";
|
|
32
|
+
readonly Paused: "paused";
|
|
18
33
|
};
|
|
19
34
|
}
|
|
@@ -4,25 +4,28 @@ export * from "./CountAggregationPricingMetricInterface.mjs";
|
|
|
4
4
|
export * from "./CountAggregationPricingMetricResource.mjs";
|
|
5
5
|
export * from "./CreateCustomerPortalSessionResponse.mjs";
|
|
6
6
|
export * from "./Price.mjs";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./CreateFixedRateRequest.mjs";
|
|
8
8
|
export * from "./Aggregation.mjs";
|
|
9
9
|
export * from "./CreatePricingMetricResponse.mjs";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./CreateSimpleUsageBasedRateRequest.mjs";
|
|
11
11
|
export * from "./CreateSubjectResponse.mjs";
|
|
12
12
|
export * from "./CreateSubscriptionCheckoutSessionResponse.mjs";
|
|
13
13
|
export * from "./CreateUsageEventSummaryResponse.mjs";
|
|
14
|
-
export * from "./CustomPricingMetricResource.mjs";
|
|
15
14
|
export * from "./FixedRateInterface.mjs";
|
|
16
15
|
export * from "./FlatPrice.mjs";
|
|
17
16
|
export * from "./GetPricingMetricResponse.mjs";
|
|
18
17
|
export * from "./HttpValidationError.mjs";
|
|
19
|
-
export * from "./
|
|
18
|
+
export * from "./InvoiceLineItemResource.mjs";
|
|
19
|
+
export * from "./InvoiceResource.mjs";
|
|
20
|
+
export * from "./ListInvoicesResponse.mjs";
|
|
21
|
+
export * from "./ListPricingMetricsResponse.mjs";
|
|
20
22
|
export * from "./ListRateCardsResponse.mjs";
|
|
21
23
|
export * from "./ListSubjectsResponse.mjs";
|
|
22
24
|
export * from "./ListSubscriptionsResponse.mjs";
|
|
23
|
-
export * from "./MaxAggregationPricingMetricResource.mjs";
|
|
24
25
|
export * from "./PackagePrice.mjs";
|
|
25
26
|
export * from "./Period.mjs";
|
|
27
|
+
export * from "./PeriodResource.mjs";
|
|
28
|
+
export * from "./PricingMetricResource.mjs";
|
|
26
29
|
export * from "./RateCardResourceUsageBasedRatesItem.mjs";
|
|
27
30
|
export * from "./RateCardResource.mjs";
|
|
28
31
|
export * from "./SimpleUsageBasedRateInterface.mjs";
|
|
@@ -4,25 +4,28 @@ export * from "./CountAggregationPricingMetricInterface.mjs";
|
|
|
4
4
|
export * from "./CountAggregationPricingMetricResource.mjs";
|
|
5
5
|
export * from "./CreateCustomerPortalSessionResponse.mjs";
|
|
6
6
|
export * from "./Price.mjs";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./CreateFixedRateRequest.mjs";
|
|
8
8
|
export * from "./Aggregation.mjs";
|
|
9
9
|
export * from "./CreatePricingMetricResponse.mjs";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./CreateSimpleUsageBasedRateRequest.mjs";
|
|
11
11
|
export * from "./CreateSubjectResponse.mjs";
|
|
12
12
|
export * from "./CreateSubscriptionCheckoutSessionResponse.mjs";
|
|
13
13
|
export * from "./CreateUsageEventSummaryResponse.mjs";
|
|
14
|
-
export * from "./CustomPricingMetricResource.mjs";
|
|
15
14
|
export * from "./FixedRateInterface.mjs";
|
|
16
15
|
export * from "./FlatPrice.mjs";
|
|
17
16
|
export * from "./GetPricingMetricResponse.mjs";
|
|
18
17
|
export * from "./HttpValidationError.mjs";
|
|
19
|
-
export * from "./
|
|
18
|
+
export * from "./InvoiceLineItemResource.mjs";
|
|
19
|
+
export * from "./InvoiceResource.mjs";
|
|
20
|
+
export * from "./ListInvoicesResponse.mjs";
|
|
21
|
+
export * from "./ListPricingMetricsResponse.mjs";
|
|
20
22
|
export * from "./ListRateCardsResponse.mjs";
|
|
21
23
|
export * from "./ListSubjectsResponse.mjs";
|
|
22
24
|
export * from "./ListSubscriptionsResponse.mjs";
|
|
23
|
-
export * from "./MaxAggregationPricingMetricResource.mjs";
|
|
24
25
|
export * from "./PackagePrice.mjs";
|
|
25
26
|
export * from "./Period.mjs";
|
|
27
|
+
export * from "./PeriodResource.mjs";
|
|
28
|
+
export * from "./PricingMetricResource.mjs";
|
|
26
29
|
export * from "./RateCardResourceUsageBasedRatesItem.mjs";
|
|
27
30
|
export * from "./RateCardResource.mjs";
|
|
28
31
|
export * from "./SimpleUsageBasedRateInterface.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.9";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.9";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
await client.checkout.createSubscriptionCheckoutSession({
|
|
19
|
-
subject_id: "
|
|
20
|
-
rate_card_id: "
|
|
21
|
-
|
|
19
|
+
subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
20
|
+
rate_card_id: "rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
21
|
+
success_callback_url: "https://example.com/callback",
|
|
22
22
|
});
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -70,7 +70,7 @@ await client.checkout.createSubscriptionCheckoutSession({
|
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
await client.customerPortal.createCustomerPortalSession({
|
|
73
|
-
subject_id: "
|
|
73
|
+
subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
74
74
|
});
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -172,7 +172,7 @@ await client.rateCards.listRateCards({
|
|
|
172
172
|
|
|
173
173
|
```typescript
|
|
174
174
|
await client.rateCards.createRateCard({
|
|
175
|
-
name: "
|
|
175
|
+
name: "Pro Plan",
|
|
176
176
|
billing_interval: "monthly",
|
|
177
177
|
});
|
|
178
178
|
```
|
|
@@ -438,8 +438,8 @@ await client.subscriptions.listSubscriptions({
|
|
|
438
438
|
|
|
439
439
|
```typescript
|
|
440
440
|
await client.subscriptions.createSubscription({
|
|
441
|
-
rate_card_id: "
|
|
442
|
-
subject_id: "
|
|
441
|
+
rate_card_id: "rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
442
|
+
subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
443
443
|
});
|
|
444
444
|
```
|
|
445
445
|
|
|
@@ -523,6 +523,120 @@ await client.subscriptions.getSubscription("subscription_id");
|
|
|
523
523
|
</dl>
|
|
524
524
|
</details>
|
|
525
525
|
|
|
526
|
+
<details><summary><code>client.subscriptions.<a href="/src/api/resources/subscriptions/client/Client.ts">cancelSubscription</a>(subscriptionId, { ...params }) -> Lark.SubscriptionResource</code></summary>
|
|
527
|
+
<dl>
|
|
528
|
+
<dd>
|
|
529
|
+
|
|
530
|
+
#### 🔌 Usage
|
|
531
|
+
|
|
532
|
+
<dl>
|
|
533
|
+
<dd>
|
|
534
|
+
|
|
535
|
+
<dl>
|
|
536
|
+
<dd>
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
await client.subscriptions.cancelSubscription("subscription_id");
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
</dd>
|
|
543
|
+
</dl>
|
|
544
|
+
</dd>
|
|
545
|
+
</dl>
|
|
546
|
+
|
|
547
|
+
#### ⚙️ Parameters
|
|
548
|
+
|
|
549
|
+
<dl>
|
|
550
|
+
<dd>
|
|
551
|
+
|
|
552
|
+
<dl>
|
|
553
|
+
<dd>
|
|
554
|
+
|
|
555
|
+
**subscriptionId:** `string`
|
|
556
|
+
|
|
557
|
+
</dd>
|
|
558
|
+
</dl>
|
|
559
|
+
|
|
560
|
+
<dl>
|
|
561
|
+
<dd>
|
|
562
|
+
|
|
563
|
+
**request:** `Lark.CancelSubscriptionRequest`
|
|
564
|
+
|
|
565
|
+
</dd>
|
|
566
|
+
</dl>
|
|
567
|
+
|
|
568
|
+
<dl>
|
|
569
|
+
<dd>
|
|
570
|
+
|
|
571
|
+
**requestOptions:** `Subscriptions.RequestOptions`
|
|
572
|
+
|
|
573
|
+
</dd>
|
|
574
|
+
</dl>
|
|
575
|
+
</dd>
|
|
576
|
+
</dl>
|
|
577
|
+
|
|
578
|
+
</dd>
|
|
579
|
+
</dl>
|
|
580
|
+
</details>
|
|
581
|
+
|
|
582
|
+
<details><summary><code>client.subscriptions.<a href="/src/api/resources/subscriptions/client/Client.ts">changeSubscriptionRateCard</a>(subscriptionId, { ...params }) -> Lark.SubscriptionResource</code></summary>
|
|
583
|
+
<dl>
|
|
584
|
+
<dd>
|
|
585
|
+
|
|
586
|
+
#### 🔌 Usage
|
|
587
|
+
|
|
588
|
+
<dl>
|
|
589
|
+
<dd>
|
|
590
|
+
|
|
591
|
+
<dl>
|
|
592
|
+
<dd>
|
|
593
|
+
|
|
594
|
+
```typescript
|
|
595
|
+
await client.subscriptions.changeSubscriptionRateCard("subscription_id", {
|
|
596
|
+
rate_card_id: "rc_jQK2n0wutCj6bBcAIrL6o07g",
|
|
597
|
+
});
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
</dd>
|
|
601
|
+
</dl>
|
|
602
|
+
</dd>
|
|
603
|
+
</dl>
|
|
604
|
+
|
|
605
|
+
#### ⚙️ Parameters
|
|
606
|
+
|
|
607
|
+
<dl>
|
|
608
|
+
<dd>
|
|
609
|
+
|
|
610
|
+
<dl>
|
|
611
|
+
<dd>
|
|
612
|
+
|
|
613
|
+
**subscriptionId:** `string`
|
|
614
|
+
|
|
615
|
+
</dd>
|
|
616
|
+
</dl>
|
|
617
|
+
|
|
618
|
+
<dl>
|
|
619
|
+
<dd>
|
|
620
|
+
|
|
621
|
+
**request:** `Lark.ChangeSubscriptionRateCardRequest`
|
|
622
|
+
|
|
623
|
+
</dd>
|
|
624
|
+
</dl>
|
|
625
|
+
|
|
626
|
+
<dl>
|
|
627
|
+
<dd>
|
|
628
|
+
|
|
629
|
+
**requestOptions:** `Subscriptions.RequestOptions`
|
|
630
|
+
|
|
631
|
+
</dd>
|
|
632
|
+
</dl>
|
|
633
|
+
</dd>
|
|
634
|
+
</dl>
|
|
635
|
+
|
|
636
|
+
</dd>
|
|
637
|
+
</dl>
|
|
638
|
+
</details>
|
|
639
|
+
|
|
526
640
|
## Subjects
|
|
527
641
|
|
|
528
642
|
<details><summary><code>client.subjects.<a href="/src/api/resources/subjects/client/Client.ts">listSubjects</a>({ ...params }) -> Lark.ListSubjectsResponse</code></summary>
|
|
@@ -778,6 +892,56 @@ await client.subjects.deleteSubject("subject_id");
|
|
|
778
892
|
|
|
779
893
|
## PricingMetrics
|
|
780
894
|
|
|
895
|
+
<details><summary><code>client.pricingMetrics.<a href="/src/api/resources/pricingMetrics/client/Client.ts">listPricingMetrics</a>({ ...params }) -> Lark.ListPricingMetricsResponse</code></summary>
|
|
896
|
+
<dl>
|
|
897
|
+
<dd>
|
|
898
|
+
|
|
899
|
+
#### 🔌 Usage
|
|
900
|
+
|
|
901
|
+
<dl>
|
|
902
|
+
<dd>
|
|
903
|
+
|
|
904
|
+
<dl>
|
|
905
|
+
<dd>
|
|
906
|
+
|
|
907
|
+
```typescript
|
|
908
|
+
await client.pricingMetrics.listPricingMetrics({
|
|
909
|
+
limit: 1,
|
|
910
|
+
});
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
</dd>
|
|
914
|
+
</dl>
|
|
915
|
+
</dd>
|
|
916
|
+
</dl>
|
|
917
|
+
|
|
918
|
+
#### ⚙️ Parameters
|
|
919
|
+
|
|
920
|
+
<dl>
|
|
921
|
+
<dd>
|
|
922
|
+
|
|
923
|
+
<dl>
|
|
924
|
+
<dd>
|
|
925
|
+
|
|
926
|
+
**request:** `Lark.ListPricingMetricsPricingMetricsGetRequest`
|
|
927
|
+
|
|
928
|
+
</dd>
|
|
929
|
+
</dl>
|
|
930
|
+
|
|
931
|
+
<dl>
|
|
932
|
+
<dd>
|
|
933
|
+
|
|
934
|
+
**requestOptions:** `PricingMetrics.RequestOptions`
|
|
935
|
+
|
|
936
|
+
</dd>
|
|
937
|
+
</dl>
|
|
938
|
+
</dd>
|
|
939
|
+
</dl>
|
|
940
|
+
|
|
941
|
+
</dd>
|
|
942
|
+
</dl>
|
|
943
|
+
</details>
|
|
944
|
+
|
|
781
945
|
<details><summary><code>client.pricingMetrics.<a href="/src/api/resources/pricingMetrics/client/Client.ts">createPricingMetric</a>({ ...params }) -> Lark.CreatePricingMetricResponse</code></summary>
|
|
782
946
|
<dl>
|
|
783
947
|
<dd>
|
|
@@ -930,3 +1094,57 @@ await client.customerAccess.getBillingState("subject_id");
|
|
|
930
1094
|
</dd>
|
|
931
1095
|
</dl>
|
|
932
1096
|
</details>
|
|
1097
|
+
|
|
1098
|
+
## Invoices
|
|
1099
|
+
|
|
1100
|
+
<details><summary><code>client.invoices.<a href="/src/api/resources/invoices/client/Client.ts">listInvoices</a>({ ...params }) -> Lark.ListInvoicesResponse</code></summary>
|
|
1101
|
+
<dl>
|
|
1102
|
+
<dd>
|
|
1103
|
+
|
|
1104
|
+
#### 🔌 Usage
|
|
1105
|
+
|
|
1106
|
+
<dl>
|
|
1107
|
+
<dd>
|
|
1108
|
+
|
|
1109
|
+
<dl>
|
|
1110
|
+
<dd>
|
|
1111
|
+
|
|
1112
|
+
```typescript
|
|
1113
|
+
await client.invoices.listInvoices({
|
|
1114
|
+
subject_id: "subject_id",
|
|
1115
|
+
limit: 1,
|
|
1116
|
+
offset: 1,
|
|
1117
|
+
});
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
</dd>
|
|
1121
|
+
</dl>
|
|
1122
|
+
</dd>
|
|
1123
|
+
</dl>
|
|
1124
|
+
|
|
1125
|
+
#### ⚙️ Parameters
|
|
1126
|
+
|
|
1127
|
+
<dl>
|
|
1128
|
+
<dd>
|
|
1129
|
+
|
|
1130
|
+
<dl>
|
|
1131
|
+
<dd>
|
|
1132
|
+
|
|
1133
|
+
**request:** `Lark.ListInvoicesInvoicesGetRequest`
|
|
1134
|
+
|
|
1135
|
+
</dd>
|
|
1136
|
+
</dl>
|
|
1137
|
+
|
|
1138
|
+
<dl>
|
|
1139
|
+
<dd>
|
|
1140
|
+
|
|
1141
|
+
**requestOptions:** `Invoices.RequestOptions`
|
|
1142
|
+
|
|
1143
|
+
</dd>
|
|
1144
|
+
</dl>
|
|
1145
|
+
</dd>
|
|
1146
|
+
</dl>
|
|
1147
|
+
|
|
1148
|
+
</dd>
|
|
1149
|
+
</dl>
|
|
1150
|
+
</details>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Lark from "../index.js";
|
|
5
|
-
export interface CreateSimpleUsageBasedRateInterface {
|
|
6
|
-
usage_based_rate_type?: "simple";
|
|
7
|
-
name?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
price: Lark.Price;
|
|
10
|
-
included_units?: number;
|
|
11
|
-
pricing_metric_id: string;
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Lark from "../index.mjs";
|
|
5
|
-
export interface CreateSimpleUsageBasedRateInterface {
|
|
6
|
-
usage_based_rate_type?: "simple";
|
|
7
|
-
name?: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
price: Lark.Price;
|
|
10
|
-
included_units?: number;
|
|
11
|
-
pricing_metric_id: string;
|
|
12
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|