lark-billing 0.0.7__py3-none-any.whl → 0.0.9__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 (58) hide show
  1. lark/__init__.py +45 -29
  2. lark/checkout/client.py +34 -12
  3. lark/checkout/raw_client.py +22 -6
  4. lark/client.py +19 -0
  5. lark/core/client_wrapper.py +2 -2
  6. lark/core/http_sse/__init__.py +42 -0
  7. lark/core/http_sse/_api.py +112 -0
  8. lark/core/http_sse/_decoders.py +61 -0
  9. lark/core/http_sse/_exceptions.py +7 -0
  10. lark/core/http_sse/_models.py +17 -0
  11. lark/core/pydantic_utilities.py +3 -1
  12. lark/customer_portal/client.py +4 -2
  13. lark/customer_portal/raw_client.py +2 -0
  14. lark/invoices/__init__.py +4 -0
  15. lark/invoices/client.py +136 -0
  16. lark/invoices/raw_client.py +147 -0
  17. lark/pricing_metrics/client.py +69 -0
  18. lark/pricing_metrics/raw_client.py +101 -0
  19. lark/rate_cards/__init__.py +15 -3
  20. lark/rate_cards/client.py +20 -14
  21. lark/rate_cards/raw_client.py +26 -20
  22. lark/rate_cards/types/__init__.py +12 -2
  23. lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +30 -0
  24. lark/subjects/client.py +16 -18
  25. lark/subjects/raw_client.py +14 -8
  26. lark/subscriptions/client.py +194 -8
  27. lark/subscriptions/raw_client.py +256 -4
  28. lark/types/__init__.py +31 -32
  29. lark/types/aggregation.py +1 -43
  30. lark/types/amount.py +4 -1
  31. lark/types/create_customer_portal_session_response.py +9 -2
  32. lark/types/{create_simple_usage_based_rate_interface.py → create_fixed_rate_request.py} +11 -6
  33. lark/types/create_simple_usage_based_rate_request.py +39 -0
  34. lark/types/create_subject_response.py +29 -6
  35. lark/types/create_subscription_checkout_session_response.py +14 -3
  36. lark/types/fixed_rate_interface.py +1 -1
  37. lark/types/{custom_pricing_metric_resource.py → invoice_line_item_resource.py} +6 -2
  38. lark/types/invoice_resource.py +56 -0
  39. lark/types/invoice_status.py +5 -0
  40. lark/types/{max_aggregation_pricing_metric_resource.py → list_invoices_response.py} +4 -2
  41. lark/types/{create_fixed_rate_interface.py → list_pricing_metrics_response.py} +4 -5
  42. lark/types/period_resource.py +23 -0
  43. lark/types/{last_aggregation_pricing_metric_resource.py → pricing_metric_resource.py} +7 -2
  44. lark/types/rate_card_resource.py +36 -7
  45. lark/types/rate_card_resource_usage_based_rates_item.py +1 -2
  46. lark/types/simple_usage_based_rate_interface.py +1 -6
  47. lark/types/subject_resource.py +29 -6
  48. lark/types/subscription_resource.py +42 -8
  49. lark/types/subscription_status.py +5 -0
  50. lark/usage_events/__init__.py +6 -3
  51. lark/usage_events/client.py +15 -4
  52. lark/usage_events/raw_client.py +21 -6
  53. lark/usage_events/types/__init__.py +4 -2
  54. lark/{types/status.py → usage_events/types/create_usage_event_request_data_value.py} +1 -1
  55. {lark_billing-0.0.7.dist-info → lark_billing-0.0.9.dist-info}/METADATA +8 -7
  56. lark_billing-0.0.9.dist-info/RECORD +108 -0
  57. lark_billing-0.0.7.dist-info/RECORD +0 -94
  58. {lark_billing-0.0.7.dist-info → lark_billing-0.0.9.dist-info}/WHEEL +0 -0
lark/rate_cards/client.py CHANGED
@@ -4,12 +4,12 @@ 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_fixed_rate_interface import CreateFixedRateInterface
8
- from ..types.create_simple_usage_based_rate_interface import CreateSimpleUsageBasedRateInterface
7
+ from ..types.create_fixed_rate_request import CreateFixedRateRequest
9
8
  from ..types.list_rate_cards_response import ListRateCardsResponse
10
9
  from ..types.rate_card_resource import RateCardResource
11
10
  from .raw_client import AsyncRawRateCardsClient, RawRateCardsClient
12
11
  from .types.create_rate_card_request_billing_interval import CreateRateCardRequestBillingInterval
12
+ from .types.create_rate_card_request_usage_based_rates_item import CreateRateCardRequestUsageBasedRatesItem
13
13
 
14
14
  # this is used as the default value for optional parameters
