Skip to content

Commit 5380bef

Browse files
feat: complete Account class implementation with missing methods
- Add getAccountInfo, updateAccountInfo, getAccountStatistics methods - Add getLimits method for account resource limits - Add complete type definitions for account operations - Update documentation with comprehensive examples - Add unit tests for all new methods (27 tests passing)
1 parent 5205c65 commit 5380bef

9 files changed

Lines changed: 1481 additions & 36 deletions

File tree

docs/source/Device/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Instance
1212
| **token**: str
1313
| Device Token
1414
15-
| *Optional* **region**: Regions: "usa-1" or "env"
15+
| *Optional* **region**: Regions: "us-e1" or "ue-w1" or "env"
1616
| Region is a optional parameter
1717
1818
.. code-block::
1919
:caption: **Example:**
2020
2121
from tagoio_sdk import Device
2222
23-
myDevice = Device({"token": "my_device_token", "region": "usa-1"})
23+
myDevice = Device({"token": "my_device_token", "region": "us-e1"})
2424
2525
2626

docs/source/Resources/Account/Account_type.rst

Lines changed: 173 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,193 @@
66

77
AccountOptions
88
--------------
9+
910
**Attributes:**
1011

11-
| **user_view_welcome**: bool
12-
| **decimal_separator**: str
13-
| **thousand_separator**: str
14-
| **last_whats_new**: Optional[datetime]
12+
| user_view_welcome: bool
13+
14+
| decimal_separator: str
15+
16+
| thousand_separator: str
17+
18+
| last_whats_new: Optional[datetime]
1519
1620

1721
.. _AccountOpt:
1822

1923
AccountOpt
20-
-----------
24+
----------
25+
2126
**Attributes:**
2227

23-
| **authenticator**: bool
24-
| **sms**: bool
25-
| **email**: bool
28+
| authenticator: bool
29+
30+
| sms: bool
31+
32+
| email: bool
2633
2734

2835
.. _AccountInfo:
2936

3037
AccountInfo
3138
-----------
39+
40+
**Attributes:**
41+
42+
| active: bool
43+
44+
| name: str
45+
46+
| email: str
47+
48+
| country: Optional[str]
49+
50+
| timezone: str
51+
52+
| company: Optional[str]
53+
54+
| newsletter: Optional[bool]
55+
56+
| developer: Optional[bool]
57+
58+
| blocked: bool
59+
60+
| id: :ref:`GenericID`
61+
62+
| language: str
63+
64+
| last_login: Optional[datetime]
65+
66+
| options: :ref:`AccountOptions`
67+
68+
| phone: Optional[str]
69+
70+
| send_invoice: bool
71+
72+
| stripe_id: Optional[str]
73+
74+
| type: str
75+
76+
| plan: str
77+
78+
| created_at: datetime
79+
80+
| updated_at: datetime
81+
82+
| otp: Optional[:ref:`AccountOpt`]
83+
84+
85+
.. _AccountCreateInfo:
86+
87+
AccountCreateInfo
88+
-----------------
89+
90+
Information required to create a new TagoIO account.
91+
92+
**Attributes:**
93+
94+
| name: str
95+
96+
| email: str
97+
98+
| password: str
99+
100+
| cpassword: str
101+
102+
| country: Optional[str]
103+
104+
| timezone: str
105+
106+
| company: Optional[str]
107+
108+
| newsletter: Optional[bool]
109+
110+
| developer: Optional[bool]
111+
112+
113+
.. _OTPType:
114+
115+
OTPType
116+
-------
117+
118+
Type of One-Time Password authentication method.
119+
120+
**Values:**
121+
122+
| "sms" or "email" or "authenticator"
123+
124+
125+
.. _TokenCreateInfo:
126+
127+
TokenCreateInfo
128+
---------------
129+
130+
Information required to create a new account token.
131+
132+
**Attributes:**
133+
134+
| profile_id: :ref:`GenericID`
135+
136+
| email: str
137+
138+
| password: str
139+
140+
| pin_code: str
141+
142+
| otp_type: :ref:`OTPType`
143+
144+
| name: str
145+
146+
147+
.. _LoginCredentials:
148+
149+
LoginCredentials
150+
----------------
151+
152+
Credentials required for account login.
153+
32154
**Attributes:**
33155

34-
| **active**: bool
35-
| **name**: str
36-
| **email**: str
37-
| **country**: Optional[str]
38-
| **timezone**: str
39-
| **company**: Optional[str]
40-
| **newsletter**: Optional[bool]
41-
| **developer**: Optional[bool]
42-
| **blocked**: bool
43-
| **id**: GenericID
44-
| **language**: str
45-
| **last_login**: Optional[datetime]
46-
| **options**: :ref:`AccountOptions`
47-
| **phone**: Optional[str]
48-
| **send_invoice**: bool
49-
| **stripe_id**: Optional[str]
50-
| **type**: str
51-
| **plan**: str
52-
| **created_at**: datetime
53-
| **updated_at**: datetime
54-
| **otp**: Optional[:ref:`AccountOpt`]
156+
| email: str
157+
158+
| password: str
159+
160+
| otp_type: :ref:`OTPType`
161+
162+
| pin_code: str
163+
164+
165+
.. _ProfileListInfoForLogin:
166+
167+
ProfileListInfoForLogin
168+
-----------------------
169+
170+
Profile information returned in login response.
171+
172+
**Attributes:**
173+
174+
| id: :ref:`GenericID`
175+
176+
| name: str
177+
178+
179+
.. _LoginResponse:
180+
181+
LoginResponse
182+
-------------
183+
184+
Response data from account login endpoint.
185+
186+
**Attributes:**
187+
188+
| type: str
189+
190+
| id: :ref:`GenericID`
191+
192+
| email: str
193+
194+
| company: str
195+
196+
| name: str
197+
198+
| profiles: List[:ref:`ProfileListInfoForLogin`]

0 commit comments

Comments
 (0)