cuenca 2.1.4.dev4__py3-none-any.whl → 2.1.5.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cuenca/__init__.py +2 -2
- cuenca/resources/__init__.py +3 -3
- cuenca/resources/kyc_validations.py +14 -8
- cuenca/resources/postal_codes.py +21 -0
- cuenca/version.py +1 -1
- {cuenca-2.1.4.dev4.dist-info → cuenca-2.1.5.dev1.dist-info}/METADATA +2 -2
- {cuenca-2.1.4.dev4.dist-info → cuenca-2.1.5.dev1.dist-info}/RECORD +12 -12
- {cuenca-2.1.4.dev4.dist-info → cuenca-2.1.5.dev1.dist-info}/WHEEL +1 -1
- tests/resources/test_kyc_validations.py +5 -1
- tests/resources/test_postal_codes.py +17 -0
- cuenca/resources/kyc_verifications.py +0 -53
- tests/resources/test_kyc_verifications.py +0 -25
- {cuenca-2.1.4.dev4.dist-info → cuenca-2.1.5.dev1.dist-info}/licenses/LICENSE +0 -0
- {cuenca-2.1.4.dev4.dist-info → cuenca-2.1.5.dev1.dist-info}/top_level.txt +0 -0
cuenca/__init__.py
CHANGED
|
@@ -20,7 +20,6 @@ __all__ = [
|
|
|
20
20
|
'Identity',
|
|
21
21
|
'IdentityEvent',
|
|
22
22
|
'KYCValidation',
|
|
23
|
-
'KYCVerification',
|
|
24
23
|
'LimitedWallet',
|
|
25
24
|
'LoginToken',
|
|
26
25
|
'Otp',
|
|
@@ -45,6 +44,7 @@ __all__ = [
|
|
|
45
44
|
'JwtToken',
|
|
46
45
|
'TermsOfService',
|
|
47
46
|
'UserTOSAgreement',
|
|
47
|
+
'PostalCodes',
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
from . import http
|
|
@@ -70,11 +70,11 @@ from .resources import (
|
|
|
70
70
|
IdentityEvent,
|
|
71
71
|
JwtToken,
|
|
72
72
|
KYCValidation,
|
|
73
|
-
KYCVerification,
|
|
74
73
|
LimitedWallet,
|
|
75
74
|
LoginToken,
|
|
76
75
|
Otp,
|
|
77
76
|
Platform,
|
|
77
|
+
PostalCodes,
|
|
78
78
|
Questionnaires,
|
|
79
79
|
Saving,
|
|
80
80
|
ServiceProvider,
|
cuenca/resources/__init__.py
CHANGED
|
@@ -19,7 +19,6 @@ __all__ = [
|
|
|
19
19
|
'Identity',
|
|
20
20
|
'IdentityEvent',
|
|
21
21
|
'KYCValidation',
|
|
22
|
-
'KYCVerification',
|
|
23
22
|
'LimitedWallet',
|
|
24
23
|
'LoginToken',
|
|
25
24
|
'Otp',
|
|
@@ -41,6 +40,7 @@ __all__ = [
|
|
|
41
40
|
'JwtToken',
|
|
42
41
|
'TermsOfService',
|
|
43
42
|
'UserTOSAgreement',
|
|
43
|
+
'PostalCodes',
|
|
44
44
|
]
|
|
45
45
|
|
|
46
46
|
from .accounts import Account
|
|
@@ -64,11 +64,11 @@ from .identities import Identity
|
|
|
64
64
|
from .identity_events import IdentityEvent
|
|
65
65
|
from .jwt_tokens import JwtToken
|
|
66
66
|
from .kyc_validations import KYCValidation
|
|
67
|
-
from .kyc_verifications import KYCVerification
|
|
68
67
|
from .limited_wallets import LimitedWallet
|
|
69
68
|
from .login_tokens import LoginToken
|
|
70
69
|
from .otps import Otp
|
|
71
70
|
from .platforms import Platform
|
|
71
|
+
from .postal_codes import PostalCodes
|
|
72
72
|
from .questionnaires import Questionnaires
|
|
73
73
|
from .resources import RESOURCES
|
|
74
74
|
from .savings import Saving
|
|
@@ -110,7 +110,6 @@ resource_classes = [
|
|
|
110
110
|
Identity,
|
|
111
111
|
IdentityEvent,
|
|
112
112
|
KYCValidation,
|
|
113
|
-
KYCVerification,
|
|
114
113
|
LimitedWallet,
|
|
115
114
|
LoginToken,
|
|
116
115
|
Questionnaires,
|
|
@@ -129,6 +128,7 @@ resource_classes = [
|
|
|
129
128
|
WhatsappTransfer,
|
|
130
129
|
Webhook,
|
|
131
130
|
Platform,
|
|
131
|
+
PostalCodes,
|
|
132
132
|
JwtToken,
|
|
133
133
|
TermsOfService,
|
|
134
134
|
UserTOSAgreement,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import ClassVar, Optional
|
|
2
2
|
|
|
3
|
-
from cuenca_validations.types import
|
|
3
|
+
from cuenca_validations.types import KYCValidationRequest, KYCValidationSource
|
|
4
4
|
from pydantic import ConfigDict
|
|
5
5
|
|
|
6
6
|
from ..http import Session, session as global_session
|
|
@@ -10,19 +10,25 @@ from .base import Creatable, Queryable, Retrievable
|
|
|
10
10
|
class KYCValidation(Creatable, Retrievable, Queryable):
|
|
11
11
|
_resource: ClassVar = 'kyc_validations'
|
|
12
12
|
platform_id: str
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
user_id: str
|
|
14
|
+
source_type: KYCValidationSource
|
|
15
|
+
flow_id: str
|
|
15
16
|
files_uri: Optional[list[str]] = None
|
|
17
|
+
verification_id: Optional[str] = None
|
|
18
|
+
identity_id: Optional[str] = None
|
|
16
19
|
|
|
17
20
|
model_config = ConfigDict(
|
|
18
21
|
json_schema_extra={
|
|
19
22
|
'example': {
|
|
20
23
|
'id': 'KVNEUInh69SuKXXmK95sROwQ',
|
|
21
|
-
'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg',
|
|
22
24
|
'created_at': '2020-05-24T14:15:22Z',
|
|
23
|
-
'
|
|
25
|
+
'platform_id': 'PT-1234567890',
|
|
26
|
+
'user_id': 'US-1234567890',
|
|
27
|
+
'source_type': 'server',
|
|
28
|
+
'flow_id': '123e4567-e89b-12d3-a456-426614174000',
|
|
24
29
|
'files_uri': ['cuenca.com/files/id', 'cuenca.com/files/id2'],
|
|
25
|
-
'
|
|
30
|
+
'verification_id': 'metamap-verification-id',
|
|
31
|
+
'identity_id': 'metamap-identity-id',
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
)
|
|
@@ -31,13 +37,13 @@ class KYCValidation(Creatable, Retrievable, Queryable):
|
|
|
31
37
|
def create(
|
|
32
38
|
cls,
|
|
33
39
|
user_id: str,
|
|
40
|
+
source_type: KYCValidationSource,
|
|
34
41
|
force: bool = False,
|
|
35
|
-
documents: list[KYCFile] = [],
|
|
36
42
|
session: Session = global_session,
|
|
37
43
|
) -> 'KYCValidation':
|
|
38
44
|
req = KYCValidationRequest(
|
|
39
45
|
user_id=user_id,
|
|
40
46
|
force=force,
|
|
41
|
-
|
|
47
|
+
source_type=source_type,
|
|
42
48
|
)
|
|
43
49
|
return cls._create(**req.model_dump(), session=session)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import datetime as dt
|
|
2
|
+
from typing import ClassVar
|
|
3
|
+
|
|
4
|
+
from cuenca_validations.types import Country, PostalCodeQuery, State
|
|
5
|
+
|
|
6
|
+
from .base import Queryable, Retrievable
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PostalCodes(Retrievable, Queryable):
|
|
10
|
+
_resource: ClassVar = 'postal_codes'
|
|
11
|
+
_query_params: ClassVar = PostalCodeQuery
|
|
12
|
+
|
|
13
|
+
id: str
|
|
14
|
+
created_at: dt.datetime
|
|
15
|
+
postal_code: str
|
|
16
|
+
colonia: str
|
|
17
|
+
city: str
|
|
18
|
+
state: State
|
|
19
|
+
state_name: str
|
|
20
|
+
country: Country
|
|
21
|
+
country_name: str
|
cuenca/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cuenca
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5.dev1
|
|
4
4
|
Summary: Cuenca API Client
|
|
5
5
|
Home-page: https://github.com/cuenca-mx/cuenca-python
|
|
6
6
|
Author: Cuenca
|
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.9
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: requests>=2.32.0
|
|
19
|
-
Requires-Dist: cuenca-validations>=2.1.
|
|
19
|
+
Requires-Dist: cuenca-validations>=2.1.5
|
|
20
20
|
Requires-Dist: pydantic-extra-types>=2.10.0
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: author-email
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
cuenca/__init__.py,sha256=
|
|
1
|
+
cuenca/__init__.py,sha256=glrCEfdQ7vemadixSdLY3kQLYU4K4o-mQwKkmBRydK0,1870
|
|
2
2
|
cuenca/exc.py,sha256=r_lL03-JS0AsXw71wuNbiwNYLHNDagM56tRxpYyK6Lw,601
|
|
3
3
|
cuenca/jwt.py,sha256=plB2ttHPZnL0xq3gqubw_Jjtj1QYG2E5bk99N3cn5zg,1502
|
|
4
4
|
cuenca/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
cuenca/version.py,sha256=
|
|
5
|
+
cuenca/version.py,sha256=FtNEmpVHv6oUwMTR-n-qKapR5-OTbVrGFYIkH4qFddo,83
|
|
6
6
|
cuenca/http/__init__.py,sha256=V5TG6Ro9d3VY7umzcbtanmvHlGkv-k71H0tqrdMyH-s,49
|
|
7
7
|
cuenca/http/client.py,sha256=psXJiSgd3SUSJ5jwvhdBWsVMNadenG353BNVXdh7HMY,4168
|
|
8
|
-
cuenca/resources/__init__.py,sha256=
|
|
8
|
+
cuenca/resources/__init__.py,sha256=RVdGFW-0dqa94obH-NxGVw5zd7DJXgUz49rSZiUYCiI,3249
|
|
9
9
|
cuenca/resources/accounts.py,sha256=5yfNxAHpxWFosoR4WrPrDGpBCRkaQk98V-w0wCPPXqU,345
|
|
10
10
|
cuenca/resources/api_keys.py,sha256=p65ZUiAu51JhEL_fZDc7_DTR0PMcSa-YQeK9gRFY82s,2618
|
|
11
11
|
cuenca/resources/arpc.py,sha256=a9gGIgpBV8RK2ePSPBxI5c4ET4MtKH6Po_HRiv73B5k,1689
|
|
@@ -27,12 +27,12 @@ cuenca/resources/files.py,sha256=WZYRo76fIGXNXk2HzA252dSdIdA4bl3EjB6q0bb6BFg,183
|
|
|
27
27
|
cuenca/resources/identities.py,sha256=IdL495eTjx_2gDRxM9oG_QmDNOwaY7Nv9gzqeZu_Wdk,1092
|
|
28
28
|
cuenca/resources/identity_events.py,sha256=K1G6IEGlw6n482nZhBo_CJNBdpKFCO6duMQr5y9k4x8,374
|
|
29
29
|
cuenca/resources/jwt_tokens.py,sha256=NSFLMcWKPZLcVR6g8X-RIQ9e4i7VDoQvrkp3GLiapEc,952
|
|
30
|
-
cuenca/resources/kyc_validations.py,sha256=
|
|
31
|
-
cuenca/resources/kyc_verifications.py,sha256=ysvVS9zdvFZ1Wyh2G_cr_IMwYeLW5BRLVyAt46hTk4g,1563
|
|
30
|
+
cuenca/resources/kyc_validations.py,sha256=xxbdztNRD7A3vleZ637TjeGPPK7Ei2waashsm1zgqvI,1596
|
|
32
31
|
cuenca/resources/limited_wallets.py,sha256=Z3pKMRmMFTAaCw-KdzGSWfYFHCpy-ZrBwOmalVfSdRU,1049
|
|
33
32
|
cuenca/resources/login_tokens.py,sha256=vxRWqQznxdEUK0R80k0qC0BkTSZwZgUsC2neX8TTd8Q,799
|
|
34
33
|
cuenca/resources/otps.py,sha256=dZEwns98N8uUtRBFCu6Qs6ySHARU9v3zTF6T5rpF43M,711
|
|
35
34
|
cuenca/resources/platforms.py,sha256=ztGcI-cNnushMRqKqjPaZg_ioS1bpR4vR88osHAyYXw,2560
|
|
35
|
+
cuenca/resources/postal_codes.py,sha256=FOC9P4nZCQVRHMGeG8wHiRtsD083EdHtcKGPuJKj8b8,467
|
|
36
36
|
cuenca/resources/questionnaires.py,sha256=TKICPHghEhER83byMhe75Wb798K5veqv47RafYA5VOM,1043
|
|
37
37
|
cuenca/resources/resources.py,sha256=sDkVwN-RguyoQXJhSYCa95Cem1AUmcgMJeFJveVf6Q0,912
|
|
38
38
|
cuenca/resources/savings.py,sha256=3DBP1ygxhcScDpLvAQS_fF5chljyDTz4xwnltI0LCAg,1433
|
|
@@ -51,7 +51,7 @@ cuenca/resources/verifications.py,sha256=YyvSh5IpiJ02lHK8k-guTwoHSFoaMYSFk1aC2tP
|
|
|
51
51
|
cuenca/resources/wallet_transactions.py,sha256=8ePZI3-GaEd658GPYizAfHK9GVwlkt1r95-mEb7T3Jg,1030
|
|
52
52
|
cuenca/resources/webhooks.py,sha256=bGjuvkSP3GXo4Q6v8iZ40Md8xc4AQrEmAD3r40VJqxM,392
|
|
53
53
|
cuenca/resources/whatsapp_transfers.py,sha256=YSL606FBOMGKjhyKK5TiF0di96zdDKoiVtjiz_Zl_ZI,902
|
|
54
|
-
cuenca-2.1.
|
|
54
|
+
cuenca-2.1.5.dev1.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
|
|
55
55
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
56
|
tests/conftest.py,sha256=xrQtFNkqWG4KG35HorTD5N3-QUL98CAXqmLxu93haKI,1769
|
|
57
57
|
tests/test_cuenca.py,sha256=aeha_utz9YiHQg6eJK2PB7g66pVUYFi9U6pYMGXDKvk,1628
|
|
@@ -80,12 +80,12 @@ tests/resources/test_files.py,sha256=2VSlvYnGHrw--mYNvA6hlpEw-olbW_Hlq2d4vdn8v7M
|
|
|
80
80
|
tests/resources/test_identities.py,sha256=0osumiLrzKkGG4XLlL4nIdSp_nGutHaPf55w_IVREps,454
|
|
81
81
|
tests/resources/test_identity_events.py,sha256=BZlM2RXKtCORdTDQCemY3NAR3KWb3mPNql4sd6oU4-U,344
|
|
82
82
|
tests/resources/test_jwt_tokens.py,sha256=DnZS_kEGhtnb0KWFh9W0tJIiCvo_u1A3iXcu2h3z5WA,184
|
|
83
|
-
tests/resources/test_kyc_validations.py,sha256=
|
|
84
|
-
tests/resources/test_kyc_verifications.py,sha256=Y-ZU61o18I_3NFqMN2w4WGZTzwsIhULAtESqIXiizUY,634
|
|
83
|
+
tests/resources/test_kyc_validations.py,sha256=Cn_aiGUNSWFrptTQtgS8HhbK-50QEq_Qor2UMW8XuEU,540
|
|
85
84
|
tests/resources/test_limited_wallets.py,sha256=c0zDDOip3lJk8chbcGr_nWCdkO9yuL_HbD1IikR5jH4,527
|
|
86
85
|
tests/resources/test_login_tokens.py,sha256=kn0gXFOanIXjgKjbeOzfNyKsGAUkc2iKnuVmzIRaMD8,572
|
|
87
86
|
tests/resources/test_otps.py,sha256=IpCczDNRL_WaWwc1rYbSRmtWMR7GMa-Pfbq2TZcZQDw,616
|
|
88
87
|
tests/resources/test_platforms.py,sha256=5b6-XC3uAz8GARFkFoanH62jxE1uJIMXcdpeUhmI8Kg,211
|
|
88
|
+
tests/resources/test_postal_codes.py,sha256=LnP_6wRxlpsl3zmWoyCmqyA7Wa5pUxNgSyfP1rmwSiY,408
|
|
89
89
|
tests/resources/test_questionnaires.py,sha256=Sl8YHXgL42xiijUncycOUzGu5MtI3jEnhADS8Nol6N8,321
|
|
90
90
|
tests/resources/test_resources.py,sha256=rTcfjZOxujOJXjfqvOV6TPpYl8lae4bgbZj4jTAWm_o,170
|
|
91
91
|
tests/resources/test_savings.py,sha256=2qlGo9Qy_bqwYfMmjf9OsPIPVWRb6zlkzaMgg5RWElk,1127
|
|
@@ -102,7 +102,7 @@ tests/resources/test_verifications.py,sha256=yyL-bdryQU3MvqnmAgnnzGG9t7UTxWwPiVu
|
|
|
102
102
|
tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
|
|
103
103
|
tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
|
|
104
104
|
tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
|
|
105
|
-
cuenca-2.1.
|
|
106
|
-
cuenca-2.1.
|
|
107
|
-
cuenca-2.1.
|
|
108
|
-
cuenca-2.1.
|
|
105
|
+
cuenca-2.1.5.dev1.dist-info/METADATA,sha256=QqQRLCgM3pE9VDySmXfjzOGGtkQ8cEhdfsCWcLB8FFM,4988
|
|
106
|
+
cuenca-2.1.5.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
107
|
+
cuenca-2.1.5.dev1.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
|
|
108
|
+
cuenca-2.1.5.dev1.dist-info/RECORD,,
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import pytest
|
|
2
|
+
from cuenca_validations.types import KYCValidationSource
|
|
2
3
|
|
|
3
4
|
from cuenca import KYCValidation
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
@pytest.mark.vcr
|
|
7
8
|
def test_validation_create():
|
|
8
|
-
kyc_validation: KYCValidation = KYCValidation.create(
|
|
9
|
+
kyc_validation: KYCValidation = KYCValidation.create(
|
|
10
|
+
user_id="USFOOBAR",
|
|
11
|
+
source_type=KYCValidationSource.server,
|
|
12
|
+
)
|
|
9
13
|
assert kyc_validation.id
|
|
10
14
|
assert kyc_validation.verification_id
|
|
11
15
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from cuenca.resources import PostalCodes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@pytest.mark.vcr
|
|
7
|
+
@pytest.mark.parametrize(
|
|
8
|
+
"postal_code,expected_count",
|
|
9
|
+
[
|
|
10
|
+
("40100", 1),
|
|
11
|
+
("40106", 2),
|
|
12
|
+
("00000", 0),
|
|
13
|
+
],
|
|
14
|
+
)
|
|
15
|
+
def test_postal_codes_retrieve(postal_code: str, expected_count: int) -> None:
|
|
16
|
+
postal_codes = list(PostalCodes.all(postal_code=postal_code))
|
|
17
|
+
assert len(postal_codes) == expected_count
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import datetime as dt
|
|
2
|
-
from typing import ClassVar, Optional
|
|
3
|
-
|
|
4
|
-
from cuenca_validations.types import (
|
|
5
|
-
Address,
|
|
6
|
-
Curp,
|
|
7
|
-
KYCVerificationUpdateRequest,
|
|
8
|
-
Rfc,
|
|
9
|
-
)
|
|
10
|
-
from pydantic import ConfigDict
|
|
11
|
-
|
|
12
|
-
from ..http import Session, session as global_session
|
|
13
|
-
from .base import Creatable, Retrievable, Updateable
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class KYCVerification(Creatable, Retrievable, Updateable):
|
|
17
|
-
_resource: ClassVar = 'kyc_verifications'
|
|
18
|
-
|
|
19
|
-
platform_id: str
|
|
20
|
-
created_at: dt.datetime
|
|
21
|
-
deactivated_at: Optional[dt.datetime] = None
|
|
22
|
-
verification_id: Optional[str] = None
|
|
23
|
-
curp: Optional[Curp] = None
|
|
24
|
-
rfc: Optional[Rfc] = None
|
|
25
|
-
address: Optional[Address] = None
|
|
26
|
-
|
|
27
|
-
model_config = ConfigDict(
|
|
28
|
-
json_schema_extra={
|
|
29
|
-
'example': {
|
|
30
|
-
'id': 'KVNEUInh69SuKXXmK95sROwQ',
|
|
31
|
-
'updated_at': '2020-05-24T14:15:22Z',
|
|
32
|
-
'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg',
|
|
33
|
-
'created_at': '2020-05-24T14:15:22Z',
|
|
34
|
-
'verification_id': 'string',
|
|
35
|
-
'curp': 'GOCG650418HVZNML08',
|
|
36
|
-
'rfc': 'GOCG650418123',
|
|
37
|
-
'address': Address.schema().get('example'),
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
@classmethod
|
|
43
|
-
def create(cls, session: Session = global_session) -> 'KYCVerification':
|
|
44
|
-
return cls._create(session=session)
|
|
45
|
-
|
|
46
|
-
@classmethod
|
|
47
|
-
def update(
|
|
48
|
-
cls,
|
|
49
|
-
kyc_id: str,
|
|
50
|
-
curp: Optional[Curp] = None,
|
|
51
|
-
) -> 'KYCVerification':
|
|
52
|
-
req = KYCVerificationUpdateRequest(curp=curp)
|
|
53
|
-
return cls._update(id=kyc_id, **req.model_dump())
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
from cuenca import KYCVerification
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@pytest.mark.vcr
|
|
7
|
-
def test_kyc_verification_create():
|
|
8
|
-
kyc_verification: KYCVerification = KYCVerification.create()
|
|
9
|
-
assert kyc_verification.id
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@pytest.mark.vcr
|
|
13
|
-
def test_kyc_verification_retrieve():
|
|
14
|
-
kyc_verification = KYCVerification.retrieve('KYC01')
|
|
15
|
-
assert kyc_verification.id
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@pytest.mark.vcr
|
|
19
|
-
def test_kyc_verification_update():
|
|
20
|
-
kyc_id = 'KYC01'
|
|
21
|
-
changes = dict(curp='HEMA921130HNERNN05')
|
|
22
|
-
kyc_verification = KYCVerification.update(kyc_id, **changes)
|
|
23
|
-
assert all(
|
|
24
|
-
item in kyc_verification.to_dict().items() for item in changes.items()
|
|
25
|
-
)
|
|
File without changes
|
|
File without changes
|