cuenca 2.1.19.dev0__py3-none-any.whl → 2.1.20.dev0__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 CHANGED
@@ -23,6 +23,7 @@ __all__ = [
23
23
  'LimitedWallet',
24
24
  'LoginToken',
25
25
  'Otp',
26
+ 'PasswordReset',
26
27
  'Platform',
27
28
  'Questionnaires',
28
29
  'Saving',
@@ -76,6 +77,7 @@ from .resources import (
76
77
  LimitedWallet,
77
78
  LoginToken,
78
79
  Otp,
80
+ PasswordReset,
79
81
  PhoneVerificationAssociations,
80
82
  Platform,
81
83
  PostalCodes,
cuenca/http/client.py CHANGED
@@ -18,7 +18,7 @@ from ..jwt import Jwt
18
18
  from ..version import API_VERSION, CLIENT_VERSION
19
19
 
20
20
  API_HOST = 'api.cuenca.com'
21
- SANDBOX_HOST = 'sandbox.cuenca.com'
21
+ SANDBOX_HOST = 'api.cuenca.com'
22
22
 
23
23
 
24
24
  class Session:
@@ -23,6 +23,7 @@ __all__ = [
23
23
  'LimitedWallet',
24
24
  'LoginToken',
25
25
  'Otp',
26
+ 'PasswordReset',
26
27
  'Platform',
27
28
  'PhoneVerificationAssociation',
28
29
  'Questionnaires',
@@ -70,6 +71,7 @@ from .kyc_validations import KYCValidation
70
71
  from .limited_wallets import LimitedWallet
71
72
  from .login_tokens import LoginToken
72
73
  from .otps import Otp
74
+ from .password_resets import PasswordReset
73
75
  from .phone_verification_associations import PhoneVerificationAssociations
74
76
  from .platforms import Platform
75
77
  from .postal_codes import PostalCodes
@@ -116,6 +118,7 @@ resource_classes = [
116
118
  KYCValidation,
117
119
  LimitedWallet,
118
120
  LoginToken,
121
+ PasswordReset,
119
122
  Questionnaires,
120
123
  Saving,
121
124
  Session,
@@ -0,0 +1,54 @@
1
+ import datetime as dt
2
+ from typing import ClassVar, Optional
3
+
4
+ from cuenca_validations.types import VerificationStatus
5
+ from cuenca_validations.types.requests import PasswordResetRequest
6
+ from pydantic import ConfigDict
7
+ from pydantic_extra_types.coordinate import Coordinate
8
+
9
+ from ..http import Session, session as global_session
10
+ from .base import Creatable, Queryable, Retrievable
11
+
12
+
13
+ class PasswordReset(Creatable, Retrievable, Queryable):
14
+ _resource: ClassVar = 'password_resets'
15
+
16
+ platform_id: str
17
+ verification_id: str
18
+ flow_id: str
19
+ status: VerificationStatus = VerificationStatus.created
20
+ mati_verification_id: Optional[str] = None
21
+ identity_id: Optional[str] = None
22
+ provider_url: Optional[str] = None
23
+ created_at: dt.datetime
24
+ updated_at: Optional[dt.datetime] = None
25
+ deactivated_at: Optional[dt.datetime] = None
26
+
27
+ model_config = ConfigDict(
28
+ json_schema_extra={
29
+ 'example': {
30
+ 'id': 'PRNEUInh69SuKXXmK95sROwQ',
31
+ 'platform_id': 'PT-1234567890',
32
+ 'verification_id': 'VENEUInh69SuKXXmK95sROwQ',
33
+ 'flow_id': '123e4567-e89b-12d3-a456-426614174000',
34
+ 'status': 'created',
35
+ 'mati_verification_id': 'metamap-verification-id',
36
+ 'identity_id': 'metamap-identity-id',
37
+ 'created_at': '2026-05-06T14:15:22Z',
38
+ }
39
+ }
40
+ )
41
+
42
+ @classmethod
43
+ def create(
44
+ cls,
45
+ verification_id: str,
46
+ location: Coordinate,
47
+ *,
48
+ session: Session = global_session,
49
+ ) -> 'PasswordReset':
50
+ req = PasswordResetRequest(
51
+ verification_id=verification_id,
52
+ location=location,
53
+ )
54
+ return cls._create(session=session, **req.model_dump())
cuenca/version.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = '2.1.19.dev0'
1
+ __version__ = '2.1.20.dev0'
2
2
  CLIENT_VERSION = __version__
3
3
  API_VERSION = '2020-03-19'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cuenca
3
- Version: 2.1.19.dev0
3
+ Version: 2.1.20.dev0
4
4
  Summary: Cuenca API Client
5
5
  Home-page: https://github.com/cuenca-mx/cuenca-python
6
6
  Author: Cuenca
@@ -1,11 +1,11 @@
1
- cuenca/__init__.py,sha256=R_PNGTPbmivdWfiE5qAFQE-gsw0AOB4cw4W6DWpF-KY,1978
1
+ cuenca/__init__.py,sha256=iRradQitV5UJnzDfw-ktkFFNIdpJq3NVcokoWASFm7Y,2018
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=gISFVjCUW4lDLIgRD2oVu_Uj_NauQOFf2pVpXt0n4ns,84
5
+ cuenca/version.py,sha256=dHyeZolVPhfhCPQ9ivyrs8MNsLbxrhheESD33QDAEOM,84
6
6
  cuenca/http/__init__.py,sha256=V5TG6Ro9d3VY7umzcbtanmvHlGkv-k71H0tqrdMyH-s,49
7
- cuenca/http/client.py,sha256=psXJiSgd3SUSJ5jwvhdBWsVMNadenG353BNVXdh7HMY,4168
8
- cuenca/resources/__init__.py,sha256=uBp3dzTwPTY62Dx8o9bPCtNJ6OeHKNRoTsUc2RQL5uA,3452
7
+ cuenca/http/client.py,sha256=_kZ74egXibXX0nPbbl13YPubZezV5zEGixfhwmdWiDI,4164
8
+ cuenca/resources/__init__.py,sha256=zbHBUgSJ4AR9i33k6NI9R2eFeXD-UwVCG0trGgU40U4,3535
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
@@ -32,6 +32,7 @@ cuenca/resources/kyc_validations.py,sha256=Omu4qaP0AFa6PDoU5V9gUQmiY8sxOzEuC7qS0
32
32
  cuenca/resources/limited_wallets.py,sha256=Z3pKMRmMFTAaCw-KdzGSWfYFHCpy-ZrBwOmalVfSdRU,1049
33
33
  cuenca/resources/login_tokens.py,sha256=vxRWqQznxdEUK0R80k0qC0BkTSZwZgUsC2neX8TTd8Q,799
34
34
  cuenca/resources/otps.py,sha256=dZEwns98N8uUtRBFCu6Qs6ySHARU9v3zTF6T5rpF43M,711
35
+ cuenca/resources/password_resets.py,sha256=Iq-lHbxEbx_x0ssr9RVGeo2BAi8iJNDtF4UgmYxfJrU,1778
35
36
  cuenca/resources/phone_verification_associations.py,sha256=JydlFi57kVH-3qdCRMfj67tZSz6N--ZX5ULBe9Owu0Q,720
36
37
  cuenca/resources/platforms.py,sha256=ztGcI-cNnushMRqKqjPaZg_ioS1bpR4vR88osHAyYXw,2560
37
38
  cuenca/resources/postal_codes.py,sha256=FOC9P4nZCQVRHMGeG8wHiRtsD083EdHtcKGPuJKj8b8,467
@@ -53,7 +54,7 @@ cuenca/resources/verifications.py,sha256=c90Pyd20EXLA5Wy0C1RABxjjivMB--q6yu6uK-R
53
54
  cuenca/resources/wallet_transactions.py,sha256=8ePZI3-GaEd658GPYizAfHK9GVwlkt1r95-mEb7T3Jg,1030
54
55
  cuenca/resources/webhooks.py,sha256=bGjuvkSP3GXo4Q6v8iZ40Md8xc4AQrEmAD3r40VJqxM,392
55
56
  cuenca/resources/whatsapp_transfers.py,sha256=YSL606FBOMGKjhyKK5TiF0di96zdDKoiVtjiz_Zl_ZI,902
56
- cuenca-2.1.19.dev0.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
57
+ cuenca-2.1.20.dev0.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
57
58
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
59
  tests/conftest.py,sha256=0tgOjjZOitOvFcYU6GRJ29ySdFmDAM3FX8ZGKjJj3Ac,1828
59
60
  tests/test_cuenca.py,sha256=aeha_utz9YiHQg6eJK2PB7g66pVUYFi9U6pYMGXDKvk,1628
@@ -87,6 +88,7 @@ tests/resources/test_kyc_validations.py,sha256=Cn_aiGUNSWFrptTQtgS8HhbK-50QEq_Qo
87
88
  tests/resources/test_limited_wallets.py,sha256=c0zDDOip3lJk8chbcGr_nWCdkO9yuL_HbD1IikR5jH4,527
88
89
  tests/resources/test_login_tokens.py,sha256=kn0gXFOanIXjgKjbeOzfNyKsGAUkc2iKnuVmzIRaMD8,572
89
90
  tests/resources/test_otps.py,sha256=IpCczDNRL_WaWwc1rYbSRmtWMR7GMa-Pfbq2TZcZQDw,616
91
+ tests/resources/test_password_resets.py,sha256=CpCi9pbSSYGeudn3rFN05ZuAxRNLWTv4gn5mmtEcLLc,762
90
92
  tests/resources/test_phone_verification_association.py,sha256=ZYzXYJbYVjlb2KqeE6vDhmkrbYO3aq07gl5nvpdcA_0,375
91
93
  tests/resources/test_platforms.py,sha256=5b6-XC3uAz8GARFkFoanH62jxE1uJIMXcdpeUhmI8Kg,211
92
94
  tests/resources/test_postal_codes.py,sha256=LnP_6wRxlpsl3zmWoyCmqyA7Wa5pUxNgSyfP1rmwSiY,408
@@ -107,7 +109,7 @@ tests/resources/test_verifications.py,sha256=bBXR-pkmrs-_MekKo9iJS4TDkSyqZ65crsr
107
109
  tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
108
110
  tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
109
111
  tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
110
- cuenca-2.1.19.dev0.dist-info/METADATA,sha256=U3WeVcDdvV1xxQh0fQmUWHavnhKRSNf9z6z3xBYn0uk,4990
111
- cuenca-2.1.19.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
112
- cuenca-2.1.19.dev0.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
113
- cuenca-2.1.19.dev0.dist-info/RECORD,,
112
+ cuenca-2.1.20.dev0.dist-info/METADATA,sha256=jqobTcqxGRKc6DrVgUSl8c8TSS5SoYroMm3_4cffgug,4990
113
+ cuenca-2.1.20.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
+ cuenca-2.1.20.dev0.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
115
+ cuenca-2.1.20.dev0.dist-info/RECORD,,
@@ -0,0 +1,29 @@
1
+ import pytest
2
+ from pydantic_extra_types.coordinate import Coordinate, Latitude, Longitude
3
+
4
+ from cuenca import PasswordReset
5
+
6
+
7
+ @pytest.mark.vcr
8
+ def test_password_resets_create() -> None:
9
+ password_reset = PasswordReset.create(
10
+ verification_id='VEze_Bh1zhROKehtBOS7EHlw',
11
+ location=Coordinate(
12
+ latitude=Latitude(19.432608),
13
+ longitude=Longitude(-99.133209),
14
+ ),
15
+ )
16
+ assert password_reset.id.startswith('PR')
17
+
18
+
19
+ @pytest.mark.vcr
20
+ def test_password_resets_retrieve() -> None:
21
+ password_reset = PasswordReset.retrieve('PRFOO')
22
+ assert password_reset.id
23
+ assert password_reset.verification_id
24
+
25
+
26
+ @pytest.mark.vcr
27
+ def test_password_resets_all() -> None:
28
+ items = list(PasswordReset.all())
29
+ assert items