lark-billing 0.0.6__py3-none-any.whl → 0.0.8__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.
- lark/__init__.py +92 -369
- lark/checkout/client.py +20 -79
- lark/checkout/raw_client.py +18 -102
- lark/client.py +112 -27
- lark/core/client_wrapper.py +2 -2
- lark/core/http_sse/__init__.py +42 -0
- lark/core/http_sse/_api.py +112 -0
- lark/core/http_sse/_decoders.py +61 -0
- lark/{types/credit_grant.py → core/http_sse/_exceptions.py} +4 -2
- lark/core/http_sse/_models.py +17 -0
- lark/core/pydantic_utilities.py +3 -1
- lark/{feature_access → customer_access}/client.py +30 -24
- lark/{feature_access → customer_access}/raw_client.py +22 -17
- lark/{types/rate_card.py → customer_portal/__init__.py} +1 -2
- lark/customer_portal/client.py +115 -0
- lark/customer_portal/raw_client.py +134 -0
- lark/environment.py +7 -0
- lark/{types/dimension.py → invoices/__init__.py} +1 -2
- lark/invoices/client.py +136 -0
- lark/invoices/raw_client.py +147 -0
- lark/pricing_metrics/__init__.py +38 -0
- lark/pricing_metrics/client.py +288 -0
- lark/pricing_metrics/raw_client.py +369 -0
- lark/pricing_metrics/types/__init__.py +42 -0
- lark/{types/credit_grant_resource_input_schedule.py → pricing_metrics/types/pricing_metric_aggregation.py} +7 -8
- lark/rate_cards/__init__.py +0 -15
- lark/rate_cards/client.py +30 -542
- lark/rate_cards/raw_client.py +34 -370
- lark/rate_cards/types/__init__.py +0 -17
- lark/rate_cards/types/create_rate_card_request_usage_based_rates_item.py +3 -29
- lark/subjects/client.py +18 -54
- lark/subjects/raw_client.py +14 -24
- lark/subscriptions/client.py +104 -80
- lark/subscriptions/raw_client.py +186 -53
- lark/types/__init__.py +63 -379
- lark/types/aggregation.py +1 -43
- lark/types/amount.py +5 -1
- lark/types/{credit_grant_date_time_expiration_interface.py → billing_state_response.py} +3 -2
- lark/types/{credit_grant_schedule_one_time_resource.py → count_aggregation_pricing_metric_resource.py} +1 -1
- lark/types/{create_dimension_interface.py → create_customer_portal_session_response.py} +3 -3
- lark/types/{create_dimension_coordinate_interface.py → create_fixed_rate_request.py} +5 -3
- lark/types/{pricing_metric_interface.py → create_pricing_metric_response.py} +2 -5
- lark/types/{create_simple_usage_based_rate_interface.py → create_simple_usage_based_rate_request.py} +6 -9
- lark/types/create_subject_response.py +30 -6
- lark/types/create_subscription_checkout_session_response.py +1 -2
- lark/types/create_usage_event_summary_response.py +1 -1
- lark/types/fixed_rate_interface.py +0 -6
- lark/types/{create_pricing_metric_interface.py → get_pricing_metric_response.py} +3 -5
- lark/types/{complete_subscription_checkout_response.py → invoice_line_item_resource.py} +4 -2
- lark/types/invoice_resource.py +31 -0
- lark/types/invoice_status.py +5 -0
- lark/types/{check_feature_access_response.py → list_invoices_response.py} +4 -4
- lark/types/{check_feature_access_request.py → list_pricing_metrics_response.py} +4 -7
- lark/types/package_price.py +2 -2
- lark/types/package_price_input_rounding_behavior.py +5 -0
- lark/types/package_price_output_rounding_behavior.py +5 -0
- lark/types/period_resource.py +23 -0
- lark/types/price.py +39 -1
- lark/types/pricing_metric_resource.py +24 -0
- lark/types/rate_card_resource.py +0 -6
- lark/types/rate_card_resource_usage_based_rates_item.py +2 -29
- lark/types/simple_usage_based_rate_interface.py +1 -7
- lark/types/subject_resource.py +30 -6
- lark/types/subscription_resource.py +6 -4
- lark/types/subscription_status.py +5 -0
- lark/types/{credit_grant_date_time_expiration_resource.py → sum_aggregation_pricing_metric_resource.py} +2 -2
- lark/types/{subject.py → value.py} +1 -1
- lark/usage_events/client.py +8 -21
- lark/usage_events/raw_client.py +6 -6
- {lark_billing-0.0.6.dist-info → lark_billing-0.0.8.dist-info}/METADATA +4 -3
- lark_billing-0.0.8.dist-info/RECORD +107 -0
- lark/rate_cards/types/create_rate_card_version_request_usage_based_rates_item.py +0 -58
- lark/rate_cards/types/create_rate_card_version_request_version_type.py +0 -5
- lark/types/create_credit_grant_interface.py +0 -27
- lark/types/create_credit_grant_interface_expiration.py +0 -27
- lark/types/create_credit_pool_request.py +0 -5
- lark/types/create_dimensional_usage_based_rate_interface.py +0 -32
- lark/types/create_fixed_rate_interface.py +0 -28
- lark/types/create_pricing_matrix_cell_interface.py +0 -22
- lark/types/create_pricing_matrix_interface.py +0 -20
- lark/types/create_pricing_plan_request.py +0 -5
- lark/types/create_rate_card_response.py +0 -36
- lark/types/create_rate_card_response_billing_interval.py +0 -5
- lark/types/create_rate_card_response_usage_based_rates_item.py +0 -58
- lark/types/create_rate_card_version_response.py +0 -36
- lark/types/create_rate_card_version_response_billing_interval.py +0 -5
- lark/types/create_rate_card_version_response_usage_based_rates_item.py +0 -59
- lark/types/credit_grant_duration_expiration_interface.py +0 -21
- lark/types/credit_grant_duration_expiration_resource.py +0 -21
- lark/types/credit_grant_interface.py +0 -28
- lark/types/credit_grant_interface_input_expiration.py +0 -27
- lark/types/credit_grant_interface_output_expiration.py +0 -43
- lark/types/credit_grant_interface_output_schedule.py +0 -41
- lark/types/credit_grant_resource.py +0 -28
- lark/types/credit_grant_resource_input_expiration.py +0 -27
- lark/types/credit_grant_resource_output_expiration.py +0 -43
- lark/types/credit_grant_resource_output_schedule.py +0 -39
- lark/types/credit_grant_schedule.py +0 -5
- lark/types/credit_grant_schedule_one_time_interface.py +0 -19
- lark/types/credit_grant_schedule_rate_cycle_start_interface.py +0 -19
- lark/types/credit_grant_schedule_rate_cycle_start_resource.py +0 -17
- lark/types/credit_grant_subject_granting_config_interface.py +0 -20
- lark/types/credit_pool.py +0 -5
- lark/types/credit_pool_rollover_config.py +0 -5
- lark/types/custom_aggregation_pricing_metric_interface.py +0 -22
- lark/types/custom_pricing_metric.py +0 -5
- lark/types/custom_unit.py +0 -5
- lark/types/custom_unit_amount.py +0 -5
- lark/types/dimension_coordinate.py +0 -5
- lark/types/dimension_coordinate_interface.py +0 -20
- lark/types/dimension_coordinate_set.py +0 -5
- lark/types/dimension_interface.py +0 -20
- lark/types/dimensional_rate_matrix.py +0 -5
- lark/types/dimensional_rate_matrix_cell.py +0 -5
- lark/types/dimensional_usage_based_rate.py +0 -5
- lark/types/dimensional_usage_based_rate_input.py +0 -5
- lark/types/dimensional_usage_based_rate_interface.py +0 -33
- lark/types/feature_access_resource.py +0 -21
- lark/types/get_rate_card_response.py +0 -36
- lark/types/get_rate_card_response_billing_interval.py +0 -5
- lark/types/get_rate_card_response_usage_based_rates_item.py +0 -58
- lark/types/grant_credits_request.py +0 -5
- lark/types/last_aggregation_pricing_metric_interface.py +0 -22
- lark/types/license_based_rate.py +0 -5
- lark/types/license_based_rate_input.py +0 -5
- lark/types/max_aggregation_pricing_metric_interface.py +0 -22
- lark/types/monetary_amount.py +0 -5
- lark/types/package_price_rounding_behavior.py +0 -5
- lark/types/package_price_wrapper.py +0 -5
- lark/types/pricing_matrix_cell_interface.py +0 -22
- lark/types/pricing_matrix_interface.py +0 -20
- lark/types/pricing_metric.py +0 -5
- lark/types/pricing_plan.py +0 -5
- lark/types/pricing_plan_subscription.py +0 -5
- lark/types/pricing_tier.py +0 -5
- lark/types/rate_card_version.py +0 -5
- lark/types/rate_card_version_input.py +0 -5
- lark/types/simple_usage_based_rate.py +0 -5
- lark/types/simple_usage_based_rate_input.py +0 -5
- lark/types/status.py +0 -5
- lark/types/subject_granting_config.py +0 -5
- lark/types/subject_granting_config_resource.py +0 -20
- lark/types/tiered_price.py +0 -5
- lark/types/tiered_price_wrapper.py +0 -5
- lark/types/unit.py +0 -5
- lark/types/update_pricing_plan_request.py +0 -5
- lark/types/update_rate_card_request.py +0 -5
- lark/types/update_subscription_request.py +0 -5
- lark/types/usage_based_rate.py +0 -5
- lark/types/usage_based_rate_input.py +0 -5
- lark/types/usage_unit.py +0 -5
- lark_billing-0.0.6.dist-info/RECORD +0 -167
- /lark/{feature_access → customer_access}/__init__.py +0 -0
- {lark_billing-0.0.6.dist-info → lark_billing-0.0.8.dist-info}/WHEEL +0 -0
lark/subjects/client.py
CHANGED
|
@@ -56,7 +56,6 @@ class SubjectsClient:
|
|
|
56
56
|
|
|
57
57
|
client = Lark(
|
|
58
58
|
api_key="YOUR_API_KEY",
|
|
59
|
-
base_url="https://yourhost.com/path/to/api",
|
|
60
59
|
)
|
|
61
60
|
client.subjects.list_subjects(
|
|
62
61
|
limit=1,
|
|
@@ -72,7 +71,6 @@ class SubjectsClient:
|
|
|
72
71
|
external_id: typing.Optional[str] = OMIT,
|
|
73
72
|
name: typing.Optional[str] = OMIT,
|
|
74
73
|
email: typing.Optional[str] = OMIT,
|
|
75
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
76
74
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
77
75
|
request_options: typing.Optional[RequestOptions] = None,
|
|
78
76
|
) -> CreateSubjectResponse:
|
|
@@ -80,14 +78,16 @@ class SubjectsClient:
|
|
|
80
78
|
Parameters
|
|
81
79
|
----------
|
|
82
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.
|
|
83
82
|
|
|
84
83
|
name : typing.Optional[str]
|
|
84
|
+
The name of the subject. Used for display in the dashboard.
|
|
85
85
|
|
|
86
86
|
email : typing.Optional[str]
|
|
87
|
-
|
|
88
|
-
parent_subject_id : typing.Optional[str]
|
|
87
|
+
The email of the subject. Must be a valid email address.
|
|
89
88
|
|
|
90
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.
|
|
91
91
|
|
|
92
92
|
request_options : typing.Optional[RequestOptions]
|
|
93
93
|
Request-specific configuration.
|
|
@@ -103,17 +103,11 @@ class SubjectsClient:
|
|
|
103
103
|
|
|
104
104
|
client = Lark(
|
|
105
105
|
api_key="YOUR_API_KEY",
|
|
106
|
-
base_url="https://yourhost.com/path/to/api",
|
|
107
106
|
)
|
|
108
107
|
client.subjects.create_subject()
|
|
109
108
|
"""
|
|
110
109
|
_response = self._raw_client.create_subject(
|
|
111
|
-
external_id=external_id,
|
|
112
|
-
name=name,
|
|
113
|
-
email=email,
|
|
114
|
-
parent_subject_id=parent_subject_id,
|
|
115
|
-
metadata=metadata,
|
|
116
|
-
request_options=request_options,
|
|
110
|
+
external_id=external_id, name=name, email=email, metadata=metadata, request_options=request_options
|
|
117
111
|
)
|
|
118
112
|
return _response.data
|
|
119
113
|
|
|
@@ -139,7 +133,6 @@ class SubjectsClient:
|
|
|
139
133
|
|
|
140
134
|
client = Lark(
|
|
141
135
|
api_key="YOUR_API_KEY",
|
|
142
|
-
base_url="https://yourhost.com/path/to/api",
|
|
143
136
|
)
|
|
144
137
|
client.subjects.get_subject(
|
|
145
138
|
subject_id="subject_id",
|
|
@@ -152,10 +145,8 @@ class SubjectsClient:
|
|
|
152
145
|
self,
|
|
153
146
|
subject_id: str,
|
|
154
147
|
*,
|
|
155
|
-
external_id: typing.Optional[str] = OMIT,
|
|
156
148
|
name: typing.Optional[str] = OMIT,
|
|
157
149
|
email: typing.Optional[str] = OMIT,
|
|
158
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
159
150
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
160
151
|
request_options: typing.Optional[RequestOptions] = None,
|
|
161
152
|
) -> SubjectResource:
|
|
@@ -164,15 +155,14 @@ class SubjectsClient:
|
|
|
164
155
|
----------
|
|
165
156
|
subject_id : str
|
|
166
157
|
|
|
167
|
-
external_id : typing.Optional[str]
|
|
168
|
-
|
|
169
158
|
name : typing.Optional[str]
|
|
159
|
+
The name of the subject. Used for display in the dashboard.
|
|
170
160
|
|
|
171
161
|
email : typing.Optional[str]
|
|
172
|
-
|
|
173
|
-
parent_subject_id : typing.Optional[str]
|
|
162
|
+
The email of the subject. Must be a valid email address.
|
|
174
163
|
|
|
175
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.
|
|
176
166
|
|
|
177
167
|
request_options : typing.Optional[RequestOptions]
|
|
178
168
|
Request-specific configuration.
|
|
@@ -188,20 +178,13 @@ class SubjectsClient:
|
|
|
188
178
|
|
|
189
179
|
client = Lark(
|
|
190
180
|
api_key="YOUR_API_KEY",
|
|
191
|
-
base_url="https://yourhost.com/path/to/api",
|
|
192
181
|
)
|
|
193
182
|
client.subjects.update_subject(
|
|
194
183
|
subject_id="subject_id",
|
|
195
184
|
)
|
|
196
185
|
"""
|
|
197
186
|
_response = self._raw_client.update_subject(
|
|
198
|
-
subject_id,
|
|
199
|
-
external_id=external_id,
|
|
200
|
-
name=name,
|
|
201
|
-
email=email,
|
|
202
|
-
parent_subject_id=parent_subject_id,
|
|
203
|
-
metadata=metadata,
|
|
204
|
-
request_options=request_options,
|
|
187
|
+
subject_id, name=name, email=email, metadata=metadata, request_options=request_options
|
|
205
188
|
)
|
|
206
189
|
return _response.data
|
|
207
190
|
|
|
@@ -227,7 +210,6 @@ class SubjectsClient:
|
|
|
227
210
|
|
|
228
211
|
client = Lark(
|
|
229
212
|
api_key="YOUR_API_KEY",
|
|
230
|
-
base_url="https://yourhost.com/path/to/api",
|
|
231
213
|
)
|
|
232
214
|
client.subjects.delete_subject(
|
|
233
215
|
subject_id="subject_id",
|
|
@@ -282,7 +264,6 @@ class AsyncSubjectsClient:
|
|
|
282
264
|
|
|
283
265
|
client = AsyncLark(
|
|
284
266
|
api_key="YOUR_API_KEY",
|
|
285
|
-
base_url="https://yourhost.com/path/to/api",
|
|
286
267
|
)
|
|
287
268
|
|
|
288
269
|
|
|
@@ -304,7 +285,6 @@ class AsyncSubjectsClient:
|
|
|
304
285
|
external_id: typing.Optional[str] = OMIT,
|
|
305
286
|
name: typing.Optional[str] = OMIT,
|
|
306
287
|
email: typing.Optional[str] = OMIT,
|
|
307
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
308
288
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
309
289
|
request_options: typing.Optional[RequestOptions] = None,
|
|
310
290
|
) -> CreateSubjectResponse:
|
|
@@ -312,14 +292,16 @@ class AsyncSubjectsClient:
|
|
|
312
292
|
Parameters
|
|
313
293
|
----------
|
|
314
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.
|
|
315
296
|
|
|
316
297
|
name : typing.Optional[str]
|
|
298
|
+
The name of the subject. Used for display in the dashboard.
|
|
317
299
|
|
|
318
300
|
email : typing.Optional[str]
|
|
319
|
-
|
|
320
|
-
parent_subject_id : typing.Optional[str]
|
|
301
|
+
The email of the subject. Must be a valid email address.
|
|
321
302
|
|
|
322
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.
|
|
323
305
|
|
|
324
306
|
request_options : typing.Optional[RequestOptions]
|
|
325
307
|
Request-specific configuration.
|
|
@@ -337,7 +319,6 @@ class AsyncSubjectsClient:
|
|
|
337
319
|
|
|
338
320
|
client = AsyncLark(
|
|
339
321
|
api_key="YOUR_API_KEY",
|
|
340
|
-
base_url="https://yourhost.com/path/to/api",
|
|
341
322
|
)
|
|
342
323
|
|
|
343
324
|
|
|
@@ -348,12 +329,7 @@ class AsyncSubjectsClient:
|
|
|
348
329
|
asyncio.run(main())
|
|
349
330
|
"""
|
|
350
331
|
_response = await self._raw_client.create_subject(
|
|
351
|
-
external_id=external_id,
|
|
352
|
-
name=name,
|
|
353
|
-
email=email,
|
|
354
|
-
parent_subject_id=parent_subject_id,
|
|
355
|
-
metadata=metadata,
|
|
356
|
-
request_options=request_options,
|
|
332
|
+
external_id=external_id, name=name, email=email, metadata=metadata, request_options=request_options
|
|
357
333
|
)
|
|
358
334
|
return _response.data
|
|
359
335
|
|
|
@@ -381,7 +357,6 @@ class AsyncSubjectsClient:
|
|
|
381
357
|
|
|
382
358
|
client = AsyncLark(
|
|
383
359
|
api_key="YOUR_API_KEY",
|
|
384
|
-
base_url="https://yourhost.com/path/to/api",
|
|
385
360
|
)
|
|
386
361
|
|
|
387
362
|
|
|
@@ -400,10 +375,8 @@ class AsyncSubjectsClient:
|
|
|
400
375
|
self,
|
|
401
376
|
subject_id: str,
|
|
402
377
|
*,
|
|
403
|
-
external_id: typing.Optional[str] = OMIT,
|
|
404
378
|
name: typing.Optional[str] = OMIT,
|
|
405
379
|
email: typing.Optional[str] = OMIT,
|
|
406
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
407
380
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
408
381
|
request_options: typing.Optional[RequestOptions] = None,
|
|
409
382
|
) -> SubjectResource:
|
|
@@ -412,15 +385,14 @@ class AsyncSubjectsClient:
|
|
|
412
385
|
----------
|
|
413
386
|
subject_id : str
|
|
414
387
|
|
|
415
|
-
external_id : typing.Optional[str]
|
|
416
|
-
|
|
417
388
|
name : typing.Optional[str]
|
|
389
|
+
The name of the subject. Used for display in the dashboard.
|
|
418
390
|
|
|
419
391
|
email : typing.Optional[str]
|
|
420
|
-
|
|
421
|
-
parent_subject_id : typing.Optional[str]
|
|
392
|
+
The email of the subject. Must be a valid email address.
|
|
422
393
|
|
|
423
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.
|
|
424
396
|
|
|
425
397
|
request_options : typing.Optional[RequestOptions]
|
|
426
398
|
Request-specific configuration.
|
|
@@ -438,7 +410,6 @@ class AsyncSubjectsClient:
|
|
|
438
410
|
|
|
439
411
|
client = AsyncLark(
|
|
440
412
|
api_key="YOUR_API_KEY",
|
|
441
|
-
base_url="https://yourhost.com/path/to/api",
|
|
442
413
|
)
|
|
443
414
|
|
|
444
415
|
|
|
@@ -451,13 +422,7 @@ class AsyncSubjectsClient:
|
|
|
451
422
|
asyncio.run(main())
|
|
452
423
|
"""
|
|
453
424
|
_response = await self._raw_client.update_subject(
|
|
454
|
-
subject_id,
|
|
455
|
-
external_id=external_id,
|
|
456
|
-
name=name,
|
|
457
|
-
email=email,
|
|
458
|
-
parent_subject_id=parent_subject_id,
|
|
459
|
-
metadata=metadata,
|
|
460
|
-
request_options=request_options,
|
|
425
|
+
subject_id, name=name, email=email, metadata=metadata, request_options=request_options
|
|
461
426
|
)
|
|
462
427
|
return _response.data
|
|
463
428
|
|
|
@@ -485,7 +450,6 @@ class AsyncSubjectsClient:
|
|
|
485
450
|
|
|
486
451
|
client = AsyncLark(
|
|
487
452
|
api_key="YOUR_API_KEY",
|
|
488
|
-
base_url="https://yourhost.com/path/to/api",
|
|
489
453
|
)
|
|
490
454
|
|
|
491
455
|
|
lark/subjects/raw_client.py
CHANGED
|
@@ -86,7 +86,6 @@ class RawSubjectsClient:
|
|
|
86
86
|
external_id: typing.Optional[str] = OMIT,
|
|
87
87
|
name: typing.Optional[str] = OMIT,
|
|
88
88
|
email: typing.Optional[str] = OMIT,
|
|
89
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
90
89
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
91
90
|
request_options: typing.Optional[RequestOptions] = None,
|
|
92
91
|
) -> HttpResponse[CreateSubjectResponse]:
|
|
@@ -94,14 +93,16 @@ class RawSubjectsClient:
|
|
|
94
93
|
Parameters
|
|
95
94
|
----------
|
|
96
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.
|
|
97
97
|
|
|
98
98
|
name : typing.Optional[str]
|
|
99
|
+
The name of the subject. Used for display in the dashboard.
|
|
99
100
|
|
|
100
101
|
email : typing.Optional[str]
|
|
101
|
-
|
|
102
|
-
parent_subject_id : typing.Optional[str]
|
|
102
|
+
The email of the subject. Must be a valid email address.
|
|
103
103
|
|
|
104
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.
|
|
105
106
|
|
|
106
107
|
request_options : typing.Optional[RequestOptions]
|
|
107
108
|
Request-specific configuration.
|
|
@@ -118,7 +119,6 @@ class RawSubjectsClient:
|
|
|
118
119
|
"external_id": external_id,
|
|
119
120
|
"name": name,
|
|
120
121
|
"email": email,
|
|
121
|
-
"parent_subject_id": parent_subject_id,
|
|
122
122
|
"metadata": metadata,
|
|
123
123
|
},
|
|
124
124
|
headers={
|
|
@@ -204,10 +204,8 @@ class RawSubjectsClient:
|
|
|
204
204
|
self,
|
|
205
205
|
subject_id: str,
|
|
206
206
|
*,
|
|
207
|
-
external_id: typing.Optional[str] = OMIT,
|
|
208
207
|
name: typing.Optional[str] = OMIT,
|
|
209
208
|
email: typing.Optional[str] = OMIT,
|
|
210
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
211
209
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
212
210
|
request_options: typing.Optional[RequestOptions] = None,
|
|
213
211
|
) -> HttpResponse[SubjectResource]:
|
|
@@ -216,15 +214,14 @@ class RawSubjectsClient:
|
|
|
216
214
|
----------
|
|
217
215
|
subject_id : str
|
|
218
216
|
|
|
219
|
-
external_id : typing.Optional[str]
|
|
220
|
-
|
|
221
217
|
name : typing.Optional[str]
|
|
218
|
+
The name of the subject. Used for display in the dashboard.
|
|
222
219
|
|
|
223
220
|
email : typing.Optional[str]
|
|
224
|
-
|
|
225
|
-
parent_subject_id : typing.Optional[str]
|
|
221
|
+
The email of the subject. Must be a valid email address.
|
|
226
222
|
|
|
227
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.
|
|
228
225
|
|
|
229
226
|
request_options : typing.Optional[RequestOptions]
|
|
230
227
|
Request-specific configuration.
|
|
@@ -238,10 +235,8 @@ class RawSubjectsClient:
|
|
|
238
235
|
f"subjects/{jsonable_encoder(subject_id)}",
|
|
239
236
|
method="PUT",
|
|
240
237
|
json={
|
|
241
|
-
"external_id": external_id,
|
|
242
238
|
"name": name,
|
|
243
239
|
"email": email,
|
|
244
|
-
"parent_subject_id": parent_subject_id,
|
|
245
240
|
"metadata": metadata,
|
|
246
241
|
},
|
|
247
242
|
headers={
|
|
@@ -393,7 +388,6 @@ class AsyncRawSubjectsClient:
|
|
|
393
388
|
external_id: typing.Optional[str] = OMIT,
|
|
394
389
|
name: typing.Optional[str] = OMIT,
|
|
395
390
|
email: typing.Optional[str] = OMIT,
|
|
396
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
397
391
|
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
|
|
398
392
|
request_options: typing.Optional[RequestOptions] = None,
|
|
399
393
|
) -> AsyncHttpResponse[CreateSubjectResponse]:
|
|
@@ -401,14 +395,16 @@ class AsyncRawSubjectsClient:
|
|
|
401
395
|
Parameters
|
|
402
396
|
----------
|
|
403
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.
|
|
404
399
|
|
|
405
400
|
name : typing.Optional[str]
|
|
401
|
+
The name of the subject. Used for display in the dashboard.
|
|
406
402
|
|
|
407
403
|
email : typing.Optional[str]
|
|
408
|
-
|
|
409
|
-
parent_subject_id : typing.Optional[str]
|
|
404
|
+
The email of the subject. Must be a valid email address.
|
|
410
405
|
|
|
411
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.
|
|
412
408
|
|
|
413
409
|
request_options : typing.Optional[RequestOptions]
|
|
414
410
|
Request-specific configuration.
|
|
@@ -425,7 +421,6 @@ class AsyncRawSubjectsClient:
|
|
|
425
421
|
"external_id": external_id,
|
|
426
422
|
"name": name,
|
|
427
423
|
"email": email,
|
|
428
|
-
"parent_subject_id": parent_subject_id,
|
|
429
424
|
"metadata": metadata,
|
|
430
425
|
},
|
|
431
426
|
headers={
|
|
@@ -511,10 +506,8 @@ class AsyncRawSubjectsClient:
|
|
|
511
506
|
self,
|
|
512
507
|
subject_id: str,
|
|
513
508
|
*,
|
|
514
|
-
external_id: typing.Optional[str] = OMIT,
|
|
515
509
|
name: typing.Optional[str] = OMIT,
|
|
516
510
|
email: typing.Optional[str] = OMIT,
|
|
517
|
-
parent_subject_id: typing.Optional[str] = OMIT,
|
|
518
511
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
519
512
|
request_options: typing.Optional[RequestOptions] = None,
|
|
520
513
|
) -> AsyncHttpResponse[SubjectResource]:
|
|
@@ -523,15 +516,14 @@ class AsyncRawSubjectsClient:
|
|
|
523
516
|
----------
|
|
524
517
|
subject_id : str
|
|
525
518
|
|
|
526
|
-
external_id : typing.Optional[str]
|
|
527
|
-
|
|
528
519
|
name : typing.Optional[str]
|
|
520
|
+
The name of the subject. Used for display in the dashboard.
|
|
529
521
|
|
|
530
522
|
email : typing.Optional[str]
|
|
531
|
-
|
|
532
|
-
parent_subject_id : typing.Optional[str]
|
|
523
|
+
The email of the subject. Must be a valid email address.
|
|
533
524
|
|
|
534
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.
|
|
535
527
|
|
|
536
528
|
request_options : typing.Optional[RequestOptions]
|
|
537
529
|
Request-specific configuration.
|
|
@@ -545,10 +537,8 @@ class AsyncRawSubjectsClient:
|
|
|
545
537
|
f"subjects/{jsonable_encoder(subject_id)}",
|
|
546
538
|
method="PUT",
|
|
547
539
|
json={
|
|
548
|
-
"external_id": external_id,
|
|
549
540
|
"name": name,
|
|
550
541
|
"email": email,
|
|
551
|
-
"parent_subject_id": parent_subject_id,
|
|
552
542
|
"metadata": metadata,
|
|
553
543
|
},
|
|
554
544
|
headers={
|