Sobes.tech
Middle+

trieda PayoutService: def __init__(self): # ... pass def create_payout(self, idempotency_key: str, terminal_id: int, amount: float) -> dict: """ Mal by vrátiť slovník v tvare: {"payout_id": <int>, "terminal_id": <int>, "amount": <float>, "status": "success"} Záruky: - pri prvom volaní s novým idempotency_key — sa vytvorí nová výplata - pri ďalších volaniach s už použitým idempotency_key — sa vráti výsledok prvého volania, NENÍ vytvorená nová výplata - suma musí byť > 0, inak — vyvolať ValueError """ raise NotImplementedError

trieda PayoutService: def __init__(self): # ... pass… - sobes.tech