python-terminusgps 36.4.2__py3-none-any.whl → 36.4.4__py3-none-any.whl

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.

Potentially problematic release.


This version of python-terminusgps might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 36.4.2
3
+ Version: 36.4.4
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
@@ -9,7 +9,7 @@ terminusgps/authorizenet/profiles/addresses.py,sha256=5GudJStBa4P0Hd7G_hRFH2C-Wp
9
9
  terminusgps/authorizenet/profiles/base.py,sha256=Pu1NGrvC5Ox2W1oZuVcPqUw3aUoSK191Evexw1U6_3k,3940
10
10
  terminusgps/authorizenet/profiles/customers.py,sha256=mKPHSFoDqJqHL1CvTximNVRb1myRwQ9NvMkA2-iswOg,11701
11
11
  terminusgps/authorizenet/profiles/payments.py,sha256=nhudGuJ6RzmK0MrhDVuYL2BxvyzKNpliBIfIpFU5Y-4,11038
12
- terminusgps/authorizenet/profiles/subscriptions.py,sha256=m_jb9GqeD1tLmeqSnaGwJrzPcQOulEkF8K1wCaqKR24,7924
12
+ terminusgps/authorizenet/profiles/subscriptions.py,sha256=t2oWcmChx0-YHer958Mi3IQ4whJeOinVq_SYc4cTFew,8539
13
13
  terminusgps/authorizenet/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  terminusgps/authorizenet/tests/test_auth.py,sha256=sdByYrcv8RKjcJckOHbyHH1z_M4qrATFI3qj_XDQXbk,1624
15
15
  terminusgps/authorizenet/tests/test_profiles.py,sha256=tvLBY0iSAC33RlWiBP_NSnPskUQBjfrf0YHMpR-m22k,7566
@@ -52,7 +52,7 @@ terminusgps/wialon/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
52
52
  terminusgps/wialon/tests/test_items.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  terminusgps/wialon/tests/test_session.py,sha256=9mBlYchMo9NeqRIZsmxYzrM1zBHorqu4ooxqSNppLpI,1336
54
54
  terminusgps/wialon/tests/test_utils.py,sha256=SK4PxJQGECFnzx_EQeRAQfsQ5_3FLaVcis2W9u_ibuI,1730
55
- python_terminusgps-36.4.2.dist-info/METADATA,sha256=moU-r9iotwr4Sb98T_uEnJa6_VK9DYtkoIL7FCT7fQM,1616
56
- python_terminusgps-36.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
- python_terminusgps-36.4.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
- python_terminusgps-36.4.2.dist-info/RECORD,,
55
+ python_terminusgps-36.4.4.dist-info/METADATA,sha256=3VQh9CB1YlDZ-r8I5FiHqTMLO4okxY9Yio3pe1LIb1g,1616
56
+ python_terminusgps-36.4.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
+ python_terminusgps-36.4.4.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
+ python_terminusgps-36.4.4.dist-info/RECORD,,
@@ -1,3 +1,5 @@
1
+ import decimal
2
+
1
3
  from authorizenet import apicontractsv1, apicontrollers
2
4
 
3
5
  from terminusgps.authorizenet.constants import AuthorizenetSubscriptionStatus
@@ -7,6 +9,31 @@ from terminusgps.authorizenet.profiles.base import AuthorizenetSubProfileBase
7
9
  class SubscriptionProfile(AuthorizenetSubProfileBase):
8
10
  """An Authorizenet subscription profile."""
9
11
 
12
+ @property
13
+ def name(self) -> str | None:
14
+ """
15
+ The subscription name.
16
+
17
+ :type: :py:obj:`str` | :py:obj:`None`
18
+
19
+ """
20
+ if self.id:
21
+ sub = self._authorizenet_get_subscription().subscription
22
+ return str(sub.name)
23
+
24
+ @property
25
+ def amount(self) -> decimal.Decimal | None:
26
+ """
27
+ The subscription amount.
28
+
29
+ :type: :py:obj:`~decimal.Decimal` | :py:obj:`None`
30
+
31
+ """
32
+ if self.id:
33
+ decimal.getcontext().prec = 4
34
+ sub = self._authorizenet_get_subscription().subscription
35
+ return decimal.Decimal(float(sub.amount)) * 1
36
+
10
37
  @property
11
38
  def status(self) -> AuthorizenetSubscriptionStatus | None:
12
39
  """
@@ -15,13 +42,10 @@ class SubscriptionProfile(AuthorizenetSubProfileBase):
15
42
  :type: :py:obj:`~terminusgps.authorizenet.constants.AuthorizenetSubscriptionStatus` | :py:obj:`None`
16
43
 
17
44
  """
18
- return (
19
- AuthorizenetSubscriptionStatus(
45
+ if self.id:
46
+ return AuthorizenetSubscriptionStatus(
20
47
  self._authorizenet_get_subscription_status().status
21
48
  )
22
- if self.id
23
- else None
24
- )
25
49
 
26
50
  @property
27
51
  def transactions(self) -> list[dict[str, str]]: