python-terminusgps 36.1.2__py3-none-any.whl → 36.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: 36.1.2
3
+ Version: 36.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://docs.terminusgps.com
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -7,7 +7,7 @@ terminusgps/authorizenet/utils.py,sha256=FrKqXWrplcgiET1rDTmUaqmN_ze7j93jWgfFeJR
7
7
  terminusgps/authorizenet/profiles/__init__.py,sha256=IG4XCEEYtHKqXOatlZlob6J3ukAgF7cFR-RXxOSMS1c,161
8
8
  terminusgps/authorizenet/profiles/addresses.py,sha256=5GudJStBa4P0Hd7G_hRFH2C-WpICAH_k3MT9YJkicKw,6305
9
9
  terminusgps/authorizenet/profiles/base.py,sha256=Pu1NGrvC5Ox2W1oZuVcPqUw3aUoSK191Evexw1U6_3k,3940
10
- terminusgps/authorizenet/profiles/customers.py,sha256=lLzQPJByu_oEck8u3h4vzoV_uVOKKeLr6qhFAV5uQ_E,12793
10
+ terminusgps/authorizenet/profiles/customers.py,sha256=CAinLbFOixvhcUWCYu1pbZDElhyvtX93oBQkoeQaixM,12723
11
11
  terminusgps/authorizenet/profiles/payments.py,sha256=nhudGuJ6RzmK0MrhDVuYL2BxvyzKNpliBIfIpFU5Y-4,11038
12
12
  terminusgps/authorizenet/profiles/subscriptions.py,sha256=m_jb9GqeD1tLmeqSnaGwJrzPcQOulEkF8K1wCaqKR24,7924
13
13
  terminusgps/authorizenet/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -37,7 +37,7 @@ terminusgps/twilio/caller.py,sha256=RQax2iZ6SYHiuCvBxXkrooRWQ9J8DwKGAjxa8RYjrLI,
37
37
  terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  terminusgps/wialon/constants.py,sha256=Ju2XL2A4DPFD-w8NjYqEfnnqregl1luPT0XGhGSUnO8,6316
39
39
  terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
40
- terminusgps/wialon/session.py,sha256=jHMr3fQ5tuB3pic73sCZvAsitW3Hcoqzu4X3UblPzvw,10670
40
+ terminusgps/wialon/session.py,sha256=BN8GBfYNIJcjvev9-qOam2Sbkf7EyCoQXTudRrmA3vc,10533
41
41
  terminusgps/wialon/utils.py,sha256=SwpcxLPBLy0u3AT84G-Co4wxmhRrPFyW3jo_9O6ICvk,11008
42
42
  terminusgps/wialon/validators.py,sha256=j5vrtcfClAzRdRkWTvRRAmrne1t0R6cKkmYdE7fAkSs,4247
43
43
  terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
@@ -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.1.2.dist-info/METADATA,sha256=T7PaahUSoEK5xvSdkWjPjMyjmOcxpsIXCprtOFC7aN8,1616
56
- python_terminusgps-36.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
- python_terminusgps-36.1.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
- python_terminusgps-36.1.2.dist-info/RECORD,,
55
+ python_terminusgps-36.2.0.dist-info/METADATA,sha256=JEx5k-8-huypQryiLolU4amgRqUztsNP-RsnYiFZtwM,1616
56
+ python_terminusgps-36.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
57
+ python_terminusgps-36.2.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
58
+ python_terminusgps-36.2.0.dist-info/RECORD,,
@@ -16,7 +16,7 @@ class CustomerProfile(AuthorizenetProfileBase):
16
16
  desc: str | None = None,
17
17
  ) -> None:
18
18
  """
19
- Sets :py:attr:`merchant_id`, :py:attr:`email` and :py:attr:`desc`.
19
+ Sets :py:attr:`merchantCustomerId`, :py:attr:`email` and :py:attr:`desc`.
20
20
 
21
21
  :returns: Nothing.
22
22
  :rtype: :py:obj:`None`
@@ -169,12 +169,12 @@ class CustomerProfile(AuthorizenetProfileBase):
169
169
 
170
170
  """
171
171
  response = self._authorizenet_get_customer_profile()
172
- if response is not None:
172
+ if response is not None and hasattr(response.profile, "paymentProfiles"):
173
173
  return [
174
174
  int(p.customerPaymentProfileId)
175
175
  for p in response.profile.paymentProfiles
176
- if hasattr(response.profile, "paymentProfiles")
177
176
  ]
177
+ return []
178
178
 
179
179
  def get_address_profile_ids(self) -> list[int]:
180
180
  """
@@ -185,12 +185,9 @@ class CustomerProfile(AuthorizenetProfileBase):
185
185
 
186
186
  """
187
187
  response = self._authorizenet_get_customer_profile()
188
- if response is not None:
189
- return [
190
- int(p.customerAddressId)
191
- for p in response.profile.shipToList
192
- if hasattr(response.profile, "shipToList")
193
- ]
188
+ if response is not None and hasattr(response.profile, "shipToList"):
189
+ return [int(p.customerAddressId) for p in response.profile.shipToList]
190
+ return []
194
191
 
195
192
  def _generate_customer_profile_ex_type(
196
193
  self,
@@ -256,12 +253,10 @@ class CustomerProfile(AuthorizenetProfileBase):
256
253
 
257
254
  if self.id:
258
255
  request.customerProfileId = self.id
259
- elif self.merchantCustomerId:
256
+ if self.merchantCustomerId:
260
257
  request.merchantCustomerId = self.merchantCustomerId
261
- elif self.email:
258
+ if self.email:
262
259
  request.email = self.email
263
- else:
264
- return
265
260
 
266
261
  controller = apicontrollers.getCustomerProfileController(request)
267
262
  return self.execute_controller(controller)
@@ -102,13 +102,9 @@ class WialonSession:
102
102
  f"logs/{self.__class__.__name__}.log",
103
103
  level=log_level,
104
104
  retention=f"{log_days} days",
105
- diagnose=debug or settings.DEBUG if settings.configured else False,
106
- )
107
- self._token = (
108
- token or settings.WIALON_TOKEN
109
- if settings.configured
110
- else os.getenv("WIALON_TOKEN")
105
+ diagnose=debug or settings.DEBUG
111
106
  )
107
+ self._token = token or settings.WIALON_TOKEN
112
108
  self._username = None
113
109
  self._gis_sid = None
114
110
  self._hw_gp_ip = None