2525)
2626from models_library .users import GroupID
2727from models_library .wallets import WalletID , WalletStatus
28- from pydantic import BaseModel , Field , NonNegativeFloat , NonNegativeInt , PlainSerializer
28+ from pydantic import (
29+ BaseModel ,
30+ ConfigDict ,
31+ Field ,
32+ NonNegativeFloat ,
33+ NonNegativeInt ,
34+ PlainSerializer ,
35+ )
2936
3037
3138class GetCreditPriceLegacy (BaseModel ):
39+ model_config = ConfigDict (
40+ populate_by_name = True ,
41+ )
3242 product_name : str = Field (alias = "productName" )
3343 usd_per_credit : (
3444 Annotated [
@@ -56,6 +66,9 @@ class GetCreditPriceLegacy(BaseModel):
5666
5767
5868class PricingUnitGetLegacy (BaseModel ):
69+ model_config = ConfigDict (
70+ populate_by_name = True ,
71+ )
5972 pricing_unit_id : PricingUnitId = Field (alias = "pricingUnitId" )
6073 unit_name : str = Field (alias = "unitName" )
6174 unit_extra_info : UnitExtraInfo = Field (alias = "unitExtraInfo" )
@@ -71,6 +84,9 @@ class PricingUnitGetLegacy(BaseModel):
7184
7285
7386class WalletGetWithAvailableCreditsLegacy (BaseModel ):
87+ model_config = ConfigDict (
88+ populate_by_name = True ,
89+ )
7490 wallet_id : WalletID = Field (alias = "walletId" )
7591 name : IDStr
7692 description : str | None = None
@@ -90,6 +106,9 @@ class WalletGetWithAvailableCreditsLegacy(BaseModel):
90106
91107
92108class ServicePricingPlanGetLegacy (BaseModel ):
109+ model_config = ConfigDict (
110+ populate_by_name = True ,
111+ )
93112 pricing_plan_id : PricingPlanId = Field (alias = "pricingPlanId" )
94113 display_name : str = Field (alias = "displayName" )
95114 description : str
0 commit comments