Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update token charge api #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aiocloudpayments/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .client import AioCpClient
from .dispatcher import AiohttpDispatcher, Router, Result

__version__ = "0.1.1"
__version__ = "0.1.2"
13 changes: 13 additions & 0 deletions aiocloudpayments/endpoints/payments/tokens/bases.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiocloudpayments"
version = "0.1.1"
version = "0.1.2"
description = "CloudPayments Python Async Library"
authors = ["drforse <[email protected]>"]
readme = "README.md"
Expand Down