lark-billing 0.0.9__py3-none-any.whl → 0.1.0__py3-none-any.whl

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.

Files changed (34) hide show
  1. lark/__init__.py +39 -16
  2. lark/core/client_wrapper.py +2 -2
  3. lark/pricing_metrics/__init__.py +19 -2
  4. lark/pricing_metrics/client.py +148 -22
  5. lark/pricing_metrics/raw_client.py +159 -20
  6. lark/pricing_metrics/types/__init__.py +14 -1
  7. lark/pricing_metrics/types/pricing_metric_aggregation.py +69 -1
  8. lark/rate_cards/client.py +58 -2
  9. lark/rate_cards/raw_client.py +4 -0
  10. lark/subjects/client.py +12 -2
  11. lark/types/__init__.py +23 -13
  12. lark/types/aggregation.py +45 -1
  13. lark/types/billing_state_response.py +9 -2
  14. lark/types/count_aggregation_pricing_metric_interface.py +4 -0
  15. lark/types/custom_aggregation_pricing_metric_interface.py +26 -0
  16. lark/types/last_aggregation_pricing_metric_interface.py +26 -0
  17. lark/types/{get_pricing_metric_response.py → last_aggregation_pricing_metric_resource.py} +5 -7
  18. lark/types/{create_usage_event_summary_response.py → max_aggregation_pricing_metric_interface.py} +9 -6
  19. lark/types/{create_pricing_metric_response.py → max_aggregation_pricing_metric_resource.py} +5 -7
  20. lark/types/period.py +3 -2
  21. lark/types/pricing_metric_resource.py +24 -5
  22. lark/types/pricing_metric_summary_resource.py +43 -0
  23. lark/types/sum_aggregation_pricing_metric_interface.py +4 -0
  24. lark/types/sum_aggregation_pricing_metric_resource.py +4 -1
  25. lark/usage_events/__init__.py +3 -6
  26. lark/usage_events/client.py +25 -127
  27. lark/usage_events/raw_client.py +0 -141
  28. lark/usage_events/types/__init__.py +2 -6
  29. lark/usage_events/types/create_usage_event_request_data_value.py +1 -1
  30. {lark_billing-0.0.9.dist-info → lark_billing-0.1.0.dist-info}/METADATA +1 -1
  31. {lark_billing-0.0.9.dist-info → lark_billing-0.1.0.dist-info}/RECORD +32 -31
  32. lark/types/value.py +0 -5
  33. lark/usage_events/types/create_usage_event_summary_request_aggregation_type.py +0 -5
  34. {lark_billing-0.0.9.dist-info → lark_billing-0.1.0.dist-info}/WHEEL +0 -0
lark/__init__.py CHANGED
@@ -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
- CreateUsageEventSummaryResponse,
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 PricingMetricAggregation, PricingMetricAggregation_Count, PricingMetricAggregation_Sum
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, CreateUsageEventSummaryRequestAggregationType
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
- "CreateUsageEventSummaryRequestAggregationType": ".usage_events",
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
- "CreateUsageEventSummaryRequestAggregationType",
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.9",
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.9",
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
@@ -6,10 +6,20 @@ import typing
6
6
  from importlib import import_module
7
7
 
8
8
  if typing.TYPE_CHECKING:
9
- from .types import PricingMetricAggregation, PricingMetricAggregation_Count, PricingMetricAggregation_Sum
9
+ from .types import (
10
+ PricingMetricAggregation,
11
+ PricingMetricAggregation_Count,
12
+ PricingMetricAggregation_Custom,
13
+ PricingMetricAggregation_Last,
14
+ PricingMetricAggregation_Max,
15
+ PricingMetricAggregation_Sum,
16
+ )
10
17
  _dynamic_imports: typing.Dict[str, str] = {
11
18
  "PricingMetricAggregation": ".types",
12
19
  "PricingMetricAggregation_Count": ".types",
20
+ "PricingMetricAggregation_Custom": ".types",
21
+ "PricingMetricAggregation_Last": ".types",
22
+ "PricingMetricAggregation_Max": ".types",
13
23
  "PricingMetricAggregation_Sum": ".types",
14
24
  }
15
25
 
@@ -35,4 +45,11 @@ def __dir__():
35
45
  return sorted(lazy_attrs)
36
46
 
37
47
 
38
- __all__ = ["PricingMetricAggregation", "PricingMetricAggregation_Count", "PricingMetricAggregation_Sum"]
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
- ) -> CreatePricingMetricResponse:
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
- CreatePricingMetricResponse
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 PricingMetricAggregation_Count
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="name",
101
- event_name="event_name",
102
- aggregation=PricingMetricAggregation_Count(),
103
- unit="unit",
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
- ) -> GetPricingMetricResponse:
119
+ ) -> PricingMetricResource:
114
120
  """
115
121
  Parameters
116
122
  ----------
@@ -121,7 +127,7 @@ class PricingMetricsClient:
121
127
 
122
128
  Returns
123
129
  -------
124
- GetPricingMetricResponse
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
- ) -> CreatePricingMetricResponse:
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
- CreatePricingMetricResponse
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 PricingMetricAggregation_Count
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="name",
239
- event_name="event_name",
240
- aggregation=PricingMetricAggregation_Count(),
241
- unit="unit",
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
- ) -> GetPricingMetricResponse:
319
+ ) -> PricingMetricResource:
255
320
  """
256
321
  Parameters
257
322
  ----------
@@ -262,7 +327,7 @@ class AsyncPricingMetricsClient:
262
327
 
263
328
  Returns
264
329
  -------
265
- GetPricingMetricResponse
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