feat: implement backend API clients for multi-marketplace integration and frontend service layer

This commit is contained in:
2026-05-12 13:16:14 +03:00
parent 6974af486a
commit ee39a3d83b
65 changed files with 2501 additions and 33 deletions

View File

@@ -0,0 +1,22 @@
from typing import Dict, Any, List
from ..client import LamodaClient
class OrdersService:
"""Service to handle Lamoda Orders (FBS)."""
def __init__(self, client: LamodaClient):
self.client = client
def get_new_orders(self, limit: int = 100) -> Dict[str, Any]:
"""
Get list of new orders (assembly tasks).
Endpoint: /v1/orders/new
"""
return self.client.get("/v1/orders/new", params={"limit": limit})
def confirm_packaging(self, order_ids: List[str]) -> Dict[str, Any]:
"""
Confirm that orders are packaged and ready for dispatch.
Endpoint: /v1/orders/pack
"""
return self.client.post("/v1/orders/pack", data={"order_ids": order_ids})