(cls, value: int | None)
| 297 | product_id: str |
| 298 | pay_type: PayType | Literal["alipay", "wechat"] = "ALI" |
| 299 | biz_id: str | None = None |
| 300 | invitation_code: str | None = None |
| 301 | |
| 302 | @field_validator("pay_type", mode="before") |
| 303 | @classmethod |
| 304 | def normalize_pay_type(cls, value: Any) -> PayType: |
| 305 | raw = str(value or "").strip().upper() |
| 306 | if raw in {"ALI", "ALIPAY"}: |
| 307 | return "ALI" |
| 308 | if raw in {"WE_CHAT", "WECHAT", "WECHATPAY", "WECHAT_PAY"}: |
nothing calls this directly
no outgoing calls
no test coverage detected