cuenca 1.0.3.dev1__py3-none-any.whl → 2.0.0.dev2__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.
Files changed (46) hide show
  1. cuenca/exc.py +4 -5
  2. cuenca/resources/api_keys.py +11 -9
  3. cuenca/resources/arpc.py +6 -5
  4. cuenca/resources/balance_entries.py +2 -4
  5. cuenca/resources/base.py +52 -41
  6. cuenca/resources/card_activations.py +4 -2
  7. cuenca/resources/card_transactions.py +4 -1
  8. cuenca/resources/card_validations.py +7 -7
  9. cuenca/resources/cards.py +7 -6
  10. cuenca/resources/clabes.py +2 -2
  11. cuenca/resources/curp_validations.py +46 -42
  12. cuenca/resources/deposits.py +1 -1
  13. cuenca/resources/endpoints.py +25 -27
  14. cuenca/resources/file_batches.py +12 -4
  15. cuenca/resources/files.py +15 -4
  16. cuenca/resources/identities.py +13 -13
  17. cuenca/resources/kyc_validations.py +11 -8
  18. cuenca/resources/kyc_verifications.py +10 -9
  19. cuenca/resources/limited_wallets.py +4 -4
  20. cuenca/resources/login_tokens.py +7 -5
  21. cuenca/resources/otps.py +5 -3
  22. cuenca/resources/platforms.py +30 -31
  23. cuenca/resources/questionnaires.py +8 -5
  24. cuenca/resources/resources.py +2 -2
  25. cuenca/resources/savings.py +5 -5
  26. cuenca/resources/sessions.py +11 -11
  27. cuenca/resources/transfers.py +5 -4
  28. cuenca/resources/user_credentials.py +8 -3
  29. cuenca/resources/user_events.py +5 -3
  30. cuenca/resources/user_lists_validation.py +7 -3
  31. cuenca/resources/user_logins.py +7 -6
  32. cuenca/resources/users.py +49 -51
  33. cuenca/resources/verifications.py +17 -11
  34. cuenca/resources/wallet_transactions.py +1 -1
  35. cuenca/resources/webhooks.py +7 -8
  36. cuenca/resources/whatsapp_transfers.py +4 -4
  37. cuenca/version.py +1 -1
  38. {cuenca-1.0.3.dev1.dist-info → cuenca-2.0.0.dev2.dist-info}/METADATA +10 -6
  39. {cuenca-1.0.3.dev1.dist-info → cuenca-2.0.0.dev2.dist-info}/RECORD +46 -46
  40. {cuenca-1.0.3.dev1.dist-info → cuenca-2.0.0.dev2.dist-info}/WHEEL +1 -1
  41. tests/resources/test_api_keys.py +1 -1
  42. tests/resources/test_endpoints.py +1 -1
  43. tests/resources/test_sessions.py +2 -2
  44. tests/resources/test_transfers.py +1 -1
  45. {cuenca-1.0.3.dev1.dist-info → cuenca-2.0.0.dev2.dist-info}/LICENSE +0 -0
  46. {cuenca-1.0.3.dev1.dist-info → cuenca-2.0.0.dev2.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,7 @@
1
1
  from typing import ClassVar
2
2
 
3
+ from pydantic import ConfigDict
4
+
3
5
  from .identity_events import IdentityEvent
4
6
  from .users import User
5
7
 
@@ -9,9 +11,8 @@ class UserEvent(IdentityEvent):
9
11
 
10
12
  user_id: str
11
13
  platform_id: str
12
-
13
- class Config:
14
- schema_extra = {
14
+ model_config = ConfigDict(
15
+ json_schema_extra={
15
16
  'example': {
16
17
  'id': 'UEYE4qnWs3Sm68tbgqkx_d5Q',
17
18
  'created_at': '2022-05-24T14:15:22Z',
@@ -22,3 +23,4 @@ class UserEvent(IdentityEvent):
22
23
  'new_model': User.schema().get('example'),
23
24
  }
24
25
  }
26
+ )
@@ -1,6 +1,7 @@
1
1
  import datetime as dt
2
- from typing import ClassVar, Optional
2
+ from typing import ClassVar, Optional, cast
3
3
 
4
+ from clabe import Clabe
4
5
  from cuenca_validations.types import UserListsRequest, VerificationStatus
5
6
  from cuenca_validations.types.identities import CurpField
6
7
 
@@ -34,6 +35,9 @@ class UserListsValidation(Creatable, Retrievable):
34
35
  first_surname=first_surname,
35
36
  second_surname=second_surname,
36
37
  curp=curp,
37
- account_number=account_number,
38
+ account_number=cast(Clabe, account_number),
39
+ )
40
+ return cast(
41
+ 'UserListsValidation',
42
+ cls._create(session=session, **req.model_dump()),
38
43
  )
39
- return cls._create(session=session, **req.dict())
@@ -1,7 +1,8 @@
1
1
  import datetime as dt
2
- from typing import ClassVar, Optional
2
+ from typing import ClassVar, Optional, cast
3
3
 
4
4
  from cuenca_validations.types.requests import UserLoginRequest
5
+ from pydantic import ConfigDict
5
6
 
6
7
  from ..http import Session, session as global_session
7
8
  from .base import Creatable
@@ -10,17 +11,17 @@ from .base import Creatable
10
11
  class UserLogin(Creatable):
11
12
  _resource: ClassVar = 'user_logins'
12
13
 
13
- last_login_at: Optional[dt.datetime]
14
+ last_login_at: Optional[dt.datetime] = None
14
15
  success: bool
15
-
16
- class Config:
17
- schema_extra = {
16
+ model_config = ConfigDict(
17
+ json_schema_extra={
18
18
  'example': {
19
19
  'id': 'ULNEUInh69SuKXXmK95sROwQ',
20
20
  'last_login_at': '2022-01-01T14:15:22Z',
21
21
  'success': True,
22
22
  }
23
23
  }
24
+ )
24
25
 
25
26
  @classmethod
26
27
  def create(
@@ -31,7 +32,7 @@ class UserLogin(Creatable):
31
32
  session: Session = global_session,
32
33
  ) -> 'UserLogin':
33
34
  req = UserLoginRequest(password=password, user_id=user_id)
34
- login = cls._create(session=session, **req.dict())
35
+ login = cast('UserLogin', cls._create(session=session, **req.dict()))
35
36
  if login.success:
36
37
  session.headers['X-Cuenca-LoginId'] = login.id
37
38
  return login
cuenca/resources/users.py CHANGED
@@ -16,7 +16,7 @@ from cuenca_validations.types import (
16
16
  )
17
17
  from cuenca_validations.types.enums import Country, Gender, State
18
18
  from cuenca_validations.types.identities import CurpField
19
- from pydantic import EmailStr, HttpUrl
19
+ from pydantic import ConfigDict, EmailStr, Field, HttpUrl
20
20
 
21
21
  from ..http import Session, session as global_session
22
22
  from .balance_entries import BalanceEntry
@@ -30,60 +30,52 @@ class User(Creatable, Retrievable, Updateable, Queryable):
30
30
  _query_params: ClassVar = UserQuery
31
31
 
32
32
  identity_uri: str
33
- level: int
34
- required_level: int
33
+ level: int = Field(
34
+ ..., description='Account level according to KYC information'
35
+ )
36
+ required_level: int = Field(
37
+ ..., description='Maximum level User can reach. Set by platform'
38
+ )
35
39
  created_at: dt.datetime
36
- phone_number: Optional[PhoneNumber]
37
- email_address: Optional[EmailStr]
38
- profession: Optional[str]
39
- terms_of_service: Optional[TOSAgreement]
40
- status: Optional[UserStatus]
41
- address: Optional[Address]
42
- govt_id: Optional[KYCFile]
43
- proof_of_address: Optional[KYCFile]
44
- proof_of_life: Optional[KYCFile]
45
- beneficiaries: Optional[List[Beneficiary]]
40
+ phone_number: Optional[PhoneNumber] = None
41
+ email_address: Optional[EmailStr] = None
42
+ profession: Optional[str] = None
43
+ terms_of_service: Optional[TOSAgreement] = None
44
+ status: Optional[UserStatus] = None
45
+ address: Optional[Address] = None
46
+ govt_id: Optional[KYCFile] = Field(
47
+ None, description='Government ID document validation'
48
+ )
49
+ proof_of_address: Optional[KYCFile] = Field(
50
+ None, description='Detail of proof of address document validation'
51
+ )
52
+ proof_of_life: Optional[KYCFile] = Field(
53
+ None, description='Detail of selfie video validation'
54
+ )
55
+ beneficiaries: Optional[List[Beneficiary]] = Field(
56
+ None, description='Beneficiaries of account in case of death'
57
+ )
46
58
  platform_id: Optional[str] = None
47
59
  clabe: Optional[Clabe] = None
48
60
  # These fields are added by identify when retrieving a User:
49
- names: Optional[str]
50
- first_surname: Optional[str]
51
- second_surname: Optional[str]
52
- curp: Optional[str]
53
- rfc: Optional[str]
54
- gender: Optional[Gender]
55
- date_of_birth: Optional[dt.date]
56
- state_of_birth: Optional[State]
57
- nationality: Optional[Country]
58
- country_of_birth: Optional[Country]
61
+ names: Optional[str] = None
62
+ first_surname: Optional[str] = None
63
+ second_surname: Optional[str] = None
64
+ curp: Optional[str] = None
65
+ rfc: Optional[str] = None
66
+ gender: Optional[Gender] = None
67
+ date_of_birth: Optional[dt.date] = None
68
+ state_of_birth: Optional[State] = None
69
+ nationality: Optional[Country] = None
70
+ country_of_birth: Optional[Country] = None
59
71
 
60
72
  @property
61
73
  def balance(self) -> int:
62
- be = BalanceEntry.first(user_id=self.id)
74
+ be = cast(BalanceEntry, BalanceEntry.first(user_id=self.id))
63
75
  return be.rolling_balance if be else 0
64
76
 
65
- class Config:
66
- fields = {
67
- 'level': {
68
- 'description': 'Account level according to KYC information'
69
- },
70
- 'required_level': {
71
- 'description': 'Maximum level User can reach. Set by platform'
72
- },
73
- 'govt_id': {
74
- 'description': 'Detail of government id document validation'
75
- },
76
- 'proof_of_address': {
77
- 'description': 'Detail of proof of address document validation'
78
- },
79
- 'proof_of_life': {
80
- 'description': 'Detail of selfie video validation'
81
- },
82
- 'beneficiaries': {
83
- 'description': 'Beneficiaries of account in case of death'
84
- },
85
- }
86
- schema_extra = {
77
+ model_config = ConfigDict(
78
+ json_schema_extra={
87
79
  'example': {
88
80
  'id': 'USWqY5cvkISJOxHyEKjAKf8w',
89
81
  'created_at': '2019-08-24T14:15:22Z',
@@ -105,12 +97,14 @@ class User(Creatable, Retrievable, Updateable, Queryable):
105
97
  ],
106
98
  'platform_id': 'PT8UEv02zBTcymd4Kd3MO6pg',
107
99
  }
108
- }
100
+ },
101
+ )
109
102
 
110
103
  @classmethod
111
104
  def create(
112
105
  cls,
113
106
  curp: CurpField,
107
+ id: Optional[str] = None,
114
108
  phone_number: Optional[PhoneNumber] = None,
115
109
  email_address: Optional[EmailStr] = None,
116
110
  profession: Optional[str] = None,
@@ -124,6 +118,7 @@ class User(Creatable, Retrievable, Updateable, Queryable):
124
118
  session: Session = global_session,
125
119
  ) -> 'User':
126
120
  req = UserRequest(
121
+ id=id,
127
122
  curp=curp,
128
123
  phone_number=phone_number,
129
124
  email_address=email_address,
@@ -135,7 +130,7 @@ class User(Creatable, Retrievable, Updateable, Queryable):
135
130
  status=status,
136
131
  terms_of_service=terms_of_service,
137
132
  )
138
- return cls._create(session=session, **req.dict())
133
+ return cast('User', cls._create(session=session, **req.model_dump()))
139
134
 
140
135
  @classmethod
141
136
  def update(
@@ -154,7 +149,7 @@ class User(Creatable, Retrievable, Updateable, Queryable):
154
149
  status: Optional[UserStatus] = None,
155
150
  email_verification_id: Optional[str] = None,
156
151
  phone_verification_id: Optional[str] = None,
157
- curp_document: Optional[HttpUrl] = None,
152
+ curp_document_uri: Optional[HttpUrl] = None,
158
153
  *,
159
154
  session: Session = global_session,
160
155
  ):
@@ -171,10 +166,13 @@ class User(Creatable, Retrievable, Updateable, Queryable):
171
166
  verification_id=verification_id,
172
167
  email_verification_id=email_verification_id,
173
168
  phone_verification_id=phone_verification_id,
174
- curp_document=curp_document,
169
+ curp_document_uri=curp_document_uri,
175
170
  status=status,
176
171
  )
