From fb762bf1733d2ece52723565e3ff69910f50cbff Mon Sep 17 00:00:00 2001 From: Rostyslav Bohomaz Date: Fri, 8 Mar 2024 12:47:06 +0200 Subject: [PATCH] feat!: add `hold_wait` status to `Report` model --- liqpy/models/report.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/liqpy/models/report.py b/liqpy/models/report.py index c43aee8..e962394 100644 --- a/liqpy/models/report.py +++ b/liqpy/models/report.py @@ -89,27 +89,32 @@ class Status(StrEnum): VERIFY_SENDER = "sender_verify" # other payment statuses + WAIT_HOLD = auto() WAIT_ACCEPT = auto() WAIT_SECURE = auto() def is_wait(self) -> bool: - return self in (Status.WAIT_ACCEPT, Status.WAIT_SECURE) + return self in ( + self.__class__.WAIT_ACCEPT, + self.__class__.WAIT_SECURE, + self.__class__.WAIT_HOLD, + ) def requires_confirmation(self) -> bool: return self in ( - Status.VERIFY_3DS, - Status.VERIFY_CVV, - Status.VERIFY_OTP, - Status.VERIFY_RECEIVER, - Status.VERIFY_SENDER, + self.__class__.VERIFY_3DS, + self.__class__.VERIFY_CVV, + self.__class__.VERIFY_OTP, + self.__class__.VERIFY_RECEIVER, + self.__class__.VERIFY_SENDER, ) def is_final(self) -> bool: return self in ( - Status.SUCCESS, - Status.ERROR, - Status.FAILURE, - Status.REVERSED, + self.__class__.SUCCESS, + self.__class__.ERROR, + self.__class__.FAILURE, + self.__class__.REVERSED, )