MCPcopy Create free account
hub / github.com/VitoHowe/glm-coding / PaymentTaskRecord

Class PaymentTaskRecord

app/models.py:192–211  ·  view source on GitHub ↗

Persisted QR-code payment task.

Source from the content-addressed store, hash-verified

190 return normalized
191
192 @field_validator("cookies", mode="before")
193 @classmethod
194 def validate_cookies(cls, value: Any) -> dict[str, str]:
195 if value in (None, ""):
196 return {}
197 if not isinstance(value, dict):
198 raise ValueError("cookies 必须是对象")
199 return {str(key): str(item) for key, item in value.items()}
200
201 @model_validator(mode="after")
202 def validate_auth(self) -> "AccountImportRequest":
203 has_auth = bool((self.token or "").strip() or (self.cookie_header or "").strip() or self.cookies)
204 if not has_auth:
205 raise ValueError("必须提供 token、cookie_header 或 cookies 之一")
206 return self
207
208
209class ManualCaptchaRequest(BaseModel):
210 """Manual captcha ticket storage payload."""
211
212 model_config = ConfigDict(extra="ignore")
213
214 ticket: str

Callers 1

create_qrMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected