python-terminusgps 43.0.1__tar.gz → 43.1.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.
Files changed (76) hide show
  1. python_terminusgps-43.1.0/.github/workflows/sphinx.yml +26 -0
  2. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/.gitignore +1 -0
  3. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/PKG-INFO +2 -2
  4. python_terminusgps-43.1.0/docs/CNAME +1 -0
  5. python_terminusgps-43.1.0/docs/requirements.txt +4 -0
  6. python_terminusgps-43.1.0/docs/source/authorizenet/api.rst +38 -0
  7. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/authorizenet/controllers.rst +0 -3
  8. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/authorizenet/index.rst +2 -3
  9. python_terminusgps-43.1.0/docs/source/authorizenet/usage.rst +20 -0
  10. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/conf.py +3 -11
  11. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/django/mixins.rst +0 -1
  12. python_terminusgps-43.1.0/docs/source/wialon/index.rst +10 -0
  13. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/wialon/session.rst +0 -1
  14. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/pyproject.toml +6 -4
  15. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/address_profiles.py +8 -8
  16. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/customer_profiles.py +6 -6
  17. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/payment_profiles.py +11 -10
  18. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/subscriptions.py +27 -27
  19. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/session.py +10 -9
  20. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/uv.lock +8 -6
  21. python_terminusgps-43.0.1/docs/source/authorizenet/examples.rst +0 -165
  22. python_terminusgps-43.0.1/docs/source/authorizenet/profiles.rst +0 -23
  23. python_terminusgps-43.0.1/docs/source/authorizenet/subscriptions.rst +0 -5
  24. python_terminusgps-43.0.1/docs/source/authorizenet/utils.rst +0 -5
  25. python_terminusgps-43.0.1/docs/source/wialon/constants.rst +0 -20
  26. python_terminusgps-43.0.1/docs/source/wialon/errors.rst +0 -10
  27. python_terminusgps-43.0.1/docs/source/wialon/examples.rst +0 -339
  28. python_terminusgps-43.0.1/docs/source/wialon/flags.rst +0 -16
  29. python_terminusgps-43.0.1/docs/source/wialon/index.rst +0 -30
  30. python_terminusgps-43.0.1/docs/source/wialon/items.rst +0 -37
  31. python_terminusgps-43.0.1/docs/source/wialon/utils.rst +0 -28
  32. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/COPYING +0 -0
  33. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/README.md +0 -0
  34. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/Makefile +0 -0
  35. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/make.bat +0 -0
  36. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/authorizenet/auth.rst +0 -0
  37. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/authorizenet/constants.rst +0 -0
  38. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/authorizenet/validators.rst +0 -0
  39. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/django/forms.rst +0 -0
  40. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/django/index.rst +0 -0
  41. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/django/settings.rst +0 -0
  42. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/django/validators.rst +0 -0
  43. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/docs/source/index.rst +0 -0
  44. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/__init__.py +0 -0
  45. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/__init__.py +0 -0
  46. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/__init__.py +0 -0
  47. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/api/transactions.py +0 -0
  48. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/auth.py +0 -0
  49. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/constants.py +0 -0
  50. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/controllers.py +0 -0
  51. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/authorizenet/validators.py +0 -0
  52. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/__init__.py +0 -0
  53. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/forms/__init__.py +0 -0
  54. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/forms/fields.py +0 -0
  55. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/forms/forms.py +0 -0
  56. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/forms/renderer.py +0 -0
  57. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/forms/widgets.py +0 -0
  58. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/mixins.py +0 -0
  59. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/settings.py +0 -0
  60. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/utils.py +0 -0
  61. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/django/validators.py +0 -0
  62. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/__init__.py +0 -0
  63. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/constants.py +0 -0
  64. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/flags.py +0 -0
  65. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/__init__.py +0 -0
  66. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/account.py +0 -0
  67. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/base.py +0 -0
  68. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/factory.py +0 -0
  69. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/resource.py +0 -0
  70. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/retranslator.py +0 -0
  71. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/route.py +0 -0
  72. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/unit.py +0 -0
  73. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/unit_group.py +0 -0
  74. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/items/user.py +0 -0
  75. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/utils.py +0 -0
  76. {python_terminusgps-43.0.1 → python_terminusgps-43.1.0}/terminusgps/wialon/validators.py +0 -0
@@ -0,0 +1,26 @@
1
+ name: "Sphinx: Render docs"
2
+ on: push
3
+
4
+ jobs:
5
+ builds:
6
+ runs-on: ubuntu-latest
7
+ permissions:
8
+ contents: write
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ with:
12
+ persist-credentials: false
13
+ - name: Build HTML
14
+ uses: ammaraskar/sphinx-action@8.2.3
15
+ - name: Upload artifacts
16
+ uses: actions/upload-artifact@v4
17
+ with:
18
+ name: html-docs
19
+ path: docs/build/html/
20
+ - name: Deploy
21
+ uses: peaceiris/actions-gh-pages@v3
22
+ if: github.ref == 'refs/heads/main'
23
+ with:
24
+ github_token: ${{ secrets.GITHUB_TOKEN }}
25
+ publish_dir: docs/build/html
26
+
@@ -1,5 +1,6 @@
1
1
  .*
2
2
  !.gitignore
3
+ !.github
3
4
 
4
5
  # Python-generated files
5
6
  __pycache__/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 43.0.1
3
+ Version: 43.1.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://docs.terminusgps.com
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>=5.1.5
15
+ Requires-Dist: django>=5.2.6
16
16
  Requires-Dist: python-wialon>=1.2.4
17
17
  Description-Content-Type: text/markdown
18
18
 
@@ -0,0 +1 @@
1
+ docs.terminusgps.com
@@ -0,0 +1,4 @@
1
+ django>=5.2.1
2
+ furo==2024.04.27
3
+ python-wialon>=1.2.4
4
+ sphinxawesome-theme>=5.3.2
@@ -0,0 +1,38 @@
1
+ Authorizenet API Endpoints
2
+ ==========================
3
+
4
+ ================
5
+ Address Profiles
6
+ ================
7
+
8
+ .. automodule:: terminusgps.authorizenet.api.address_profiles
9
+ :members:
10
+
11
+ =================
12
+ Customer Profiles
13
+ =================
14
+
15
+ .. automodule:: terminusgps.authorizenet.api.customer_profiles
16
+ :members:
17
+
18
+ ================
19
+ Payment Profiles
20
+ ================
21
+
22
+ .. automodule:: terminusgps.authorizenet.api.payment_profiles
23
+ :members:
24
+
25
+ =============
26
+ Subscriptions
27
+ =============
28
+
29
+ .. automodule:: terminusgps.authorizenet.api.subscriptions
30
+ :members:
31
+
32
+ ============
33
+ Transactions
34
+ ============
35
+
36
+ .. automodule:: terminusgps.authorizenet.api.transactions
37
+ :members:
38
+
@@ -1,7 +1,4 @@
1
1
  API Controllers
2
2
  ===============
3
3
 
4
- .. autoclass:: terminusgps.authorizenet.controllers.AuthorizenetControllerExecutor
5
- :members:
6
-
7
4
  .. autoexception:: terminusgps.authorizenet.controllers.AuthorizenetControllerExecutionError
@@ -7,10 +7,9 @@ Authorizenet API
7
7
  :maxdepth: 2
8
8
  :caption: Contents:
9
9
 
10
+ api.rst
10
11
  auth.rst
11
12
  constants.rst
12
13
  controllers.rst
13
- profiles.rst
14
- subscriptions.rst
15
- utils.rst
14
+ usage.rst
16
15
  validators.rst
@@ -0,0 +1,20 @@
1
+ Usage
2
+ =====
3
+
4
+ Check the Authorizenet API documentation for expected attributes in each response.
5
+
6
+ .. code:: python
7
+
8
+ from terminusgps.authorizenet import api as anet
9
+
10
+ # An Authorizenet 'createCustomerProfileRequest'
11
+ response = anet.create_customer_profile(
12
+ merchant_id="1",
13
+ email="blake@terminusgps.com",
14
+ description="Blake Nall"
15
+ )
16
+
17
+ # Authorizenet API calls may return None
18
+ # Check first before trying to access attributes on it
19
+ if response is not None and hasattr(response, "customerProfileId"):
20
+ response.customerProfileId
@@ -8,23 +8,16 @@
8
8
  import os
9
9
  import sys
10
10
 
11
- import django
12
- from sphinxawesome_theme.postprocess import Icons
13
-
14
- sys.path.insert(0, os.path.abspath("../.."))
15
- os.environ["DJANGO_SETTINGS_MODULE"] = "terminusgps.django.settings"
16
- django.setup()
17
-
11
+ sys.path.insert(0, os.path.abspath("../../"))
18
12
  project = "python-terminusgps"
19
13
  copyright = "2025, Terminus GPS, LLC"
20
14
  author = "Terminus GPS, LLC"
21
- release = "43.0.1"
15
+ release = "43.1.0"
22
16
 
23
17
  # -- General configuration ---------------------------------------------------
24
18
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
25
19
 
26
20
  extensions = [
27
- "autoclasstoc",
28
21
  "sphinx.ext.autodoc",
29
22
  "sphinx.ext.autosummary",
30
23
  "sphinx.ext.intersphinx",
@@ -32,7 +25,7 @@ extensions = [
32
25
  ]
33
26
 
34
27
  intersphinx_mapping = {
35
- "python": ("https://docs.python.org/3", None),
28
+ "python": ("https://docs.python.org/3/", None),
36
29
  "django": (
37
30
  "http://docs.djangoproject.com/en/stable/",
38
31
  "http://docs.djangoproject.com/en/stable/_objects/",
@@ -47,7 +40,6 @@ exclude_patterns = []
47
40
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
48
41
 
49
42
  html_theme = "sphinxawesome_theme"
50
- html_permalinks_icon = Icons.permalinks_icon
51
43
  pygments_style = "sas"
52
44
  pygments_style_dark = "lightbulb"
53
45
  html_static_path = ["_static"]
@@ -3,7 +3,6 @@ Mixins
3
3
 
4
4
  .. autoclass:: terminusgps.django.mixins.HtmxTemplateResponseMixin
5
5
  :members:
6
- :autoclasstoc:
7
6
 
8
7
  =====
9
8
  Usage
@@ -0,0 +1,10 @@
1
+ Wialon API
2
+ ==========
3
+
4
+ :py:mod:`terminusgps` offers the :py:mod:`wialon` package.
5
+
6
+ .. toctree::
7
+ :maxdepth: 2
8
+ :caption: Contents:
9
+
10
+ session.rst
@@ -4,7 +4,6 @@ Wialon API Sessions
4
4
  .. autoclass:: terminusgps.wialon.session.WialonSession
5
5
  :members:
6
6
  :class-doc-from: init
7
- :autoclasstoc:
8
7
 
9
8
 
10
9
  =====
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-terminusgps"
3
- version = "43.0.1"
3
+ version = "43.1.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>=5.1.5",
16
+ "django>=5.2.6",
17
17
  "python-wialon>=1.2.4",
18
18
  ]
19
19
 
@@ -70,8 +70,10 @@ skip-magic-trailing-comma = true
70
70
 
71
71
  [dependency-groups]
72
72
  dev = [
73
- "autoclasstoc>=1.7.0",
74
73
  "django-stubs>=5.1.3",
75
- "sphinx>=8.1.3",
74
+ ]
75
+ docs = [
76
+ "autoclasstoc>=1.7.0",
77
+ "sphinx>=8.2.3",
76
78
  "sphinxawesome-theme>=5.3.2",
77
79
  ]
@@ -15,18 +15,18 @@ __all__ = [
15
15
  def create_customer_shipping_address(
16
16
  customer_profile_id: int,
17
17
  address: apicontractsv1.customerAddressType,
18
- default: bool = True,
18
+ default: bool = False,
19
19
  ) -> ObjectifiedElement | None:
20
20
  """
21
21
  `createCustomerShippingAddressRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-shipping-address>`_.
22
22
 
23
23
  :param customer_profile_id: An Authorizenet customer profile id.
24
24
  :type customer_profile_id: :py:obj:`int`
25
- :param elem: An Authorizenet customer address element.
26
- :type elem: :py:obj:`~authorizenet.apicontractsv1.customerAddressType`
27
- :param default: Whether or not to mark the new shipping address as default. Default is :py:obj:`True`.
25
+ :param address: An Authorizenet customer address element.
26
+ :type address: :py:obj:`~authorizenet.apicontractsv1.customerAddressType`
27
+ :param default: Whether to set the address profile as default. Default is :py:obj:`False`.
28
28
  :type default: :py:obj:`bool`
29
- :returns: An Authorizenet createCustomerShippingAddress response.
29
+ :returns: An Authorizenet createCustomerShippingAddressResponse element.
30
30
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
31
31
 
32
32
  """
@@ -51,7 +51,7 @@ def get_customer_shipping_address(
51
51
  :type customer_profile_id: :py:obj:`int`
52
52
  :param address_profile_id: An Authorizenet customer address profile id.
53
53
  :type address_profile_id: :py:obj:`int`
54
- :returns: An Authorizenet getCustomerShippingAddress response.
54
+ :returns: An Authorizenet getCustomerShippingAddressResponse element.
55
55
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
56
56
 
57
57
  """
@@ -77,9 +77,9 @@ def update_customer_shipping_address(
77
77
  :type customer_profile_id: :py:obj:`int`
78
78
  :param address: An Authorizenet customer address element.
79
79
  :type address: :py:obj:`~authorizenet.apicontractsv1.customerAddressType`
80
- :param default: Whether or not to mark the new shipping address as default. Default is :py:obj:`False`.
80
+ :param default: Whether to set the address profile as default. Default is :py:obj:`False`.
81
81
  :type default: :py:obj:`bool`
82
- :returns: An Authorizenet updateCustomerShippingAddress response.
82
+ :returns: An Authorizenet updateCustomerShippingAddressResponse element.
83
83
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
84
84
 
85
85
  """
@@ -25,7 +25,7 @@ def create_customer_profile(
25
25
  :type email: :py:obj:`str`
26
26
  :param description: An optional customer description.
27
27
  :type description: :py:obj:`str`
28
- :returns: An Authorizenet createCustomerProfile response.
28
+ :returns: An Authorizenet createCustomerProfileResponse element.
29
29
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
30
30
 
31
31
  """
@@ -49,9 +49,9 @@ def get_customer_profile(
49
49
 
50
50
  :param customer_profile_id: An Authorizenet customer profile id.
51
51
  :type customer_profile_id: :py:obj:`int`
52
- :param include_issuer_info: Whether or not to include issuer info in the response. Default is :py:obj:`False`.
52
+ :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
53
53
  :type include_issuer_info: :py:obj:`bool`
54
- :returns: An Authorizenet getCustomerProfile response.
54
+ :returns: An Authorizenet getCustomerProfileResponse element.
55
55
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
56
56
 
57
57
  """
@@ -69,7 +69,7 @@ def get_customer_profile_ids() -> ObjectifiedElement | None:
69
69
  """
70
70
  `getCustomerProfileIdsRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile-ids>`_.
71
71
 
72
- :returns: An Authorizenet getCustomerProfileIds response.
72
+ :returns: An Authorizenet getCustomerProfileIdsResponse element.
73
73
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
74
74
 
75
75
  """
@@ -89,7 +89,7 @@ def update_customer_profile(
89
89
 
90
90
  :param profile: An Authorizenet customer profile ex element.
91
91
  :type profile: :py:obj:`~authorizenet.apicontractsv1.customerProfileExType`
92
- :returns: An Authorizenet updateCustomerProfile response.
92
+ :returns: An Authorizenet updateCustomerProfileResponse element.
93
93
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
94
94
 
95
95
  """
@@ -110,7 +110,7 @@ def delete_customer_profile(
110
110
 
111
111
  :param customer_profile_id: An Authorizenet customer profile id.
112
112
  :type customer_profile_id: :py:obj:`int`
113
- :returns: An Authorizenet deleteCustomerProfile response.
113
+ :returns: An Authorizenet deleteCustomerProfileResponse element.
114
114
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
115
115
 
116
116
  """
@@ -19,7 +19,7 @@ __all__ = [
19
19
  def create_customer_payment_profile(
20
20
  customer_profile_id: int,
21
21
  payment_profile: apicontractsv1.customerPaymentProfileType,
22
- validate: bool = False,
22
+ validate: bool = True,
23
23
  ) -> ObjectifiedElement | None:
24
24
  """
25
25
  `createCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-payment-profile>`_.
@@ -28,7 +28,8 @@ def create_customer_payment_profile(
28
28
  :type customer_profile_id: :py:obj:`int`
29
29
  :param payment_profile: An Authorizenet payment profile element.
30
30
  :type payment_profile: :py:obj:`~authorizenet.apicontractsv1.customerPaymentProfileType`
31
- :returns: An Authorizenet createCustomerPaymentProfile response.
31
+ :param validate: Whether to validate the payment profile. Default is :py:obj:`True`.
32
+ :returns: An Authorizenet createCustomerPaymentProfileResponse element.
32
33
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
33
34
 
34
35
  """
@@ -58,7 +59,7 @@ def get_customer_payment_profile(
58
59
  :type payment_profile_id: :py:obj:`int`
59
60
  :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
60
61
  :type include_issuer_info: :py:obj:`bool`
61
- :returns: An Authorizenet getCustomerPaymentProfile response.
62
+ :returns: An Authorizenet getCustomerPaymentProfileResponse element.
62
63
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
63
64
 
64
65
  """
@@ -81,9 +82,9 @@ def validate_customer_payment_profile(
81
82
 
82
83
  :param customer_profile_id: An Authorizenet customer profile id.
83
84
  :type customer_profile_id: :py:obj:`int`
84
- :param customer_payment_profile_id: An Authorizenet customer payment profile id.
85
- :type customer_payment_profile_id: :py:obj:`int`
86
- :returns: An Authorizenet validateCustomerPaymentProfile response.
85
+ :param payment_profile_id: An Authorizenet customer payment profile id.
86
+ :type payment_profile_id: :py:obj:`int`
87
+ :returns: An Authorizenet validateCustomerPaymentProfileResponse element.
87
88
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
88
89
 
89
90
  """
@@ -102,7 +103,7 @@ def update_customer_payment_profile(
102
103
  customer_profile_id: int,
103
104
  payment_profile_id: int,
104
105
  payment_profile: apicontractsv1.customerPaymentProfileType,
105
- validate: bool = False,
106
+ validate: bool = True,
106
107
  ) -> ObjectifiedElement | None:
107
108
  """
108
109
  `updateCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-profile>`_.
@@ -113,9 +114,9 @@ def update_customer_payment_profile(
113
114
  :type payment_profile_id: :py:obj:`int`
114
115
  :param payment_profile: An Authorizenet payment profile element.
115
116
  :type payment_profile: :py:obj:`~authorizenet.apicontractsv1.customerPaymentProfileType`
116
- :param validate: Whether to validate the updated payment profile. Default is :py:obj:`False`.
117
+ :param validate: Whether to validate the payment profile. Default is :py:obj:`True`.
117
118
  :type validate: :py:obj:`bool`
118
- :returns: An Authorizenet updateCustomerPaymentProfile response.
119
+ :returns: An Authorizenet updateCustomerPaymentProfileResponse element.
119
120
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
120
121
 
121
122
  """
@@ -144,7 +145,7 @@ def delete_customer_payment_profile(
144
145
  :type customer_profile_id: :py:obj:`int`
145
146
  :param payment_profile_id: An Authorizenet customer payment profile id.
146
147
  :type payment_profile_id: :py:obj:`int`
147
- :returns: An Authorizenet deleteCustomerPaymentProfile response.
148
+ :returns: An Authorizenet deleteCustomerPaymentProfileResponse element.
148
149
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
149
150
 
150
151
  """
@@ -21,7 +21,7 @@ def create_subscription(
21
21
 
22
22
  :param subscription: An Authorizenet ARBSubscriptionType element.
23
23
  :type subscription: :py:obj:`~authorizenet.apicontractsv1.ARBSubscriptionType`
24
- :returns: An Authorizenet ARBCreateSubscription response.
24
+ :returns: An Authorizenet ARBCreateSubscriptionResponse element.
25
25
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
26
26
 
27
27
  """
@@ -42,17 +42,17 @@ def get_subscription(
42
42
 
43
43
  :param subscription_id: An Authorizenet subscription id.
44
44
  :type subscription_id: :py:obj:`int`
45
- :param include_transactions: Whether or not to include the subscription transaction list in the response. Default is :py:obj:`True`.
45
+ :param include_transactions: Whether to include the subscription transaction list in the response. Default is :py:obj:`True`.
46
46
  :type include_transactions: :py:obj:`bool`
47
- :returns: An Authorizenet ARBGetSubscription response.
47
+ :returns: An Authorizenet ARBGetSubscriptionResponse element.
48
48
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
49
49
 
50
50
  """
51
- request = apicontractsv1.ARBGetSubscriptionRequest(
52
- merchantAuthentication=get_merchant_auth(),
53
- subscriptionId=str(subscription_id),
54
- includeTransactions=str(include_transactions).lower(),
55
- )
51
+ request = apicontractsv1.ARBGetSubscriptionRequest()
52
+ request.merchantAuthentication = get_merchant_auth()
53
+ request.subscriptionId = str(subscription_id)
54
+ request.includeTransactions = str(include_transactions).lower()
55
+
56
56
  return execute_controller(
57
57
  apicontrollers.ARBGetSubscriptionController(request)
58
58
  )
@@ -64,38 +64,38 @@ def get_subscription_status(subscription_id: int) -> ObjectifiedElement | None:
64
64
 
65
65
  :param subscription_id: An Authorizenet subscription id.
66
66
  :type subscription_id: :py:obj:`int`
67
- :returns: An Authorizenet ARBGetSubscriptionStatus response.
67
+ :returns: An Authorizenet ARBGetSubscriptionStatusResponse element.
68
68
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
69
69
 
70
70
  """
71
- request = apicontractsv1.ARBGetSubscriptionStatusRequest(
72
- merchantAuthentication=get_merchant_auth(),
73
- subscriptionId=str(subscription_id),
74
- )
71
+ request = apicontractsv1.ARBGetSubscriptionStatusRequest()
72
+ request.merchantAuthentication = get_merchant_auth()
73
+ request.subscriptionId = str(subscription_id)
74
+
75
75
  return execute_controller(
76
76
  apicontrollers.ARBGetSubscriptionStatusController(request)
77
77
  )
78
78
 
79
79
 
80
80
  def update_subscription(
81
- subscription_id: int, subscription_obj: apicontractsv1.ARBSubscriptionType
81
+ subscription_id: int, subscription: apicontractsv1.ARBSubscriptionType
82
82
  ) -> ObjectifiedElement | None:
83
83
  """
84
84
  `ARBUpdateSubscriptionRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-update-a-subscription>`_.
85
85
 
86
86
  :param subscription_id: An Authorizenet subscription id.
87
87
  :type subscription_id: :py:obj:`int`
88
- :param subscription_obj: An Authorizenet subscription object.
89
- :type subscription_obj: :py:obj:`~authorizenet.apicontractsv1.ARBSubscriptionType`
90
- :returns: An Authorizenet ARBUpdateSubscription response.
88
+ :param subscription: An Authorizenet ARBSubscriptionType element.
89
+ :type subscription: :py:obj:`~authorizenet.apicontractsv1.ARBSubscriptionType`
90
+ :returns: An Authorizenet ARBUpdateSubscriptionResponse element.
91
91
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
92
92
 
93
93
  """
94
- request = apicontractsv1.ARBUpdateSubscriptionRequest(
95
- merchantAuthentication=get_merchant_auth(),
96
- subscriptionId=str(subscription_id),
97
- subscription=subscription_obj,
98
- )
94
+ request = apicontractsv1.ARBUpdateSubscriptionRequest()
95
+ request.merchantAuthentication = get_merchant_auth()
96
+ request.subscriptionId = str(subscription_id)
97
+ request.subscription = subscription
98
+
99
99
  return execute_controller(
100
100
  apicontrollers.ARBUpdateSubscriptionController(request)
101
101
  )
@@ -107,14 +107,14 @@ def cancel_subscription(subscription_id: int) -> ObjectifiedElement | None:
107
107
 
108
108
  :param subscription_id: An Authorizenet subscription id.
109
109
  :type subscription_id: :py:obj:`int`
110
- :returns: An Authorizenet ARBCancelSubscription response.
110
+ :returns: An Authorizenet ARBCancelSubscriptionResponse element.
111
111
  :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
112
112
 
113
113
  """
114
- request = apicontractsv1.ARBCancelSubscriptionRequest(
115
- merchantAuthentication=get_merchant_auth(),
116
- subscriptionId=str(subscription_id),
117
- )
114
+ request = apicontractsv1.ARBCancelSubscriptionRequest()
115
+ request.merchantAuthentication = get_merchant_auth()
116
+ request.subscriptionId = str(subscription_id)
117
+
118
118
  return execute_controller(
119
119
  apicontrollers.ARBCancelSubscriptionController(request)
120
120
  )
@@ -50,7 +50,7 @@ class WialonSession:
50
50
 
51
51
  """
52
52
 
53
- self._token = token or os.getenv("WIALON_TOKEN")
53
+ self._token = token if token else os.getenv("WIALON_TOKEN")
54
54
  self._username = None
55
55
  self._uid = None
56
56
  self._wialon_api = Wialon(
@@ -93,7 +93,7 @@ class WialonSession:
93
93
  @property
94
94
  def uid(self) -> str | None:
95
95
  """
96
- A Wialon user ID this session is operating as.
96
+ User id of the session's authenticated Wialon user.
97
97
 
98
98
  :type: :py:obj:`str` | :py:obj:`None`
99
99
  :value: :py:obj:`None`
@@ -103,7 +103,7 @@ class WialonSession:
103
103
  @property
104
104
  def username(self) -> str | None:
105
105
  """
106
- A Wialon username the session is operating as.
106
+ Username of the session's authenticated Wialon user.
107
107
 
108
108
  :type: :py:obj:`str` | :py:obj:`None`
109
109
  :value: :py:obj:`None`
@@ -114,6 +114,8 @@ class WialonSession:
114
114
  @property
115
115
  def id(self) -> str | None:
116
116
  """
117
+ Wialon API session id.
118
+
117
119
  Shortcut property for :py:attr:`WialonSession.wialon_api.sid`.
118
120
 
119
121
  Returns :py:obj:`None` if the session wasn't logged in.
@@ -127,19 +129,16 @@ class WialonSession:
127
129
  @property
128
130
  def token(self) -> str:
129
131
  """
130
- A Wialon API token set during :py:meth:`WialonSession.__init__`.
131
-
132
- Default token value is :confval:`WIALON_TOKEN`.
132
+ Wialon API token set during :py:meth:`WialonSession.__init__`.
133
133
 
134
134
  :type: :py:obj:`str`
135
- :value: :confval:`WIALON_TOKEN`
136
135
 
137
136
  """
138
137
  return str(self._token)
139
138
 
140
139
  def login(self, token: str, flags: int | None = None) -> str:
141
140
  """
142
- Logs into the Wialon API and starts a new session.
141
+ Logs into the Wialon API, starts a new session then returns its id.
143
142
 
144
143
  :param token: An active Wialon API token.
145
144
  :type token: :py:obj:`str`
@@ -190,7 +189,9 @@ class WialonSession:
190
189
 
191
190
  """
192
191
  if login_response is None:
193
- raise ValueError(f"Login response is required, got '{login_response}'")
192
+ raise ValueError(
193
+ f"Login response is required, got '{login_response}'"
194
+ )
194
195
 
195
196
  self.wialon_api.sid = login_response.get("eid")
196
197
  self._uid = login_response.get("user", {}).get("id")
@@ -298,7 +298,7 @@ wheels = [
298
298
 
299
299
  [[package]]
300
300
  name = "python-terminusgps"
301
- version = "43.0.1"
301
+ version = "43.1.0"
302
302
  source = { editable = "." }
303
303
  dependencies = [
304
304
  { name = "authorizenet" },
@@ -308,8 +308,10 @@ dependencies = [
308
308
 
309
309
  [package.dev-dependencies]
310
310
  dev = [
311
- { name = "autoclasstoc" },
312
311
  { name = "django-stubs" },
312
+ ]
313
+ docs = [
314
+ { name = "autoclasstoc" },
313
315
  { name = "sphinx" },
314
316
  { name = "sphinxawesome-theme" },
315
317
  ]
@@ -317,15 +319,15 @@ dev = [
317
319
  [package.metadata]
318
320
  requires-dist = [
319
321
  { name = "authorizenet", specifier = ">=1.1.5" },
320
- { name = "django", specifier = ">=5.1.5" },
322
+ { name = "django", specifier = ">=5.2.6" },
321
323
  { name = "python-wialon", specifier = ">=1.2.4" },
322
324
  ]
323
325
 
324
326
  [package.metadata.requires-dev]
325
- dev = [
327
+ dev = [{ name = "django-stubs", specifier = ">=5.1.3" }]
328
+ docs = [
326
329
  { name = "autoclasstoc", specifier = ">=1.7.0" },
327
- { name = "django-stubs", specifier = ">=5.1.3" },
328
- { name = "sphinx", specifier = ">=8.1.3" },
330
+ { name = "sphinx", specifier = ">=8.2.3" },
329
331
  { name = "sphinxawesome-theme", specifier = ">=5.3.2" },
330
332
  ]
331
333