python-terminusgps 37.7.1__py3-none-any.whl → 37.7.3__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.7.1.dist-info → python_terminusgps-37.7.3.dist-info}/METADATA +1 -1
- {python_terminusgps-37.7.1.dist-info → python_terminusgps-37.7.3.dist-info}/RECORD +7 -7
- terminusgps/authorizenet/profiles/customers.py +1 -1
- terminusgps/authorizenet/utils.py +0 -15
- terminusgps/aws/secrets.py +9 -5
- {python_terminusgps-37.7.1.dist-info → python_terminusgps-37.7.3.dist-info}/WHEEL +0 -0
- {python_terminusgps-37.7.1.dist-info → python_terminusgps-37.7.3.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 37.7.
|
|
3
|
+
Version: 37.7.3
|
|
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,12 +3,12 @@ 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
|
-
terminusgps/authorizenet/profiles/customers.py,sha256=
|
|
11
|
+
terminusgps/authorizenet/profiles/customers.py,sha256=u5qe-oRHrtf2xxh_gJ3sYnNDDIa-SjhigMJqKMLaenY,11804
|
|
12
12
|
terminusgps/authorizenet/profiles/payments.py,sha256=ncuHtnkqm7nJZnKrGuLGm9n7CMPI-fqAzr2G5PKcvoE,11313
|
|
13
13
|
terminusgps/authorizenet/profiles/subscriptions.py,sha256=a8cXFslhV0_iTwmubUjd4EtFglF5acfF_Q8Es0RVVbY,10382
|
|
14
14
|
terminusgps/authorizenet/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -17,7 +17,7 @@ terminusgps/authorizenet/tests/test_profiles.py,sha256=MkpMSU9cgSeLy9bBuZdhdFiPx
|
|
|
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
|
|
@@ -51,7 +51,7 @@ terminusgps/wialon/items/route.py,sha256=2dEUK9o8nwutPE03W-5GUcZrjGvbwLoExVnFV9L
|
|
|
51
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.7.
|
|
55
|
-
python_terminusgps-37.7.
|
|
56
|
-
python_terminusgps-37.7.
|
|
57
|
-
python_terminusgps-37.7.
|
|
54
|
+
python_terminusgps-37.7.3.dist-info/METADATA,sha256=7-6-rkfD_qjI5VJPPnTWHFQA36YB8YgrWR9ooBDYgDA,1329
|
|
55
|
+
python_terminusgps-37.7.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
56
|
+
python_terminusgps-37.7.3.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
57
|
+
python_terminusgps-37.7.3.dist-info/RECORD,,
|
|
@@ -258,7 +258,7 @@ class CustomerProfile(AuthorizenetProfileBase):
|
|
|
258
258
|
if self.id:
|
|
259
259
|
request.customerProfileId = self.id
|
|
260
260
|
if self._merchant_id:
|
|
261
|
-
request.merchantCustomerId = self._merchant_id
|
|
261
|
+
request.merchantCustomerId = str(self._merchant_id)
|
|
262
262
|
if self._email:
|
|
263
263
|
request.email = self._email
|
|
264
264
|
|
|
@@ -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)
|
|
File without changes
|
{python_terminusgps-37.7.1.dist-info → python_terminusgps-37.7.3.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|