cuenca 2.2.1__py3-none-any.whl → 2.2.2.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
@@ -1,5 +1,7 @@
1
1
  __all__ = [
2
2
  '__version__',
3
+ 'Agent',
4
+ 'AgentVerification',
3
5
  'ApiKey',
4
6
  'Account',
5
7
  'Arpc',
@@ -53,6 +55,8 @@ __all__ = [
53
55
  from . import http
54
56
  from .resources import (
55
57
  Account,
58
+ Agent,
59
+ AgentVerification,
56
60
  ApiKey,
57
61
  Arpc,
58
62
  BalanceEntry,
@@ -1,4 +1,6 @@
1
1
  __all__ = [
2
+ 'Agent',
3
+ 'AgentVerification',
2
4
  'ApiKey',
3
5
  'Account',
4
6
  'Arpc',
@@ -47,6 +49,8 @@ __all__ = [
47
49
  ]
48
50
 
49
51
  from .accounts import Account
52
+ from .agent_verifications import AgentVerification
53
+ from .agents import Agent
50
54
  from .api_keys import ApiKey
51
55
  from .arpc import Arpc
52
56
  from .balance_entries import BalanceEntry
@@ -96,6 +100,8 @@ from .whatsapp_transfers import WhatsappTransfer
96
100
 
97
101
  # avoid circular imports
98
102
  resource_classes = [
103
+ Agent,
104
+ AgentVerification,
99
105
  ApiKey,
100
106
  Account,
101
107
  Arpc,
@@ -0,0 +1,37 @@
1
+ import datetime as dt
2
+ from typing import ClassVar
3
+
4
+ from cuenca_validations.types.identities import PhoneNumber
5
+ from pydantic import ConfigDict
6
+
7
+ from ..http import Session, session as global_session
8
+ from .base import Creatable
9
+
10
+
11
+ class AgentVerification(Creatable):
12
+ _resource: ClassVar = 'agent_verifications'
13
+
14
+ created_at: dt.datetime
15
+ user_id: str
16
+ platform_id: str
17
+ phone_number: PhoneNumber
18
+ pairing_code: str
19
+ deactivated_at: dt.datetime
20
+
21
+ model_config = ConfigDict(
22
+ json_schema_extra={
23
+ 'example': {
24
+ 'id': 'AVjTtPH1mhT65GEgOeomJ4DQ',
25
+ 'created_at': '2026-06-25T22:50:08.495768',
26
+ 'user_id': 'USMP3EPgI4T4CPFyVmXUPi8A',
27
+ 'platform_id': 'PTZbBlk__kQt-wfwzP5nwA9A',
28
+ 'phone_number': '+525512345678',
29
+ 'pairing_code': 'OJC37W',
30
+ 'deactivated_at': '2026-06-25T22:55:08.495779',
31
+ }
32
+ }
33
+ )
34
+
35
+ @classmethod
36
+ def create(cls, session: Session = global_session) -> 'AgentVerification':
37
+ return cls._create(session=session)
@@ -0,0 +1,52 @@
1
+ import datetime as dt
2
+ from typing import ClassVar, Optional
3
+
4
+ from cuenca_validations.types import AgentQuery, AgentRequest, PhoneNumber
5
+ from cuenca_validations.typing import DictStrAny
6
+ from pydantic import ConfigDict, Field
7
+
8
+ from ..http import Session, session as global_session
9
+ from .base import Creatable, Queryable
10
+
11
+
12
+ class Agent(Creatable, Queryable):
13
+ _resource: ClassVar = 'agents'
14
+ _query_params: ClassVar = AgentQuery
15
+
16
+ created_at: dt.datetime
17
+ user_id: str
18
+ platform_id: str
19
+ agent_verification_id: str
20
+ session_id: str
21
+ device_info: DictStrAny = Field(default_factory=dict)
22
+ deactivated_at: Optional[dt.datetime] = None
23
+
24
+ model_config = ConfigDict(
25
+ json_schema_extra={
26
+ 'example': {
27
+ 'id': 'AG1G6Bm0oGQOCRjTDaeFSsyA',
28
+ 'created_at': '2026-06-27T01:56:42.613781',
29
+ 'user_id': 'USMP3EPgI4T4CPFyVmXUPi8A',
30
+ 'platform_id': 'PTZbBlk__kQt-wfwzP5nwA9A',
31
+ 'agent_verification_id': 'AV7A1FLC7MSnqKcb7oAkiQxA',
32
+ 'session_id': 'SSH0M5yteyRHas-PmfT9pu9w',
33
+ 'device_info': {'client': 'cursor', 'os': 'macOS'},
34
+ }
35
+ }
36
+ )
37
+
38
+ @classmethod
39
+ def create(
40
+ cls,
41
+ pairing_code: str,
42
+ phone_number: PhoneNumber,
43
+ device_info: Optional[DictStrAny] = None,
44
+ *,
45
+ session: Session = global_session,
46
+ ) -> 'Agent':
47
+ req = AgentRequest(
48
+ pairing_code=pairing_code,
49
+ phone_number=phone_number,
50
+ device_info=device_info or {},
51
+ )
52
+ return cls._create(session=session, **req.model_dump())
cuenca/version.py CHANGED
@@ -1,3 +1,3 @@
1
- __version__ = '2.2.1'
1
+ __version__ = '2.2.2.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.2.1
3
+ Version: 2.2.2.dev0
4
4
  Summary: Cuenca API Client
5
5
  Home-page: https://github.com/cuenca-mx/cuenca-python
6
6
  Author: Cuenca
@@ -1,12 +1,14 @@
1
- cuenca/__init__.py,sha256=iRradQitV5UJnzDfw-ktkFFNIdpJq3NVcokoWASFm7Y,2018
1
+ cuenca/__init__.py,sha256=zsTFAP7_uZxDnJfbJGRQrIUICHU4AzIeaHW6bclI2Ag,2090
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=eSt6enOL3RA6eY73P2nbKvNCf1U4sXSCOjoVzDn6erM,78
5
+ cuenca/version.py,sha256=q-Pf9uci6FT6ojAVm_FkZV3KoBjjtKu5g9DyCgR37Rk,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=zbHBUgSJ4AR9i33k6NI9R2eFeXD-UwVCG0trGgU40U4,3535
8
+ cuenca/resources/__init__.py,sha256=mNwQjWDgH5lSndDpIQ5bmSoOc2kUfFeZgHV6nEX-gWM,3684
9
9
  cuenca/resources/accounts.py,sha256=5yfNxAHpxWFosoR4WrPrDGpBCRkaQk98V-w0wCPPXqU,345
10
+ cuenca/resources/agent_verifications.py,sha256=y3sE6gW6ce5IxJOUh8-8EuJ3I5xlYy28lIAkKKQub5k,1098
11
+ cuenca/resources/agents.py,sha256=QW4Zul4mUrJrPYq8h9bMWqcF5HVQXscsqWeo5CbApcQ,1644
10
12
  cuenca/resources/api_keys.py,sha256=p65ZUiAu51JhEL_fZDc7_DTR0PMcSa-YQeK9gRFY82s,2618
11
13
  cuenca/resources/arpc.py,sha256=a9gGIgpBV8RK2ePSPBxI5c4ET4MtKH6Po_HRiv73B5k,1689
12
14
  cuenca/resources/balance_entries.py,sha256=c2p9nXrKpMJ2xlQkTLP_ttycb1RitA979mP46mbZnEc,1073
@@ -54,7 +56,7 @@ cuenca/resources/verifications.py,sha256=c90Pyd20EXLA5Wy0C1RABxjjivMB--q6yu6uK-R
54
56
  cuenca/resources/wallet_transactions.py,sha256=8ePZI3-GaEd658GPYizAfHK9GVwlkt1r95-mEb7T3Jg,1030
55
57
  cuenca/resources/webhooks.py,sha256=bGjuvkSP3GXo4Q6v8iZ40Md8xc4AQrEmAD3r40VJqxM,392
56
58
  cuenca/resources/whatsapp_transfers.py,sha256=YSL606FBOMGKjhyKK5TiF0di96zdDKoiVtjiz_Zl_ZI,902
57
- cuenca-2.2.1.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
59
+ cuenca-2.2.2.dev0.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
58
60
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
61
  tests/conftest.py,sha256=0tgOjjZOitOvFcYU6GRJ29ySdFmDAM3FX8ZGKjJj3Ac,1828
60
62
  tests/test_cuenca.py,sha256=aeha_utz9YiHQg6eJK2PB7g66pVUYFi9U6pYMGXDKvk,1628
@@ -109,7 +111,7 @@ tests/resources/test_verifications.py,sha256=bBXR-pkmrs-_MekKo9iJS4TDkSyqZ65crsr
109
111
  tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
110
112
  tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
111
113
  tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
112
- cuenca-2.2.1.dist-info/METADATA,sha256=M2nI5OEy3-u1ZB-0_4nFqS2ojFDMXadJ93bVOPRSVVQ,4984
113
- cuenca-2.2.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
- cuenca-2.2.1.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
115
- cuenca-2.2.1.dist-info/RECORD,,
114
+ cuenca-2.2.2.dev0.dist-info/METADATA,sha256=uZBy_dW_vpUzs2li-X72aBiEmbYOYuPF-qLpF3MyMaA,4989
115
+ cuenca-2.2.2.dev0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
116
+ cuenca-2.2.2.dev0.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
117
+ cuenca-2.2.2.dev0.dist-info/RECORD,,