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.

Files changed (26) hide show
  1. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/PKG-INFO +1 -1
  2. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/pyproject.toml +1 -1
  3. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/authorizenet/auth.py +2 -2
  4. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/base.py +2 -2
  5. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/user.py +7 -6
  6. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/.gitignore +0 -0
  7. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/COPYING +0 -0
  8. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/README.md +0 -0
  9. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/requirements.txt +0 -0
  10. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/__init__.py +0 -0
  11. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/authorizenet/__init__.py +0 -0
  12. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/aws/__init__.py +0 -0
  13. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/aws/secrets.py +0 -0
  14. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/__init__.py +0 -0
  15. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/constants.py +0 -0
  16. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/errors.py +0 -0
  17. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/flags.py +0 -0
  18. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/__init__.py +0 -0
  19. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/resource.py +0 -0
  20. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/retranslator.py +0 -0
  21. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/route.py +0 -0
  22. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/unit.py +0 -0
  23. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/items/unit_group.py +0 -0
  24. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/session.py +0 -0
  25. {python_terminusgps-1.2.0 → python_terminusgps-1.2.2}/terminusgps/wialon/utils.py +0 -0
  26. {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.0
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.0"
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, other_item: "WialonBase") -> bool:
31
+ def has_access(self, other: "WialonBase") -> bool:
32
32
  response = self.session.wialon_api.core_check_accessors(
33
- **{"items": [other_item.id], "flags": False}
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, other_item: WialonBase) -> bool:
48
- response = self._get_access_response(hw_type=other_item.hw_type)
49
- items = [key for key in response.keys()]
50
- return True if str(other_item.id) in items else False
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 assign_item(
59
+ def grant_access(
59
60
  self, item: WialonBase, access_mask: int = constants.ACCESSMASK_UNIT_BASIC
60
61
  ) -> None:
61
- """Assigns an item to this user according to the supplied access mask integer."""
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
  )