Shopify_AI / app /agents /order_agent.py
Prerna43's picture
shopify_ai
80ef840
Raw
History Blame Contribute Delete
440 Bytes
from app.services.shopify_service import ShopifyService
from app.utils.helpers import extract_order_id
class OrderAgent:
def __init__(self, service: ShopifyService | None = None):
self.service = service or ShopifyService()
def fetch(self, message: str, order_id: str | None = None) -> dict | None:
resolved_order_id = order_id or extract_order_id(message)
return self.service.get_order(resolved_order_id)