python-terminusgps 1.2.0__tar.gz → 1.2.2__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.2.0 → python_terminusgps-1.2.2}/PKG-INFO +1 -1
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/pyproject.toml +1 -1
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/authorizenet/auth.py +2 -2
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/base.py +2 -2
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/user.py +7 -6
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/.gitignore +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/COPYING +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/README.md +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/requirements.txt +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/__init__.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/aws/__init__.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/aws/secrets.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/errors.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/__init__.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/resource.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/retranslator.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/route.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/unit.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/unit_group.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/session.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/utils.py +0 -0
- {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
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.2.
|
|
3
|
+
version = "1.2.2"
|
|
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" } ]
|
|
@@ -6,8 +6,8 @@ from django.conf import settings
|
|
|
6
6
|
|
|
7
7
|
def get_merchant_auth() -> merchantAuthenticationType:
|
|
8
8
|
return merchantAuthenticationType(
|
|
9
|
-
name=settings.MERCHANT_AUTH_LOGIN_ID,
|
|
10
|
-
transactionKey=settings.MERCHANT_AUTH_TRANSACTION_KEY,
|
|
9
|
+
name=str(settings.MERCHANT_AUTH_LOGIN_ID),
|
|
10
|
+
transactionKey=str(settings.MERCHANT_AUTH_TRANSACTION_KEY),
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
|
|
@@ -28,9 +28,9 @@ class WialonBase:
|
|
|
28
28
|
def id(self) -> int | None:
|
|
29
29
|
return int(self._id) if self._id else None
|
|
30
30
|
|
|
31
|
-
def has_access(self,
|
|
31
|
+
def has_access(self, other: "WialonBase") -> bool:
|
|
32
32
|
response = self.session.wialon_api.core_check_accessors(
|
|
33
|
-
**{"items": [
|
|
33
|
+
**{"items": [other.id], "flags": False}
|
|
34
34
|
)
|
|
35
35
|
return True if self.id in response.keys() else False
|
|
36
36
|
|
|
@@ -44,21 +44,22 @@ class WialonUser(WialonBase):
|
|
|
44
44
|
response = self._get_access_response(hw_type="avl_unit_group")
|
|
45
45
|
return [key for key in response.keys()]
|
|
46
46
|
|
|
47
|
-
def has_access(self,
|
|
48
|
-
response = self._get_access_response(hw_type=
|
|
49
|
-
items = [key for key in response.keys()]
|
|
50
|
-
return True if str(
|
|
47
|
+
def has_access(self, other: WialonBase) -> bool:
|
|
48
|
+
response: dict = self._get_access_response(hw_type=other.hw_type)
|
|
49
|
+
items: list[str] = [key for key in response.keys()]
|
|
50
|
+
return True if str(other.id) in items else False
|
|
51
51
|
|
|
52
52
|
def assign_phone(self, phone: str) -> None:
|
|
53
53
|
self.add_cproperty(("phone", quote_plus(phone)))
|
|
54
54
|
|
|
55
55
|
def assign_email(self, email: str) -> None:
|
|
56
|
+
"""Assigns an email address to the Wialon user."""
|
|
56
57
|
self.add_cproperty(("email", email))
|
|
57
58
|
|
|
58
|
-
def
|
|
59
|
+
def grant_access(
|
|
59
60
|
self, item: WialonBase, access_mask: int = constants.ACCESSMASK_UNIT_BASIC
|
|
60
61
|
) -> None:
|
|
61
|
-
"""
|
|
62
|
+
"""Grants item access to the Wialon user according to the access mask integer."""
|
|
62
63
|
self.session.wialon_api.user_update_item_access(
|
|
63
64
|
**{"userId": self.id, "itemId": item.id, "accessMask": access_mask}
|
|
64
65
|
)
|
|
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
|
|
File without changes
|
{python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/retranslator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/unit_group.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|