python-terminusgps 24.0.0__py3-none-any.whl → 24.2.0__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.
- {python_terminusgps-24.0.0.dist-info → python_terminusgps-24.2.0.dist-info}/METADATA +1 -1
- {python_terminusgps-24.0.0.dist-info → python_terminusgps-24.2.0.dist-info}/RECORD +7 -7
- terminusgps/authorizenet/profiles/addresses.py +10 -0
- terminusgps/wialon/items/unit.py +21 -6
- terminusgps/wialon/items/unit_group.py +3 -2
- {python_terminusgps-24.0.0.dist-info → python_terminusgps-24.2.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-24.0.0.dist-info → python_terminusgps-24.2.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.2.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
|
|
@@ -5,7 +5,7 @@ terminusgps/authorizenet/auth.py,sha256=ICxPPzoUc64VbsIIemEWKrn8xjHGwbNdo2VbtaFC
|
|
|
5
5
|
terminusgps/authorizenet/errors.py,sha256=HG5NwVxQCtOYidVl30y49PC0Ovw5VYdsy9wTgUFMw9M,949
|
|
6
6
|
terminusgps/authorizenet/utils.py,sha256=5aczO2EcMX2bi-kRg8_fnzLzE7qMA9K1qBxAo2AJz1c,2021
|
|
7
7
|
terminusgps/authorizenet/profiles/__init__.py,sha256=QKjMKcXpCSCEhv6LBCz0yGP8t0VxAyKyYRS4_HLYnxQ,114
|
|
8
|
-
terminusgps/authorizenet/profiles/addresses.py,sha256=
|
|
8
|
+
terminusgps/authorizenet/profiles/addresses.py,sha256=7yrOrb9kIsiiazgWbeH8v_YUBiWG3Y61g46R3S5DD-k,6592
|
|
9
9
|
terminusgps/authorizenet/profiles/base.py,sha256=TOUHr22QRQBLErdysOkfcpJBusTjrUTqOmWEyNvMacA,2240
|
|
10
10
|
terminusgps/authorizenet/profiles/customers.py,sha256=xe7LNsqSB_oRCY-teojDTt0O6a5yVf0dyuu86ftc4hA,8377
|
|
11
11
|
terminusgps/authorizenet/profiles/payments.py,sha256=O_oZGUwO8XTApzr0itu-1XQYnWFR4gDpNCusWNzBh7A,11152
|
|
@@ -27,10 +27,10 @@ terminusgps/wialon/items/base.py,sha256=EAtzlnCvB7WTu3iX1bV1-S9TvwXc-Eez7e0X4TMi
|
|
|
27
27
|
terminusgps/wialon/items/resource.py,sha256=qmQKEakJa9LH5YkI9-iBDA0hsotc5ctcwdb7kZuXdfQ,14549
|
|
28
28
|
terminusgps/wialon/items/retranslator.py,sha256=8q9EDc92w92MElnHIeEzH3Ra4kiPXrx4t9V5nPDZuRU,3728
|
|
29
29
|
terminusgps/wialon/items/route.py,sha256=PTJx1gmT_PGz7nlSSUS2VzjYD-aAuvkEOIdIFneUSSQ,1148
|
|
30
|
-
terminusgps/wialon/items/unit.py,sha256
|
|
31
|
-
terminusgps/wialon/items/unit_group.py,sha256=
|
|
30
|
+
terminusgps/wialon/items/unit.py,sha256=K0kmzFEInR3dAQVtMUA6M7KNy7HlD5IKl7f7YElr2sQ,9116
|
|
31
|
+
terminusgps/wialon/items/unit_group.py,sha256=Stp-WfCGbOqcnxV6FU1AKtV7KIxIwCHa0NwhNJfgRoM,5032
|
|
32
32
|
terminusgps/wialon/items/user.py,sha256=INwAibQVmjNNelepQXMfDevgJqMvIjHHgEjAMLRvhB0,7082
|
|
33
|
-
python_terminusgps-24.
|
|
34
|
-
python_terminusgps-24.
|
|
35
|
-
python_terminusgps-24.
|
|
36
|
-
python_terminusgps-24.
|
|
33
|
+
python_terminusgps-24.2.0.dist-info/METADATA,sha256=bbVaXq63-hNzcN6anqXZROwwpiLiQCVGaysMjctFxRY,946
|
|
34
|
+
python_terminusgps-24.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
python_terminusgps-24.2.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
+
python_terminusgps-24.2.0.dist-info/RECORD,,
|
|
@@ -47,6 +47,16 @@ class AddressProfile(AuthorizenetSubProfileBase):
|
|
|
47
47
|
"""
|
|
48
48
|
return self._authorizenet_delete_shipping_address()
|
|
49
49
|
|
|
50
|
+
def get_details(self) -> dict | None:
|
|
51
|
+
"""
|
|
52
|
+
Gets details for the Authorizenet address profile.
|
|
53
|
+
|
|
54
|
+
:returns: An Authorizenet API response, if any.
|
|
55
|
+
:rtype: :py:obj:`dict` | :py:obj:`None`
|
|
56
|
+
|
|
57
|
+
"""
|
|
58
|
+
return self._authorizenet_get_shipping_address()
|
|
59
|
+
|
|
50
60
|
def _authorizenet_get_shipping_address(self) -> dict | None:
|
|
51
61
|
"""
|
|
52
62
|
Executes a :py:obj:`~authorizenet.apicontractsv1.getCustomerShippingAddressRequest` using the Authorizenet API.
|
terminusgps/wialon/items/unit.py
CHANGED
|
@@ -17,7 +17,9 @@ class WialonUnit(WialonBase):
|
|
|
17
17
|
:type name: :py:obj:`str`
|
|
18
18
|
:param hw_type_id: A Wialon hardware type ID.
|
|
19
19
|
:type hw_type_id: :py:obj:`str` | :py:obj:`int`
|
|
20
|
-
:
|
|
20
|
+
:raises ValueError: If ``creator_id`` is a :py:obj:`str` but not a digit.
|
|
21
|
+
:raises ValueError: If ``hw_type_id`` is a :py:obj:`str` but not a digit.
|
|
22
|
+
:returns: An id for the new unit.
|
|
21
23
|
:rtype: :py:obj:`int` | :py:obj:`None`
|
|
22
24
|
|
|
23
25
|
"""
|
|
@@ -55,23 +57,36 @@ class WialonUnit(WialonBase):
|
|
|
55
57
|
**{"id": self.id, "flags": flags.DATAFLAG_UNIT_POSITION}
|
|
56
58
|
)
|
|
57
59
|
|
|
60
|
+
@property
|
|
61
|
+
def exists(self) -> bool:
|
|
62
|
+
"""Whether or not the unit exists in Wialon."""
|
|
63
|
+
return bool(
|
|
64
|
+
self.session.wialon_api.core_search_item(
|
|
65
|
+
**{"id": self.id, "flags": flags.DATAFLAG_UNIT_BASE}
|
|
66
|
+
).get("item", False)
|
|
67
|
+
)
|
|
68
|
+
|
|
58
69
|
@property
|
|
59
70
|
def available_commands(self) -> dict:
|
|
71
|
+
"""Assigned commands to the unit."""
|
|
60
72
|
return self.session.wialon_api.core_get_hw_cmds(
|
|
61
73
|
**{"deviceTypeId": 0, "unitId": self.id}
|
|
62
74
|
)
|
|
63
75
|
|
|
64
76
|
@property
|
|
65
77
|
def image_uri(self) -> str:
|
|
78
|
+
"""An image URI for the unit."""
|
|
66
79
|
return self._image_uri
|
|
67
80
|
|
|
68
81
|
@property
|
|
69
82
|
def imei_number(self) -> int | None:
|
|
83
|
+
"""The unit's IMEI number."""
|
|
70
84
|
if self._imei_number:
|
|
71
85
|
return int(self._imei_number)
|
|
72
86
|
|
|
73
87
|
@property
|
|
74
88
|
def active(self) -> bool:
|
|
89
|
+
"""Whether or not the unit is active."""
|
|
75
90
|
if self._active:
|
|
76
91
|
return bool(self._active)
|
|
77
92
|
return False
|
|
@@ -85,7 +100,7 @@ class WialonUnit(WialonBase):
|
|
|
85
100
|
param: dict | None = None,
|
|
86
101
|
) -> None:
|
|
87
102
|
"""
|
|
88
|
-
Executes a command on
|
|
103
|
+
Executes a command on the unit.
|
|
89
104
|
|
|
90
105
|
:param name: A Wialon command name.
|
|
91
106
|
:type name: :py:obj:`str`
|
|
@@ -115,7 +130,7 @@ class WialonUnit(WialonBase):
|
|
|
115
130
|
|
|
116
131
|
def set_access_password(self, password: str) -> None:
|
|
117
132
|
"""
|
|
118
|
-
Sets a new access password for
|
|
133
|
+
Sets a new access password for the unit.
|
|
119
134
|
|
|
120
135
|
:param password: A new access password.
|
|
121
136
|
:type name: :py:obj:`str`
|
|
@@ -131,7 +146,7 @@ class WialonUnit(WialonBase):
|
|
|
131
146
|
|
|
132
147
|
def activate(self) -> None:
|
|
133
148
|
"""
|
|
134
|
-
Activates
|
|
149
|
+
Activates the unit.
|
|
135
150
|
|
|
136
151
|
:raises WialonError: If something goes wrong with Wialon.
|
|
137
152
|
:returns: Nothing.
|
|
@@ -145,7 +160,7 @@ class WialonUnit(WialonBase):
|
|
|
145
160
|
|
|
146
161
|
def deactivate(self) -> None:
|
|
147
162
|
"""
|
|
148
|
-
Deactivates
|
|
163
|
+
Deactivates the unit.
|
|
149
164
|
|
|
150
165
|
:raises WialonError: If something goes wrong with Wialon.
|
|
151
166
|
:returns: Nothing.
|
|
@@ -159,7 +174,7 @@ class WialonUnit(WialonBase):
|
|
|
159
174
|
|
|
160
175
|
def assign_phone(self, phone: str) -> None:
|
|
161
176
|
"""
|
|
162
|
-
Assigns a phone number to
|
|
177
|
+
Assigns a phone number to the unit.
|
|
163
178
|
|
|
164
179
|
:param phone: A phone number beginning with a country code.
|
|
165
180
|
:type phone: :py:obj:`str`
|
|
@@ -120,10 +120,11 @@ class WialonUnitGroup(WialonBase):
|
|
|
120
120
|
def main() -> None:
|
|
121
121
|
import logging
|
|
122
122
|
|
|
123
|
-
from django.utils import timezone
|
|
124
123
|
from django.conf import settings
|
|
125
|
-
from
|
|
124
|
+
from django.utils import timezone
|
|
125
|
+
|
|
126
126
|
from terminusgps.wialon.items import WialonUnit
|
|
127
|
+
from terminusgps.wialon.session import WialonSession
|
|
127
128
|
from terminusgps.wialon.utils import get_hw_type_id
|
|
128
129
|
|
|
129
130
|
timestamp = f"{timezone.now():%Y_%m_%d_%H:%M:%S}"
|
|
File without changes
|
{python_terminusgps-24.0.0.dist-info → python_terminusgps-24.2.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|