177
- return cls._update(id=user_id, **request.dict(), session=session)
172
+ return cast(
173
+ 'User',
174
+ cls._update(id=user_id, **request.model_dump(), session=session),
175
+ )
178
176
 
179
177
  @property
180
178
  def identity(self) -> Identity:
@@ -1,5 +1,5 @@
1
1
  import datetime as dt
2
- from typing import ClassVar, Optional, Union
2
+ from typing import ClassVar, Optional, Union, cast
3
3
 
4
4
  from cuenca_validations.types import (
5
5
  VerificationAttemptRequest,
@@ -7,7 +7,7 @@ from cuenca_validations.types import (
7
7
  VerificationType,
8
8
  )
9
9
  from cuenca_validations.types.identities import PhoneNumber
10
- from pydantic import EmailStr
10
+ from pydantic import ConfigDict, EmailStr, Field
11
11
 
12
12
  from ..http import Session, session as global_session
13
13
  from .base import Creatable, Updateable
@@ -16,14 +16,14 @@ from .base import Creatable, Updateable
16
16
  class Verification(Creatable, Updateable):
17
17
  _resource: ClassVar = 'verifications'
18
18
 
19
- recipient: Union[EmailStr, PhoneNumber]
19
+ recipient: Union[EmailStr, PhoneNumber] = Field(
20
+ ..., description='Phone or email to validate'
21
+ )
20
22
  type: VerificationType
21
23
  created_at: dt.datetime
22
- deactivated_at: Optional[dt.datetime]
23
-
24
- class Config:
25
- fields = {'recipient': {'description': 'Phone or email to validate'}}
26
- schema_extra = {
24
+ deactivated_at: Optional[dt.datetime] = None
25
+ model_config = ConfigDict(
26
+ json_schema_extra={
27
27
  'example': {
28
28
  'id': 'VENEUInh69SuKXXmK95sROwQ',
29
29
  'recipient': 'user@example.com',
@@ -31,7 +31,8 @@ class Verification(Creatable, Updateable):
31
31
  'created_at': '2022-05-24T14:15:22Z',
32
32
  'deactivated_at': None,
33
33
  }
34
- }
34
+ },
35
+ )
35
36
 
36
37
  @classmethod
37
38
  def create(
@@ -44,7 +45,9 @@ class Verification(Creatable, Updateable):
44
45
  req = VerificationRequest(
45
46
  recipient=recipient, type=type, platform_id=platform_id
46
47
  )
47
- return cls._create(**req.dict(), session=session)
48
+ return cast(
49
+ 'Verification', cls._create(**req.model_dump(), session=session)
50
+ )
48
51
 
49
52
  @classmethod
50
53
  def verify(
@@ -54,4 +57,7 @@ class Verification(Creatable, Updateable):
54
57
  session: Session = global_session,
55
58
  ) -> 'Verification':
56
59
  req = VerificationAttemptRequest(code=code)
57
- return cls._update(id=id, **req.dict(), session=session)
60
+ return cast(
61
+ 'Verification',
62
+ cls._update(id=id, **req.model_dump(), session=session),
63
+ )
@@ -35,4 +35,4 @@ class WalletTransaction(Transaction, Creatable):
35
35
  transaction_type=transaction_type,
36
36
  amount=amount,
37
37
  )
38
- return cls._create(**request.dict())
38
+ return cast('WalletTransaction', cls._create(**request.dict()))
@@ -1,6 +1,7 @@
1
1
  from typing import Any, ClassVar, Dict
2
2
 
3
3
  from cuenca_validations.types.enums import WebhookEvent
4
+ from pydantic import Field
4
5
 
5
6
  from .base import Queryable, Retrievable
6
7
 
@@ -8,11 +9,9 @@ from .base import Queryable, Retrievable
8
9
  class Webhook(Retrievable, Queryable):
9
10
  _resource: ClassVar = 'webhooks'
10
11
 
11
- payload: Dict[str, Any]
12
- event: WebhookEvent
13
-
14
- class Config:
15
- fields = {
16
- 'payload': {'description': 'object sent by the webhook'},
17
- 'event': {'description': 'type of event being reported'},
18
- }
12
+ payload: Dict[str, Any] = Field(
13
+ ..., description='object sent by the webhook'
14
+ )
15
+ event: WebhookEvent = Field(
16
+ ..., description='type of event being reported'
17
+ )
@@ -14,12 +14,12 @@ class WhatsappTransfer(Transaction):
14
14
  updated_at: dt.datetime
15
15
  recipient_name: str
16
16
  phone_number: str
17
- claim_url: Optional[str]
17
+ claim_url: Optional[str] = None
18
18
  expires_at: dt.datetime
19
19
  # defined after the transfer has been claimed
20
- destination_uri: Optional[str]
21
- network: Optional[TransferNetwork]
22
- tracking_key: Optional[str] # clave rastreo if network is SPEI
20
+ destination_uri: Optional[str] = None
21
+ network: Optional[TransferNetwork] = None
22
+ tracking_key: Optional[str] = None # clave rastreo if network is SPEI
23
23
 
24
24
  @property # type: ignore
25
25
  def destination(self) -> Optional[Account]:
cuenca/version.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = '1.0.3.dev1'
1
+ __version__ = '2.0.0.dev2'
2
2
  CLIENT_VERSION = __version__
3
3
  API_VERSION = '2020-03-19'
@@ -1,19 +1,23 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cuenca
3
- Version: 1.0.3.dev1
3
+ Version: 2.0.0.dev2
4
4
  Summary: Cuenca API Client
5
5
  Home-page: https://github.com/cuenca-mx/cuenca-python
6
6
  Author: Cuenca
7
7
  Author-email: dev@cuenca.com
8
- Classifier: Programming Language :: Python :: 3.8
8
+ Classifier: Programming Language :: Python :: 3.9
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
9
13
  Classifier: License :: OSI Approved :: MIT License
10
14
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.8
15
+ Requires-Python: >=3.9
12
16
  Description-Content-Type: text/markdown
13
17
  License-File: LICENSE
14
- Requires-Dist: requests<28,>=2.24
15
- Requires-Dist: cuenca-validations<0.12.0,>=0.11.3
16
- Requires-Dist: dataclasses>=0.7; python_version < "3.8"
18
+ Requires-Dist: requests>=2.32.3
19
+ Requires-Dist: cuenca-validations==2.0.0.dev8
20
+ Requires-Dist: pydantic-extra-types>=2.10.1
17
21
 
18
22
  # Cuenca – Python client library
19
23
 
@@ -1,53 +1,53 @@
1
1
  cuenca/__init__.py,sha256=vFLEaVgT93FvqGtuoGyMFd_mQLABRm6T7zIcTZSMKjc,1807
2
- cuenca/exc.py,sha256=r_lL03-JS0AsXw71wuNbiwNYLHNDagM56tRxpYyK6Lw,601
2
+ cuenca/exc.py,sha256=_sghDbHx-9JKAF2d4GClEfqv8MfoWb9oQjK5uzIds_w,672
3
3
  cuenca/jwt.py,sha256=plB2ttHPZnL0xq3gqubw_Jjtj1QYG2E5bk99N3cn5zg,1502
4
4
  cuenca/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- cuenca/version.py,sha256=wc5LRS5XIvvpujmHjGckQ9yvyHKeKdoXr2DA21JiEZ0,83
5
+ cuenca/version.py,sha256=PmFciMFo2CJhrcLb1zKLk-kG_OWkfckvys8ioLXCKNA,83
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=pySyBur3jnWA5yfHFuVZfdnk6nROj3BsLRy7vVWXFoc,3019
9
9
  cuenca/resources/accounts.py,sha256=5yfNxAHpxWFosoR4WrPrDGpBCRkaQk98V-w0wCPPXqU,345
10
- cuenca/resources/api_keys.py,sha256=98ye291Z9bt7J2lbTp64fxA9EsFz4XjqFLc3mRcTuCI,2471
11
- cuenca/resources/arpc.py,sha256=pdpVkAOQKkhEX4UsbD90oOw1NJv6JrupjLjVpt4jHHs,1669
12
- cuenca/resources/balance_entries.py,sha256=aw07ntL9D1AfsuBbcDk5xR9nQIIopQ_WHXd0KHBAges,1104
13
- cuenca/resources/base.py,sha256=C6BR6g4mEOtXdsbo2VrjRXxHdWnnmRBUIb8Vk1G_BdI,5425
10
+ cuenca/resources/api_keys.py,sha256=uLF6xVoXkG2JSYZtDKaqBo8-dmS9XEGnM51E5DkiCyE,2621
11
+ cuenca/resources/arpc.py,sha256=VymgjCNvsKWcozwQ1an4OHMmuRslBoSdxYqjvw2VAi4,1791
12
+ cuenca/resources/balance_entries.py,sha256=c2p9nXrKpMJ2xlQkTLP_ttycb1RitA979mP46mbZnEc,1073
13
+ cuenca/resources/base.py,sha256=IdX5PpT6FpARE6hkcyca5rviVbvQTwF3T-uppg3cCeI,5785
14
14
  cuenca/resources/bill_payments.py,sha256=spZSVCkLoJTOJIvfYim3R1JEUCvCKdRqLmr98M9y8oo,529
15
- cuenca/resources/card_activations.py,sha256=CxiXuVcXRZ6Hsd0alCNhC2OqrOdd1S2hqBe2ZQEQ9K0,1277
16
- cuenca/resources/card_transactions.py,sha256=_7RvYXaHiGJyTfySIPV65vRAA1uWi7l_tE3fzKT5LSg,1083
17
- cuenca/resources/card_validations.py,sha256=zfCMfbbftHEbBV62uqLz7EOPceVSWASBuGGQad1fheQ,1914
18
- cuenca/resources/cards.py,sha256=9h8eWFVhDjiVSt0_cb7QPs69DlrGam7C0zNwlSAnoRA,3370
15
+ cuenca/resources/card_activations.py,sha256=HUknScnIQLi0zqUHIPKppCg65QPFywHAHTiUQuimtb0,1336
16
+ cuenca/resources/card_transactions.py,sha256=Fs1x5kq4WSlRj6lt2enUkWW8trN7VgwW_KE2tybj30o,1195
17
+ cuenca/resources/card_validations.py,sha256=LyVpIkNVkAnfOUBJf7e39qCYu5tblB6F1FdYjCPy1MI,1956
18
+ cuenca/resources/cards.py,sha256=HTqfuz8KN_nxkIG9zPkActh4P0U0-Pug_yAo8gnZPWo,3461
19
19
  cuenca/resources/cash_references.py,sha256=ZVN4ed8pRV3u0BshE3OPJB76FMfLKWHm1rwnk2KvbLc,195
20
- cuenca/resources/clabes.py,sha256=mIWnOXLpUQMBRlhaoY5xv0vQXRnZz9basMD99RbUXuc,370
20
+ cuenca/resources/clabes.py,sha256=S6ExYCAULtzNWyvzK1FP-zcXQq-7D4DMNEVVdAJ9Pic,391
21
21
  cuenca/resources/commissions.py,sha256=Fz5kHq7FPJl8Z0qiu5_z-Ws2jEPqGi1x2OOwXCCM-Yw,513
22
- cuenca/resources/curp_validations.py,sha256=MEOEg9Q-GFe0R0hs6Zr6pM3fGxe_S-UiypCLf9F1v2I,3712
23
- cuenca/resources/deposits.py,sha256=sB92dodHQ7VVdF33WAGTXzXFqFsc7JAgkPw-B32bqJ0,559
24
- cuenca/resources/endpoints.py,sha256=JtMyAfjU7dE2n4eqpiekR0F3diFoESLqqbVb3K552tw,3205
25
- cuenca/resources/file_batches.py,sha256=PPWkFElBClqLr4yhwjG02AcyVADQX8qjkKCo8JYzcv8,699
26
- cuenca/resources/files.py,sha256=YgP-5Q2zwF4nwAAPxR2HZa3xgxnGAwd6QMXOrY9AXI4,1783
27
- cuenca/resources/identities.py,sha256=dh4J6jikQ1_rtVuifuUnxWZBcAgrgARKV164qB5j_-s,1011
22
+ cuenca/resources/curp_validations.py,sha256=gGP0bCRGr7dxlQ-vGVb-dJILKanetfjF8dg-upWS96A,3634
23
+ cuenca/resources/deposits.py,sha256=8FINQJ3c0Zg8FAq7e1JZu9i8G40fX-Kmawhl7Ouxpx4,566
24
+ cuenca/resources/endpoints.py,sha256=rUd3E3yYyt3-dNZxsO725eVoLaqV_zhYgL7VPPI_fXo,3178
25
+ cuenca/resources/file_batches.py,sha256=FsX87tdLCu83zSRhLuMBC8XzodHZQKvz-WbKg459aYs,829
26
+ cuenca/resources/files.py,sha256=WLrEZcgrlm02mpxyBrhEKcThbubVGYM5kS0CQe3xODk,1942
27
+ cuenca/resources/identities.py,sha256=wW8jbOQyWipmTwPgJ2ZEQVdOvNv3Y6dcuLHbMyyqjRg,1102
28
28
  cuenca/resources/identity_events.py,sha256=K1G6IEGlw6n482nZhBo_CJNBdpKFCO6duMQr5y9k4x8,374
29
- cuenca/resources/kyc_validations.py,sha256=EWbvTHuXee9YilnPGdIuRGXm5RTBxNDpx5qdOi5QHSo,1247
30
- cuenca/resources/kyc_verifications.py,sha256=YECzqLfJPU8-yHRKManUUMB3UgIuErzRBakLYlllzMI,1504
31
- cuenca/resources/limited_wallets.py,sha256=br6YxQaXR93FuHXm2Fi3--X2oOzt1FWxhjmlRkWk5us,1051
32
- cuenca/resources/login_tokens.py,sha256=WnVLer9ajZeh04-omoFTmTyXMhBB8xrZlcOc2Dx5mdE,613
33
- cuenca/resources/otps.py,sha256=M4eTocovZlvRXVahdnPfQy1cl1RMy7gzUh9DRHVEJDE,582
34
- cuenca/resources/platforms.py,sha256=koalWdedx1BNmCkHNB46X_t0f25-Gp1tCbgRXcdqq9E,2719
35
- cuenca/resources/questionnaires.py,sha256=CV-jVgxbGttA2HLorfq-b_nQ1TeiM9gA-uXl7-0ZA1w,983
36
- cuenca/resources/resources.py,sha256=IUd_rsjlsn4grujxZ24PQs2Nhphcd4uIUZ2YDKlSbqA,681
37
- cuenca/resources/savings.py,sha256=eyRpeVLDtz9zBCZzc2GqPDR6UKvmdgRn7rlcFIKqkfA,1395
29
+ cuenca/resources/kyc_validations.py,sha256=9lnaabCL8qgwGIH2c_c7LYgzg7ihRw1XTaJHz3cDhew,1372
30
+ cuenca/resources/kyc_verifications.py,sha256=B5bnk2g6iNm88QvXS4HP4IYEq5TH4CXfD8KUw-yD7s0,1610
31
+ cuenca/resources/limited_wallets.py,sha256=Spc9dYgHDxNQe_t0Z0Vqf4VPJ2tlkL2F3ZPp3kiWZ00,1070
32
+ cuenca/resources/login_tokens.py,sha256=aWGoiM80NIvMYdEhHvX0JqFzqhfWXMfQJZFGNbugluk,693
33
+ cuenca/resources/otps.py,sha256=buqQp5l6rW23vmUdhmP-ntwYKK-uSR7bw3WVaYUhn4E,636
34
+ cuenca/resources/platforms.py,sha256=w-pOGZm4gTLf-exoF2kAOVidUy1Fgf_ZT-8WuP3T7Fs,2616
35
+ cuenca/resources/questionnaires.py,sha256=csrVXIuWMmL140EyG5Xlukgangf7tytXEB3JepeE0LA,1094
36
+ cuenca/resources/resources.py,sha256=g6ssYfGTALzP-ZDBTDedJw1GeAnSTiWi78w9Hg_zeAg,706
37
+ cuenca/resources/savings.py,sha256=r1UimpZvlDQRxfwNuvNrsr8h5cNGoEmgXLPny5ixYlM,1447
38
38
  cuenca/resources/service_providers.py,sha256=aOulwTAvCLyzojBlhO7EQaPtlM9YPRYAAUXLjuGZwAk,316
39
- cuenca/resources/sessions.py,sha256=nfc-LK-ynrweLHlUDMFcFIBZDY0caJOltYuYM4xtw8w,1541
39
+ cuenca/resources/sessions.py,sha256=bmiMh2GF8UNj-Ezu4Cq6T1zNxHg0ax3ZNPBF5ukrPjc,1646
40
40
  cuenca/resources/statements.py,sha256=PqMvhoE9cvBneXjaS7w4JnTzYdDakkCkbdNYrd7b8LI,282
41
- cuenca/resources/transfers.py,sha256=Nol4yqMM4a7FHYlMKH8bsiGqJowJMVlq7sBoMf4lzn8,3206
42
- cuenca/resources/user_credentials.py,sha256=Vr6n-Ramlqd65hobs_6bet4J9mtAlVdSJTFZeOvykag,1153
43
- cuenca/resources/user_events.py,sha256=UUIiM2VoHh8aUqMUdx3YuUwUvSSNkjfSd5ayiQ_javk,673
44
- cuenca/resources/user_lists_validation.py,sha256=1MAl3nbSQyHeHRFWNhVryXg6PqVb6lwZ-LFTd3tGJso,1284
45
- cuenca/resources/user_logins.py,sha256=ennHfHuEn-huuaSLdwtmvsRPs85XqbYb3muPCy5rG8w,1344
46
- cuenca/resources/users.py,sha256=DHx40XSc9NrjYarhtBqJOklzneYqKchlohBVCFSlG5g,6351
47
- cuenca/resources/verifications.py,sha256=f830qksMvU49E_H9dx-1StDs7_01uhbqkP28MB37n5A,1635
48
- cuenca/resources/wallet_transactions.py,sha256=HFL-wHmZyCjiqWg61LbxnQhE7BQp1JHw7qv0Y9UOGgw,1001
49
- cuenca/resources/webhooks.py,sha256=gF_88ewhK_koHQZhfTeShuAN5Cqv4LxJhqfSPIdiDkU,457
50
- cuenca/resources/whatsapp_transfers.py,sha256=Dro2wECBWawZPD4A96eerFiDcUtO6N1jSfdFnYLKjfM,874
41
+ cuenca/resources/transfers.py,sha256=nfSte0YzA1vxh6oAH8wUnjGnzc-iSTT66BJv8RA1IOQ,3270
42
+ cuenca/resources/user_credentials.py,sha256=Z0ppaWzxArMl7T5_FejaEPKgXhpsHUVc8EC2gMwtEbY,1264
43
+ cuenca/resources/user_events.py,sha256=CGhTTtWL9YvI2y77jk2KZaJ8cUQREhGrNG1fyAVrAPk,727
44
+ cuenca/resources/user_lists_validation.py,sha256=Flvyyono3TZibrlPHqa_43d1HHH2U_i_jOW-a8pf1W0,1397
45
+ cuenca/resources/user_logins.py,sha256=kwEtls5QYRf3GNTPgYQFkrZ-xjeFX9DgkiLW1VmIu0g,1429
46
+ cuenca/resources/users.py,sha256=wEYibaC56KpvUB8RJsMzv8tXiyEXPkzNr-7EATE4kWY,6418
47
+ cuenca/resources/verifications.py,sha256=OJ8g1Q0tpdc8IFPyMSCnQAEaoSSRuGCFdATss-w0wrM,1793
48
+ cuenca/resources/wallet_transactions.py,sha256=hzGg1NZjxv6PiFN-GF2Z2eai07TQHtkoomMgHt5D1tw,1028
49
+ cuenca/resources/webhooks.py,sha256=mYld4rIWMjG2ezmjLxT1rky4eG1dtjm21LcmBmJnBwQ,436
50
+ cuenca/resources/whatsapp_transfers.py,sha256=YSL606FBOMGKjhyKK5TiF0di96zdDKoiVtjiz_Zl_ZI,902
51
51
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  tests/conftest.py,sha256=CASYYH0rKWkLLdO9SQS4A0H62oNRKqH29KgvUl62Gmg,1793
53
53
  tests/test_cuenca.py,sha256=aeha_utz9YiHQg6eJK2PB7g66pVUYFi9U6pYMGXDKvk,1628
@@ -57,7 +57,7 @@ tests/http/conftest.py,sha256=TnVfv_s0eXC55HSJQotxIqV2Rl2WbgNt5Ow6z-ZOjZE,177
57
57
  tests/http/test_client.py,sha256=y0dhBDG4ZKbIvN_TENFGT920mzxwI535imQ99UuqgC0,2594
58
58
  tests/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  tests/resources/test_accounts.py,sha256=q7dD3k9Qj4qnl9v3aXmYSw6ShkLKD2W9FViFU_6VFeY,313
60
- tests/resources/test_api_keys.py,sha256=1ipbhYGoho_12MnM9UKr5zHNPUk7s_JCXowv5TkmKwo,2272
60
+ tests/resources/test_api_keys.py,sha256=Cui7nmJAqFL6yScuObj5Fpjt_ecGnpb29JIdPhbdqIs,2281
61
61
  tests/resources/test_arpc.py,sha256=4lRd8fO5vf8rvoh1V8Rw9qjw__fdZCeIh4IEYlU0k5o,489
62
62
  tests/resources/test_balance_entries.py,sha256=myoHpr3XSef_smUijS60EXW7YHcmr6m9b6B_BVW-JtY,643
63
63
  tests/resources/test_bill_payments.py,sha256=TnvrTPtCPOvKPGC5G1zI0fng3HXyTdKegCOvoYDHc9s,340
@@ -70,7 +70,7 @@ tests/resources/test_clabes.py,sha256=iUO09_qdQA5B6DU7235qniC8TEdhWAMYXjkTFwRhSN
70
70
  tests/resources/test_commissions.py,sha256=_dnSJhojBwPdK4K344IFiBulJyyhtKaVVKKx02R3OUs,1027
71
71
  tests/resources/test_curp_validations.py,sha256=5GvPrgQGfzD8JCtCdQDz4023Q2caonLbirn7_gZMXow,530
72
72
  tests/resources/test_deposits.py,sha256=LQxg3PYQsyl2f8naPUAKvXnAanZszFlGFsa4WDRvouc,262
73
- tests/resources/test_endpoints.py,sha256=pkGRxCuMFfV-me1KVNaTBGhpYBx6Sr8ktNCRwXDGzOo,1491
73
+ tests/resources/test_endpoints.py,sha256=0rIGeHTiM55HtHVOBG82x5w3Xqj4N7TxFQ2DS70C_KA,1497
74
74
  tests/resources/test_file_batches.py,sha256=xcVeWZns4j3_RPZEv8W1Ws4-bcaxOXTQzFyUpKGVmxM,981
75
75
  tests/resources/test_files.py,sha256=2VSlvYnGHrw--mYNvA6hlpEw-olbW_Hlq2d4vdn8v7M,961
76
76
  tests/resources/test_identities.py,sha256=0osumiLrzKkGG4XLlL4nIdSp_nGutHaPf55w_IVREps,454
@@ -85,9 +85,9 @@ tests/resources/test_questionnaires.py,sha256=Sl8YHXgL42xiijUncycOUzGu5MtI3jEnhA
85
85
  tests/resources/test_resources.py,sha256=rTcfjZOxujOJXjfqvOV6TPpYl8lae4bgbZj4jTAWm_o,170
86
86
  tests/resources/test_savings.py,sha256=2qlGo9Qy_bqwYfMmjf9OsPIPVWRb6zlkzaMgg5RWElk,1127
87
87
  tests/resources/test_service_providers.py,sha256=yhjTvRdVaTpwEHLVtvX8OD6bMef2W9wUI8MRwLY-i64,563
88
- tests/resources/test_sessions.py,sha256=n81GBvSGuxksv6Weo9AWU9isD2QrXMhlqE_bZeXnfXI,1402
88
+ tests/resources/test_sessions.py,sha256=Ve7tfjPVrUIZvja4UPiC7f-aKKFF870MhsYt8544fzM,1412
89
89
  tests/resources/test_statements.py,sha256=e9S_yn5kD6M8IpfpRmIOJ0Y6aggBkYWQxynY6P7Q7nI,370
90
- tests/resources/test_transfers.py,sha256=06_1vHTM1pU3-LJXGupRo44VjZ21m7ICZcviJfxCYU4,4157
90
+ tests/resources/test_transfers.py,sha256=bW3igYOdYPDiZtLr8WVIYwfP-dV4sdJ9pbaXFps2ac8,4161
91
91
  tests/resources/test_user_credentials.py,sha256=WbK20aprlT3P_IEOwplvhIYnLfTgGhK3Q3Tu6Tf129c,809
92
92
  tests/resources/test_user_events.py,sha256=aPTyrEVF7jBD8-UQZeVOLbUmj9sni0JRCYgootmaQ8c,292
93
93
  tests/resources/test_user_lists_validation.py,sha256=-aHXS13o6mqbDsiWlprfyWzPbhMK3s0Qvk0G0zAhUfA,711
@@ -97,8 +97,8 @@ tests/resources/test_verifications.py,sha256=yyL-bdryQU3MvqnmAgnnzGG9t7UTxWwPiVu
97
97
  tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
98
98
  tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
99
99
  tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
100
- cuenca-1.0.3.dev1.dist-info/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
101
- cuenca-1.0.3.dev1.dist-info/METADATA,sha256=ECD-XNiJRenAaIXI_9x3AGn1wNhFS45ilGLn4G_KHUo,4588
102
- cuenca-1.0.3.dev1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
103
- cuenca-1.0.3.dev1.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
104
- cuenca-1.0.3.dev1.dist-info/RECORD,,
100
+ cuenca-2.0.0.dev2.dist-info/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
101
+ cuenca-2.0.0.dev2.dist-info/METADATA,sha256=kb1WPqKZ6d29XHKsTjTaIJtiBeK2kcc8MyAHgwKfULE,4774
102
+ cuenca-2.0.0.dev2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
103
+ cuenca-2.0.0.dev2.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
104
+ cuenca-2.0.0.dev2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -84,7 +84,7 @@ def test_api_key_from_dict():
84
84
  metadata=None,
85
85
  user_id=None,
86
86
  )
