19
19
from ._base import InputSchema , OutputSchema
20
20
21
21
22
- class GetCreditPrice (OutputSchema ):
22
+ class CreditPriceGet (OutputSchema ):
23
23
product_name : str
24
24
usd_per_credit : Annotated [
25
- NonNegativeDecimal ,
26
- PlainSerializer (float , return_type = NonNegativeFloat , when_used = "json" ),
27
- ] | None = Field (
28
- ...,
29
- description = "Price of a credit in USD. "
30
- "If None, then this product's price is UNDEFINED" ,
31
- )
25
+ Annotated [
26
+ NonNegativeDecimal ,
27
+ PlainSerializer (float , return_type = NonNegativeFloat , when_used = "json" ),
28
+ ]
29
+ | None ,
30
+ Field (
31
+ description = "Price of a credit in USD. "
32
+ "If None, then this product's price is UNDEFINED" ,
33
+ ),
34
+ ]
35
+
32
36
min_payment_amount_usd : Annotated [
33
37
NonNegativeInt | None ,
34
38
Field (
@@ -61,15 +65,11 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
61
65
)
62
66
63
67
64
- class GetProductTemplate (OutputSchema ):
68
+ class ProductTemplateGet (OutputSchema ):
65
69
id_ : Annotated [IDStr , Field (alias = "id" )]
66
70
content : str
67
71
68
72
69
- class UpdateProductTemplate (InputSchema ):
70
- content : str
71
-
72
-
73
73
class ProductGet (OutputSchema ):
74
74
name : ProductName
75
75
display_name : str
@@ -92,7 +92,7 @@ class ProductGet(OutputSchema):
92
92
credits_per_usd : NonNegativeDecimal | None
93
93
94
94
templates : Annotated [
95
- list [GetProductTemplate ],
95
+ list [ProductTemplateGet ],
96
96
Field (
97
97
description = "List of templates available to this product for communications (e.g. emails, sms, etc)" ,
98
98
default_factory = list ,
@@ -111,7 +111,7 @@ class ProductUIGet(OutputSchema):
111
111
ExtraCreditsUsdRangeInt : TypeAlias = Annotated [int , Field (ge = 0 , lt = 500 )]
112
112
113
113
114
- class GenerateInvitation (InputSchema ):
114
+ class InvitationGenerate (InputSchema ):
115
115
guest : LowerCaseEmailStr
116
116
trial_account_days : PositiveInt | None = None
117
117
extra_credits_in_usd : ExtraCreditsUsdRangeInt | None = None
0 commit comments