cuenca 2.0.0.dev7__py3-none-any.whl → 2.0.2.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 CHANGED
@@ -42,6 +42,7 @@ __all__ = [
42
42
  'WhatsappTransfer',
43
43
  'configure',
44
44
  'get_balance',
45
+ 'JwtToken',
45
46
  ]
46
47
 
47
48
  from . import http
@@ -65,6 +66,7 @@ from .resources import (
65
66
  FileBatch,
66
67
  Identity,
67
68
  IdentityEvent,
69
+ JwtToken,
68
70
  KYCValidation,
69
71
  KYCVerification,
70
72
  LimitedWallet,
@@ -38,6 +38,7 @@ __all__ = [
38
38
  'WalletTransaction',
39
39
  'Webhook',
40
40
  'WhatsappTransfer',
41
+ 'JwtToken',
41
42
  ]
42
43
 
43
44
  from .accounts import Account
@@ -59,6 +60,7 @@ from .file_batches import FileBatch
59
60
  from .files import File
60
61
  from .identities import Identity
61
62
  from .identity_events import IdentityEvent
63
+ from .jwt_tokens import JwtToken
62
64
  from .kyc_validations import KYCValidation
63
65
  from .kyc_verifications import KYCVerification
64
66
  from .limited_wallets import LimitedWallet
@@ -123,6 +125,7 @@ resource_classes = [
123
125
  WhatsappTransfer,
124
126
  Webhook,
125
127
  Platform,
128
+ JwtToken,
126
129
  ]
127
130
  for resource_cls in resource_classes:
128
131
  RESOURCES[resource_cls._resource] = resource_cls # type: ignore
@@ -1,7 +1,7 @@
1
1
  import datetime as dt
2
- from typing import ClassVar, Optional
2
+ from typing import Annotated, ClassVar, Optional
3
3
 
4
- from cuenca_validations.types import ApiKeyQuery, ApiKeyUpdateRequest
4
+ from cuenca_validations.types import ApiKeyQuery, ApiKeyUpdateRequest, Metadata
5
5
  from pydantic import ConfigDict
6
6
 
7
7
  from ..http import Session, session as global_session
@@ -12,7 +12,7 @@ class ApiKey(Creatable, Queryable, Retrievable, Updateable):
12
12
  _resource: ClassVar = 'api_keys'
13
13
  _query_params: ClassVar = ApiKeyQuery
14
14
 
15
- secret: str
15
+ secret: Annotated[str, Metadata(sensitive=True, log_chars=4)]
16
16
  deactivated_at: Optional[dt.datetime] = None
17
17
  user_id: Optional[str] = None
18
18
  model_config = ConfigDict(
@@ -1,11 +1,12 @@
1
1
  from typing import ClassVar, Optional
2
2
 
3
3
  from cuenca_validations.types.enums import WebhookEvent
4
+ from cuenca_validations.types.general import SerializableHttpUrl
4
5
  from cuenca_validations.types.requests import (
5
6
  EndpointRequest,
6
7
  EndpointUpdateRequest,
7
8
  )
8
- from pydantic import ConfigDict, Field, HttpUrl
9
+ from pydantic import ConfigDict, Field
9
10
 
10
11
  from ..http import Session, session as global_session
11
12
  from .base import Creatable, Deactivable, Queryable, Retrievable, Updateable
@@ -14,7 +15,7 @@ from .base import Creatable, Deactivable, Queryable, Retrievable, Updateable
14
15
  class Endpoint(Creatable, Deactivable, Retrievable, Queryable, Updateable):
15
16
  _resource: ClassVar = 'endpoints'
16
17
 
17
- url: HttpUrl = Field(description='HTTPS url to send webhooks')
18
+ url: SerializableHttpUrl = Field(description='HTTPS url to send webhooks')
18
19
  secret: str = Field(
19
20
  description='token to verify the webhook is sent by Cuenca '
20
21
  'using HMAC algorithm',
@@ -51,7 +52,7 @@ class Endpoint(Creatable, Deactivable, Retrievable, Queryable, Updateable):
51
52
  @classmethod
52
53
  def create(
53
54
  cls,
54
- url: HttpUrl,
55
+ url: SerializableHttpUrl,
55
56
  events: Optional[list[WebhookEvent]] = None,
56
57
  *,
57
58
  session: Session = global_session,
@@ -72,7 +73,7 @@ class Endpoint(Creatable, Deactivable, Retrievable, Queryable, Updateable):
72
73
  def update(
73
74
  cls,
74
75
  endpoint_id: str,
75
- url: Optional[HttpUrl] = None,
76
+ url: Optional[SerializableHttpUrl] = None,
76
77
  events: Optional[list[WebhookEvent]] = None,
77
78
  is_enable: Optional[bool] = None,
78
79
  *,
cuenca/resources/files.py CHANGED
@@ -2,7 +2,7 @@ from io import BytesIO
2
2
  from typing import ClassVar, Optional
3
3
 
4
4
  from cuenca_validations.types import FileQuery, FileUploadRequest, KYCFileType
5
- from pydantic import HttpUrl
5
+ from cuenca_validations.types.general import SerializableHttpUrl
6
6
 
7
7
  from ..http import Session, session as global_session
8
8
  from .base import Downloadable, Queryable, Uploadable
@@ -14,7 +14,7 @@ class File(Downloadable, Queryable, Uploadable):
14
14
 
15
15
  extension: str
16
16
  type: KYCFileType
17
- url: HttpUrl
17
+ url: SerializableHttpUrl
18
18
  user_id: str
19
19
 
20
20
  @classmethod
@@ -0,0 +1,44 @@
1
+ import datetime as dt
2
+ from typing import Annotated, ClassVar
3
+
4
+ from cuenca_validations.types import Metadata
5
+ from pydantic import ConfigDict
6
+
7
+ from ..http import Session, session as global_session
8
+ from .base import Creatable
9
+
10
+
11
+ class JwtToken(Creatable):
12
+ _resource: ClassVar = 'token'
13
+
14
+ id: Annotated[str, Metadata(sensitive=True, log_chars=4)]
15
+ token: Annotated[str, Metadata(sensitive=True, log_chars=4)]
16
+ created_at: dt.datetime
17
+ api_key_uri: str
18
+
19
+ model_config = ConfigDict(
20
+ json_schema_extra={
21
+ 'example': {
22
+ 'id': (
23
+ 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzgzNjI'
24
+ '4NzcsImlhdCI6MTczNzc1ODA3Nywic3ViIjoiQUtzY3p5N3RzaVJkMkl'
25
+ 'iakxfbllGb2xRIiwidWlkIjoiNjRiZmQ0OTItZGFhMy0xMWVmLWEyMWU'
26
+ 'tMGE1OGE5ZmVhYzAyIn0.Er8kDsw4rtGkwAXpEgUhwyXFiBjYlwDVTGF'
27
+ 'tYW7o0go'
28
+ ),
29
+ 'token': (
30
+ 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzgzNjI'
31
+ '4NzcsImlhdCI6MTczNzc1ODA3Nywic3ViIjoiQUtzY3p5N3RzaVJkMkl'
32
+ 'iakxfbllGb2xRIiwidWlkIjoiNjRiZmQ0OTItZGFhMy0xMWVmLWEyMWU'
33
+ 'tMGE1OGE5ZmVhYzAyIn0.Er8kDsw4rtGkwAXpEgUhwyXFiBjYlwDVTGF'
34
+ 'tYW7o0go'
35
+ ),
36
+ 'created_at': '2025-01-24T22:34:37.659667',
37
+ 'api_key_uri': '/api_key/AKsczy7tsiRd2IbjL_nYFolQ',
38
+ }
39
+ }
40
+ )
41
+
42
+ @classmethod
43
+ def create(cls, session: Session = global_session) -> 'JwtToken':
44
+ return cls._create(session=session)
@@ -1,5 +1,6 @@
1
- from typing import ClassVar
1
+ from typing import Annotated, ClassVar
2
2
 
3
+ from cuenca_validations.types import Metadata
3
4
  from pydantic import ConfigDict
4
5
 
5
6
  from ..http import Session, session as global_session
@@ -9,6 +10,8 @@ from .base import Creatable
9
10
  class LoginToken(Creatable):
10
11
  _resource: ClassVar = 'login_tokens'
11
12
 
13
+ id: Annotated[str, Metadata(sensitive=True, log_chars=4)]
14
+
12
15
  model_config = ConfigDict(
13
16
  json_schema_extra={'example': {'id': 'LTNEUInh69SuKXXmK95sROwQ'}}
14
17
  )
cuenca/resources/otps.py CHANGED
@@ -1,5 +1,6 @@
1
- from typing import ClassVar
1
+ from typing import Annotated, ClassVar
2
2
 
3
+ from cuenca_validations.types import Metadata
3
4
  from pydantic import ConfigDict
4
5
 
5
6
  from ..http import Session, session as global_session
@@ -8,7 +9,7 @@ from .base import Creatable
8
9
 
9
10
  class Otp(Creatable):
10
11
  _resource: ClassVar = 'otps'
11
- secret: str
12
+ secret: Annotated[str, Metadata(sensitive=True, log_chars=4)]
12
13
 
13
14
  model_config = ConfigDict(
14
15
  json_schema_extra={
@@ -1,8 +1,9 @@
1
1
  import datetime as dt
2
- from typing import ClassVar, Optional
2
+ from typing import Annotated, ClassVar, Optional
3
3
 
4
- from cuenca_validations.types import SessionRequest, SessionType
5
- from pydantic import AnyUrl, ConfigDict
4
+ from cuenca_validations.types import Metadata, SessionRequest, SessionType
5
+ from cuenca_validations.types.general import SerializableAnyUrl
6
+ from pydantic import ConfigDict
6
7
 
7
8
  from .. import http
8
9
  from .base import Creatable, Queryable, Retrievable
@@ -11,13 +12,13 @@ from .base import Creatable, Queryable, Retrievable
11
12
  class Session(Creatable, Retrievable, Queryable):
12
13
  _resource: ClassVar = 'sessions'
13
14
 
14
- id: str
15
+ id: Annotated[str, Metadata(sensitive=True, log_chars=4)]
15
16
  created_at: dt.datetime
16
17
  user_id: str
17
18
  platform_id: str
18
19
  expires_at: dt.datetime
19
- success_url: Optional[AnyUrl] = None
20
- failure_url: Optional[AnyUrl] = None
20
+ success_url: Optional[SerializableAnyUrl] = None
21
+ failure_url: Optional[SerializableAnyUrl] = None
21
22
  type: Optional[SessionType] = None
22
23
 
23
24
  model_config = ConfigDict(
@@ -25,7 +25,9 @@ class UserCredential(Creatable, Updateable):
25
25
  session: Session = global_session,
26
26
  ) -> 'UserCredential':
27
27
  req = UserCredentialRequest(password=password, user_id=user_id)
28
- return cls._create(**req.model_dump(), session=session)
28
+ data = req.model_dump()
29
+ data['password'] = data['password'].get_secret_value()
30
+ return cls._create(**data, session=session)
29
31
 
30
32
  @classmethod
31
33
  def update(
@@ -40,4 +42,7 @@ class UserCredential(Creatable, Updateable):
40
42
  is_active=is_active,
41
43
  password=password,
42
44
  )
43
- return cls._update(id=user_id, **req.model_dump(), session=session)
45
+ data = req.model_dump()
46
+ if password:
47
+ data['password'] = data['password'].get_secret_value()
48
+ return cls._update(id=user_id, **data, session=session)
cuenca/resources/users.py CHANGED
@@ -15,8 +15,9 @@ from cuenca_validations.types import (
15
15
  UserUpdateRequest,
16
16
  )
17
17
  from cuenca_validations.types.enums import Country, Gender, State
18
+ from cuenca_validations.types.general import SerializableHttpUrl
18
19
  from cuenca_validations.types.identities import Curp
19
- from pydantic import ConfigDict, EmailStr, Field, HttpUrl
20
+ from pydantic import ConfigDict, EmailStr, Field
20
21
 
21
22
  from ..http import Session, session as global_session
22
23
  from .balance_entries import BalanceEntry
@@ -147,7 +148,7 @@ class User(Creatable, Retrievable, Updateable, Queryable):
147
148
  status: Optional[UserStatus] = None,
148
149
  email_verification_id: Optional[str] = None,
149
150
  phone_verification_id: Optional[str] = None,
150
- curp_document: Optional[HttpUrl] = None,
151
+ curp_document: Optional[SerializableHttpUrl] = None,
151
152
  *,
152
153
  session: Session = global_session,
153
154
  ) -> 'User':
cuenca/version.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = '2.0.0.dev7'
1
+ __version__ = '2.0.2.dev1'
2
2
  CLIENT_VERSION = __version__
3
3
  API_VERSION = '2020-03-19'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cuenca
3
- Version: 2.0.0.dev7
3
+ Version: 2.0.2.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.0.0
19
+ Requires-Dist: cuenca-validations>=2.0.4
20
20
  Requires-Dist: pydantic-extra-types>=2.10.0
21
21
  Dynamic: author
22
22
  Dynamic: author-email
@@ -1,13 +1,13 @@
1
- cuenca/__init__.py,sha256=Lqmi5MUI4WQ1HWGTQOlpfh0Y3ujvJJ3vsvhBR2CPTno,1760
1
+ 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=chP36FkWzoNW7ka8aLLmRGqMpLTYF21JFjxOWYAIrXQ,83
5
+ cuenca/version.py,sha256=ho04klpNnEYHZp1fQzYXlXcEokatCzKGoDFl26-l2V4,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=pySyBur3jnWA5yfHFuVZfdnk6nROj3BsLRy7vVWXFoc,3019
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=7pARbgLtaOR_ZmUsToBok5c2QXyY05ysiU0SBN0eJok,2544
10
+ cuenca/resources/api_keys.py,sha256=Sy9QZpcFDNqZrZnAEzG63pKt2igE9CgyxyOrCvjUhEs,2615
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
@@ -21,29 +21,30 @@ cuenca/resources/clabes.py,sha256=mIWnOXLpUQMBRlhaoY5xv0vQXRnZz9basMD99RbUXuc,37
21
21
  cuenca/resources/commissions.py,sha256=Fz5kHq7FPJl8Z0qiu5_z-Ws2jEPqGi1x2OOwXCCM-Yw,513
22
22
  cuenca/resources/curp_validations.py,sha256=LWJcu1ccoc6_t9ky0t8xqWepdpWSrUYIjW6a_8xJ_Rs,3506
23
23
  cuenca/resources/deposits.py,sha256=8FINQJ3c0Zg8FAq7e1JZu9i8G40fX-Kmawhl7Ouxpx4,566
24
- cuenca/resources/endpoints.py,sha256=121fGkJnb-xcv98hmMJSGqBMeqLSKu4zp-jSguo5RE4,3143
24
+ cuenca/resources/endpoints.py,sha256=AhrG8O6-6rtjtA9Ll98nmxq7xxiLkrKHR7XXZ59PGSs,3235
25
25
  cuenca/resources/file_batches.py,sha256=2Fsmz8ryOjvLn3dpsyR0G2iS0zNVR4ajovNkaMZaHaM,786
26
- cuenca/resources/files.py,sha256=neEo7TOw0M_FMeXd30UqAv-L54D3uMA8zczETzEWtKs,1789
26
+ cuenca/resources/files.py,sha256=WZYRo76fIGXNXk2HzA252dSdIdA4bl3EjB6q0bb6BFg,1837
27
27
  cuenca/resources/identities.py,sha256=IdL495eTjx_2gDRxM9oG_QmDNOwaY7Nv9gzqeZu_Wdk,1092
28
28
  cuenca/resources/identity_events.py,sha256=K1G6IEGlw6n482nZhBo_CJNBdpKFCO6duMQr5y9k4x8,374
29
+ cuenca/resources/jwt_tokens.py,sha256=xxZBBNNj9HylTAAT8NVbx2xExq_JLoF98cIUuUOw3U8,1621
29
30
  cuenca/resources/kyc_validations.py,sha256=1G_dr6e1mpLUlqT9RmBgiC06eh0vQjMzosM5w3ZCQoE,1322
30
31
  cuenca/resources/kyc_verifications.py,sha256=ysvVS9zdvFZ1Wyh2G_cr_IMwYeLW5BRLVyAt46hTk4g,1563
31
32
  cuenca/resources/limited_wallets.py,sha256=Z3pKMRmMFTAaCw-KdzGSWfYFHCpy-ZrBwOmalVfSdRU,1049
32
- cuenca/resources/login_tokens.py,sha256=WgNynC03TYwih37j26TO8nZI3fAAQ6IC-RJEn_CXEtU,668
33
- cuenca/resources/otps.py,sha256=0LXYSNwI16Xsi8N7rmO8NHggSou8F2IWPQR5h2fAzf8,618
33
+ cuenca/resources/login_tokens.py,sha256=52AOEUngx5uNjUWXNp0icSFGIqu0e2ZulK5JkK7RV0o,788
34
+ cuenca/resources/otps.py,sha256=uYPJkBxFSMflAAfQo6GccR1CGSqu93n-OGTlPQmYsJg,725
34
35
  cuenca/resources/platforms.py,sha256=ztGcI-cNnushMRqKqjPaZg_ioS1bpR4vR88osHAyYXw,2560
35
36
  cuenca/resources/questionnaires.py,sha256=TKICPHghEhER83byMhe75Wb798K5veqv47RafYA5VOM,1043
36
37
  cuenca/resources/resources.py,sha256=sDkVwN-RguyoQXJhSYCa95Cem1AUmcgMJeFJveVf6Q0,912
37
38
  cuenca/resources/savings.py,sha256=3DBP1ygxhcScDpLvAQS_fF5chljyDTz4xwnltI0LCAg,1433
38
39
  cuenca/resources/service_providers.py,sha256=x-FNcyiUkdUsNCGudyLGYDbRkD2jPj8-T8U3IumxTVQ,310
39
- cuenca/resources/sessions.py,sha256=eYb5jI7linDAG-mlOe8YE1PJ6Of5kK--pz6FAwK7mV4,1602
40
+ cuenca/resources/sessions.py,sha256=I7bpCcglL9BhV6mG2DkJp-fLGnnCyXO2rzZhMf_UsEE,1753
40
41
  cuenca/resources/statements.py,sha256=PqMvhoE9cvBneXjaS7w4JnTzYdDakkCkbdNYrd7b8LI,282
41
42
  cuenca/resources/transfers.py,sha256=v742SAGUIZfvYHfCNtk0hSm2uyhMGh00RbHIIJiqLzQ,3201
42
- cuenca/resources/user_credentials.py,sha256=eXjnXF3skklRF6SpAAv6c3ZXLnz61nbbhyds938dSkE,1165
43
+ cuenca/resources/user_credentials.py,sha256=glpxUa5-aYhgJ1ZG1g_c1PAWaQ9eEWP01lauBaccSQQ,1356
43
44
  cuenca/resources/user_events.py,sha256=L57v7clStwxyJX2vwe-357uRTrzeQglDpCCgXRg7v9Y,728
44
45
  cuenca/resources/user_lists_validation.py,sha256=eOADDHKg-RthgeO50Edh4VQtQcNl2tHvdmXMYuGpsCA,1275
45
46
  cuenca/resources/user_logins.py,sha256=G78OPnxiOd4AVdBsk6UkEH2za-k3IPghRklTiElHYcc,1411
46
- cuenca/resources/users.py,sha256=RNrh6-_0aqde_-7LAA50a3fwE3krKqu1PQh0Cn_8iUE,6253
47
+ cuenca/resources/users.py,sha256=3qb0-_3KBQCooqFUrknQ28ywU2v7s4JMudrd65z5Q-0,6321
47
48
  cuenca/resources/verifications.py,sha256=YyvSh5IpiJ02lHK8k-guTwoHSFoaMYSFk1aC2tPi7n0,1680
48
49
  cuenca/resources/wallet_transactions.py,sha256=8ePZI3-GaEd658GPYizAfHK9GVwlkt1r95-mEb7T3Jg,1030
49
50
  cuenca/resources/webhooks.py,sha256=bGjuvkSP3GXo4Q6v8iZ40Md8xc4AQrEmAD3r40VJqxM,392
@@ -75,6 +76,7 @@ tests/resources/test_file_batches.py,sha256=xcVeWZns4j3_RPZEv8W1Ws4-bcaxOXTQzFyU
75
76
  tests/resources/test_files.py,sha256=2VSlvYnGHrw--mYNvA6hlpEw-olbW_Hlq2d4vdn8v7M,961
76
77
  tests/resources/test_identities.py,sha256=0osumiLrzKkGG4XLlL4nIdSp_nGutHaPf55w_IVREps,454
77
78
  tests/resources/test_identity_events.py,sha256=BZlM2RXKtCORdTDQCemY3NAR3KWb3mPNql4sd6oU4-U,344
79
+ tests/resources/test_jwt_tokens.py,sha256=XBvtz2C2HbUXXyoxP2iq27nOkLgkUgGI7GSECJzVGRE,664
78
80
  tests/resources/test_kyc_validations.py,sha256=TEyS6encW-InRpcAR4nDCfmkqqnn8yMC9AaS3iWm8Xw,420
79
81
  tests/resources/test_kyc_verifications.py,sha256=Y-ZU61o18I_3NFqMN2w4WGZTzwsIhULAtESqIXiizUY,634
80
82
  tests/resources/test_limited_wallets.py,sha256=c0zDDOip3lJk8chbcGr_nWCdkO9yuL_HbD1IikR5jH4,527
@@ -88,7 +90,7 @@ tests/resources/test_service_providers.py,sha256=yhjTvRdVaTpwEHLVtvX8OD6bMef2W9w
88
90
  tests/resources/test_sessions.py,sha256=t9ljOiTbtrkpf_zh15LomK_JkJJDy8q8SdiVLw2pZ2k,1275
89
91
  tests/resources/test_statements.py,sha256=e9S_yn5kD6M8IpfpRmIOJ0Y6aggBkYWQxynY6P7Q7nI,370
90
92
  tests/resources/test_transfers.py,sha256=bW3igYOdYPDiZtLr8WVIYwfP-dV4sdJ9pbaXFps2ac8,4161
91
- tests/resources/test_user_credentials.py,sha256=WbK20aprlT3P_IEOwplvhIYnLfTgGhK3Q3Tu6Tf129c,809
93
+ tests/resources/test_user_credentials.py,sha256=pJkIMIN4yMkj7AlaBMjI-e2O1YIoFWAh4r9C489GT7s,815
92
94
  tests/resources/test_user_events.py,sha256=aPTyrEVF7jBD8-UQZeVOLbUmj9sni0JRCYgootmaQ8c,292
93
95
  tests/resources/test_user_lists_validation.py,sha256=-aHXS13o6mqbDsiWlprfyWzPbhMK3s0Qvk0G0zAhUfA,711
94
96
  tests/resources/test_user_logins.py,sha256=YLIZiFsR9tBv1fNH-lIpIMtvGY_7NHGQpMBFVuEFj6c,988
@@ -97,8 +99,8 @@ tests/resources/test_verifications.py,sha256=yyL-bdryQU3MvqnmAgnnzGG9t7UTxWwPiVu
97
99
  tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
98
100
  tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
99
101
  tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
100
- cuenca-2.0.0.dev7.dist-info/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
101
- cuenca-2.0.0.dev7.dist-info/METADATA,sha256=6n9pj2QpAMWwwxS3xbm4Y05F8MSo_9rnLwl1iAQnZjk,4966
102
- cuenca-2.0.0.dev7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
103
- cuenca-2.0.0.dev7.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
104
- cuenca-2.0.0.dev7.dist-info/RECORD,,
102
+ cuenca-2.0.2.dev1.dist-info/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
103
+ cuenca-2.0.2.dev1.dist-info/METADATA,sha256=oAKuPMl4wGpL6NOcnb99rAyVCeqJmfBYuXYXACz10m0,4966
104
+ cuenca-2.0.2.dev1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
105
+ cuenca-2.0.2.dev1.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
106
+ cuenca-2.0.2.dev1.dist-info/RECORD,,
@@ -0,0 +1,28 @@
1
+ import pytest
2
+
3
+ from cuenca import JwtToken, LoginToken, UserLogin
4
+ from cuenca.http.client import Session
5
+
6
+
7
+ @pytest.fixture(scope='function')
8
+ def session():
9
+ session = Session()
10
+ session.configure(
11
+ 'api_key',
12
+ 'api_secret',
13
+ sandbox=True,
14
+ )
15
+ return session
16
+
17
+
18
+ @pytest.mark.vcr
19
+ def test_jwt_tokens(session):
20
+ UserLogin.create('111111', session=session)
21
+ login_token = LoginToken.create(session=session)
22
+ session.headers.pop(
23
+ 'X-Cuenca-LoginId',
24
+ )
25
+ session.configure(login_token=login_token.id)
26
+ jwt_token = JwtToken.create(session=session)
27
+ assert jwt_token
28
+ assert isinstance(jwt_token.token, str)
@@ -7,9 +7,9 @@ from cuenca.http import Session
7
7
 
8
8
  @pytest.mark.vcr
9
9
  def test_update_password():
10
- UserCredential.create('222222')
11
- UserLogin.create('222222')
12
- UserCredential.update(password='111111')
10
+ UserCredential.create('22222222')
11
+ UserLogin.create('22222222')
12
+ UserCredential.update(password='11111111')
13
13
 
14
14
 
15
15
  @pytest.mark.vcr