Update project 3 iteration feat: core booking pipeline, webhook and async pdf worker CORE COPLETE
This commit is contained in:
14
backend/schemas/payment.py
Normal file
14
backend/schemas/payment.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from pydantic import BaseModel, field_validator
|
||||
|
||||
|
||||
class PaymentWebhookRequest(BaseModel):
|
||||
ticket_id: int
|
||||
idempotency_key: str
|
||||
status: str
|
||||
|
||||
@field_validator("status")
|
||||
@classmethod
|
||||
def status_must_be_success(cls, v: str) -> str:
|
||||
if v != "success":
|
||||
raise ValueError("Only 'success' status is accepted")
|
||||
return v
|
||||
Reference in New Issue
Block a user