lark-billing 0.0.9__tar.gz → 0.1.0__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.9 → lark_billing-0.1.0}/PKG-INFO +1 -1
- {lark_billing-0.0.9 → lark_billing-0.1.0}/pyproject.toml +1 -1
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/__init__.py +39 -16
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/client_wrapper.py +2 -2
- lark_billing-0.1.0/src/lark/pricing_metrics/__init__.py +55 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/pricing_metrics/client.py +148 -22
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/pricing_metrics/raw_client.py +159 -20
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/pricing_metrics/types/__init__.py +14 -1
- lark_billing-0.1.0/src/lark/pricing_metrics/types/pricing_metric_aggregation.py +106 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/client.py +58 -2
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/raw_client.py +4 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subjects/client.py +12 -2
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/__init__.py +23 -13
- lark_billing-0.1.0/src/lark/types/aggregation.py +82 -0
- lark_billing-0.1.0/src/lark/types/billing_state_response.py +27 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/count_aggregation_pricing_metric_interface.py +4 -0
- lark_billing-0.1.0/src/lark/types/custom_aggregation_pricing_metric_interface.py +26 -0
- lark_billing-0.1.0/src/lark/types/last_aggregation_pricing_metric_interface.py +26 -0
- lark_billing-0.1.0/src/lark/types/last_aggregation_pricing_metric_resource.py +22 -0
- lark_billing-0.1.0/src/lark/types/max_aggregation_pricing_metric_interface.py +26 -0
- lark_billing-0.0.9/src/lark/types/billing_state_response.py → lark_billing-0.1.0/src/lark/types/max_aggregation_pricing_metric_resource.py +5 -3
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/period.py +3 -2
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/pricing_metric_resource.py +24 -5
- lark_billing-0.1.0/src/lark/types/pricing_metric_summary_resource.py +43 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/sum_aggregation_pricing_metric_interface.py +4 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/sum_aggregation_pricing_metric_resource.py +4 -1
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/usage_events/__init__.py +3 -6
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/usage_events/client.py +25 -127
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/usage_events/raw_client.py +0 -141
- {lark_billing-0.0.9/src/lark/pricing_metrics → lark_billing-0.1.0/src/lark/usage_events/types}/__init__.py +3 -7
- lark_billing-0.0.9/src/lark/types/value.py → lark_billing-0.1.0/src/lark/usage_events/types/create_usage_event_request_data_value.py +1 -1
- lark_billing-0.0.9/src/lark/pricing_metrics/types/pricing_metric_aggregation.py +0 -38
- lark_billing-0.0.9/src/lark/types/aggregation.py +0 -38
- lark_billing-0.0.9/src/lark/types/create_pricing_metric_response.py +0 -24
- lark_billing-0.0.9/src/lark/types/create_usage_event_summary_response.py +0 -23
- lark_billing-0.0.9/src/lark/types/get_pricing_metric_response.py +0 -24
- lark_billing-0.0.9/src/lark/usage_events/types/__init__.py +0 -38
- lark_billing-0.0.9/src/lark/usage_events/types/create_usage_event_request_data_value.py +0 -5
- lark_billing-0.0.9/src/lark/usage_events/types/create_usage_event_summary_request_aggregation_type.py +0 -5
- {lark_billing-0.0.9 → lark_billing-0.1.0}/README.md +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/checkout/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/checkout/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/checkout/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/api_error.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/datetime_utils.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/file.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/force_multipart.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_sse/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_sse/_api.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_sse/_decoders.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_sse/_exceptions.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/http_sse/_models.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/jsonable_encoder.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/pydantic_utilities.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/query_encoder.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/remove_none_from_dict.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/request_options.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/core/serialization.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_access/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_access/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_access/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_portal/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_portal/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/customer_portal/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/environment.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/errors/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/errors/unprocessable_entity_error.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/invoices/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/invoices/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/invoices/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/py.typed +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/types/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/types/create_rate_card_request_billing_interval.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subjects/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subjects/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subscriptions/__init__.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subscriptions/client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/subscriptions/raw_client.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/amount.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/count_aggregation_pricing_metric_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/create_customer_portal_session_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/create_fixed_rate_request.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/create_simple_usage_based_rate_request.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/create_subject_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/create_subscription_checkout_session_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/fixed_rate_interface.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/flat_price.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/http_validation_error.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/invoice_line_item_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/invoice_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/invoice_status.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/list_invoices_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/list_pricing_metrics_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/list_rate_cards_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/list_subjects_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/list_subscriptions_response.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/package_price.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/package_price_input_rounding_behavior.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/package_price_output_rounding_behavior.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/period_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/price.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/rate_card_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/rate_card_resource_billing_interval.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/rate_card_resource_usage_based_rates_item.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/simple_usage_based_rate_interface.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/subject_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/subscription_resource.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/subscription_status.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/validation_error.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/types/validation_error_loc_item.py +0 -0
- {lark_billing-0.0.9 → lark_billing-0.1.0}/src/lark/version.py +0 -0
|
@@ -9,6 +9,8 @@ if typing.TYPE_CHECKING:
|
|
|
9
9
|
from .types import (
|
|
10
10
|
Aggregation,
|
|
11
11
|
Aggregation_Count,
|
|
12
|
+
Aggregation_Last,
|
|
13
|
+
Aggregation_Max,
|
|
12
14
|
Aggregation_Sum,
|
|
13
15
|
Amount,
|
|
14
16
|
BillingStateResponse,
|
|
@@ -16,23 +18,25 @@ if typing.TYPE_CHECKING:
|
|
|
16
18
|
CountAggregationPricingMetricResource,
|
|
17
19
|
CreateCustomerPortalSessionResponse,
|
|
18
20
|
CreateFixedRateRequest,
|
|
19
|
-
CreatePricingMetricResponse,
|
|
20
21
|
CreateSimpleUsageBasedRateRequest,
|
|
21
22
|
CreateSubjectResponse,
|
|
22
23
|
CreateSubscriptionCheckoutSessionResponse,
|
|
23
|
-
|
|
24
|
+
CustomAggregationPricingMetricInterface,
|
|
24
25
|
FixedRateInterface,
|
|
25
26
|
FlatPrice,
|
|
26
|
-
GetPricingMetricResponse,
|
|
27
27
|
HttpValidationError,
|
|
28
28
|
InvoiceLineItemResource,
|
|
29
29
|
InvoiceResource,
|
|
30
30
|
InvoiceStatus,
|
|
31
|
+
LastAggregationPricingMetricInterface,
|
|
32
|
+
LastAggregationPricingMetricResource,
|
|
31
33
|
ListInvoicesResponse,
|
|
32
34
|
ListPricingMetricsResponse,
|
|
33
35
|
ListRateCardsResponse,
|
|
34
36
|
ListSubjectsResponse,
|
|
35
37
|
ListSubscriptionsResponse,
|
|
38
|
+
MaxAggregationPricingMetricInterface,
|
|
39
|
+
MaxAggregationPricingMetricResource,
|
|
36
40
|
PackagePrice,
|
|
37
41
|
PackagePriceInputRoundingBehavior,
|
|
38
42
|
PackagePriceOutputRoundingBehavior,
|
|
@@ -42,6 +46,7 @@ if typing.TYPE_CHECKING:
|
|
|
42
46
|
Price_Flat,
|
|
43
47
|
Price_Package,
|
|
44
48
|
PricingMetricResource,
|
|
49
|
+
PricingMetricSummaryResource,
|
|
45
50
|
RateCardResource,
|
|
46
51
|
RateCardResourceBillingInterval,
|
|
47
52
|
RateCardResourceUsageBasedRatesItem,
|
|
@@ -54,7 +59,6 @@ if typing.TYPE_CHECKING:
|
|
|
54
59
|
SumAggregationPricingMetricResource,
|
|
55
60
|
ValidationError,
|
|
56
61
|
ValidationErrorLocItem,
|
|
57
|
-
Value,
|
|
58
62
|
)
|
|
59
63
|
from .errors import UnprocessableEntityError
|
|
60
64
|
from . import (
|
|
@@ -70,17 +74,26 @@ if typing.TYPE_CHECKING:
|
|
|
70
74
|
)
|
|
71
75
|
from .client import AsyncLark, Lark
|
|
72
76
|
from .environment import LarkEnvironment
|
|
73
|
-
from .pricing_metrics import
|
|
77
|
+
from .pricing_metrics import (
|
|
78
|
+
PricingMetricAggregation,
|
|
79
|
+
PricingMetricAggregation_Count,
|
|
80
|
+
PricingMetricAggregation_Custom,
|
|
81
|
+
PricingMetricAggregation_Last,
|
|
82
|
+
PricingMetricAggregation_Max,
|
|
83
|
+
PricingMetricAggregation_Sum,
|
|
84
|
+
)
|
|
74
85
|
from .rate_cards import (
|
|
75
86
|
CreateRateCardRequestBillingInterval,
|
|
76
87
|
CreateRateCardRequestUsageBasedRatesItem,
|
|
77
88
|
CreateRateCardRequestUsageBasedRatesItem_Simple,
|
|
78
89
|
)
|
|
79
|
-
from .usage_events import CreateUsageEventRequestDataValue
|
|
90
|
+
from .usage_events import CreateUsageEventRequestDataValue
|
|
80
91
|
from .version import __version__
|
|
81
92
|
_dynamic_imports: typing.Dict[str, str] = {
|
|
82
93
|
"Aggregation": ".types",
|
|
83
94
|
"Aggregation_Count": ".types",
|
|
95
|
+
"Aggregation_Last": ".types",
|
|
96
|
+
"Aggregation_Max": ".types",
|
|
84
97
|
"Aggregation_Sum": ".types",
|
|
85
98
|
"Amount": ".types",
|
|
86
99
|
"AsyncLark": ".client",
|
|
@@ -89,7 +102,6 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
89
102
|
"CountAggregationPricingMetricResource": ".types",
|
|
90
103
|
"CreateCustomerPortalSessionResponse": ".types",
|
|
91
104
|
"CreateFixedRateRequest": ".types",
|
|
92
|
-
"CreatePricingMetricResponse": ".types",
|
|
93
105
|
"CreateRateCardRequestBillingInterval": ".rate_cards",
|
|
94
106
|
"CreateRateCardRequestUsageBasedRatesItem": ".rate_cards",
|
|
95
107
|
"CreateRateCardRequestUsageBasedRatesItem_Simple": ".rate_cards",
|
|
@@ -97,22 +109,24 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
97
109
|
"CreateSubjectResponse": ".types",
|
|
98
110
|
"CreateSubscriptionCheckoutSessionResponse": ".types",
|
|
99
111
|
"CreateUsageEventRequestDataValue": ".usage_events",
|
|
100
|
-
"
|
|
101
|
-
"CreateUsageEventSummaryResponse": ".types",
|
|
112
|
+
"CustomAggregationPricingMetricInterface": ".types",
|
|
102
113
|
"FixedRateInterface": ".types",
|
|
103
114
|
"FlatPrice": ".types",
|
|
104
|
-
"GetPricingMetricResponse": ".types",
|
|
105
115
|
"HttpValidationError": ".types",
|
|
106
116
|
"InvoiceLineItemResource": ".types",
|
|
107
117
|
"InvoiceResource": ".types",
|
|
108
118
|
"InvoiceStatus": ".types",
|
|
109
119
|
"Lark": ".client",
|
|
110
120
|
"LarkEnvironment": ".environment",
|
|
121
|
+
"LastAggregationPricingMetricInterface": ".types",
|
|
122
|
+
"LastAggregationPricingMetricResource": ".types",
|
|
111
123
|
"ListInvoicesResponse": ".types",
|
|
112
124
|
"ListPricingMetricsResponse": ".types",
|
|
113
125
|
"ListRateCardsResponse": ".types",
|
|
114
126
|
"ListSubjectsResponse": ".types",
|
|
115
127
|
"ListSubscriptionsResponse": ".types",
|
|
128
|
+
"MaxAggregationPricingMetricInterface": ".types",
|
|
129
|
+
"MaxAggregationPricingMetricResource": ".types",
|
|
116
130
|
"PackagePrice": ".types",
|
|
117
131
|
"PackagePriceInputRoundingBehavior": ".types",
|
|
118
132
|
"PackagePriceOutputRoundingBehavior": ".types",
|
|
@@ -123,8 +137,12 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
123
137
|
"Price_Package": ".types",
|
|
124
138
|
"PricingMetricAggregation": ".pricing_metrics",
|
|
125
139
|
"PricingMetricAggregation_Count": ".pricing_metrics",
|
|
140
|
+
"PricingMetricAggregation_Custom": ".pricing_metrics",
|
|
141
|
+
"PricingMetricAggregation_Last": ".pricing_metrics",
|
|
142
|
+
"PricingMetricAggregation_Max": ".pricing_metrics",
|
|
126
143
|
"PricingMetricAggregation_Sum": ".pricing_metrics",
|
|
127
144
|
"PricingMetricResource": ".types",
|
|
145
|
+
"PricingMetricSummaryResource": ".types",
|
|
128
146
|
"RateCardResource": ".types",
|
|
129
147
|
"RateCardResourceBillingInterval": ".types",
|
|
130
148
|
"RateCardResourceUsageBasedRatesItem": ".types",
|
|
@@ -138,7 +156,6 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
138
156
|
"UnprocessableEntityError": ".errors",
|
|
139
157
|
"ValidationError": ".types",
|
|
140
158
|
"ValidationErrorLocItem": ".types",
|
|
141
|
-
"Value": ".types",
|
|
142
159
|
"__version__": ".version",
|
|
143
160
|
"checkout": ".checkout",
|
|
144
161
|
"customer_access": ".customer_access",
|
|
@@ -176,6 +193,8 @@ def __dir__():
|
|
|
176
193
|
__all__ = [
|
|
177
194
|
"Aggregation",
|
|
178
195
|
"Aggregation_Count",
|
|
196
|
+
"Aggregation_Last",
|
|
197
|
+
"Aggregation_Max",
|
|
179
198
|
"Aggregation_Sum",
|
|
180
199
|
"Amount",
|
|
181
200
|
"AsyncLark",
|
|
@@ -184,7 +203,6 @@ __all__ = [
|
|
|
184
203
|
"CountAggregationPricingMetricResource",
|
|
185
204
|
"CreateCustomerPortalSessionResponse",
|
|
186
205
|
"CreateFixedRateRequest",
|
|
187
|
-
"CreatePricingMetricResponse",
|
|
188
206
|
"CreateRateCardRequestBillingInterval",
|
|
189
207
|
"CreateRateCardRequestUsageBasedRatesItem",
|
|
190
208
|
"CreateRateCardRequestUsageBasedRatesItem_Simple",
|
|
@@ -192,22 +210,24 @@ __all__ = [
|
|
|
192
210
|
"CreateSubjectResponse",
|
|
193
211
|
"CreateSubscriptionCheckoutSessionResponse",
|
|
194
212
|
"CreateUsageEventRequestDataValue",
|
|
195
|
-
"
|
|
196
|
-
"CreateUsageEventSummaryResponse",
|
|
213
|
+
"CustomAggregationPricingMetricInterface",
|
|
197
214
|
"FixedRateInterface",
|
|
198
215
|
"FlatPrice",
|
|
199
|
-
"GetPricingMetricResponse",
|
|
200
216
|
"HttpValidationError",
|
|
201
217
|
"InvoiceLineItemResource",
|
|
202
218
|
"InvoiceResource",
|
|
203
219
|
"InvoiceStatus",
|
|
204
220
|
"Lark",
|
|
205
221
|
"LarkEnvironment",
|
|
222
|
+
"LastAggregationPricingMetricInterface",
|
|
223
|
+
"LastAggregationPricingMetricResource",
|
|
206
224
|
"ListInvoicesResponse",
|
|
207
225
|
"ListPricingMetricsResponse",
|
|
208
226
|
"ListRateCardsResponse",
|
|
209
227
|
"ListSubjectsResponse",
|
|
210
228
|
"ListSubscriptionsResponse",
|
|
229
|
+
"MaxAggregationPricingMetricInterface",
|
|
230
|
+
"MaxAggregationPricingMetricResource",
|
|
211
231
|
"PackagePrice",
|
|
212
232
|
"PackagePriceInputRoundingBehavior",
|
|
213
233
|
"PackagePriceOutputRoundingBehavior",
|
|
@@ -218,8 +238,12 @@ __all__ = [
|
|
|
218
238
|
"Price_Package",
|
|
219
239
|
"PricingMetricAggregation",
|
|
220
240
|
"PricingMetricAggregation_Count",
|
|
241
|
+
"PricingMetricAggregation_Custom",
|
|
242
|
+
"PricingMetricAggregation_Last",
|
|
243
|
+
"PricingMetricAggregation_Max",
|
|
221
244
|
"PricingMetricAggregation_Sum",
|
|
222
245
|
"PricingMetricResource",
|
|
246
|
+
"PricingMetricSummaryResource",
|
|
223
247
|
"RateCardResource",
|
|
224
248
|
"RateCardResourceBillingInterval",
|
|
225
249
|
"RateCardResourceUsageBasedRatesItem",
|
|
@@ -233,7 +257,6 @@ __all__ = [
|
|
|
233
257
|
"UnprocessableEntityError",
|
|
234
258
|
"ValidationError",
|
|
235
259
|
"ValidationErrorLocItem",
|
|
236
|
-
"Value",
|
|
237
260
|
"__version__",
|
|
238
261
|
"checkout",
|
|
239
262
|
"customer_access",
|
|
@@ -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.1.0",
|
|
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.1.0",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["X-API-Key"] = self.api_key
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import (
|
|
10
|
+
PricingMetricAggregation,
|
|
11
|
+
PricingMetricAggregation_Count,
|
|
12
|
+
PricingMetricAggregation_Custom,
|
|
13
|
+
PricingMetricAggregation_Last,
|
|
14
|
+
PricingMetricAggregation_Max,
|
|
15
|
+
PricingMetricAggregation_Sum,
|
|
16
|
+
)
|
|
17
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
18
|
+
"PricingMetricAggregation": ".types",
|
|
19
|
+
"PricingMetricAggregation_Count": ".types",
|
|
20
|
+
"PricingMetricAggregation_Custom": ".types",
|
|
21
|
+
"PricingMetricAggregation_Last": ".types",
|
|
22
|
+
"PricingMetricAggregation_Max": ".types",
|
|
23
|
+
"PricingMetricAggregation_Sum": ".types",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
28
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
29
|
+
if module_name is None:
|
|
30
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
31
|
+
try:
|
|
32
|
+
module = import_module(module_name, __package__)
|
|
33
|
+
if module_name == f".{attr_name}":
|
|
34
|
+
return module
|
|
35
|
+
else:
|
|
36
|
+
return getattr(module, attr_name)
|
|
37
|
+
except ImportError as e:
|
|
38
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
39
|
+
except AttributeError as e:
|
|
40
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def __dir__():
|
|
44
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
45
|
+
return sorted(lazy_attrs)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
"PricingMetricAggregation",
|
|
50
|
+
"PricingMetricAggregation_Count",
|
|
51
|
+
"PricingMetricAggregation_Custom",
|
|
52
|
+
"PricingMetricAggregation_Last",
|
|
53
|
+
"PricingMetricAggregation_Max",
|
|
54
|
+
"PricingMetricAggregation_Sum",
|
|
55
|
+
]
|
|
@@ -4,9 +4,10 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
|
-
from ..types.create_pricing_metric_response import CreatePricingMetricResponse
|
|
8
|
-
from ..types.get_pricing_metric_response import GetPricingMetricResponse
|
|
9
7
|
from ..types.list_pricing_metrics_response import ListPricingMetricsResponse
|
|
8
|
+
from ..types.period import Period
|
|
9
|
+
from ..types.pricing_metric_resource import PricingMetricResource
|
|
10
|
+
from ..types.pricing_metric_summary_resource import PricingMetricSummaryResource
|
|
10
11
|
from .raw_client import AsyncRawPricingMetricsClient, RawPricingMetricsClient
|
|
11
12
|
from .types.pricing_metric_aggregation import PricingMetricAggregation
|
|
12
13
|
|
|
@@ -67,40 +68,45 @@ class PricingMetricsClient:
|
|
|
67
68
|
aggregation: PricingMetricAggregation,
|
|
68
69
|
unit: str,
|
|
69
70
|
request_options: typing.Optional[RequestOptions] = None,
|
|
70
|
-
) ->
|
|
71
|
+
) -> PricingMetricResource:
|
|
71
72
|
"""
|
|
72
73
|
Parameters
|
|
73
74
|
----------
|
|
74
75
|
name : str
|
|
76
|
+
The name of the pricing metric.
|
|
75
77
|
|
|
76
78
|
event_name : str
|
|
79
|
+
The name of the event that the pricing metric is computed on.
|
|
77
80
|
|
|
78
81
|
aggregation : PricingMetricAggregation
|
|
82
|
+
The aggregation function used to compute the value of the pricing metric.
|
|
79
83
|
|
|
80
84
|
unit : str
|
|
81
|
-
Unit of measurement for the pricing metric
|
|
85
|
+
Unit of measurement for the pricing metric.
|
|
82
86
|
|
|
83
87
|
request_options : typing.Optional[RequestOptions]
|
|
84
88
|
Request-specific configuration.
|
|
85
89
|
|
|
86
90
|
Returns
|
|
87
91
|
-------
|
|
88
|
-
|
|
92
|
+
PricingMetricResource
|
|
89
93
|
Successful Response
|
|
90
94
|
|
|
91
95
|
Examples
|
|
92
96
|
--------
|
|
93
97
|
from lark import Lark
|
|
94
|
-
from lark.pricing_metrics import
|
|
98
|
+
from lark.pricing_metrics import PricingMetricAggregation_Sum
|
|
95
99
|
|
|
96
100
|
client = Lark(
|
|
97
101
|
api_key="YOUR_API_KEY",
|
|
98
102
|
)
|
|
99
103
|
client.pricing_metrics.create_pricing_metric(
|
|
100
|
-
name="
|
|
101
|
-
event_name="
|
|
102
|
-
aggregation=
|
|
103
|
-
|
|
104
|
+
name="Compute Hours",
|
|
105
|
+
event_name="job_completed",
|
|
106
|
+
aggregation=PricingMetricAggregation_Sum(
|
|
107
|
+
value_field="value_field",
|
|
108
|
+
),
|
|
109
|
+
unit="hours",
|
|
104
110
|
)
|
|
105
111
|
"""
|
|
106
112
|
_response = self._raw_client.create_pricing_metric(
|
|
@@ -110,7 +116,7 @@ class PricingMetricsClient:
|
|
|
110
116
|
|
|
111
117
|
def get_pricing_metric(
|
|
112
118
|
self, pricing_metric_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
113
|
-
) ->
|
|
119
|
+
) -> PricingMetricResource:
|
|
114
120
|
"""
|
|
115
121
|
Parameters
|
|
116
122
|
----------
|
|
@@ -121,7 +127,7 @@ class PricingMetricsClient:
|
|
|
121
127
|
|
|
122
128
|
Returns
|
|
123
129
|
-------
|
|
124
|
-
|
|
130
|
+
PricingMetricResource
|
|
125
131
|
Successful Response
|
|
126
132
|
|
|
127
133
|
Examples
|
|
@@ -138,6 +144,60 @@ class PricingMetricsClient:
|
|
|
138
144
|
_response = self._raw_client.get_pricing_metric(pricing_metric_id, request_options=request_options)
|
|
139
145
|
return _response.data
|
|
140
146
|
|
|
147
|
+
def create_pricing_metric_summary(
|
|
148
|
+
self,
|
|
149
|
+
pricing_metric_id: str,
|
|
150
|
+
*,
|
|
151
|
+
subject_id: str,
|
|
152
|
+
period: Period,
|
|
153
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
154
|
+
) -> PricingMetricSummaryResource:
|
|
155
|
+
"""
|
|
156
|
+
Parameters
|
|
157
|
+
----------
|
|
158
|
+
pricing_metric_id : str
|
|
159
|
+
|
|
160
|
+
subject_id : str
|
|
161
|
+
The ID of the subject that the summary should be computed for.
|
|
162
|
+
|
|
163
|
+
period : Period
|
|
164
|
+
The period that the summary should be computed over.
|
|
165
|
+
|
|
166
|
+
request_options : typing.Optional[RequestOptions]
|
|
167
|
+
Request-specific configuration.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
PricingMetricSummaryResource
|
|
172
|
+
Successful Response
|
|
173
|
+
|
|
174
|
+
Examples
|
|
175
|
+
--------
|
|
176
|
+
import datetime
|
|
177
|
+
|
|
178
|
+
from lark import Lark, Period
|
|
179
|
+
|
|
180
|
+
client = Lark(
|
|
181
|
+
api_key="YOUR_API_KEY",
|
|
182
|
+
)
|
|
183
|
+
client.pricing_metrics.create_pricing_metric_summary(
|
|
184
|
+
pricing_metric_id="pricing_metric_id",
|
|
185
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
186
|
+
period=Period(
|
|
187
|
+
start=datetime.datetime.fromisoformat(
|
|
188
|
+
"2025-10-01 00:00:00+00:00",
|
|
189
|
+
),
|
|
190
|
+
end=datetime.datetime.fromisoformat(
|
|
191
|
+
"2025-11-01 00:00:00+00:00",
|
|
192
|
+
),
|
|
193
|
+
),
|
|
194
|
+
)
|
|
195
|
+
"""
|
|
196
|
+
_response = self._raw_client.create_pricing_metric_summary(
|
|
197
|
+
pricing_metric_id, subject_id=subject_id, period=period, request_options=request_options
|
|
198
|
+
)
|
|
199
|
+
return _response.data
|
|
200
|
+
|
|
141
201
|
|
|
142
202
|
class AsyncPricingMetricsClient:
|
|
143
203
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -200,25 +260,28 @@ class AsyncPricingMetricsClient:
|
|
|
200
260
|
aggregation: PricingMetricAggregation,
|
|
201
261
|
unit: str,
|
|
202
262
|
request_options: typing.Optional[RequestOptions] = None,
|
|
203
|
-
) ->
|
|
263
|
+
) -> PricingMetricResource:
|
|
204
264
|
"""
|
|
205
265
|
Parameters
|
|
206
266
|
----------
|
|
207
267
|
name : str
|
|
268
|
+
The name of the pricing metric.
|
|
208
269
|
|
|
209
270
|
event_name : str
|
|
271
|
+
The name of the event that the pricing metric is computed on.
|
|
210
272
|
|
|
211
273
|
aggregation : PricingMetricAggregation
|
|
274
|
+
The aggregation function used to compute the value of the pricing metric.
|
|
212
275
|
|
|
213
276
|
unit : str
|
|
214
|
-
Unit of measurement for the pricing metric
|
|
277
|
+
Unit of measurement for the pricing metric.
|
|
215
278
|
|
|
216
279
|
request_options : typing.Optional[RequestOptions]
|
|
217
280
|
Request-specific configuration.
|
|
218
281
|
|
|
219
282
|
Returns
|
|
220
283
|
-------
|
|
221
|
-
|
|
284
|
+
PricingMetricResource
|
|
222
285
|
Successful Response
|
|
223
286
|
|
|
224
287
|
Examples
|
|
@@ -226,7 +289,7 @@ class AsyncPricingMetricsClient:
|
|
|
226
289
|
import asyncio
|
|
227
290
|
|
|
228
291
|
from lark import AsyncLark
|
|
229
|
-
from lark.pricing_metrics import
|
|
292
|
+
from lark.pricing_metrics import PricingMetricAggregation_Sum
|
|
230
293
|
|
|
231
294
|
client = AsyncLark(
|
|
232
295
|
api_key="YOUR_API_KEY",
|
|
@@ -235,10 +298,12 @@ class AsyncPricingMetricsClient:
|
|
|
235
298
|
|
|
236
299
|
async def main() -> None:
|
|
237
300
|
await client.pricing_metrics.create_pricing_metric(
|
|
238
|
-
name="
|
|
239
|
-
event_name="
|
|
240
|
-
aggregation=
|
|
241
|
-
|
|
301
|
+
name="Compute Hours",
|
|
302
|
+
event_name="job_completed",
|
|
303
|
+
aggregation=PricingMetricAggregation_Sum(
|
|
304
|
+
value_field="value_field",
|
|
305
|
+
),
|
|
306
|
+
unit="hours",
|
|
242
307
|
)
|
|
243
308
|
|
|
244
309
|
|
|
@@ -251,7 +316,7 @@ class AsyncPricingMetricsClient:
|
|
|
251
316
|
|
|
252
317
|
async def get_pricing_metric(
|
|
253
318
|
self, pricing_metric_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
254
|
-
) ->
|
|
319
|
+
) -> PricingMetricResource:
|
|
255
320
|
"""
|
|
256
321
|
Parameters
|
|
257
322
|
----------
|
|
@@ -262,7 +327,7 @@ class AsyncPricingMetricsClient:
|
|
|
262
327
|
|
|
263
328
|
Returns
|
|
264
329
|
-------
|
|
265
|
-
|
|
330
|
+
PricingMetricResource
|
|
266
331
|
Successful Response
|
|
267
332
|
|
|
268
333
|
Examples
|
|
@@ -286,3 +351,64 @@ class AsyncPricingMetricsClient:
|
|
|
286
351
|
"""
|
|
287
352
|
_response = await self._raw_client.get_pricing_metric(pricing_metric_id, request_options=request_options)
|
|
288
353
|
return _response.data
|
|
354
|
+
|
|
355
|
+
async def create_pricing_metric_summary(
|
|
356
|
+
self,
|
|
357
|
+
pricing_metric_id: str,
|
|
358
|
+
*,
|
|
359
|
+
subject_id: str,
|
|
360
|
+
period: Period,
|
|
361
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
362
|
+
) -> PricingMetricSummaryResource:
|
|
363
|
+
"""
|
|
364
|
+
Parameters
|
|
365
|
+
----------
|
|
366
|
+
pricing_metric_id : str
|
|
367
|
+
|
|
368
|
+
subject_id : str
|
|
369
|
+
The ID of the subject that the summary should be computed for.
|
|
370
|
+
|
|
371
|
+
period : Period
|
|
372
|
+
The period that the summary should be computed over.
|
|
373
|
+
|
|
374
|
+
request_options : typing.Optional[RequestOptions]
|
|
375
|
+
Request-specific configuration.
|
|
376
|
+
|
|
377
|
+
Returns
|
|
378
|
+
-------
|
|
379
|
+
PricingMetricSummaryResource
|
|
380
|
+
Successful Response
|
|
381
|
+
|
|
382
|
+
Examples
|
|
383
|
+
--------
|
|
384
|
+
import asyncio
|
|
385
|
+
import datetime
|
|
386
|
+
|
|
387
|
+
from lark import AsyncLark, Period
|
|
388
|
+
|
|
389
|
+
client = AsyncLark(
|
|
390
|
+
api_key="YOUR_API_KEY",
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
async def main() -> None:
|
|
395
|
+
await client.pricing_metrics.create_pricing_metric_summary(
|
|
396
|
+
pricing_metric_id="pricing_metric_id",
|
|
397
|
+
subject_id="subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
398
|
+
period=Period(
|
|
399
|
+
start=datetime.datetime.fromisoformat(
|
|
400
|
+
"2025-10-01 00:00:00+00:00",
|
|
401
|
+
),
|
|
402
|
+
end=datetime.datetime.fromisoformat(
|
|
403
|
+
"2025-11-01 00:00:00+00:00",
|
|
404
|
+
),
|
|
405
|
+
),
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
asyncio.run(main())
|
|
410
|
+
"""
|
|
411
|
+
_response = await self._raw_client.create_pricing_metric_summary(
|
|
412
|
+
pricing_metric_id, subject_id=subject_id, period=period, request_options=request_options
|
|
413
|
+
)
|
|
414
|
+
return _response.data
|