- Separate booking_status, payment_arrangement, and payment_status in schema.sql and booking endpoints.
- Add GET /bookings/follow-up-queue, POST /bookings/{id}/authorize-delayed-payment, POST /bookings/{id}/release, and POST /payments/acknowledge.
- Add CalendarService adapter tracking gcal_sync_status with manual retry endpoint (POST /bookings/{id}/sync-calendar).
- Add integration test suite covering OAuth allowlist, 48h follow-up queue, delayed-payment exceptions, and slot release.
Refs: #3
32 lines
721 B
Python
32 lines
721 B
Python
from __future__ import annotations
|
|
|
|
from typing import Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
PaymentMethod = Literal["SPEI", "OXXO", "CASH"]
|
|
PaymentStatus = Literal["ACKNOWLEDGED", "REVERSED"]
|
|
|
|
|
|
class PaymentAcknowledgmentRequest(BaseModel):
|
|
booking_id: str
|
|
amount_mxn: int = Field(..., ge=0)
|
|
payment_method: PaymentMethod = "SPEI"
|
|
notes: str | None = None
|
|
|
|
|
|
# Alias for backward compatibility
|
|
PaymentVerificationRequest = PaymentAcknowledgmentRequest
|
|
|
|
|
|
class PaymentRead(BaseModel):
|
|
id: str
|
|
booking_id: str
|
|
amount_mxn: int
|
|
payment_method: PaymentMethod
|
|
status: PaymentStatus
|
|
acknowledged_by: str
|
|
acknowledged_at: str
|
|
notes: str | None = None
|
|
created_at: str
|