python-terminusgps 1.11.0__tar.gz → 1.12.0__tar.gz
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.
Potentially problematic release.
This version of python-terminusgps might be problematic. Click here for more details.
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/PKG-INFO +1 -1
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/pyproject.toml +1 -1
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/resource.py +53 -2
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/uv.lock +1 -1
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/.gitignore +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/COPYING +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/README.md +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/auth.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/addresses.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/base.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/customers.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/payments.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/aws/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/aws/secrets.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/aws/ses.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/settings.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/twilio/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/twilio/caller.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/errors.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/__init__.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/base.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/notification.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/retranslator.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/route.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/unit.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/unit_group.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/user.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/session.py +0 -0
- {python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.12.0
|
|
4
4
|
Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
|
|
5
5
|
Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-terminusgps"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.12.0"
|
|
4
4
|
description = "Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [ {name = "Blake Nall", email = "blake@terminusgps.com" } ]
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/resource.py
RENAMED
|
@@ -22,24 +22,59 @@ class WialonResource(WialonBase):
|
|
|
22
22
|
|
|
23
23
|
@property
|
|
24
24
|
def is_account(self) -> bool:
|
|
25
|
+
"""
|
|
26
|
+
Whether or not the resource is an account.
|
|
27
|
+
|
|
28
|
+
:type: :py:obj:`bool`
|
|
29
|
+
|
|
30
|
+
"""
|
|
25
31
|
response = self.session.wialon_api.core_search_item(
|
|
26
32
|
**{"id": self.id, "flags": flags.DATAFLAG_RESOURCE_BILLING_PROPERTIES}
|
|
27
33
|
)
|
|
28
34
|
return response.get("item", {}).get("bact") == self.id
|
|
29
35
|
|
|
30
36
|
def is_migrated(self, unit: WialonBase) -> bool:
|
|
37
|
+
"""
|
|
38
|
+
Checks if a unit is migrated into the account.
|
|
39
|
+
|
|
40
|
+
:param unit: A Wialon object.
|
|
41
|
+
:type unit: :py:obj:`~terminusgps.wialon.items.base.WialonBase`
|
|
42
|
+
:returns: Whether or not the unit is migrated into the account.
|
|
43
|
+
:rtype: :py:obj:`bool`
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
assert self.is_account, "The resource is not an acccount"
|
|
31
47
|
response = self.session.wialon_api.account_list_change_accounts(
|
|
32
48
|
**{"units": [unit.id]}
|
|
33
49
|
)
|
|
34
|
-
results = [
|
|
50
|
+
results = [self.id == int(item.get("id")) for item in response]
|
|
35
51
|
return any(results)
|
|
36
52
|
|
|
53
|
+
def set_dealer_rights(self, enabled: bool = False) -> None:
|
|
54
|
+
"""
|
|
55
|
+
Sets dealer rights on the account.
|
|
56
|
+
|
|
57
|
+
:param enabled: :py:obj:`True` to enable dealer rights, :py:obj:`False` to disable dealer rights. Default is :py:obj:`False`.
|
|
58
|
+
:type enabled: :py:obj:`bool`
|
|
59
|
+
:raises AssertionError: If the resource is not an account.
|
|
60
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
61
|
+
:returns: Nothing.
|
|
62
|
+
:rtype: :py:obj:`None`
|
|
63
|
+
|
|
64
|
+
"""
|
|
65
|
+
assert self.is_account, "The resource is not an account"
|
|
66
|
+
self.session.wialon_api.account_update_dealer_rights(
|
|
67
|
+
**{"itemId": self.id, "enable": str(enabled).lower()}
|
|
68
|
+
)
|
|
69
|
+
|
|
37
70
|
def migrate_unit(self, unit: WialonBase) -> None:
|
|
38
71
|
"""
|
|
39
72
|
Migrates a :py:obj:`WialonUnit` into the account.
|
|
40
73
|
|
|
41
74
|
:param unit: A Wialon object.
|
|
42
75
|
:type unit: :py:obj:`~terminusgps.wialon.items.base.WialonBase`
|
|
76
|
+
:raises AssertionError: If the resource is not an account.
|
|
77
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
43
78
|
:returns: Nothing.
|
|
44
79
|
:rtype: :py:obj:`None`
|
|
45
80
|
|
|
@@ -55,6 +90,8 @@ class WialonResource(WialonBase):
|
|
|
55
90
|
|
|
56
91
|
:param new_plan: The name of a billing plan.
|
|
57
92
|
:type new_plan: :py:obj:`str`
|
|
93
|
+
:raises AssertionError: If the resource is not an account.
|
|
94
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
58
95
|
:returns: Nothing.
|
|
59
96
|
:rtype: :py:obj:`None`
|
|
60
97
|
|
|
@@ -70,11 +107,13 @@ class WialonResource(WialonBase):
|
|
|
70
107
|
|
|
71
108
|
:param billing_plan: The name of a billing plan.
|
|
72
109
|
:type billing_plan: :py:obj:`str`
|
|
110
|
+
:raises AssertionError: If the resource is already account.
|
|
111
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
73
112
|
:returns: Nothing.
|
|
74
113
|
:rtype: :py:obj:`None`
|
|
75
114
|
|
|
76
115
|
"""
|
|
77
|
-
assert self.is_account, "The resource is already an account"
|
|
116
|
+
assert not self.is_account, "The resource is already an account"
|
|
78
117
|
self.session.wialon_api.account_create_account(
|
|
79
118
|
**{"itemId": self.id, "plan": billing_plan}
|
|
80
119
|
)
|
|
@@ -83,6 +122,8 @@ class WialonResource(WialonBase):
|
|
|
83
122
|
"""
|
|
84
123
|
Deletes the account if it exists, as well as any micro-objects and macro-objects it contains.
|
|
85
124
|
|
|
125
|
+
:raises AssertionError: If the resource is not an account.
|
|
126
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
86
127
|
:returns: Nothing.
|
|
87
128
|
:rtype: :py:obj:`None`
|
|
88
129
|
|
|
@@ -94,6 +135,8 @@ class WialonResource(WialonBase):
|
|
|
94
135
|
"""
|
|
95
136
|
Enables the Wialon account.
|
|
96
137
|
|
|
138
|
+
:raises AssertionError: If the resource is not an account.
|
|
139
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
97
140
|
:returns: Nothing.
|
|
98
141
|
:rtype: :py:obj:`None`
|
|
99
142
|
|
|
@@ -107,6 +150,8 @@ class WialonResource(WialonBase):
|
|
|
107
150
|
"""
|
|
108
151
|
Disables the Wialon account.
|
|
109
152
|
|
|
153
|
+
:raises AssertionError: If the resource is not an account.
|
|
154
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
110
155
|
:returns: Nothing.
|
|
111
156
|
:rtype: :py:obj:`None`
|
|
112
157
|
|
|
@@ -122,6 +167,8 @@ class WialonResource(WialonBase):
|
|
|
122
167
|
|
|
123
168
|
:param days: Number of days to set the counter to. Default is ``0``.
|
|
124
169
|
:type days: :py:obj:`int`
|
|
170
|
+
:raises AssertionError: If the resource is not an account.
|
|
171
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
125
172
|
:returns: Nothing.
|
|
126
173
|
:rtype: :py:obj:`None`
|
|
127
174
|
|
|
@@ -137,6 +184,8 @@ class WialonResource(WialonBase):
|
|
|
137
184
|
|
|
138
185
|
:param days: Number of days to add to the account. Default is ``30``.
|
|
139
186
|
:type days: :py:obj:`int`
|
|
187
|
+
:raises AssertionError: If the resource is not an account.
|
|
188
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
140
189
|
:returns: Nothing.
|
|
141
190
|
:rtype: :py:obj:`None`
|
|
142
191
|
|
|
@@ -166,6 +215,8 @@ class WialonResource(WialonBase):
|
|
|
166
215
|
:type block_balance_val: :py:obj:`float`
|
|
167
216
|
:param deny_balance_val: Minimum amount on the account's balance before denying the account.
|
|
168
217
|
:type deny_balance_val: :py:obj:`float`
|
|
218
|
+
:raises AssertionError: If the resource is not an account.
|
|
219
|
+
:raises WialonError: If something goes wrong with Wialon.
|
|
169
220
|
:returns: Nothing.
|
|
170
221
|
:rtype: :py:obj:`None`
|
|
171
222
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/authorizenet/profiles/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/notification.py
RENAMED
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/retranslator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.11.0 → python_terminusgps-1.12.0}/terminusgps/wialon/items/unit_group.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|