[UP] OrderNotificationsIn {~ order > order_id}

This commit is contained in:
Evgeny (Krymmy) Momotov 2025-09-25 16:11:55 +03:00
parent 87b754d767
commit 0bc6e7ab04

View file

@ -168,9 +168,9 @@ class OrderOut(BaseModel):
class OrderNotificationsIn(BaseModel):
order: int
notify_side: OrderNotifySide
notify_type: OrderNotifyType
order_id: int
notify_side: OrderNotifySide = Field(default=OrderNotifySide.CLIENT)
notify_type: OrderNotifyType = Field(default=OrderNotifyType.DRIVER_ARRIVED)
processed: Optional[bool] = False
class OrderNotificationsOut(BaseModel):
@ -416,7 +416,7 @@ class TaxisClient:
return OrderNotificationsOut(**result)
async def mark_order_notification_processed(self, notification_id: int, processed: bool) -> 'OrderNotificationsOut':
result = await self._request("PATCH", f"/order_notifications/{notification_id}/processed", params={"processed": processed})
result = await self._request("PATCH", f"/order_notifications/{notification_id}/processed", params={"processed": str(processed).lower()})
return OrderNotificationsOut(**result)
async def delete_order_notification(self, notification_id: int) -> None: