from typing import Dict, Any, Optional from ..client import AEClient class TransactionsService: """Service to handle AE Platform Transactions (Orders).""" def __init__(self, client: AEClient): self.client = client def get_list(self, user_id: Optional[str] = None, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: """ Get list of transactions (orders) for a user. Endpoint: GET /users/{user_id}/transactions """ uid = user_id or self.client.user_id if not uid: raise ValueError("user_id must be provided either in the method call or client initialization.") return self.client.get(f"/users/{uid}/transactions", params=params)