15
15
  OMIT = typing.cast(typing.Any, ...)
@@ -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[CreateSimpleUsageBasedRateInterface]] = OMIT,
70
- fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateInterface]] = OMIT,
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,14 +75,17 @@ 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]
84
+ The description of the rate card displayed to the customer.
82
85
 
83
- usage_based_rates : typing.Optional[typing.Sequence[CreateSimpleUsageBasedRateInterface]]
86
+ fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
84
87
 
85
- fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateInterface]]
88
+ usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
86
89
 
87
90
  metadata : typing.Optional[typing.Dict[str, str]]
88
91
 
@@ -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="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[CreateSimpleUsageBasedRateInterface]] = OMIT,
211
- fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateInterface]] = OMIT,
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,14 +219,17 @@ 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]
228
+ The description of the rate card displayed to the customer.
223
229
 
224
- usage_based_rates : typing.Optional[typing.Sequence[CreateSimpleUsageBasedRateInterface]]
230
+ fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
225
231
 
226
- fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateInterface]]
232
+ usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
227
233
 
228
234
  metadata : typing.Optional[typing.Dict[str, str]]
229
235
 
@@ -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="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
  )
@@ -11,12 +11,12 @@ from ..core.pydantic_utilities import parse_obj_as
11
11
  from ..core.request_options import RequestOptions
12
12
  from ..core.serialization import convert_and_respect_annotation_metadata
13
13
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
14
- from ..types.create_fixed_rate_interface import CreateFixedRateInterface
15
- from ..types.create_simple_usage_based_rate_interface import CreateSimpleUsageBasedRateInterface
14
+ from ..types.create_fixed_rate_request import CreateFixedRateRequest
16
15
  from ..types.http_validation_error import HttpValidationError
17
16
  from ..types.list_rate_cards_response import ListRateCardsResponse
18
17
  from ..types.rate_card_resource import RateCardResource
19
18
  from .types.create_rate_card_request_billing_interval import CreateRateCardRequestBillingInterval
19
+ from .types.create_rate_card_request_usage_based_rates_item import CreateRateCardRequestUsageBasedRatesItem
20
20
 
21
21
  # this is used as the default value for optional parameters
22
22
  OMIT = typing.cast(typing.Any, ...)
@@ -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[CreateSimpleUsageBasedRateInterface]] = OMIT,
86
- fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateInterface]] = OMIT,
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,14 +91,17 @@ 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]
100
+ The description of the rate card displayed to the customer.
98
101
 
99
- usage_based_rates : typing.Optional[typing.Sequence[CreateSimpleUsageBasedRateInterface]]
102
+ fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
100
103
 
101
- fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateInterface]]
104
+ usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
102
105
 
103
106
  metadata : typing.Optional[typing.Dict[str, str]]
104
107
 
@@ -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
- annotation=typing.Sequence[CreateSimpleUsageBasedRateInterface],
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[CreateFixedRateInterface], 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[CreateSimpleUsageBasedRateInterface]] = OMIT,
271
- fixed_rates: typing.Optional[typing.Sequence[CreateFixedRateInterface]] = OMIT,
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,14 +279,17 @@ 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]
288
+ The description of the rate card displayed to the customer.
283
289
 
284
- usage_based_rates : typing.Optional[typing.Sequence[CreateSimpleUsageBasedRateInterface]]
290
+ fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateRequest]]
285
291
 
286
- fixed_rates : typing.Optional[typing.Sequence[CreateFixedRateInterface]]
292
+ usage_based_rates : typing.Optional[typing.Sequence[CreateRateCardRequestUsageBasedRatesItem]]
287
293
 
288
294
  metadata : typing.Optional[typing.Dict[str, str]]
289
295
 
@@ -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
- annotation=typing.Sequence[CreateSimpleUsageBasedRateInterface],
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[CreateFixedRateInterface], direction="write"
311
- ),
312
- "billing_interval": billing_interval,
313
319
  "metadata": metadata,
314
320
  },
