python-terminusgps 47.1.3__py3-none-any.whl → 47.3.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.

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: 47.1.3
3
+ Version: 47.3.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://terminusgps.github.io/python-terminusgps
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -1,13 +1,13 @@
1
1
  terminusgps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  terminusgps/default_settings.py,sha256=XuAoAf8V91nxI7NxXbgEGmuzLMybiEnR4Tep_xbhuGM,584
3
3
  terminusgps/mixins.py,sha256=Q9ZJuzpk3d9lDnlVA8ZTVvnZWxB13p08EQ8yVJcztn4,1034
4
- terminusgps/validators.py,sha256=Mf0c7ku_wTQ7uv4hcLRyz0r2eRjvznIL77LLTE5uJ6E,9152
4
+ terminusgps/validators.py,sha256=ZO3ychuBfpGTLsXFU_PFVMkMOyE1fJIsQh2hYsGDjKM,9508
5
5
  terminusgps/authorizenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  terminusgps/authorizenet/constants.py,sha256=nz3XX2jp9icsJhbSTKi9X-TQDr6jrs35opSWpYuwePc,2757
7
7
  terminusgps/authorizenet/service.py,sha256=jjYo1vLgTZSXVNeBY6uKSma94AgEj3Q5xOAT5wUB6ko,4260
8
8
  terminusgps/authorizenet/api/__init__.py,sha256=VXR4Yco1yz5R-R7vgaH2zTP9VFqzfvvGy_XJVjyb3i0,154
9
9
  terminusgps/authorizenet/api/address_profiles.py,sha256=VouUN6dIxlnuE3qEiacFqqDBi_VtwvSbsELqTqFZ0BE,4746
10
- terminusgps/authorizenet/api/customer_profiles.py,sha256=oya9KMRE10nKLjECTIdanfV_P8-gnNZLE0sYmRYVkgM,4505
10
+ terminusgps/authorizenet/api/customer_profiles.py,sha256=0UjD-SqjmUpjWl1dO2AEgdV_5g6mwTSDeJa2NlueUsE,6431
11
11
  terminusgps/authorizenet/api/payment_profiles.py,sha256=s-telQZXdq6bu5TxWVYv5xBNHWq81ve_hQVrRlqoBb0,8089
12
12
  terminusgps/authorizenet/api/subscriptions.py,sha256=VAXKjOHLOfifrixObK6XbiJCmPobkYBzXJQrjtos9LE,4542
13
13
  terminusgps/authorizenet/api/transactions.py,sha256=zwbUXGxI1wkTXSPG4L4O5Y2fdNgxOrNaak1jwcC9PeM,8531
@@ -26,7 +26,7 @@ terminusgps/wialon/items/route.py,sha256=9hmRBEFRJF3lKukv_y3blZxqxv75YgFCcRALrU6
26
26
  terminusgps/wialon/items/unit.py,sha256=B5iuGEghu89SL8KzYLUytYNRa8cogsVtf-bJ_RybPTA,5522
27
27
  terminusgps/wialon/items/unit_group.py,sha256=MIR0x5IlTjcnwx8Y9wXLNTql-wwVVj7NCe7dL2vOw4c,2131
28
28
  terminusgps/wialon/items/user.py,sha256=CRSICiJ-qzybEO_gXuKyzW5oa2RQeIp0SzX9ARcdME4,5151
29
- python_terminusgps-47.1.3.dist-info/METADATA,sha256=mpkegy8aqASMWDrmgZ1xEgp8zq0nHNGrxgxLhuZLi-M,938
30
- python_terminusgps-47.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- python_terminusgps-47.1.3.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
32
- python_terminusgps-47.1.3.dist-info/RECORD,,
29
+ python_terminusgps-47.3.0.dist-info/METADATA,sha256=MnjxES0u0JmuRabrDTpVnN-mNi4tdQQQ4UiXjPSDyys,938
30
+ python_terminusgps-47.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
+ python_terminusgps-47.3.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
32
+ python_terminusgps-47.3.0.dist-info/RECORD,,
@@ -55,6 +55,46 @@ def get_customer_profile(
55
55
  return request, apicontrollers.getCustomerProfileController
56
56
 
57
57
 
58
+ def get_customer_profile_by_email(
59
+ email: str, include_issuer_info: bool = False
60
+ ) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
61
+ """
62
+ `getCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile>`_.
63
+
64
+ :param email: Merchant designated customer profile email address.
65
+ :type email: str
66
+ :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
67
+ :type include_issuer_info: bool
68
+ :returns: A tuple containing an Authorizenet API request element and controller class.
69
+ :rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
70
+
71
+ """
72
+ request = apicontractsv1.getCustomerProfileRequest()
73
+ request.email = str(email)
74
+ request.includeIssuerInfo = str(include_issuer_info).lower()
75
+ return request, apicontrollers.getCustomerProfileController
76
+
77
+
78
+ def get_customer_profile_by_merchant_id(
79
+ merchant_id: str, include_issuer_info: bool = False
80
+ ) -> tuple[ObjectifiedElement, type[APIOperationBase]]:
81
+ """
82
+ `getCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile>`_.
83
+
84
+ :param merchant_id: Merchant designated customer profile id.
85
+ :type merchant_id: str
86
+ :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
87
+ :type include_issuer_info: bool
88
+ :returns: A tuple containing an Authorizenet API request element and controller class.
89
+ :rtype: tuple[~lxml.objectify.ObjectifiedElement, type[~authorizenet.apicontrollersbase.APIOperationBase]]
90
+
91
+ """
92
+ request = apicontractsv1.getCustomerProfileRequest()
93
+ request.merchantCustomerId = str(merchant_id)
94
+ request.includeIssuerInfo = str(include_issuer_info).lower()
95
+ return request, apicontrollers.getCustomerProfileController
96
+
97
+
58
98
  def get_customer_profile_ids() -> tuple[
59
99
  ObjectifiedElement, type[APIOperationBase]
60
100
  ]:
terminusgps/validators.py CHANGED
@@ -7,6 +7,16 @@ from django.utils.translation import gettext_lazy as _
7
7
  VALID_COUNTRY_CODES = ("+1", "+52")
8
8
 
9
9
 
10
+ def validate_is_digit(value: str) -> None:
11
+ """Raises :py:exc:`django.core.exceptions.ValidationError` if the value contained non-digit characters."""
12
+ if not value.isdigit():
13
+ raise ValidationError(
14
+ _("Value can only contain digits, got '%(value)s'."),
15
+ code="invalid",
16
+ params={"value": value},
17
+ )
18
+
19
+
10
20
  def validate_e164_phone_number(value: str) -> None:
11
21
  """
12
22
  Raises :py:exc:`~django.core.exceptions.ValidationError` if the value is not a valid `E.164 <https://en.wikipedia.org/wiki/E.164>`_ formatted phone number.