python-terminusgps 28.1.2__py3-none-any.whl → 28.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 28.1.2
3
+ Version: 28.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://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -9,7 +9,7 @@ terminusgps/authorizenet/profiles/addresses.py,sha256=7yrOrb9kIsiiazgWbeH8v_YUBi
9
9
  terminusgps/authorizenet/profiles/base.py,sha256=TOUHr22QRQBLErdysOkfcpJBusTjrUTqOmWEyNvMacA,2240
10
10
  terminusgps/authorizenet/profiles/customers.py,sha256=-F8IsQEn2CyHpfxyVZjKayHSuVe4ENNUj_ck7SE8LO0,8568
11
11
  terminusgps/authorizenet/profiles/payments.py,sha256=ohhZrs9MB7GkCi7jQvPVvELNKnR9BwzMd607jJmT4n4,11316
12
- terminusgps/authorizenet/profiles/subscriptions.py,sha256=m8X7tE8UKyD7XiLNye0EBxETp4N8S9HS3lpYAMjizf8,12478
12
+ terminusgps/authorizenet/profiles/subscriptions.py,sha256=zqXc-Cge8-a7mGWsDf7n2wH_JolmSHnbPYWKGwFCA_k,13120
13
13
  terminusgps/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  terminusgps/aws/secrets.py,sha256=MxQEmmBLpMUQ2tYAsHdCYf-7RZ84LiogdKcTsACX5dw,361
15
15
  terminusgps/twilio/__init__.py,sha256=dYo41F2jft_eHDWSUtSpKGSRG1bewq_qClqilUJZkYM,33
@@ -29,7 +29,7 @@ terminusgps/wialon/items/route.py,sha256=8SzlqNmpYVdt-ZAY--B_KHoDIHgN0Zb7KBsBWAz
29
29
  terminusgps/wialon/items/unit.py,sha256=i7sQiRu3N0XxyTHVN2RnmjYy9X48KdnZLSB18ic37w8,9363
30
30
  terminusgps/wialon/items/unit_group.py,sha256=YsYh34l2DjSKcv5SIZkEVi5FSjveGB1gxU2fwdLyvl4,4101
31
31
  terminusgps/wialon/items/user.py,sha256=PFYBie04F16YE2B5364PLxkmlTmQr4sZXpItvRBxsDc,7143
32
- python_terminusgps-28.1.2.dist-info/METADATA,sha256=l3XpTPkz5hesLqux7ez0cAmQ70bCKiUl-YMTVaSJq0c,946
33
- python_terminusgps-28.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
- python_terminusgps-28.1.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
35
- python_terminusgps-28.1.2.dist-info/RECORD,,
32
+ python_terminusgps-28.2.0.dist-info/METADATA,sha256=0-xCj1j2zEwNyuQXaZsKEzBNwqZ3Jx-2sZPuEAeI3cg,946
33
+ python_terminusgps-28.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
+ python_terminusgps-28.2.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
35
+ python_terminusgps-28.2.0.dist-info/RECORD,,
@@ -158,7 +158,9 @@ class SubscriptionProfile(ControllerExecutionMixin):
158
158
  def status(self) -> str | None:
159
159
  """Current status of the subscription."""
160
160
  response: dict | None = self._authorizenet_get_subscription_status()
161
- return str(response.status) if response else None
161
+ return (
162
+ str(response.status) if response and response.status is not None else None
163
+ )
162
164
 
163
165
  @property
164
166
  def transactions(self) -> list | None:
@@ -166,6 +168,22 @@ class SubscriptionProfile(ControllerExecutionMixin):
166
168
  response = self._authorizenet_get_subscription(include_transactions=True)
167
169
  return response.arbTransactions.getchildren() if response else None
168
170
 
171
+ @property
172
+ def payment_id(self) -> int | None:
173
+ """Customer payment profile id for the subscription."""
174
+ if not self.id:
175
+ return
176
+ response = self._authorizenet_get_subscription()
177
+ return int(response.profile.paymentProfile.customerPaymentProfileId)
178
+
179
+ @property
180
+ def address_id(self) -> int | None:
181
+ """Customer address profile id for the subscription."""
182
+ if not self.id:
183
+ return
184
+ response = self._authorizenet_get_subscription()
185
+ return int(response.profile.shippingProfile.customerAddressId)
186
+
169
187
  def _authorizenet_create_subscription(
170
188
  self, subscription: apicontractsv1.ARBSubscriptionType
171
189
  ) -> dict | None: