diff --git a/aiocloudpayments/__init__.py b/aiocloudpayments/__init__.py index 2b719bd..44e15c9 100644 --- a/aiocloudpayments/__init__.py +++ b/aiocloudpayments/__init__.py @@ -1,4 +1,4 @@ from .client import AioCpClient from .dispatcher import AiohttpDispatcher, Router, Result -__version__ = "0.1.1" +__version__ = "0.1.2" diff --git a/aiocloudpayments/endpoints/payments/tokens/bases.py b/aiocloudpayments/endpoints/payments/tokens/bases.py index 385fd75..99cc30b 100644 --- a/aiocloudpayments/endpoints/payments/tokens/bases.py +++ b/aiocloudpayments/endpoints/payments/tokens/bases.py @@ -1,10 +1,21 @@ import abc +import enum from ....typehints import NUMERIC from ....types.transaction import Transaction from ...base import CpEndpoint +class TrInitiatorCode(enum.IntEnum): + SERVICE_INITIATED = 0 + CLIENT_INITIATED = 1 + + +class PaymentScheduled(enum.IntEnum): + ONCE = 0 + SCHEDULED = 1 + + class CpTokensChargeAuthEndpoint(CpEndpoint, abc.ABC): __returning__ = Transaction @@ -17,3 +28,5 @@ class CpTokensChargeAuthEndpoint(CpEndpoint, abc.ABC): ip_address: str = None email: str = None json_data: dict = None + tr_initiator_code: int + payment_scheduled: int = None # Note: required if tr_initiator_code is SERVICE_INITIATED diff --git a/pyproject.toml b/pyproject.toml index 9c76c0c..a8fcd1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aiocloudpayments" -version = "0.1.1" +version = "0.1.2" description = "CloudPayments Python Async Library" authors = ["drforse "] readme = "README.md"