315
321
  headers={
@@ -7,8 +7,14 @@ from importlib import import_module
7
7
 
8
8
  if typing.TYPE_CHECKING:
9
9
  from .create_rate_card_request_billing_interval import CreateRateCardRequestBillingInterval
10
+ from .create_rate_card_request_usage_based_rates_item import (
11
+ CreateRateCardRequestUsageBasedRatesItem,
12
+ CreateRateCardRequestUsageBasedRatesItem_Simple,
13
+ )
10
14
  _dynamic_imports: typing.Dict[str, str] = {
11
- "CreateRateCardRequestBillingInterval": ".create_rate_card_request_billing_interval"
15
+ "CreateRateCardRequestBillingInterval": ".create_rate_card_request_billing_interval",
16
+ "CreateRateCardRequestUsageBasedRatesItem": ".create_rate_card_request_usage_based_rates_item",
17
+ "CreateRateCardRequestUsageBasedRatesItem_Simple": ".create_rate_card_request_usage_based_rates_item",
12
18
  }
13
19
 
14
20
 
@@ -33,4 +39,8 @@ def __dir__():
33
39
  return sorted(lazy_attrs)
34
40
 
35
41
 
36
- __all__ = ["CreateRateCardRequestBillingInterval"]
42
+ __all__ = [
43
+ "CreateRateCardRequestBillingInterval",
44
+ "CreateRateCardRequestUsageBasedRatesItem",
45
+ "CreateRateCardRequestUsageBasedRatesItem_Simple",
46
+ ]
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import pydantic
8
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
+ from ...types.price import Price
10
+
11
+
12
+ class CreateRateCardRequestUsageBasedRatesItem_Simple(UniversalBaseModel):
13
+ usage_based_rate_type: typing.Literal["simple"] = "simple"
14
+ name: str
15
+ description: typing.Optional[str] = None
16
+ price: Price
17
+ included_units: typing.Optional[int] = None
18
+ pricing_metric_id: str
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
28
+
29
+
30
+ CreateRateCardRequestUsageBasedRatesItem = CreateRateCardRequestUsageBasedRatesItem_Simple
lark/subjects/client.py CHANGED
@@ -78,12 +78,16 @@ class SubjectsClient:
78
78
  Parameters
79
79
  ----------
80
80
  external_id : typing.Optional[str]
81
+ The ID of the subject in your system. If provided, you may use pass it to the API in place of the subject ID. Must be unique.
81
82
 
82
83
  name : typing.Optional[str]
84
+ The name of the subject. Used for display in the dashboard.
83
85
 
84
86
  email : typing.Optional[str]
87
+ The email of the subject. Must be a valid email address.
85
88
 
86
89
  metadata : typing.Optional[typing.Dict[str, str]]
90
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
87
91
 
88
92
  request_options : typing.Optional[RequestOptions]
89
93
  Request-specific configuration.
@@ -141,7 +145,6 @@ class SubjectsClient:
141
145
  self,
142
146
  subject_id: str,
143
147
  *,
144
- external_id: typing.Optional[str] = OMIT,
145
148
  name: typing.Optional[str] = OMIT,
146
149
  email: typing.Optional[str] = OMIT,
147
150
  metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -152,13 +155,14 @@ class SubjectsClient:
152
155
  ----------
153
156
  subject_id : str
154
157
 
155
- external_id : typing.Optional[str]
156
-
157
158
  name : typing.Optional[str]
159
+ The name of the subject. Used for display in the dashboard.
158
160
 
159
161
  email : typing.Optional[str]
162
+ The email of the subject. Must be a valid email address.
160
163
 
161
164
  metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
165
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
162
166
 
163
167
  request_options : typing.Optional[RequestOptions]
164
168
  Request-specific configuration.
@@ -180,12 +184,7 @@ class SubjectsClient:
180
184
  )
181
185
  """
182
186
  _response = self._raw_client.update_subject(
183
- subject_id,
184
- external_id=external_id,
185
- name=name,
186
- email=email,
187
- metadata=metadata,
188
- request_options=request_options,
187
+ subject_id, name=name, email=email, metadata=metadata, request_options=request_options
189
188
  )
190
189
  return _response.data
191
190
 
@@ -293,12 +292,16 @@ class AsyncSubjectsClient:
293
292
  Parameters
294
293
  ----------
295
294
  external_id : typing.Optional[str]
295
+ The ID of the subject in your system. If provided, you may use pass it to the API in place of the subject ID. Must be unique.
296
296
 
297
297
  name : typing.Optional[str]
298
+ The name of the subject. Used for display in the dashboard.
298
299
 
299
300
  email : typing.Optional[str]
301
+ The email of the subject. Must be a valid email address.
300
302
 
301
303
  metadata : typing.Optional[typing.Dict[str, str]]
304
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
302
305
 
303
306
  request_options : typing.Optional[RequestOptions]
304
307
  Request-specific configuration.
@@ -372,7 +375,6 @@ class AsyncSubjectsClient:
372
375
  self,
373
376
  subject_id: str,
374
377
  *,
375
- external_id: typing.Optional[str] = OMIT,
376
378
  name: typing.Optional[str] = OMIT,
377
379
  email: typing.Optional[str] = OMIT,
378
380
  metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -383,13 +385,14 @@ class AsyncSubjectsClient:
383
385
  ----------
384
386
  subject_id : str
385
387
 
386
- external_id : typing.Optional[str]
387
-
388
388
  name : typing.Optional[str]
389
+ The name of the subject. Used for display in the dashboard.
389
390
 
390
391
  email : typing.Optional[str]
392
+ The email of the subject. Must be a valid email address.
391
393
 
392
394
  metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
395
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
393
396
 
394
397
  request_options : typing.Optional[RequestOptions]
395
398
  Request-specific configuration.
@@ -419,12 +422,7 @@ class AsyncSubjectsClient:
419
422
  asyncio.run(main())
420
423
  """
