diff --git a/src/TaxisLibrary/taxis_client.py b/src/TaxisLibrary/taxis_client.py index 64413fa..cc7e2e9 100644 --- a/src/TaxisLibrary/taxis_client.py +++ b/src/TaxisLibrary/taxis_client.py @@ -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: