python-terminusgps 54.0.0__tar.gz → 54.1.2__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 (48) hide show
  1. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/PKG-INFO +2 -2
  2. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/conf.py +1 -1
  3. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/pyproject.toml +2 -2
  4. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/payment_profiles.py +8 -12
  5. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/service.py +1 -1
  6. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/tests/test_authorizenet.py +15 -19
  7. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/uv.lock +241 -225
  8. python_terminusgps-54.0.0/htmlcov/.gitignore +0 -2
  9. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/.github/workflows/python-test.yml +0 -0
  10. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/.github/workflows/sphinx.yml +0 -0
  11. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/.gitignore +0 -0
  12. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/.python-version +0 -0
  13. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/COPYING +0 -0
  14. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/README.md +0 -0
  15. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/dist/.gitignore +0 -0
  16. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/Makefile +0 -0
  17. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/make.bat +0 -0
  18. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/requirements.txt +0 -0
  19. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/authorizenet/api.rst +0 -0
  20. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/authorizenet/constants.rst +0 -0
  21. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/authorizenet/index.rst +0 -0
  22. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/authorizenet/service.rst +0 -0
  23. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/index.rst +0 -0
  24. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/mixins.rst +0 -0
  25. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/validators.rst +0 -0
  26. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/constants.rst +0 -0
  27. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/exceptions.rst +0 -0
  28. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/index.rst +0 -0
  29. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/items.rst +0 -0
  30. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/session.rst +0 -0
  31. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/usage.rst +0 -0
  32. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/docs/source/wialon/utils.rst +0 -0
  33. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/__init__.py +0 -0
  34. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/__init__.py +0 -0
  35. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/__init__.py +0 -0
  36. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/address_profiles.py +0 -0
  37. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/customer_profiles.py +0 -0
  38. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/subscriptions.py +0 -0
  39. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/authorizenet/api/transactions.py +0 -0
  40. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/default_settings.py +0 -0
  41. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/mixins.py +0 -0
  42. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/validators.py +0 -0
  43. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/wialon/__init__.py +0 -0
  44. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/wialon/constants.py +0 -0
  45. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/wialon/flags.py +0 -0
  46. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/wialon/session.py +0 -0
  47. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/terminusgps/wialon/utils.py +0 -0
  48. {python_terminusgps-54.0.0 → python_terminusgps-54.1.2}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 54.0.0
3
+ Version: 54.1.2
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.2
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 = "52.0.0"
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.0.0"
3
+ version = "54.1.2"
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.2",
16
+ "django>=6.0.3",
17
17
  "py-aiowialon>=1.3.5",
18
18
  "python-wialon>=1.2.4",
19
19
  ]
@@ -14,8 +14,7 @@ __all__ = [
14
14
  def create_customer_payment_profile(
15
15
  customer_profile_id: int,
16
16
  contract: apicontractsv1.customerPaymentProfileType,
17
- default: bool = False,
18
- validation: str = "liveMode",
17
+ validation: str = apicontractsv1.validationModeEnum.liveMode,
19
18
  ) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
20
19
  """
21
20
  `createCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-payment-profile>`_.
@@ -24,10 +23,10 @@ def create_customer_payment_profile(
24
23
  :type customer_profile_id: int
25
24
  :param contract: A customer payment profile element.
26
25
  :type contract: ~authorizenet.apicontractsv1.customerPaymentProfileType
27
- :param default: Whether to set the payment profile as default. Default is :py:obj:`False`.
28
- :type default: bool
29
26
  :param validation: Validation mode. Default is :py:obj:`"liveMode"`.
30
27
  :type validation: str
28
+ :raises ValueError: If :py:attr:`payment` wasn't in the contract.
29
+ :raises ValueError: If :py:attr:`billTo` wasn't in the contract.
31
30
  :returns: A tuple containing an Authorizenet API request element and controller class.
32
31
  :rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
33
32
 
@@ -40,7 +39,6 @@ def create_customer_payment_profile(
40
39
  request.customerProfileId = str(customer_profile_id)
41
40
  request.validationMode = validation
42
41
  request.paymentProfile = contract
43
- request.paymentProfile.defaultPaymentProfile = int(default)
44
42
  return request, apicontrollers.createCustomerPaymentProfileController
45
43
 
46
44
 
@@ -72,7 +70,7 @@ def get_customer_payment_profile(
72
70
  def validate_customer_payment_profile(
73
71
  customer_profile_id: int,
74
72
  payment_profile_id: int,
75
- validation: str = "liveMode",
73
+ validation: str = apicontractsv1.validationModeEnum.liveMode,
76
74
  ) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
77
75
  """
78
76
  `validateCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-validate-customer-payment-profile>`_.
@@ -97,8 +95,7 @@ def validate_customer_payment_profile(
97
95
  def update_customer_payment_profile(
98
96
  customer_profile_id: int,
99
97
  contract: apicontractsv1.customerPaymentProfileExType,
100
- default: bool,
101
- validation: str = "liveMode",
98
+ validation: str = apicontractsv1.validationModeEnum.liveMode,
102
99
  ) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
103
100
  """
104
101
  `updateCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-profile>`_.
@@ -107,11 +104,11 @@ def update_customer_payment_profile(
107
104
  :type customer_profile_id: int
108
105
  :param contract: A customer payment profile ex element.
109
106
  :type contract: ~authorizenet.apicontractsv1.customerPaymentProfileExType
110
- :param default: Whether to set the payment profile as default.
111
- :type default: bool
112
107
  :param validation: Validation mode. Default is :py:obj:`"liveMode"`.
113
108
  :type validation: str
114
- :raises ValueError: If neither payment nor address was provided.
109
+ :raises ValueError: If :py:attr:`payment` wasn't in the contract.
110
+ :raises ValueError: If :py:attr:`billTo` wasn't in the contract.
111
+ :raises ValueError: If :py:attr:`customerProfileId` wasn't in the contract.
115
112
  :returns: A tuple containing an Authorizenet API request element and controller class.
116
113
  :rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
117
114
 
@@ -126,7 +123,6 @@ def update_customer_payment_profile(
126
123
  request.customerProfileId = str(customer_profile_id)
127
124
  request.validationMode = validation
128
125
  request.paymentProfile = contract
129
- request.paymentProfile.defaultPaymentProfile = int(default)
130
126
  return request, apicontrollers.updateCustomerPaymentProfileController
131
127
 
132
128
 
@@ -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 is not None and response.messages.resultCode != "Ok":
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,
@@ -316,8 +316,8 @@ class CreateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
316
316
  "contract": apicontractsv1.customerPaymentProfileType(
317
317
  billTo=apicontractsv1.customerAddressType(),
318
318
  payment=apicontractsv1.paymentType(),
319
+ defaultPaymentProfile="1",
319
320
  ),
320
- "default": False,
321
321
  "validation": "testMode",
322
322
  }
323
323
  expected = apicontrollers.createCustomerPaymentProfileController
@@ -330,9 +330,10 @@ class CreateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
330
330
  kwargs = {
331
331
  "customer_profile_id": 1,
332
332
  "contract": apicontractsv1.customerPaymentProfileType(
333
- billTo=None, payment=apicontractsv1.paymentType()
333
+ billTo=None,
334
+ payment=apicontractsv1.paymentType(),
335
+ defaultPaymentProfile="1",
334
336
  ),
335
- "default": False,
336
337
  "validation": "testMode",
337
338
  }
338
339
  self.func(**kwargs)
@@ -340,9 +341,10 @@ class CreateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
340
341
  kwargs = {
341
342
  "customer_profile_id": 1,
342
343
  "contract": apicontractsv1.customerPaymentProfileType(
343
- billTo=apicontractsv1.customerAddressType(), payment=None
344
+ billTo=apicontractsv1.customerAddressType(),
345
+ payment=None,
346
+ defaultPaymentProfile="1",
344
347
  ),
345
- "default": False,
346
348
  "validation": "testMode",
347
349
  }
348
350
  self.func(**kwargs)
@@ -354,8 +356,8 @@ class CreateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
354
356
  "contract": apicontractsv1.customerPaymentProfileType(
355
357
  billTo=apicontractsv1.customerAddressType(),
356
358
  payment=apicontractsv1.paymentType(),
359
+ defaultPaymentProfile="1",
357
360
  ),
358
- "default": True,
359
361
  "validation": "testMode",
360
362
  }
361
363
 
@@ -365,10 +367,7 @@ class CreateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
365
367
  self.assertEqual(
366
368
  request.customerProfileId, str(kwargs["customer_profile_id"])
367
369
  )
368
- self.assertEqual(
369
- request.paymentProfile.defaultPaymentProfile,
370
- int(kwargs["default"]),
371
- )
370
+ self.assertEqual(request.paymentProfile.defaultPaymentProfile, 1)
372
371
 
373
372
 
374
373
  class GetCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
@@ -450,8 +449,8 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
450
449
  payment=apicontractsv1.paymentType(),
451
450
  billTo=apicontractsv1.customerAddressType(),
452
451
  customerPaymentProfileId="1",
452
+ defaultPaymentProfile="1",
453
453
  ),
454
- "default": False,
455
454
  "validation": "testMode",
456
455
  }
457
456
  expected = apicontrollers.updateCustomerPaymentProfileController
@@ -466,8 +465,8 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
466
465
  payment=apicontractsv1.paymentType(),
467
466
  billTo=apicontractsv1.customerAddressType(),
468
467
  customerPaymentProfileId="1",
468
+ defaultPaymentProfile="1",
469
469
  ),
470
- "default": True,
471
470
  "validation": "testMode",
472
471
  }
473
472
 
@@ -477,10 +476,7 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
477
476
  )
478
477
  self.assertEqual(request.paymentProfile, kwargs["contract"])
479
478
  self.assertEqual(request.validationMode, kwargs["validation"])
480
- self.assertEqual(
481
- request.paymentProfile.defaultPaymentProfile,
482
- int(kwargs["default"]),
483
- )
479
+ self.assertEqual(request.paymentProfile.defaultPaymentProfile, 1)
484
480
 
485
481
  def test_invalid_contract_values_raises_valueerror(self):
486
482
  """Fails if :py:exec:`ValueError` wasn't raised when calling the function with a contract with invalid values."""
@@ -491,8 +487,8 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
491
487
  payment=apicontractsv1.paymentType(),
492
488
  billTo=apicontractsv1.customerAddressType(),
493
489
  customerPaymentProfileId=None,
490
+ defaultPaymentProfile="1",
494
491
  ),
495
- "default": True,
496
492
  "validation": "testMode",
497
493
  }
498
494
  self.func(**kwargs)
@@ -503,8 +499,8 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
503
499
  payment=None,
504
500
  billTo=apicontractsv1.customerAddressType(),
505
501
  customerPaymentProfileId="1",
502
+ defaultPaymentProfile="1",
506
503
  ),
507
- "default": True,
508
504
  "validation": "testMode",
509
505
  }
510
506
  self.func(**kwargs)
@@ -515,8 +511,8 @@ class UpdateCustomerPaymentProfileFunctionTestCase(unittest.TestCase):
515
511
  payment=apicontractsv1.paymentType(),
516
512
  billTo=None,
517
513
  customerPaymentProfileId="1",
514
+ defaultPaymentProfile="1",
518
515
  ),
519
- "default": True,
520
516
  "validation": "testMode",
521
517
  }
522
518
  self.func(**kwargs)