421
424
  _response = await self._raw_client.update_subject(
422
- subject_id,
423
- external_id=external_id,
424
- name=name,
425
- email=email,
426
- metadata=metadata,
427
- request_options=request_options,
425
+ subject_id, name=name, email=email, metadata=metadata, request_options=request_options
428
426
  )
429
427
  return _response.data
430
428
 
@@ -93,12 +93,16 @@ class RawSubjectsClient:
93
93
  Parameters
94
94
  ----------
95
95
  external_id : typing.Optional[str]
96
+ The ID of the subject in your system. If provided, you may use pass it to the API in place of the subject ID. Must be unique.
96
97
 
97
98
  name : typing.Optional[str]
99
+ The name of the subject. Used for display in the dashboard.
98
100
 
99
101
  email : typing.Optional[str]
102
+ The email of the subject. Must be a valid email address.
100
103
 
101
104
  metadata : typing.Optional[typing.Dict[str, str]]
105
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
102
106
 
103
107
  request_options : typing.Optional[RequestOptions]
104
108
  Request-specific configuration.
@@ -200,7 +204,6 @@ class RawSubjectsClient:
200
204
  self,
201
205
  subject_id: str,
202
206
  *,
203
- external_id: typing.Optional[str] = OMIT,
204
207
  name: typing.Optional[str] = OMIT,
205
208
  email: typing.Optional[str] = OMIT,
206
209
  metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -211,13 +214,14 @@ class RawSubjectsClient:
211
214
  ----------
212
215
  subject_id : str
213
216
 
214
- external_id : typing.Optional[str]
215
-
216
217
  name : typing.Optional[str]
218
+ The name of the subject. Used for display in the dashboard.
217
219
 
218
220
  email : typing.Optional[str]
221
+ The email of the subject. Must be a valid email address.
219
222
 
220
223
  metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
224
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
221
225
 
222
226
  request_options : typing.Optional[RequestOptions]
223
227
  Request-specific configuration.
@@ -231,7 +235,6 @@ class RawSubjectsClient:
231
235
  f"subjects/{jsonable_encoder(subject_id)}",
232
236
  method="PUT",
233
237
  json={
234
- "external_id": external_id,
235
238
  "name": name,
236
239
  "email": email,
237
240
  "metadata": metadata,
@@ -392,12 +395,16 @@ class AsyncRawSubjectsClient:
392
395
  Parameters
393
396
  ----------
394
397
  external_id : typing.Optional[str]
398
+ The ID of the subject in your system. If provided, you may use pass it to the API in place of the subject ID. Must be unique.
395
399
 
396
400
  name : typing.Optional[str]
401
+ The name of the subject. Used for display in the dashboard.
397
402
 
398
403
  email : typing.Optional[str]
404
+ The email of the subject. Must be a valid email address.
399
405
 
400
406
  metadata : typing.Optional[typing.Dict[str, str]]
407
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
401
408
 
402
409
  request_options : typing.Optional[RequestOptions]
403
410
  Request-specific configuration.
@@ -499,7 +506,6 @@ class AsyncRawSubjectsClient:
499
506
  self,
500
507
  subject_id: str,
501
508
  *,
502
- external_id: typing.Optional[str] = OMIT,
503
509
  name: typing.Optional[str] = OMIT,
504
510
  email: typing.Optional[str] = OMIT,
505
511
  metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -510,13 +516,14 @@ class AsyncRawSubjectsClient:
510
516
  ----------
511
517
  subject_id : str
512
518
 
513
- external_id : typing.Optional[str]
514
-
515
519
  name : typing.Optional[str]
520
+ The name of the subject. Used for display in the dashboard.
516
521
 
517
522
  email : typing.Optional[str]
523
+ The email of the subject. Must be a valid email address.
518
524
 
519
525
  metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
526
+ Additional metadata about the subject. You may use this to store any custom data about the subject.
520
527
 
521
528
  request_options : typing.Optional[RequestOptions]
522
529
  Request-specific configuration.
@@ -530,7 +537,6 @@ class AsyncRawSubjectsClient:
530
537
  f"subjects/{jsonable_encoder(subject_id)}",
531
538
  method="PUT",
532
539
  json={
533
- "external_id": external_id,
534
540
  "name": name,
535
541
  "email": email,
536
542
  "metadata": metadata,