lark-billing 0.0.8__tar.gz → 0.0.9__tar.gz
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.
Potentially problematic release.
This version of lark-billing might be problematic. Click here for more details.
- {lark_billing-0.0.8 → lark_billing-0.0.9}/PKG-INFO +5 -5
- {lark_billing-0.0.8 → lark_billing-0.0.9}/README.md +4 -4
- {lark_billing-0.0.8 → lark_billing-0.0.9}/pyproject.toml +1 -1
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/__init__.py +3 -1
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/checkout/client.py +8 -4
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/checkout/raw_client.py +4 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/client_wrapper.py +2 -2
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_portal/client.py +4 -2
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_portal/raw_client.py +2 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/client.py +16 -10
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/raw_client.py +20 -14
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +1 -1
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subscriptions/client.py +4 -2
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subscriptions/raw_client.py +2 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/amount.py +4 -1
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_customer_portal_session_response.py +9 -2
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_fixed_rate_request.py +10 -2
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_simple_usage_based_rate_request.py +15 -3
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_subscription_checkout_session_response.py +14 -3
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/fixed_rate_interface.py +1 -1
- lark_billing-0.0.9/src/lark/types/invoice_resource.py +56 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/rate_card_resource.py +36 -7
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/rate_card_resource_usage_based_rates_item.py +1 -1
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/simple_usage_based_rate_interface.py +1 -1
- lark_billing-0.0.9/src/lark/types/subscription_resource.py +61 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/usage_events/__init__.py +6 -3
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/usage_events/client.py +15 -4
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/usage_events/raw_client.py +21 -6
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/usage_events/types/__init__.py +4 -2
- lark_billing-0.0.9/src/lark/usage_events/types/create_usage_event_request_data_value.py +5 -0
- lark_billing-0.0.8/src/lark/types/invoice_resource.py +0 -31
- lark_billing-0.0.8/src/lark/types/subscription_resource.py +0 -30
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/checkout/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/api_error.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/datetime_utils.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/file.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/force_multipart.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_sse/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_sse/_api.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_sse/_decoders.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_sse/_exceptions.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/http_sse/_models.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/jsonable_encoder.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/pydantic_utilities.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/query_encoder.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/remove_none_from_dict.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/request_options.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/core/serialization.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_access/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_access/client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_access/raw_client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/customer_portal/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/environment.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/errors/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/errors/unprocessable_entity_error.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/invoices/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/invoices/client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/invoices/raw_client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/pricing_metrics/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/pricing_metrics/client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/pricing_metrics/raw_client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/pricing_metrics/types/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/pricing_metrics/types/pricing_metric_aggregation.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/py.typed +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/types/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/rate_cards/types/create_rate_card_request_billing_interval.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subjects/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subjects/client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subjects/raw_client.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/subscriptions/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/__init__.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/aggregation.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/billing_state_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/count_aggregation_pricing_metric_interface.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/count_aggregation_pricing_metric_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_pricing_metric_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_subject_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_usage_event_summary_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/flat_price.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/get_pricing_metric_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/http_validation_error.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/invoice_line_item_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/invoice_status.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/list_invoices_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/list_pricing_metrics_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/list_rate_cards_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/list_subjects_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/list_subscriptions_response.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/package_price.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/package_price_input_rounding_behavior.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/package_price_output_rounding_behavior.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/period.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/period_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/price.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/pricing_metric_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/rate_card_resource_billing_interval.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/subject_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/subscription_status.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/sum_aggregation_pricing_metric_interface.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/sum_aggregation_pricing_metric_resource.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/validation_error.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/validation_error_loc_item.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/value.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/usage_events/types/create_usage_event_summary_request_aggregation_type.py +0 -0
- {lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lark-billing
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -53,8 +53,8 @@ client = Lark(
|
|
|
53
53
|
api_key="YOUR_API_KEY",
|
|
54
54
|
)
|
|
55
55
|
client.checkout.create_subscription_checkout_session(
|
|
56
|
-
subject_id="
|
|
57
|
-
rate_card_id="
|
|
56
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
57
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
58
58
|
success_callback_url="https://example.com/callback",
|
|
59
59
|
)
|
|
60
60
|
```
|
|
@@ -75,8 +75,8 @@ client = AsyncLark(
|
|
|
75
75
|
|
|
76
76
|
async def main() -> None:
|
|
77
77
|
await client.checkout.create_subscription_checkout_session(
|
|
78
|
-
subject_id="
|
|
79
|
-
rate_card_id="
|
|
78
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
79
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
80
80
|
success_callback_url="https://example.com/callback",
|
|
81
81
|
)
|
|
82
82
|
|
|
@@ -26,8 +26,8 @@ client = Lark(
|
|
|
26
26
|
api_key="YOUR_API_KEY",
|
|
27
27
|
)
|
|
28
28
|
client.checkout.create_subscription_checkout_session(
|
|
29
|
-
subject_id="
|
|
30
|
-
rate_card_id="
|
|
29
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
30
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
31
31
|
success_callback_url="https://example.com/callback",
|
|
32
32
|
)
|
|
33
33
|
```
|
|
@@ -48,8 +48,8 @@ client = AsyncLark(
|
|
|
48
48
|
|
|
49
49
|
async def main() -> None:
|
|
50
50
|
await client.checkout.create_subscription_checkout_session(
|
|
51
|
-
subject_id="
|
|
52
|
-
rate_card_id="
|
|
51
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
52
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
53
53
|
success_callback_url="https://example.com/callback",
|
|
54
54
|
)
|
|
55
55
|
|
|
@@ -76,7 +76,7 @@ if typing.TYPE_CHECKING:
|
|
|
76
76
|
CreateRateCardRequestUsageBasedRatesItem,
|
|
77
77
|
CreateRateCardRequestUsageBasedRatesItem_Simple,
|
|
78
78
|
)
|
|
79
|
-
from .usage_events import CreateUsageEventSummaryRequestAggregationType
|
|
79
|
+
from .usage_events import CreateUsageEventRequestDataValue, CreateUsageEventSummaryRequestAggregationType
|
|
80
80
|
from .version import __version__
|
|
81
81
|
_dynamic_imports: typing.Dict[str, str] = {
|
|
82
82
|
"Aggregation": ".types",
|
|
@@ -96,6 +96,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
96
96
|
"CreateSimpleUsageBasedRateRequest": ".types",
|
|
97
97
|
"CreateSubjectResponse": ".types",
|
|
98
98
|
"CreateSubscriptionCheckoutSessionResponse": ".types",
|
|
99
|
+
"CreateUsageEventRequestDataValue": ".usage_events",
|
|
99
100
|
"CreateUsageEventSummaryRequestAggregationType": ".usage_events",
|
|
100
101
|
"CreateUsageEventSummaryResponse": ".types",
|
|
101
102
|
"FixedRateInterface": ".types",
|
|
@@ -190,6 +191,7 @@ __all__ = [
|
|
|
190
191
|
"CreateSimpleUsageBasedRateRequest",
|
|
191
192
|
"CreateSubjectResponse",
|
|
192
193
|
"CreateSubscriptionCheckoutSessionResponse",
|
|
194
|
+
"CreateUsageEventRequestDataValue",
|
|
193
195
|
"CreateUsageEventSummaryRequestAggregationType",
|
|
194
196
|
"CreateUsageEventSummaryResponse",
|
|
195
197
|
"FixedRateInterface",
|
|
@@ -39,8 +39,10 @@ class CheckoutClient:
|
|
|
39
39
|
Parameters
|
|
40
40
|
----------
|
|
41
41
|
subject_id : str
|
|
42
|
+
The ID of the subject to create the checkout for.
|
|
42
43
|
|
|
43
44
|
rate_card_id : str
|
|
45
|
+
The ID of the rate card to subscribe to.
|
|
44
46
|
|
|
45
47
|
success_callback_url : str
|
|
46
48
|
The URL to redirect to after the checkout is successful.
|
|
@@ -64,8 +66,8 @@ class CheckoutClient:
|
|
|
64
66
|
api_key="YOUR_API_KEY",
|
|
65
67
|
)
|
|
66
68
|
client.checkout.create_subscription_checkout_session(
|
|
67
|
-
subject_id="
|
|
68
|
-
rate_card_id="
|
|
69
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
70
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
69
71
|
success_callback_url="https://example.com/callback",
|
|
70
72
|
)
|
|
71
73
|
"""
|
|
@@ -107,8 +109,10 @@ class AsyncCheckoutClient:
|
|
|
107
109
|
Parameters
|
|
108
110
|
----------
|
|
109
111
|
subject_id : str
|
|
112
|
+
The ID of the subject to create the checkout for.
|
|
110
113
|
|
|
111
114
|
rate_card_id : str
|
|
115
|
+
The ID of the rate card to subscribe to.
|
|
112
116
|
|
|
113
117
|
success_callback_url : str
|
|
114
118
|
The URL to redirect to after the checkout is successful.
|
|
@@ -137,8 +141,8 @@ class AsyncCheckoutClient:
|
|
|
137
141
|
|
|
138
142
|
async def main() -> None:
|
|
139
143
|
await client.checkout.create_subscription_checkout_session(
|
|
140
|
-
subject_id="
|
|
141
|
-
rate_card_id="
|
|
144
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
145
|
+
rate_card_id="rc_AJWMxR81jxoRlli6p13uf3JB",
|
|
142
146
|
success_callback_url="https://example.com/callback",
|
|
143
147
|
)
|
|
144
148
|
|
|
@@ -33,8 +33,10 @@ class RawCheckoutClient:
|
|
|
33
33
|
Parameters
|
|
34
34
|
----------
|
|
35
35
|
subject_id : str
|
|
36
|
+
The ID of the subject to create the checkout for.
|
|
36
37
|
|
|
37
38
|
rate_card_id : str
|
|
39
|
+
The ID of the rate card to subscribe to.
|
|
38
40
|
|
|
39
41
|
success_callback_url : str
|
|
40
42
|
The URL to redirect to after the checkout is successful.
|
|
@@ -109,8 +111,10 @@ class AsyncRawCheckoutClient:
|
|
|
109
111
|
Parameters
|
|
110
112
|
----------
|
|
111
113
|
subject_id : str
|
|
114
|
+
The ID of the subject to create the checkout for.
|
|
112
115
|
|
|
113
116
|
rate_card_id : str
|
|
117
|
+
The ID of the rate card to subscribe to.
|
|
114
118
|
|
|
115
119
|
success_callback_url : str
|
|
116
120
|
The URL to redirect to after the checkout is successful.
|
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "lark-billing/0.0.
|
|
25
|
+
"User-Agent": "lark-billing/0.0.9",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "lark-billing",
|
|
28
|
-
"X-Fern-SDK-Version": "0.0.
|
|
28
|
+
"X-Fern-SDK-Version": "0.0.9",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["X-API-Key"] = self.api_key
|
|
@@ -33,6 +33,7 @@ class CustomerPortalClient:
|
|
|
33
33
|
Parameters
|
|
34
34
|
----------
|
|
35
35
|
subject_id : str
|
|
36
|
+
The ID of the subject to create the customer portal session for.
|
|
36
37
|
|
|
37
38
|
request_options : typing.Optional[RequestOptions]
|
|
38
39
|
Request-specific configuration.
|
|
@@ -50,7 +51,7 @@ class CustomerPortalClient:
|
|
|
50
51
|
api_key="YOUR_API_KEY",
|
|
51
52
|
)
|
|
52
53
|
client.customer_portal.create_customer_portal_session(
|
|
53
|
-
subject_id="
|
|
54
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
54
55
|
)
|
|
55
56
|
"""
|
|
56
57
|
_response = self._raw_client.create_customer_portal_session(
|
|
@@ -81,6 +82,7 @@ class AsyncCustomerPortalClient:
|
|
|
81
82
|
Parameters
|
|
82
83
|
----------
|
|
83
84
|
subject_id : str
|
|
85
|
+
The ID of the subject to create the customer portal session for.
|
|
84
86
|
|
|
85
87
|
request_options : typing.Optional[RequestOptions]
|
|
86
88
|
Request-specific configuration.
|
|
@@ -103,7 +105,7 @@ class AsyncCustomerPortalClient:
|
|
|
103
105
|
|
|
104
106
|
async def main() -> None:
|
|
105
107
|
await client.customer_portal.create_customer_portal_session(
|
|
106
|
-
subject_id="
|
|
108
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
107
109
|
)
|
|
108
110
|
|
|
109
111
|
|
|
@@ -27,6 +27,7 @@ class RawCustomerPortalClient:
|
|
|
27
27
|
Parameters
|
|
28
28
|
----------
|
|
29
29
|
subject_id : str
|
|
30
|
+
The ID of the subject to create the customer portal session for.
|
|
30
31
|
|
|
31
32
|
request_options : typing.Optional[RequestOptions]
|
|
32
33
|
Request-specific configuration.
|
|
@@ -86,6 +87,7 @@ class AsyncRawCustomerPortalClient:
|
|
|
86
87
|
Parameters
|
|
87
88
|
----------
|
|
88
89
|
subject_id : str
|
|
90
|
+
The ID of the subject to create the customer portal session for.
|
|
89
91
|
|
|
90
92
|
request_options : typing.Optional[RequestOptions]
|
|
91
93
|
Request-specific configuration.
|
|
@@ -66,8 +66,8 @@ class RateCardsClient:
|
|
|
66
66
|
name: str,
|
|
67
67
|
billing_interval: CreateRateCardRequestBillingInterval,
|
|
68
68
|
description: typing.Optional[str] = OMIT,
|
|
69
|
-
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
70
69
|
fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateRequest]] = OMIT,
|
|
70
|
+
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
71
71
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
72
72
|
request_options: typing.Optional[RequestOptions] = None,
|
|
73
73
|
) -> RateCardResource:
|
|
@@ -75,15 +75,18 @@ class RateCardsClient:
|
|
|
75
75
|
Parameters
|
|
76
76
|
----------
|
|
77
77
|
name : str
|
|
78
|
+
The name of the rate card displayed to the customer.
|
|
78
79
|
|
|
79
80
|
billing_interval : CreateRateCardRequestBillingInterval
|
|
81
|
+
How often the customer will be billed for this rate card.
|
|
80
82
|
|
|
81
83
|
description : typing.Optional[str]
|
|
82
|
-
|
|
83
|
-
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
84
|
+
The description of the rate card displayed to the customer.
|
|
84
85
|
|
|
85
86
|
fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
|
|
86
87
|
|
|
88
|
+
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
89
|
+
|
|
87
90
|
metadata : typing.Optional[typing.Dict[str, str]]
|
|
88
91
|
|
|
89
92
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -102,7 +105,7 @@ class RateCardsClient:
|
|
|
102
105
|
api_key="YOUR_API_KEY",
|
|
103
106
|
)
|
|
104
107
|
client.rate_cards.create_rate_card(
|
|
105
|
-
name="
|
|
108
|
+
name="Pro Plan",
|
|
106
109
|
billing_interval="monthly",
|
|
107
110
|
)
|
|
108
111
|
"""
|
|
@@ -110,8 +113,8 @@ class RateCardsClient:
|
|
|
110
113
|
name=name,
|
|
111
114
|
billing_interval=billing_interval,
|
|
112
115
|
description=description,
|
|
113
|
-
usage_based_rates=usage_based_rates,
|
|
114
116
|
fixed_rates=fixed_rates,
|
|
117
|
+
usage_based_rates=usage_based_rates,
|
|
115
118
|
metadata=metadata,
|
|
116
119
|
request_options=request_options,
|
|
117
120
|
)
|
|
@@ -207,8 +210,8 @@ class AsyncRateCardsClient:
|
|
|
207
210
|
name: str,
|
|
208
211
|
billing_interval: CreateRateCardRequestBillingInterval,
|
|
209
212
|
description: typing.Optional[str] = OMIT,
|
|
210
|
-
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
211
213
|
fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateRequest]] = OMIT,
|
|
214
|
+
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
212
215
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
213
216
|
request_options: typing.Optional[RequestOptions] = None,
|
|
214
217
|
) -> RateCardResource:
|
|
@@ -216,15 +219,18 @@ class AsyncRateCardsClient:
|
|
|
216
219
|
Parameters
|
|
217
220
|
----------
|
|
218
221
|
name : str
|
|
222
|
+
The name of the rate card displayed to the customer.
|
|
219
223
|
|
|
220
224
|
billing_interval : CreateRateCardRequestBillingInterval
|
|
225
|
+
How often the customer will be billed for this rate card.
|
|
221
226
|
|
|
222
227
|
description : typing.Optional[str]
|
|
223
|
-
|
|
224
|
-
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
228
|
+
The description of the rate card displayed to the customer.
|
|
225
229
|
|
|
226
230
|
fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
|
|
227
231
|
|
|
232
|
+
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
233
|
+
|
|
228
234
|
metadata : typing.Optional[typing.Dict[str, str]]
|
|
229
235
|
|
|
230
236
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -248,7 +254,7 @@ class AsyncRateCardsClient:
|
|
|
248
254
|
|
|
249
255
|
async def main() -> None:
|
|
250
256
|
await client.rate_cards.create_rate_card(
|
|
251
|
-
name="
|
|
257
|
+
name="Pro Plan",
|
|
252
258
|
billing_interval="monthly",
|
|
253
259
|
)
|
|
254
260
|
|
|
@@ -259,8 +265,8 @@ class AsyncRateCardsClient:
|
|
|
259
265
|
name=name,
|
|
260
266
|
billing_interval=billing_interval,
|
|
261
267
|
description=description,
|
|
262
|
-
usage_based_rates=usage_based_rates,
|
|
263
268
|
fixed_rates=fixed_rates,
|
|
269
|
+
usage_based_rates=usage_based_rates,
|
|
264
270
|
metadata=metadata,
|
|
265
271
|
request_options=request_options,
|
|
266
272
|
)
|
|
@@ -82,8 +82,8 @@ class RawRateCardsClient:
|
|
|
82
82
|
name: str,
|
|
83
83
|
billing_interval: CreateRateCardRequestBillingInterval,
|
|
84
84
|
description: typing.Optional[str] = OMIT,
|
|
85
|
-
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
86
85
|
fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateRequest]] = OMIT,
|
|
86
|
+
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
87
87
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
88
88
|
request_options: typing.Optional[RequestOptions] = None,
|
|
89
89
|
) -> HttpResponse[RateCardResource]:
|
|
@@ -91,15 +91,18 @@ class RawRateCardsClient:
|
|
|
91
91
|
Parameters
|
|
92
92
|
----------
|
|
93
93
|
name : str
|
|
94
|
+
The name of the rate card displayed to the customer.
|
|
94
95
|
|
|
95
96
|
billing_interval : CreateRateCardRequestBillingInterval
|
|
97
|
+
How often the customer will be billed for this rate card.
|
|
96
98
|
|
|
97
99
|
description : typing.Optional[str]
|
|
98
|
-
|
|
99
|
-
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
100
|
+
The description of the rate card displayed to the customer.
|
|
100
101
|
|
|
101
102
|
fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
|
|
102
103
|
|
|
104
|
+
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
105
|
+
|
|
103
106
|
metadata : typing.Optional[typing.Dict[str, str]]
|
|
104
107
|
|
|
105
108
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -116,15 +119,15 @@ class RawRateCardsClient:
|
|
|
116
119
|
json={
|
|
117
120
|
"name": name,
|
|
118
121
|
"description": description,
|
|
122
|
+
"billing_interval": billing_interval,
|
|
123
|
+
"fixed_rates": convert_and_respect_annotation_metadata(
|
|
124
|
+
object_=fixed_rates, annotation=typing.Sequence[CreateFixedRateRequest], direction="write"
|
|
125
|
+
),
|
|
119
126
|
"usage_based_rates": convert_and_respect_annotation_metadata(
|
|
120
127
|
object_=usage_based_rates,
|
|
121
128
|
annotation=typing.Sequence[CreateRateCardRequestUsageBasedRatesItem],
|
|
122
129
|
direction="write",
|
|
123
130
|
),
|
|
124
|
-
"fixed_rates": convert_and_respect_annotation_metadata(
|
|
125
|
-
object_=fixed_rates, annotation=typing.Sequence[CreateFixedRateRequest], direction="write"
|
|
126
|
-
),
|
|
127
|
-
"billing_interval": billing_interval,
|
|
128
131
|
"metadata": metadata,
|
|
129
132
|
},
|
|
130
133
|
headers={
|
|
@@ -267,8 +270,8 @@ class AsyncRawRateCardsClient:
|
|
|
267
270
|
name: str,
|
|
268
271
|
billing_interval: CreateRateCardRequestBillingInterval,
|
|
269
272
|
description: typing.Optional[str] = OMIT,
|
|
270
|
-
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
271
273
|
fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateRequest]] = OMIT,
|
|
274
|
+
usage_based_rates: typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]] = OMIT,
|
|
272
275
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
273
276
|
request_options: typing.Optional[RequestOptions] = None,
|
|
274
277
|
) -> AsyncHttpResponse[RateCardResource]:
|
|
@@ -276,15 +279,18 @@ class AsyncRawRateCardsClient:
|
|
|
276
279
|
Parameters
|
|
277
280
|
----------
|
|
278
281
|
name : str
|
|
282
|
+
The name of the rate card displayed to the customer.
|
|
279
283
|
|
|
280
284
|
billing_interval : CreateRateCardRequestBillingInterval
|
|
285
|
+
How often the customer will be billed for this rate card.
|
|
281
286
|
|
|
282
287
|
description : typing.Optional[str]
|
|
283
|
-
|
|
284
|
-
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
288
|
+
The description of the rate card displayed to the customer.
|
|
285
289
|
|
|
286
290
|
fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
|
|
287
291
|
|
|
292
|
+
usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
|
|
293
|
+
|
|
288
294
|
metadata : typing.Optional[typing.Dict[str, str]]
|
|
289
295
|
|
|
290
296
|
request_options : typing.Optional[RequestOptions]
|
|
@@ -301,15 +307,15 @@ class AsyncRawRateCardsClient:
|
|
|
301
307
|
json={
|
|
302
308
|
"name": name,
|
|
303
309
|
"description": description,
|
|
310
|
+
"billing_interval": billing_interval,
|
|
311
|
+
"fixed_rates": convert_and_respect_annotation_metadata(
|
|
312
|
+
object_=fixed_rates, annotation=typing.Sequence[CreateFixedRateRequest], direction="write"
|
|
313
|
+
),
|
|
304
314
|
"usage_based_rates": convert_and_respect_annotation_metadata(
|
|
305
315
|
object_=usage_based_rates,
|
|
306
316
|
annotation=typing.Sequence[CreateRateCardRequestUsageBasedRatesItem],
|
|
307
317
|
direction="write",
|
|
308
318
|
),
|
|
309
|
-
"fixed_rates": convert_and_respect_annotation_metadata(
|
|
310
|
-
object_=fixed_rates, annotation=typing.Sequence[CreateFixedRateRequest], direction="write"
|
|
311
|
-
),
|
|
312
|
-
"billing_interval": billing_interval,
|
|
313
319
|
"metadata": metadata,
|
|
314
320
|
},
|
|
315
321
|
headers={
|
|
@@ -11,7 +11,7 @@ from ...types.price import Price
|
|
|
11
11
|
|
|
12
12
|
class CreateRateCardRequestUsageBasedRatesItem_Simple(UniversalBaseModel):
|
|
13
13
|
usage_based_rate_type: typing.Literal["simple"] = "simple"
|
|
14
|
-
name:
|
|
14
|
+
name: str
|
|
15
15
|
description: typing.Optional[str] = None
|
|
16
16
|
price: Price
|
|
17
17
|
included_units: typing.Optional[int] = None
|
|
@@ -202,6 +202,7 @@ class SubscriptionsClient:
|
|
|
202
202
|
subscription_id : str
|
|
203
203
|
|
|
204
204
|
rate_card_id : str
|
|
205
|
+
The ID of the rate card to change the subscription to.
|
|
205
206
|
|
|
206
207
|
request_options : typing.Optional[RequestOptions]
|
|
207
208
|
Request-specific configuration.
|
|
@@ -220,7 +221,7 @@ class SubscriptionsClient:
|
|
|
220
221
|
)
|
|
221
222
|
client.subscriptions.change_subscription_rate_card(
|
|
222
223
|
subscription_id="subscription_id",
|
|
223
|
-
rate_card_id="
|
|
224
|
+
rate_card_id="rc_jQK2n0wutCj6bBcAIrL6o07g",
|
|
224
225
|
)
|
|
225
226
|
"""
|
|
226
227
|
_response = self._raw_client.change_subscription_rate_card(
|
|
@@ -451,6 +452,7 @@ class AsyncSubscriptionsClient:
|
|
|
451
452
|
subscription_id : str
|
|
452
453
|
|
|
453
454
|
rate_card_id : str
|
|
455
|
+
The ID of the rate card to change the subscription to.
|
|
454
456
|
|
|
455
457
|
request_options : typing.Optional[RequestOptions]
|
|
456
458
|
Request-specific configuration.
|
|
@@ -474,7 +476,7 @@ class AsyncSubscriptionsClient:
|
|
|
474
476
|
async def main() -> None:
|
|
475
477
|
await client.subscriptions.change_subscription_rate_card(
|
|
476
478
|
subscription_id="subscription_id",
|
|
477
|
-
rate_card_id="
|
|
479
|
+
rate_card_id="rc_jQK2n0wutCj6bBcAIrL6o07g",
|
|
478
480
|
)
|
|
479
481
|
|
|
480
482
|
|
|
@@ -275,6 +275,7 @@ class RawSubscriptionsClient:
|
|
|
275
275
|
subscription_id : str
|
|
276
276
|
|
|
277
277
|
rate_card_id : str
|
|
278
|
+
The ID of the rate card to change the subscription to.
|
|
278
279
|
|
|
279
280
|
request_options : typing.Optional[RequestOptions]
|
|
280
281
|
Request-specific configuration.
|
|
@@ -580,6 +581,7 @@ class AsyncRawSubscriptionsClient:
|
|
|
580
581
|
subscription_id : str
|
|
581
582
|
|
|
582
583
|
rate_card_id : str
|
|
584
|
+
The ID of the rate card to change the subscription to.
|
|
583
585
|
|
|
584
586
|
request_options : typing.Optional[RequestOptions]
|
|
585
587
|
Request-specific configuration.
|
|
@@ -12,7 +12,10 @@ class Amount(UniversalBaseModel):
|
|
|
12
12
|
The value of the amount in the smallest unit of the currency.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
currency_code: str
|
|
15
|
+
currency_code: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The currency code of the amount.
|
|
18
|
+
"""
|
|
16
19
|
|
|
17
20
|
if IS_PYDANTIC_V2:
|
|
18
21
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
{lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_customer_portal_session_response.py
RENAMED
|
@@ -7,8 +7,15 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class CreateCustomerPortalSessionResponse(UniversalBaseModel):
|
|
10
|
-
subject_id: str
|
|
11
|
-
|
|
10
|
+
subject_id: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
The ID of the subject for the customer portal session.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
url: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The URL to redirect to the customer portal session.
|
|
18
|
+
"""
|
|
12
19
|
|
|
13
20
|
if IS_PYDANTIC_V2:
|
|
14
21
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -8,8 +8,16 @@ from .price import Price
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class CreateFixedRateRequest(UniversalBaseModel):
|
|
11
|
-
name:
|
|
12
|
-
|
|
11
|
+
name: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The name of the rate displayed to the customer.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The description of the rate displayed to the customer.
|
|
19
|
+
"""
|
|
20
|
+
|
|
13
21
|
price: Price
|
|
14
22
|
|
|
15
23
|
if IS_PYDANTIC_V2:
|
{lark_billing-0.0.8 → lark_billing-0.0.9}/src/lark/types/create_simple_usage_based_rate_request.py
RENAMED
|
@@ -8,10 +8,22 @@ from .price import Price
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class CreateSimpleUsageBasedRateRequest(UniversalBaseModel):
|
|
11
|
-
name:
|
|
12
|
-
|
|
11
|
+
name: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The name of the rate displayed to the customer.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The description of the rate displayed to the customer.
|
|
19
|
+
"""
|
|
20
|
+
|
|
13
21
|
price: Price
|
|
14
|
-
included_units: typing.Optional[int] = None
|
|
22
|
+
included_units: typing.Optional[int] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
The number of units included in the rate before the price is applied.
|
|
25
|
+
"""
|
|
26
|
+
|
|
15
27
|
pricing_metric_id: str = pydantic.Field()
|
|
16
28
|
"""
|
|
17
29
|
The ID of the pricing metric to use for this rate.
|
|
@@ -8,9 +8,20 @@ from .amount import Amount
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class CreateSubscriptionCheckoutSessionResponse(UniversalBaseModel):
|
|
11
|
-
id: str
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
id: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The ID of the checkout session.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
amount: Amount = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
The amount of the checkout session.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
url: str = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
The URL to redirect to the checkout session.
|
|
24
|
+
"""
|
|
14
25
|
|
|
15
26
|
if IS_PYDANTIC_V2:
|
|
16
27
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .amount import Amount
|
|
9
|
+
from .invoice_line_item_resource import InvoiceLineItemResource
|
|
10
|
+
from .invoice_status import InvoiceStatus
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class InvoiceResource(UniversalBaseModel):
|
|
14
|
+
id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
The ID of the invoice.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
total_amount: Amount = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
The total amount of the invoice.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
subject_id: str = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
The ID of the subject for the invoice.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
created_at: dt.datetime = pydantic.Field()
|
|
30
|
+
"""
|
|
31
|
+
The date and time the invoice was created.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
status: InvoiceStatus = pydantic.Field()
|
|
35
|
+
"""
|
|
36
|
+
The status of the invoice.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
hosted_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
The URL of the hosted invoice.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
line_items: typing.List[InvoiceLineItemResource] = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
The line items of the invoice.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
if IS_PYDANTIC_V2:
|
|
50
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
51
|
+
else:
|
|
52
|
+
|
|
53
|
+
class Config:
|
|
54
|
+
frozen = True
|
|
55
|
+
smart_union = True
|
|
56
|
+
extra = pydantic.Extra.allow
|