37 lines
749 B
Python
37 lines
749 B
Python
from abc import ABC,abstractmethod
|
|
from dataclasses import dataclass
|
|
from decimal import Decimal
|
|
|
|
|
|
@dataclass(slots=True)
|
|
class SbpBank:
|
|
id: str
|
|
name: str
|
|
|
|
|
|
@dataclass(slots=True)
|
|
class SbpPayoutResult:
|
|
status: str
|
|
mozen_order_id: str | None = None
|
|
error: str | None = None
|
|
|
|
|
|
class IMozenSbpService(ABC):
|
|
@abstractmethod
|
|
async def get_banks(self,trace_id: str) -> list[SbpBank]:
|
|
raise NotImplementedError
|
|
|
|
|
|
@abstractmethod
|
|
async def make_withdrawal(
|
|
self,
|
|
*,
|
|
user_id: str,
|
|
withdraw_id: str,
|
|
phone: str,
|
|
bank_id: str,
|
|
amount: Decimal,
|
|
trace_id: str,
|
|
) -> SbpPayoutResult:
|
|
raise NotImplementedError
|