python-terminusgps 1.2.0__py3-none-any.whl → 1.2.2__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.

Potentially problematic release.


This version of python-terminusgps might be problematic. Click here for more details.

@@ -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
  terminusgps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  terminusgps/authorizenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- terminusgps/authorizenet/auth.py,sha256=N4vAKSgifzHkn3TPJJ_uvAkK21CzdXyU4-icFfV3YsM,462
3
+ terminusgps/authorizenet/auth.py,sha256=TBq_PY_-kUlg7ZOK4iWxJbpOnMkM5170j3ZyWSsuq6E,472
4
4
  terminusgps/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  terminusgps/aws/secrets.py,sha256=kgRA77rs0mD4berWRLkPtJLOe4Grf--o5f8NzwQqXCk,360
6
6
  terminusgps/wialon/__init__.py,sha256=vDlkEycUXBKRaZHJXpZIKis3v3Lmp1qjt9FNx3PtjZk,166
@@ -10,14 +10,14 @@ terminusgps/wialon/flags.py,sha256=-OoH-eZM54yjRqxsAXL8VImdQu_7C0OAxCrFqaCEuko,1
10
10
  terminusgps/wialon/session.py,sha256=A8vJbofARlOMXxc_ihSbgPSPM5B1tRtS8EjvNRB2wS8,2327
11
11
  terminusgps/wialon/utils.py,sha256=Y3N_U1-KDROvGZrVDECvBuAy1iJUazvisfPSCpsn-gg,2052
12
12
  terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
13
- terminusgps/wialon/items/base.py,sha256=iqI0Vb88FOaNsRkwNHKaIG-_m8tbYA3GudEqt0qEVes,4288
13
+ terminusgps/wialon/items/base.py,sha256=6u4LoBUrzdH9Uar5rM9flyjdGIZm2uWXu-BuUXIjT6c,4278
14
14
  terminusgps/wialon/items/resource.py,sha256=ZQTu8j8rxeSHV9fToL94lC6apovqv2_AzfYnweJGGrc,720
15
15
  terminusgps/wialon/items/retranslator.py,sha256=ahxtGk8K8eTnv_DQDpoCN7RdwqqPU69m9eGHsV2OLHI,833
16
16
  terminusgps/wialon/items/route.py,sha256=NbiMfo_FRM6HrA1iWXN3v3bb927mWSanDgS3ehohxl8,672
17
17
  terminusgps/wialon/items/unit.py,sha256=7t6v1IOSmbdXUy1nDseQB8GghcqYfykTwcot02ndzZg,2822
18
18
  terminusgps/wialon/items/unit_group.py,sha256=ru81kbkVF2OCTONBP1MXrgxEcOasYL3UerNz13mvy4c,2648
19
- terminusgps/wialon/items/user.py,sha256=DAIJXUJcZ6LBr52wiFWMqe-FNOrFPkKkJLLLlmh3YwM,2851
20
- python_terminusgps-1.2.0.dist-info/METADATA,sha256=AAEuwWQvmjFmGgQ67Wop4N4BqcNw_bhNK9DNGYE4Re4,860
21
- python_terminusgps-1.2.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
22
- python_terminusgps-1.2.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
23
- python_terminusgps-1.2.0.dist-info/RECORD,,
19
+ terminusgps/wialon/items/user.py,sha256=GmwE4Lblh7M2XjaEz4amd_pa5XlbIfRnj8nGEcJ_ehc,2913
20
+ python_terminusgps-1.2.2.dist-info/METADATA,sha256=yAfchUnXMEIXRDSEYtskG_Vf1hPk2MTvimPiGUj9rnM,860
21
+ python_terminusgps-1.2.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
22
+ python_terminusgps-1.2.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
23
+ python_terminusgps-1.2.2.dist-info/RECORD,,
@@ -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
  )