python-terminusgps 37.6.8__py3-none-any.whl → 37.7.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.
- {python_terminusgps-37.6.8.dist-info → python_terminusgps-37.7.2.dist-info}/METADATA +1 -1
- {python_terminusgps-37.6.8.dist-info → python_terminusgps-37.7.2.dist-info}/RECORD +8 -8
- terminusgps/authorizenet/profiles/subscriptions.py +2 -2
- terminusgps/authorizenet/utils.py +0 -15
- terminusgps/aws/secrets.py +9 -5
- terminusgps/wialon/items/unit.py +14 -0
- {python_terminusgps-37.6.8.dist-info → python_terminusgps-37.7.2.dist-info}/WHEEL +0 -0
- {python_terminusgps-37.6.8.dist-info → python_terminusgps-37.7.2.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 37.
|
|
3
|
+
Version: 37.7.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://docs.terminusgps.com
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -3,21 +3,21 @@ terminusgps/authorizenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
3
3
|
terminusgps/authorizenet/auth.py,sha256=CKT_pfDEL-53GceOEaFtIU6IBXVuVd8MVHikpPAX0xY,1184
|
|
4
4
|
terminusgps/authorizenet/constants.py,sha256=uXkYVmQPrnYBDfGahVEmzwTny21A8jGcrH7qfSdLhvc,512
|
|
5
5
|
terminusgps/authorizenet/controllers.py,sha256=rMuBwSoKJjte7wVuB1ewaqnzfuDXxwus-d5mkqbfnGE,2193
|
|
6
|
-
terminusgps/authorizenet/utils.py,sha256=
|
|
6
|
+
terminusgps/authorizenet/utils.py,sha256=LosPGnOam97Fk51aoCAIdoyrQRdxV43mXxpZ1TsmPDQ,7042
|
|
7
7
|
terminusgps/authorizenet/validators.py,sha256=Z4JfKMHhMIH9elsmzW-6KHi9TwOlNp3h_uvtRPCX0GI,3822
|
|
8
8
|
terminusgps/authorizenet/profiles/__init__.py,sha256=IG4XCEEYtHKqXOatlZlob6J3ukAgF7cFR-RXxOSMS1c,161
|
|
9
9
|
terminusgps/authorizenet/profiles/addresses.py,sha256=MwJQzq3IrjYCLJzOglLfJIcMvH5osDu1MzN6_XGO0Tc,6376
|
|
10
10
|
terminusgps/authorizenet/profiles/base.py,sha256=Pu1NGrvC5Ox2W1oZuVcPqUw3aUoSK191Evexw1U6_3k,3940
|
|
11
11
|
terminusgps/authorizenet/profiles/customers.py,sha256=0BJoTwaRBe6qGJhM_No6pinrnDjDyWYbtcig0nrCqN8,11799
|
|
12
12
|
terminusgps/authorizenet/profiles/payments.py,sha256=ncuHtnkqm7nJZnKrGuLGm9n7CMPI-fqAzr2G5PKcvoE,11313
|
|
13
|
-
terminusgps/authorizenet/profiles/subscriptions.py,sha256=
|
|
13
|
+
terminusgps/authorizenet/profiles/subscriptions.py,sha256=a8cXFslhV0_iTwmubUjd4EtFglF5acfF_Q8Es0RVVbY,10382
|
|
14
14
|
terminusgps/authorizenet/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
terminusgps/authorizenet/tests/test_auth.py,sha256=qwACQK6R4mu7i6IoSlY015X2ABB9jkTJE9JcHpfiZaQ,1601
|
|
16
16
|
terminusgps/authorizenet/tests/test_profiles.py,sha256=MkpMSU9cgSeLy9bBuZdhdFiPxFT5858u9C8BqAmRhGY,7537
|
|
17
17
|
terminusgps/authorizenet/tests/test_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
terminusgps/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
terminusgps/aws/notifications.py,sha256=76YnACuVIMs5EujEATqcBf8HcCFxs2649fnLx9nSauc,11103
|
|
20
|
-
terminusgps/aws/secrets.py,sha256
|
|
20
|
+
terminusgps/aws/secrets.py,sha256=JmRJYg3gj3yXgANtUSRNamzg5dBrQvRmR5P-AWJRqD8,784
|
|
21
21
|
terminusgps/aws/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
terminusgps/aws/tests/test_notifications.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
terminusgps/aws/tests/test_secrets.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -48,10 +48,10 @@ terminusgps/wialon/items/base.py,sha256=vS8xIo5WLiwzpB81i7aHFnwOHzCf4lQG6azjq79H
|
|
|
48
48
|
terminusgps/wialon/items/resource.py,sha256=L8fZEItLal1fxKW-YUUV6E70WKyf0DtIa7G1fd8ekes,18627
|
|
49
49
|
terminusgps/wialon/items/retranslator.py,sha256=2J1x7lNxRck-IEXrmJ7RM9bVL60mrZkfmczOSiUhiO8,3873
|
|
50
50
|
terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9LyedE,1326
|
|
51
|
-
terminusgps/wialon/items/unit.py,sha256=
|
|
51
|
+
terminusgps/wialon/items/unit.py,sha256=FsOQdCFJPiUp2OuCxzqYI_oEYBWcjgWxicYiNRFkGBM,12590
|
|
52
52
|
terminusgps/wialon/items/unit_group.py,sha256=HhYMZ9b7UATXeEgHkXN9r5-M_w82fabjDYADCUwBtxQ,4442
|
|
53
53
|
terminusgps/wialon/items/user.py,sha256=pR6OTrm6f7Zo0J8eLvKtWVsdhGi430OxMsMMthGh8YE,5382
|
|
54
|
-
python_terminusgps-37.
|
|
55
|
-
python_terminusgps-37.
|
|
56
|
-
python_terminusgps-37.
|
|
57
|
-
python_terminusgps-37.
|
|
54
|
+
python_terminusgps-37.7.2.dist-info/METADATA,sha256=t3YipxIRVLzWVI_-yeEixF-I4nTH2ewwcQiRBF4Db9k,1329
|
|
55
|
+
python_terminusgps-37.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
56
|
+
python_terminusgps-37.7.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
57
|
+
python_terminusgps-37.7.2.dist-info/RECORD,,
|
|
@@ -70,7 +70,7 @@ class SubscriptionProfile(AuthorizenetSubProfileBase):
|
|
|
70
70
|
|
|
71
71
|
"""
|
|
72
72
|
if not self.id:
|
|
73
|
-
return [
|
|
73
|
+
return []
|
|
74
74
|
|
|
75
75
|
subscription = self._authorizenet_get_subscription(
|
|
76
76
|
include_transactions=True
|
|
@@ -84,7 +84,7 @@ class SubscriptionProfile(AuthorizenetSubProfileBase):
|
|
|
84
84
|
return (
|
|
85
85
|
transactions.findall(f"{ANET_XMLNS}arbTransaction")
|
|
86
86
|
if transactions is not None
|
|
87
|
-
else [
|
|
87
|
+
else []
|
|
88
88
|
)
|
|
89
89
|
|
|
90
90
|
@property
|
|
@@ -28,21 +28,6 @@ def calculate_amount_plus_tax(
|
|
|
28
28
|
return round(amount * (1 + tax_rate), ndigits=2)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def get_days_between(start_date: datetime.date, end_date: datetime.date) -> int:
|
|
32
|
-
"""
|
|
33
|
-
Returns the total number of days between two dates.
|
|
34
|
-
|
|
35
|
-
:param start_date: Start date.
|
|
36
|
-
:type start_date: :py:obj:`~datetime.date`
|
|
37
|
-
:param end_date: End date.
|
|
38
|
-
:type end_date: :py:obj:`~datetime.date`
|
|
39
|
-
:returns: The number of days between the dates as an integer.
|
|
40
|
-
:rtype: :py:obj:`int`
|
|
41
|
-
|
|
42
|
-
"""
|
|
43
|
-
return (end_date - start_date).days
|
|
44
|
-
|
|
45
|
-
|
|
46
31
|
def get_merchant_details() -> dict | None:
|
|
47
32
|
"""
|
|
48
33
|
Returns Authorizenet merchant details.
|
terminusgps/aws/secrets.py
CHANGED
|
@@ -5,16 +5,20 @@ import boto3
|
|
|
5
5
|
|
|
6
6
|
def get_secret(name: str, region: str = "us-east-1") -> dict[str, str]:
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
Returns a secret value by name from AWS `secretsmanager`_.
|
|
9
9
|
|
|
10
|
-
:param name: An AWS `secretsmanager
|
|
10
|
+
:param name: An AWS `secretsmanager`_ name.
|
|
11
11
|
:type name: :py:obj:`str`
|
|
12
12
|
:param region: An AWS region name. Default is :py:obj:`"us-east-1"`.
|
|
13
13
|
:type region: :py:obj:`str`
|
|
14
14
|
:returns: A secret value dictionary.
|
|
15
|
-
:rtype: :py:obj:`dict
|
|
15
|
+
:rtype: :py:obj:`dict`\[:py:obj:`str`, :py:obj:`str`\]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.. _secretsmanager: https://docs.aws.amazon.com/secretsmanager/
|
|
16
19
|
|
|
17
20
|
"""
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
session = boto3.Session(profile_name="terminusgps-site-role")
|
|
22
|
+
client = session.client(service_name="secretsmanager", region_name=region)
|
|
23
|
+
secret = client.get_secret_value(**{"SecretId": name})["SecretString"]
|
|
20
24
|
return json.loads(secret)
|
terminusgps/wialon/items/unit.py
CHANGED
|
@@ -114,6 +114,20 @@ class WialonUnit(WialonBase):
|
|
|
114
114
|
response["t"] = datetime.fromtimestamp(response["t"])
|
|
115
115
|
return response
|
|
116
116
|
|
|
117
|
+
def get_command_messages(
|
|
118
|
+
self, start_time: datetime, total: int = 1, count: int = 1
|
|
119
|
+
) -> list[dict[str, str]]:
|
|
120
|
+
return self.session.wialon_api.messages_load_last(
|
|
121
|
+
**{
|
|
122
|
+
"itemId": self.id,
|
|
123
|
+
"lastTime": int(start_time.timestamp()),
|
|
124
|
+
"flags": 0x0200,
|
|
125
|
+
"flagsMask": 0,
|
|
126
|
+
"lastCount": total,
|
|
127
|
+
"loadCount": count,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
|
|
117
131
|
def execute_command(
|
|
118
132
|
self,
|
|
119
133
|
name: str,
|
|
File without changes
|
{python_terminusgps-37.6.8.dist-info → python_terminusgps-37.7.2.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|