87
- api_key = ApiKey(**api_keys_dict)
87
+ api_key = ApiKey._from_dict(api_keys_dict)
88
88
  assert not hasattr(api_key, 'extra_field_1')
89
89
  assert not hasattr(api_key, 'extra_field_2')
90
90
  assert api_key.id is not None
@@ -43,7 +43,7 @@ def test_endpoint_update():
43
43
  )
44
44
  assert endpoint.id == id_endpoint
45
45
  assert len(endpoint.events) == 2
46
- assert endpoint.url == 'https://url.io'
46
+ assert str(endpoint.url) == 'https://url.io/'
47
47
  assert not endpoint.is_enable
48
48
  assert endpoint.is_active
49
49
 
@@ -34,8 +34,8 @@ def test_session_create(curp_validation_request: Dict, user_request: Dict):
34
34
 
35
35
  assert user_session.user_id == user.id
36
36
  assert user_session.type == SessionType.registration
37
- assert user_session.success_url == success_url
38
- assert user_session.failure_url == failure_url
37
+ assert str(user_session.success_url) == success_url
38
+ assert str(user_session.failure_url) == failure_url
39
39
 
40
40
  ephimeral_cuenca_session = cuenca.http.Session()
41
41
  ephimeral_cuenca_session.configure(session_token=user_session.id)
@@ -129,4 +129,4 @@ def test_transfers_count_vs_all():
129
129
  def test_invalid_params():
130
130
  with pytest.raises(ValidationError) as e:
131
131
  Transfer.one(invalid_param='invalid_param')
132
- assert 'extra fields not permitted' in str(e)
132
+ assert 'Extra inputs are not permitted' in str(e)