cuenca 2.1.15.dev1__py3-none-any.whl → 2.1.16.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/resources/users.py +9 -2
- cuenca/version.py +1 -1
- {cuenca-2.1.15.dev1.dist-info → cuenca-2.1.16.dev1.dist-info}/METADATA +1 -1
- {cuenca-2.1.15.dev1.dist-info → cuenca-2.1.16.dev1.dist-info}/RECORD +8 -8
- {cuenca-2.1.15.dev1.dist-info → cuenca-2.1.16.dev1.dist-info}/WHEEL +1 -1
- tests/resources/test_users.py +1 -0
- {cuenca-2.1.15.dev1.dist-info → cuenca-2.1.16.dev1.dist-info}/licenses/LICENSE +0 -0
- {cuenca-2.1.15.dev1.dist-info → cuenca-2.1.16.dev1.dist-info}/top_level.txt +0 -0
cuenca/resources/users.py
CHANGED
|
@@ -31,12 +31,12 @@ from pydantic import ConfigDict, EmailStr, Field
|
|
|
31
31
|
|
|
32
32
|
from ..http import Session, session as global_session
|
|
33
33
|
from .balance_entries import BalanceEntry
|
|
34
|
-
from .base import Creatable, Queryable, Retrievable, Updateable
|
|
34
|
+
from .base import Creatable, Deactivable, Queryable, Retrievable, Updateable
|
|
35
35
|
from .identities import Identity
|
|
36
36
|
from .resources import retrieve_uri
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
class User(Creatable, Retrievable, Updateable, Queryable):
|
|
39
|
+
class User(Creatable, Retrievable, Updateable, Queryable, Deactivable):
|
|
40
40
|
_resource: ClassVar = 'users'
|
|
41
41
|
_query_params: ClassVar = UserQuery
|
|
42
42
|
|
|
@@ -87,12 +87,19 @@ class User(Creatable, Retrievable, Updateable, Queryable):
|
|
|
87
87
|
country_of_birth: Optional[Country] = None
|
|
88
88
|
blacklist_validation_status: Optional[VerificationStatus] = None
|
|
89
89
|
pronouns: Optional[str] = None
|
|
90
|
+
deactivated_at: Optional[dt.datetime] = None
|
|
91
|
+
user_tos_agreements_id: Optional[str] = None
|
|
90
92
|
|
|
91
93
|
@property
|
|
92
94
|
def balance(self) -> int:
|
|
93
95
|
be = BalanceEntry.first(user_id=self.id)
|
|
94
96
|
return be.rolling_balance if be else 0
|
|
95
97
|
|
|
98
|
+
@property
|
|
99
|
+
def full_name(self):
|
|
100
|
+
name = f'{self.names} {self.first_surname} {self.second_surname}'
|
|
101
|
+
return name.strip()
|
|
102
|
+
|
|
96
103
|
model_config = ConfigDict(
|
|
97
104
|
json_schema_extra={
|
|
98
105
|
'example': {
|
cuenca/version.py
CHANGED
|
@@ -2,7 +2,7 @@ cuenca/__init__.py,sha256=R_PNGTPbmivdWfiE5qAFQE-gsw0AOB4cw4W6DWpF-KY,1978
|
|
|
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=cgZcqTMtO1nX2nrbW_zMOXLFhNHGMYFmM9Mhy6QVISQ,84
|
|
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=uBp3dzTwPTY62Dx8o9bPCtNJ6OeHKNRoTsUc2RQL5uA,3452
|
|
@@ -47,13 +47,13 @@ cuenca/resources/user_credentials.py,sha256=glpxUa5-aYhgJ1ZG1g_c1PAWaQ9eEWP01lau
|
|
|
47
47
|
cuenca/resources/user_events.py,sha256=ktZBoG_dhdfOkyuCHBwWd3lxV3CfA74b9CMfhPTgDC4,739
|
|
48
48
|
cuenca/resources/user_lists_validation.py,sha256=UrInfZRUVd4nODBIBOTH8ALEZ3pvdYS2_xfFR7UeNrc,1595
|
|
49
49
|
cuenca/resources/user_logins.py,sha256=KDauv2c5BJUR-C5ZeIjAPsv-8VH11BhoT-wCU9KgrwY,1542
|
|
50
|
-
cuenca/resources/users.py,sha256=
|
|
50
|
+
cuenca/resources/users.py,sha256=pB84dKOiKk0iCjemxa4LRbWNY2h0LA636wCfW-_7Alo,7874
|
|
51
51
|
cuenca/resources/users_tos_agreements.py,sha256=bZiVuobGfLlxwlIyoiA9Izdo4KiUlxJyBffp9Y2NYYU,1250
|
|
52
52
|
cuenca/resources/verifications.py,sha256=c90Pyd20EXLA5Wy0C1RABxjjivMB--q6yu6uK-R8aNA,1607
|
|
53
53
|
cuenca/resources/wallet_transactions.py,sha256=8ePZI3-GaEd658GPYizAfHK9GVwlkt1r95-mEb7T3Jg,1030
|
|
54
54
|
cuenca/resources/webhooks.py,sha256=bGjuvkSP3GXo4Q6v8iZ40Md8xc4AQrEmAD3r40VJqxM,392
|
|
55
55
|
cuenca/resources/whatsapp_transfers.py,sha256=YSL606FBOMGKjhyKK5TiF0di96zdDKoiVtjiz_Zl_ZI,902
|
|
56
|
-
cuenca-2.1.
|
|
56
|
+
cuenca-2.1.16.dev1.dist-info/licenses/LICENSE,sha256=aWv5PmUiAcNENEAdghcVQSeU56pXJHWexJYgklK9XLg,1063
|
|
57
57
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
58
|
tests/conftest.py,sha256=0tgOjjZOitOvFcYU6GRJ29ySdFmDAM3FX8ZGKjJj3Ac,1828
|
|
59
59
|
tests/test_cuenca.py,sha256=aeha_utz9YiHQg6eJK2PB7g66pVUYFi9U6pYMGXDKvk,1628
|
|
@@ -101,13 +101,13 @@ tests/resources/test_user_credentials.py,sha256=pJkIMIN4yMkj7AlaBMjI-e2O1YIoFWAh
|
|
|
101
101
|
tests/resources/test_user_events.py,sha256=aPTyrEVF7jBD8-UQZeVOLbUmj9sni0JRCYgootmaQ8c,292
|
|
102
102
|
tests/resources/test_user_lists_validation.py,sha256=sZkjCYkySbWtOxM9NVSzZHaoOhXS7N0XD4buD3dke5E,1196
|
|
103
103
|
tests/resources/test_user_logins.py,sha256=YLIZiFsR9tBv1fNH-lIpIMtvGY_7NHGQpMBFVuEFj6c,988
|
|
104
|
-
tests/resources/test_users.py,sha256=
|
|
104
|
+
tests/resources/test_users.py,sha256=P7zfJ0qwwRcFxxMbtMvImKrJ1Ab-2U50nqrdByphLMg,3182
|
|
105
105
|
tests/resources/test_users_tos_agreements.py,sha256=s4Gt36KLi3fjVtVzV9vhi6VF94QzbB_Ut0HDj9Zvj7Q,272
|
|
106
106
|
tests/resources/test_verifications.py,sha256=bBXR-pkmrs-_MekKo9iJS4TDkSyqZ65crsrcqVZs4FQ,1591
|
|
107
107
|
tests/resources/test_wallet_transactions.py,sha256=_L2hjPHT4FwwhxksUoaoVHwFFYOGWfF4ScCbk0kb7Hw,3945
|
|
108
108
|
tests/resources/test_webhooks.py,sha256=nYCqAnlNJcMJKRHhgoHOWTQnFLWQHHvFyY8GVCxGTD8,328
|
|
109
109
|
tests/resources/test_whatsapp_transfers.py,sha256=4Dmrsbytx7LRrLQo9M8TAL7cGKJufPStkp51UdRCnYU,1030
|
|
110
|
-
cuenca-2.1.
|
|
111
|
-
cuenca-2.1.
|
|
112
|
-
cuenca-2.1.
|
|
113
|
-
cuenca-2.1.
|
|
110
|
+
cuenca-2.1.16.dev1.dist-info/METADATA,sha256=XXVj8ofnMrG-fGpfeTAYW2NI6UQhfHSebfsmS468_kQ,4989
|
|
111
|
+
cuenca-2.1.16.dev1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
112
|
+
cuenca-2.1.16.dev1.dist-info/top_level.txt,sha256=5h3K7XJTmJniDloPq4sIJHni_xLw-Uoc6ZJ5mcw_lZY,13
|
|
113
|
+
cuenca-2.1.16.dev1.dist-info/RECORD,,
|
tests/resources/test_users.py
CHANGED
|
File without changes
|
|
File without changes
|