Skip to content

Commit

Permalink
feat!: add hold_wait status to Report model
Browse files Browse the repository at this point in the history
  • Loading branch information
rostyq committed Mar 8, 2024
1 parent 8a4398c commit fb762bf
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions liqpy/models/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down

0 comments on commit fb762bf

Please sign in to comment.