Skip to content

Commit

Permalink
draft kyc validations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexviquez committed Sep 21, 2022
1 parent 6c245ac commit 79d8149
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cuenca/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'FileBatch',
'Identity',
'IdentityEvent',
'KYCValidations',
'KYCVerification',
'LimitedWallet',
'LoginToken',
Expand Down Expand Up @@ -55,6 +56,7 @@
from .files import File
from .identities import Identity
from .identity_events import IdentityEvent
from .kyc_validations import KYCValidations
from .kyc_verifications import KYCVerification
from .limited_wallets import LimitedWallet
from .login_tokens import LoginToken
Expand Down Expand Up @@ -95,6 +97,7 @@
FileBatch,
Identity,
IdentityEvent,
KYCValidations,
KYCVerification,
LimitedWallet,
LoginToken,
Expand Down
34 changes: 34 additions & 0 deletions cuenca/resources/kyc_validations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import datetime as dt
from typing import ClassVar, Optional, cast

from cuenca_validations.types import KYCFile

from ..http import Session, session as global_session
from .base import Creatable, Retrievable, Updateable


class KYCValidation(Creatable, Retrievable):
_resource: ClassVar = 'kyc_verifications'
platform_id: str
created_at: dt.datetime
verification_id: Optional[str]
govt_id: Optional[KYCFile]
proof_of_address: Optional[KYCFile]
proof_of_life: Optional[KYCFile]

class Config:
schema_extra = {
'example': {
'id': 'KVNEUInh69SuKXXmK95sROwQ',
'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg',
'created_at': '2020-05-24T14:15:22Z',
'verification_id': 'string',
'govt_id': KYCFile.schema().get('example'),
'proof_of_address': None,
'proof_of_life': None,
}
}

@classmethod
def create(cls, session: Session = global_session) -> 'KYCValidation':
return cast('KYCValidation', cls._create(session=session))
2 changes: 1 addition & 1 deletion cuenca/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.14.5'
__version__ = '0.14.7.dev0'
CLIENT_VERSION = __version__
API_VERSION = '2020-03-19'

0 comments on commit 79d8149

Please sign in to comment.