cuenca 2.0.2.dev3__py3-none-any.whl → 2.1.2__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/resources/api_keys.py +1 -1
- cuenca/resources/user_lists_validation.py +12 -0
- cuenca/version.py +1 -1
- {cuenca-2.0.2.dev3.dist-info → cuenca-2.1.2.dist-info}/METADATA +2 -2
- {cuenca-2.0.2.dev3.dist-info → cuenca-2.1.2.dist-info}/RECORD +9 -9
- {cuenca-2.0.2.dev3.dist-info → cuenca-2.1.2.dist-info}/WHEEL +1 -1
- tests/resources/test_user_lists_validation.py +14 -0
- {cuenca-2.0.2.dev3.dist-info → cuenca-2.1.2.dist-info}/LICENSE +0 -0
- {cuenca-2.0.2.dev3.dist-info → cuenca-2.1.2.dist-info}/top_level.txt +0 -0
cuenca/resources/api_keys.py
CHANGED
|
@@ -16,7 +16,7 @@ class ApiKey(Creatable, Queryable, Retrievable, Updateable):
|
|
|
16
16
|
_resource: ClassVar = 'api_keys'
|
|
17
17
|
_query_params: ClassVar = ApiKeyQuery
|
|
18
18
|
|
|
19
|
-
secret: Annotated[str, LogConfig(masked=True
|
|
19
|
+
secret: Annotated[str, LogConfig(masked=True)]
|
|
20
20
|
deactivated_at: Optional[dt.datetime] = None
|
|
21
21
|
user_id: Optional[str] = None
|
|
22
22
|
model_config = ConfigDict(
|
|
@@ -17,6 +17,18 @@ class UserListsValidation(Creatable, Retrievable):
|
|
|
17
17
|
curp: Optional[Curp] = None
|
|
18
18
|
account_number: Optional[str] = None
|
|
19
19
|
status: Optional[VerificationStatus] = None
|
|
20
|
+
response: Optional[dict] = None
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def ppe_matches(self) -> list[dict]:
|
|
24
|
+
if not self.response or 'persons' not in self.response:
|
|
25
|
+
return []
|
|
26
|
+
|
|
27
|
+
return [
|
|
28
|
+
person
|
|
29
|
+
for person in self.response['persons']
|
|
30
|
+
if person.get('lista') == 'PPE'
|
|
31
|
+
]
|
|
20
32
|
|
|
21
33
|
@classmethod
|
|
22
34
|
def create(
|
cuenca/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: cuenca
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.2
|
|
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.0
|
|
19
|
+
Requires-Dist: cuenca-validations>=2.1.0
|
|
20
20
|
Requires-Dist: pydantic-extra-types>=2.10.0
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: author-email
|
|
@@ -2,12 +2,12 @@ cuenca/__init__.py,sha256=KQOScdvJ-rAsCugliTHsrxnV2A2hCLVpKnwaJpv3qO0,1790
|
|
|
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=3Ij4DlpH5fb-oOq8WeXpq5KsV4GMlCWxgYT3zrSKHFI,78
|
|
6
6
|
cuenca/http/__init__.py,sha256=V5TG6Ro9d3VY7umzcbtanmvHlGkv-k71H0tqrdMyH-s,49
|
|
7
7
|
cuenca/http/client.py,sha256=psXJiSgd3SUSJ5jwvhdBWsVMNadenG353BNVXdh7HMY,4168
|
|
8
8
|
cuenca/resources/__init__.py,sha256=hD0V8_D3DV4aRZSR7hYrrQ-qRXvlVBxilnIEPa4H9nw,3082
|
|
9
9
|
cuenca/resources/accounts.py,sha256=5yfNxAHpxWFosoR4WrPrDGpBCRkaQk98V-w0wCPPXqU,345
|
|
10
|
-
cuenca/resources/api_keys.py,sha256=
|
|
10
|
+
cuenca/resources/api_keys.py,sha256=p65ZUiAu51JhEL_fZDc7_DTR0PMcSa-YQeK9gRFY82s,2618
|
|
11
11
|
cuenca/resources/arpc.py,sha256=a9gGIgpBV8RK2ePSPBxI5c4ET4MtKH6Po_HRiv73B5k,1689
|
|
12
12
|
cuenca/resources/balance_entries.py,sha256=c2p9nXrKpMJ2xlQkTLP_ttycb1RitA979mP46mbZnEc,1073
|
|
13
13
|
cuenca/resources/base.py,sha256=_DFyX6OOjhm2UO5KSCsupBJYHQYDNzhaZudvy1U8VS8,5742
|
|
@@ -42,7 +42,7 @@ cuenca/resources/statements.py,sha256=PqMvhoE9cvBneXjaS7w4JnTzYdDakkCkbdNYrd7b8L
|
|
|
42
42
|
cuenca/resources/transfers.py,sha256=v742SAGUIZfvYHfCNtk0hSm2uyhMGh00RbHIIJiqLzQ,3201
|
|
43
43
|
cuenca/resources/user_credentials.py,sha256=glpxUa5-aYhgJ1ZG1g_c1PAWaQ9eEWP01lauBaccSQQ,1356
|
|
44
44
|
cuenca/resources/user_events.py,sha256=L57v7clStwxyJX2vwe-357uRTrzeQglDpCCgXRg7v9Y,728
|
|
45
|
-
cuenca/resources/user_lists_validation.py,sha256=
|
|
45
|
+
cuenca/resources/user_lists_validation.py,sha256=UrInfZRUVd4nODBIBOTH8ALEZ3pvdYS2_xfFR7UeNrc,1595
|
|
46
46
|
cuenca/resources/user_logins.py,sha256=KDauv2c5BJUR-C5ZeIjAPsv-8VH11BhoT-wCU9KgrwY,1542
|
|
47
47
|
cuenca/resources/users.py,sha256=3qb0-_3KBQCooqFUrknQ28ywU2v7s4JMudrd65z5Q-0,6321
|
|
48
48
|
cuenca/resources/verifications.py,sha256=YyvSh5IpiJ02lHK8k-guTwoHSFoaMYSFk1aC2tPi7n0,1680
|
|
@@ -92,15 +92,15 @@ tests/resources/test_statements.py,sha256=e9S_yn5kD6M8IpfpRmIOJ0Y6aggBkYWQxynY6P
|
|
|
92
92
|
tests/resources/test_transfers.py,sha256=bW3igYOdYPDiZtLr8WVIYwfP-dV4sdJ9pbaXFps2ac8,4161
|
|
93
93
|
tests/resources/test_user_credentials.py,sha256=pJkIMIN4yMkj7AlaBMjI-e2O1YIoFWAh4r9C489GT7s,815
|
|
94
94
|
tests/resources/test_user_events.py,sha256=aPTyrEVF7jBD8-UQZeVOLbUmj9sni0JRCYgootmaQ8c,292
|
|
95
|
-
tests/resources/test_user_lists_validation.py,sha256
|
|
95
|
+
tests/resources/test_user_lists_validation.py,sha256=sZkjCYkySbWtOxM9NVSzZHaoOhXS7N0XD4buD3dke5E,1196
|
|
96
96
|
tests/resources/test_user_logins.py,sha256=YLIZiFsR9tBv1fNH-lIpIMtvGY_7NHGQpMBFVuEFj6c,988
|
|
97
97
|
tests/resources/test_users.py,sha256=AkUvk4Jdg4mM3dxvYR17jlc_z3WslIH1OLDqNDoTcc4,3223
|
|
98
98
|
tests/resources/test_verifications.py,sha256=yyL-bdryQU3MvqnmAgnnzGG9t7UTxWwPiVu-cDSCjl4,1647
|
|
99
99
|
tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
|
|
100
100
|
tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
|
|
101
101
|
tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
|
|
102
|
-
cuenca-2.
|
|
103
|
-
cuenca-2.
|
|
104
|
-
cuenca-2.
|
|
105
|
-
cuenca-2.
|
|
106
|
-
cuenca-2.
|
|
102
|
+
cuenca-2.1.2.dist-info/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
|
|
103
|
+
cuenca-2.1.2.dist-info/METADATA,sha256=_JlE8W3iUo52MyYX2v32PX6_w_5AemZzCA1hymFhYj8,4961
|
|
104
|
+
cuenca-2.1.2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
105
|
+
cuenca-2.1.2.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
|
|
106
|
+
cuenca-2.1.2.dist-info/RECORD,,
|
|
@@ -5,10 +5,24 @@ from cuenca.exc import CuencaResponseException
|
|
|
5
5
|
from cuenca.resources import UserListsValidation
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
@pytest.mark.vcr
|
|
9
|
+
def test_create_user_validation_with_response():
|
|
10
|
+
user_validation = UserListsValidation.create(
|
|
11
|
+
curp='LOBR810330HTCPLM05',
|
|
12
|
+
names='José Ramón',
|
|
13
|
+
first_surname='López',
|
|
14
|
+
second_surname='Beltrán',
|
|
15
|
+
)
|
|
16
|
+
assert user_validation.status == VerificationStatus.rejected
|
|
17
|
+
assert len(user_validation.ppe_matches) == 1
|
|
18
|
+
assert user_validation.ppe_matches[0]['parentesco'] == 'HIJO'
|
|
19
|
+
|
|
20
|
+
|
|
8
21
|
@pytest.mark.vcr
|
|
9
22
|
def test_create_user_validation(user_lists_request):
|
|
10
23
|
user_validation = UserListsValidation.create(**user_lists_request)
|
|
11
24
|
assert user_validation.status == VerificationStatus.succeeded
|
|
25
|
+
assert len(user_validation.ppe_matches) == 0
|
|
12
26
|
assert user_validation.id
|
|
13
27
|
|
|
14
28
|
|
|
File without changes
|
|
File without changes
|