class PayoutService:
def __init__(self):
# ...
pass
def create_payout(self, idempotency_key: str, terminal_id: int, amount: float) -> dict:
"""
Should return a dictionary of the form:
{"payout_id": <int>, "terminal_id": <int>, "amount": <float>, "status": "success"}
Guarantees:
- on first call with a new idempotency_key — a new payout is created
- on subsequent calls with an already used idempotency_key — the result of the first call is returned,
a new payout is NOT created
- amount must be > 0, otherwise — raise ValueError
"""
raise NotImplementedError