python-terminusgps 54.1.2__tar.gz → 54.2.1__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.
Files changed (49) hide show
  1. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/PKG-INFO +1 -1
  2. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/pyproject.toml +1 -1
  3. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/__init__.py +1 -0
  4. python_terminusgps-54.2.1/terminusgps/authorizenet/api/accept.py +46 -0
  5. python_terminusgps-54.2.1/tests/test_wialon.py +63 -0
  6. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/uv.lock +330 -324
  7. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/.github/workflows/python-test.yml +0 -0
  8. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/.github/workflows/sphinx.yml +0 -0
  9. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/.gitignore +0 -0
  10. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/.python-version +0 -0
  11. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/COPYING +0 -0
  12. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/README.md +0 -0
  13. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/dist/.gitignore +0 -0
  14. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/Makefile +0 -0
  15. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/make.bat +0 -0
  16. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/requirements.txt +0 -0
  17. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/authorizenet/api.rst +0 -0
  18. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/authorizenet/constants.rst +0 -0
  19. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/authorizenet/index.rst +0 -0
  20. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/authorizenet/service.rst +0 -0
  21. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/conf.py +0 -0
  22. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/index.rst +0 -0
  23. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/mixins.rst +0 -0
  24. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/validators.rst +0 -0
  25. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/constants.rst +0 -0
  26. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/exceptions.rst +0 -0
  27. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/index.rst +0 -0
  28. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/items.rst +0 -0
  29. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/session.rst +0 -0
  30. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/usage.rst +0 -0
  31. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/docs/source/wialon/utils.rst +0 -0
  32. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/__init__.py +0 -0
  33. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/__init__.py +0 -0
  34. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/address_profiles.py +0 -0
  35. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/customer_profiles.py +0 -0
  36. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/payment_profiles.py +0 -0
  37. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/subscriptions.py +0 -0
  38. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/api/transactions.py +0 -0
  39. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/authorizenet/service.py +0 -0
  40. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/default_settings.py +0 -0
  41. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/mixins.py +0 -0
  42. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/validators.py +0 -0
  43. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/wialon/__init__.py +0 -0
  44. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/wialon/constants.py +0 -0
  45. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/wialon/flags.py +0 -0
  46. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/wialon/session.py +0 -0
  47. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/terminusgps/wialon/utils.py +0 -0
  48. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/tests/__init__.py +0 -0
  49. {python_terminusgps-54.1.2 → python_terminusgps-54.2.1}/tests/test_authorizenet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 54.1.2
3
+ Version: 54.2.1
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-terminusgps"
3
- version = "54.1.2"
3
+ version = "54.2.1"
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" } ]
@@ -1,3 +1,4 @@
1
+ from .accept import *
1
2
  from .address_profiles import *
2
3
  from .customer_profiles import *
3
4
  from .payment_profiles import *
@@ -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 = str(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
@@ -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
+ )