"""PaymentAdapter protocol — every provider implements this."""

from typing import Protocol, runtime_checkable


@runtime_checkable
class PaymentAdapter(Protocol):
    provider_name: str

    async def validate_connection(self) -> bool: ...

    async def create_customer(self, params: dict) -> dict: ...
    async def create_order(self, params: dict) -> dict: ...
    async def create_payment(self, order_id: str, params: dict) -> dict: ...
    async def capture_payment(self, payment_id: str, amount: int) -> dict: ...
    async def create_refund(self, payment_id: str, params: dict) -> dict: ...
    async def create_dispute(self, payment_id: str, params: dict) -> dict: ...

    async def fetch_order(self, order_id: str) -> dict: ...
    async def fetch_payment(self, payment_id: str) -> dict: ...
    async def list_disputes(self, filters: dict) -> list[dict]: ...
    async def list_refunds(self, payment_id: str) -> list[dict]: ...
