python-terminusgps 54.1.0__tar.gz → 54.2.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-54.1.0 → python_terminusgps-54.2.0}/PKG-INFO +2 -2
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/conf.py +1 -1
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/pyproject.toml +2 -2
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/__init__.py +1 -0
- python_terminusgps-54.2.0/terminusgps/authorizenet/api/accept.py +46 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/service.py +1 -1
- python_terminusgps-54.2.0/tests/test_wialon.py +63 -0
- python_terminusgps-54.2.0/uv.lock +1238 -0
- python_terminusgps-54.1.0/htmlcov/.gitignore +0 -2
- python_terminusgps-54.1.0/uv.lock +0 -1216
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/.github/workflows/python-test.yml +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/.github/workflows/sphinx.yml +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/.gitignore +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/.python-version +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/COPYING +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/README.md +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/dist/.gitignore +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/Makefile +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/make.bat +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/requirements.txt +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/authorizenet/api.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/authorizenet/constants.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/authorizenet/index.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/authorizenet/service.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/index.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/mixins.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/validators.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/constants.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/exceptions.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/index.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/items.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/session.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/usage.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/docs/source/wialon/utils.rst +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/__init__.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/__init__.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/address_profiles.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/customer_profiles.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/payment_profiles.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/subscriptions.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/authorizenet/api/transactions.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/default_settings.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/mixins.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/validators.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/wialon/__init__.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/wialon/constants.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/wialon/flags.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/wialon/session.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/terminusgps/wialon/utils.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/tests/__init__.py +0 -0
- {python_terminusgps-54.1.0 → python_terminusgps-54.2.0}/tests/test_authorizenet.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 54.
|
|
3
|
+
Version: 54.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://terminusgps.github.io/python-terminusgps
|
|
6
6
|
Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
Requires-Dist: authorizenet>=1.1.5
|
|
15
|
-
Requires-Dist: django>=6.0.
|
|
15
|
+
Requires-Dist: django>=6.0.3
|
|
16
16
|
Requires-Dist: py-aiowialon>=1.3.5
|
|
17
17
|
Requires-Dist: python-wialon>=1.2.4
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -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 = "54.1.0"
|
|
16
16
|
|
|
17
17
|
# -- General configuration ---------------------------------------------------
|
|
18
18
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-terminusgps"
|
|
3
|
-
version = "54.
|
|
3
|
+
version = "54.2.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" } ]
|
|
@@ -13,7 +13,7 @@ classifiers = [
|
|
|
13
13
|
requires-python = ">=3.12"
|
|
14
14
|
dependencies = [
|
|
15
15
|
"authorizenet>=1.1.5",
|
|
16
|
-
"django>=6.0.
|
|
16
|
+
"django>=6.0.3",
|
|
17
17
|
"py-aiowialon>=1.3.5",
|
|
18
18
|
"python-wialon>=1.2.4",
|
|
19
19
|
]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from authorizenet import apicontractsv1, apicontrollers
|
|
2
|
+
from authorizenet.apicontrollersbase import APIOperationBase
|
|
3
|
+
from lxml.objectify import ObjectifiedElement
|
|
4
|
+
|
|
5
|
+
__all__ = ["get_accept_customer_profile_page", "get_accept_payment_page"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_accept_customer_profile_page(
|
|
9
|
+
customer_profile_id: int, settings: apicontractsv1.ArrayOfSetting
|
|
10
|
+
) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
|
|
11
|
+
"""
|
|
12
|
+
`getHostedProfilePageRequest <https://developer.authorize.net/api/reference/index.html#accept-suite-create-an-accept-payment-transaction>`_.
|
|
13
|
+
|
|
14
|
+
:param customer_profile_id: An Authorizenet customer profile id.
|
|
15
|
+
:type customer_profile_id: int
|
|
16
|
+
:param settings: Hosted customer profile page settings.
|
|
17
|
+
:type settings: ~authorizenet.apicontractsv1.ArrayOfSetting
|
|
18
|
+
:returns: A tuple containing an Authorizenet API request element and controller class.
|
|
19
|
+
:rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
request = apicontractsv1.getHostedProfilePageRequest()
|
|
23
|
+
request.customerProfileId = customer_profile_id
|
|
24
|
+
request.hostedProfileSettings = settings
|
|
25
|
+
return request, apicontrollers.getHostedProfilePageController
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_accept_payment_page(
|
|
29
|
+
transaction_request: apicontractsv1.transactionRequestType,
|
|
30
|
+
settings: apicontractsv1.ArrayOfSetting,
|
|
31
|
+
) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
|
|
32
|
+
"""
|
|
33
|
+
`getHostedPaymentPageRequest <https://developer.authorize.net/api/reference/index.html#accept-suite-get-an-accept-payment-page>`_.
|
|
34
|
+
|
|
35
|
+
:param transaction_request: A transaction request.
|
|
36
|
+
:type transaction_request: ~authorizenet.apicontractsv1.transactionRequestType
|
|
37
|
+
:param settings: Hosted payment page settings.
|
|
38
|
+
:type settings: ~authorizenet.apicontractsv1.ArrayOfSetting
|
|
39
|
+
:returns: A tuple containing an Authorizenet API request element and controller class.
|
|
40
|
+
:rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
|
|
41
|
+
|
|
42
|
+
"""
|
|
43
|
+
request = apicontractsv1.getHostedPaymentPageRequest()
|
|
44
|
+
request.transactionRequest = transaction_request
|
|
45
|
+
request.hostedPaymentSettings = settings
|
|
46
|
+
return request, apicontrollers.getHostedPaymentPageController
|
|
@@ -62,7 +62,7 @@ class AuthorizenetService:
|
|
|
62
62
|
message="No response from the Authorizenet API controller.",
|
|
63
63
|
code="1",
|
|
64
64
|
)
|
|
65
|
-
elif response
|
|
65
|
+
elif response.messages.resultCode != "Ok":
|
|
66
66
|
raise AuthorizenetError(
|
|
67
67
|
message=response.messages.message[0]["text"].text,
|
|
68
68
|
code=response.messages.message[0]["code"].text,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from unittest import TestCase
|
|
2
|
+
|
|
3
|
+
from terminusgps.wialon import constants, flags
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class WialonConstantTestCase(TestCase):
|
|
7
|
+
def test_accessmask_resource_basic(self):
|
|
8
|
+
"""Fails if :py:data:`ACCESSMASK_RESOURCE_BASIC` wasn't the expected flag."""
|
|
9
|
+
const = constants.ACCESSMASK_RESOURCE_BASIC
|
|
10
|
+
self.assertEqual(
|
|
11
|
+
const,
|
|
12
|
+
(
|
|
13
|
+
flags.AccessFlag.MANAGE_CUSTOM_FIELDS
|
|
14
|
+
| flags.AccessFlag.RESOURCE_MANAGE_DRIVERS
|
|
15
|
+
| flags.AccessFlag.RESOURCE_MANAGE_GEOFENCES
|
|
16
|
+
| flags.AccessFlag.RESOURCE_MANAGE_NOTIFICATIONS
|
|
17
|
+
| flags.AccessFlag.RESOURCE_VIEW_DRIVERS
|
|
18
|
+
| flags.AccessFlag.RESOURCE_VIEW_GEOFENCES
|
|
19
|
+
| flags.AccessFlag.RESOURCE_VIEW_NOTIFICATIONS
|
|
20
|
+
| flags.AccessFlag.RESOURCE_VIEW_ORDERS
|
|
21
|
+
| flags.AccessFlag.RESOURCE_VIEW_POIS
|
|
22
|
+
| flags.AccessFlag.RESOURCE_VIEW_TRAILERS
|
|
23
|
+
| flags.AccessFlag.VIEW_ADMIN_FIELDS
|
|
24
|
+
| flags.AccessFlag.VIEW_CUSTOM_FIELDS
|
|
25
|
+
| flags.AccessFlag.VIEW_ITEM_BASIC
|
|
26
|
+
),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
def test_accessmask_unit_basic(self):
|
|
30
|
+
"""Fails if :py:data:`ACCESSMASK_UNIT_BASIC` wasn't the expected flag."""
|
|
31
|
+
const = constants.ACCESSMASK_UNIT_BASIC
|
|
32
|
+
self.assertEqual(
|
|
33
|
+
const,
|
|
34
|
+
(
|
|
35
|
+
flags.AccessFlag.MANAGE_CUSTOM_FIELDS
|
|
36
|
+
| flags.AccessFlag.MANAGE_ICON
|
|
37
|
+
| flags.AccessFlag.QUERY_REPORTS
|
|
38
|
+
| flags.AccessFlag.RENAME_ITEM
|
|
39
|
+
| flags.AccessFlag.UNIT_EXECUTE_COMMANDS
|
|
40
|
+
| flags.AccessFlag.UNIT_EXPORT_MESSAGES
|
|
41
|
+
| flags.AccessFlag.UNIT_IMPORT_MESSAGES
|
|
42
|
+
| flags.AccessFlag.UNIT_REGISTER_EVENTS
|
|
43
|
+
| flags.AccessFlag.UNIT_VIEW_SERVICE_INTERVALS
|
|
44
|
+
| flags.AccessFlag.VIEW_ATTACHED_FILES
|
|
45
|
+
| flags.AccessFlag.VIEW_CUSTOM_FIELDS
|
|
46
|
+
| flags.AccessFlag.VIEW_ITEM_BASIC
|
|
47
|
+
| flags.AccessFlag.VIEW_ITEM_DETAILED
|
|
48
|
+
),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def test_accessmask_unit_migration(self):
|
|
52
|
+
"""Fails if :py:data:`ACCESSMASK_UNIT_MIGRATION` wasn't the expected flag."""
|
|
53
|
+
const = constants.ACCESSMASK_UNIT_MIGRATION
|
|
54
|
+
self.assertEqual(
|
|
55
|
+
const,
|
|
56
|
+
(
|
|
57
|
+
flags.AccessFlag.DELETE_ITEM
|
|
58
|
+
| flags.AccessFlag.MANAGE_ITEM_ACCESS
|
|
59
|
+
| flags.AccessFlag.UNIT_DELETE_MESSAGES
|
|
60
|
+
| flags.AccessFlag.UNIT_MANAGE_CONNECTIVITY
|
|
61
|
+
| flags.AccessFlag.VIEW_ITEM_BASIC
|
|
62
|
+
),
|
|
63
|
+
)
|