python-terminusgps 48.0.1__tar.gz → 49.0.0__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.
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/PKG-INFO +2 -1
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/conf.py +1 -1
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/constants.rst +8 -5
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/pyproject.toml +2 -1
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/transactions.py +31 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/constants.py +103 -0
- python_terminusgps-49.0.0/uv.lock +1117 -0
- python_terminusgps-48.0.1/uv.lock +0 -611
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/.github/workflows/sphinx.yml +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/.gitignore +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/.python-version +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/COPYING +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/README.md +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/Makefile +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/make.bat +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/requirements.txt +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/authorizenet/api.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/authorizenet/constants.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/authorizenet/index.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/authorizenet/service.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/index.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/mixins.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/validators.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/exceptions.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/index.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/items.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/session.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/usage.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/docs/source/wialon/utils.rst +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/__init__.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/__init__.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/address_profiles.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/customer_profiles.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/payment_profiles.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/subscriptions.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/constants.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/service.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/default_settings.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/mixins.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/validators.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/__init__.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/account.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/base.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/factory.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/resource.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/retranslator.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/route.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/unit.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/unit_group.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/items/user.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/session.py +0 -0
- {python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/wialon/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version:
|
|
3
|
+
Version: 49.0.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://terminusgps.github.io/python-terminusgps
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
Requires-Dist: authorizenet>=1.1.5
|
|
15
15
|
Requires-Dist: django>=5.2.7
|
|
16
|
+
Requires-Dist: py-aiowialon>=1.3.5
|
|
16
17
|
Requires-Dist: python-wialon>=1.2.4
|
|
17
18
|
Description-Content-Type: text/markdown
|
|
18
19
|
|
|
@@ -12,7 +12,7 @@ sys.path.insert(0, os.path.abspath("../../"))
|
|
|
12
12
|
project = "python-terminusgps"
|
|
13
13
|
copyright = "2025, Terminus GPS, LLC"
|
|
14
14
|
author = "Terminus GPS, LLC"
|
|
15
|
-
release = "
|
|
15
|
+
release = "49.0.0"
|
|
16
16
|
|
|
17
17
|
# -- General configuration ---------------------------------------------------
|
|
18
18
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
@@ -3,14 +3,17 @@ Constants
|
|
|
3
3
|
|
|
4
4
|
.. currentmodule:: terminusgps.wialon.constants
|
|
5
5
|
|
|
6
|
-
.. autoclass::
|
|
6
|
+
.. autoclass:: WialonMonthDayMask
|
|
7
7
|
:members:
|
|
8
|
+
:member-order: bysource
|
|
8
9
|
|
|
9
|
-
..
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
.. autoclass:: WialonMonthMask
|
|
11
|
+
:members:
|
|
12
|
+
:member-order: bysource
|
|
12
13
|
|
|
13
|
-
..
|
|
14
|
+
.. autoclass:: WialonWeekDayMask
|
|
15
|
+
:members:
|
|
16
|
+
:member-order: bysource
|
|
14
17
|
|
|
15
18
|
.. currentmodule:: terminusgps.wialon.flags
|
|
16
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-terminusgps"
|
|
3
|
-
version = "
|
|
3
|
+
version = "49.0.0"
|
|
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" } ]
|
|
@@ -14,6 +14,7 @@ requires-python = ">=3.12"
|
|
|
14
14
|
dependencies = [
|
|
15
15
|
"authorizenet>=1.1.5",
|
|
16
16
|
"django>=5.2.7",
|
|
17
|
+
"py-aiowialon>=1.3.5",
|
|
17
18
|
"python-wialon>=1.2.4",
|
|
18
19
|
]
|
|
19
20
|
|
{python_terminusgps-48.0.1 → python_terminusgps-49.0.0}/terminusgps/authorizenet/api/transactions.py
RENAMED
|
@@ -9,6 +9,7 @@ __all__ = [
|
|
|
9
9
|
"authorize_credit_card",
|
|
10
10
|
"capture_authorized_amount",
|
|
11
11
|
"refund_credit_card",
|
|
12
|
+
"charge_customer_profile",
|
|
12
13
|
]
|
|
13
14
|
|
|
14
15
|
|
|
@@ -199,3 +200,33 @@ def void_transaction(
|
|
|
199
200
|
apicontractsv1.transactionTypeEnum.voidTransaction
|
|
200
201
|
)
|
|
201
202
|
return request, apicontrollers.createTransactionController
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def charge_customer_profile(
|
|
206
|
+
customer_profile_id: int, payment_profile_id: int, amount: Decimal
|
|
207
|
+
) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
|
|
208
|
+
"""
|
|
209
|
+
`Charges a customer profile <https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-customer-profile>_`.
|
|
210
|
+
|
|
211
|
+
:param customer_profile_id: An Authorizenet customer profile id.
|
|
212
|
+
:type customer_profile_id: int
|
|
213
|
+
:param payment_profile_id: An Authorizenet payment profile id.
|
|
214
|
+
:type payment_profile_id: int
|
|
215
|
+
:param amount: Amount to change the customer profile.
|
|
216
|
+
:type amount: ~decimal.Decimal
|
|
217
|
+
:returns: A tuple containing an Authorizenet API request element and controller class.
|
|
218
|
+
:rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
|
|
219
|
+
|
|
220
|
+
"""
|
|
221
|
+
profile = apicontractsv1.customerProfilePaymentType()
|
|
222
|
+
profile.customerProfileId = str(customer_profile_id)
|
|
223
|
+
profile.paymentProfile = apicontractsv1.paymentProfile()
|
|
224
|
+
profile.paymentProfile.paymentProfileId = str(payment_profile_id)
|
|
225
|
+
request = apicontractsv1.createTransactionRequest()
|
|
226
|
+
request.transactionRequest = apicontractsv1.transactionRequestType()
|
|
227
|
+
request.transactionRequest.amount = amount
|
|
228
|
+
request.transactionRequest.profile = profile
|
|
229
|
+
request.transactionRequest.transactionType = (
|
|
230
|
+
apicontractsv1.transactionTypeEnum.authCaptureTransaction
|
|
231
|
+
)
|
|
232
|
+
return request, apicontrollers.createTransactionController
|
|
@@ -2,6 +2,109 @@ import enum
|
|
|
2
2
|
|
|
3
3
|
from . import flags
|
|
4
4
|
|
|
5
|
+
WialonMonthDayMask = enum.IntEnum(
|
|
6
|
+
"WialonMonthDayMask",
|
|
7
|
+
{
|
|
8
|
+
f"DAY_{day}": mask
|
|
9
|
+
for day, mask in {
|
|
10
|
+
1: 2**0,
|
|
11
|
+
2: 2**1,
|
|
12
|
+
3: 2**2,
|
|
13
|
+
4: 2**3,
|
|
14
|
+
5: 2**4,
|
|
15
|
+
6: 2**5,
|
|
16
|
+
7: 2**6,
|
|
17
|
+
8: 2**7,
|
|
18
|
+
9: 2**8,
|
|
19
|
+
10: 2**9,
|
|
20
|
+
11: 2**10,
|
|
21
|
+
12: 2**11,
|
|
22
|
+
13: 2**12,
|
|
23
|
+
14: 2**13,
|
|
24
|
+
15: 2**14,
|
|
25
|
+
16: 2**15,
|
|
26
|
+
17: 2**16,
|
|
27
|
+
18: 2**17,
|
|
28
|
+
19: 2**18,
|
|
29
|
+
20: 2**19,
|
|
30
|
+
21: 2**20,
|
|
31
|
+
22: 2**21,
|
|
32
|
+
23: 2**22,
|
|
33
|
+
24: 2**23,
|
|
34
|
+
25: 2**24,
|
|
35
|
+
26: 2**25,
|
|
36
|
+
27: 2**26,
|
|
37
|
+
28: 2**27,
|
|
38
|
+
29: 2**28,
|
|
39
|
+
30: 2**29,
|
|
40
|
+
31: 2**30,
|
|
41
|
+
}.items()
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
Wialon day of the month mask.
|
|
46
|
+
|
|
47
|
+
Usage:
|
|
48
|
+
|
|
49
|
+
.. code::
|
|
50
|
+
|
|
51
|
+
# First of the month
|
|
52
|
+
>> WialonMonthDayMask.DAY_1
|
|
53
|
+
> 1
|
|
54
|
+
# 16th day of the month
|
|
55
|
+
>> WialonMonthDayMask.DAY_16
|
|
56
|
+
> 32768
|
|
57
|
+
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class WialonMonthMask(enum.IntEnum):
|
|
62
|
+
"""Wialon month mask."""
|
|
63
|
+
|
|
64
|
+
JANUARY = 2**0
|
|
65
|
+
"""January."""
|
|
66
|
+
FEBRUARY = 2**1
|
|
67
|
+
"""February."""
|
|
68
|
+
MARCH = 2**2
|
|
69
|
+
"""March."""
|
|
70
|
+
APRIL = 2**3
|
|
71
|
+
"""April."""
|
|
72
|
+
MAY = 2**4
|
|
73
|
+
"""May."""
|
|
74
|
+
JUNE = 2**5
|
|
75
|
+
"""June."""
|
|
76
|
+
JULY = 2**6
|
|
77
|
+
"""July."""
|
|
78
|
+
AUGUST = 2**7
|
|
79
|
+
"""August."""
|
|
80
|
+
SEPTEMBER = 2**8
|
|
81
|
+
"""September."""
|
|
82
|
+
OCTOBER = 2**9
|
|
83
|
+
"""October."""
|
|
84
|
+
NOVEMBER = 2**10
|
|
85
|
+
"""November."""
|
|
86
|
+
DECEMBER = 2**11
|
|
87
|
+
"""December."""
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class WialonWeekDayMask(enum.IntEnum):
|
|
91
|
+
"""Wialon day of the week mask."""
|
|
92
|
+
|
|
93
|
+
MONDAY = 2**0
|
|
94
|
+
"""Monday."""
|
|
95
|
+
TUESDAY = 2**1
|
|
96
|
+
"""Tuesday."""
|
|
97
|
+
WEDNESDAY = 2**2
|
|
98
|
+
"""Wednesday."""
|
|
99
|
+
THURSDAY = 2**3
|
|
100
|
+
"""Thursday."""
|
|
101
|
+
FRIDAY = 2**4
|
|
102
|
+
"""Friday."""
|
|
103
|
+
SATURDAY = 2**5
|
|
104
|
+
"""Saturday."""
|
|
105
|
+
SUNDAY = 2**6
|
|
106
|
+
"""Sunday."""
|
|
107
|
+
|
|
5
108
|
|
|
6
109
|
class WialonLogAction(enum.StrEnum):
|
|
7
110
|
"""Wialon `log actions <https://wialon-help.link/28412fdb>`_."""
|