python-terminusgps 43.2.0__py3-none-any.whl → 43.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.
- {python_terminusgps-43.2.0.dist-info → python_terminusgps-43.3.0.dist-info}/METADATA +1 -1
- {python_terminusgps-43.2.0.dist-info → python_terminusgps-43.3.0.dist-info}/RECORD +7 -11
- terminusgps/authorizenet/controllers.py +2 -2
- terminusgps/django/forms/__init__.py +0 -1
- terminusgps/django/forms/renderer.py +0 -5
- terminusgps/django/forms/fields.py +0 -57
- terminusgps/django/forms/forms.py +0 -0
- terminusgps/django/forms/widgets.py +0 -56
- terminusgps/django/utils.py +0 -7
- {python_terminusgps-43.2.0.dist-info → python_terminusgps-43.3.0.dist-info}/WHEEL +0 -0
- {python_terminusgps-43.2.0.dist-info → python_terminusgps-43.3.0.dist-info}/licenses/COPYING +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-terminusgps
|
|
3
|
-
Version: 43.
|
|
3
|
+
Version: 43.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
|
|
@@ -2,7 +2,7 @@ terminusgps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
terminusgps/authorizenet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
terminusgps/authorizenet/auth.py,sha256=CKT_pfDEL-53GceOEaFtIU6IBXVuVd8MVHikpPAX0xY,1184
|
|
4
4
|
terminusgps/authorizenet/constants.py,sha256=xU2oGpxsAlgJftI_S4WL8Ii5TJ3OD5FXnCUNceLzXbM,1015
|
|
5
|
-
terminusgps/authorizenet/controllers.py,sha256=
|
|
5
|
+
terminusgps/authorizenet/controllers.py,sha256=li29JUoAcSaytRNaz6aB4lDK7gmvFZUuxRM4xi1fQCo,1981
|
|
6
6
|
terminusgps/authorizenet/validators.py,sha256=Wq4rqEuqG3JzOO7O1wM6oQ0FciNxxOK0HnJqTuLa8CY,3916
|
|
7
7
|
terminusgps/authorizenet/api/__init__.py,sha256=VXR4Yco1yz5R-R7vgaH2zTP9VFqzfvvGy_XJVjyb3i0,154
|
|
8
8
|
terminusgps/authorizenet/api/address_profiles.py,sha256=_BmhMbhrWnUyk7WfY6I0cDxDtS9r2H8l69OnZV6wxRU,4779
|
|
@@ -13,13 +13,9 @@ terminusgps/authorizenet/api/transactions.py,sha256=y1Bq0niTWsWEi_tMJzXUTYj3_GoJ
|
|
|
13
13
|
terminusgps/django/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
terminusgps/django/mixins.py,sha256=Q9ZJuzpk3d9lDnlVA8ZTVvnZWxB13p08EQ8yVJcztn4,1034
|
|
15
15
|
terminusgps/django/settings.py,sha256=JcHo9uonGLXoIbapkTYJ4GSIfiS74CtChzw1Cuq4XOk,644
|
|
16
|
-
terminusgps/django/utils.py,sha256=SYDQyHA5tTuVwdpZGsCtf0LpTTD0ilRKoxa8StfSTpQ,156
|
|
17
16
|
terminusgps/django/validators.py,sha256=chuJ4I1DBQ_H5dwb6CXPEIyv_CUuEzJzRUSijfss1vc,3510
|
|
18
|
-
terminusgps/django/forms/__init__.py,sha256=
|
|
19
|
-
terminusgps/django/forms/
|
|
20
|
-
terminusgps/django/forms/forms.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
terminusgps/django/forms/renderer.py,sha256=QSLQ94Ff7ZaV1jD6wAL-ltvdKIblED8Wsv5EXvSbUJ4,394
|
|
22
|
-
terminusgps/django/forms/widgets.py,sha256=No4hPQ-BK5rrotaQ5iJEjWo8quYIPNf_1C2y4OAIxro,2037
|
|
17
|
+
terminusgps/django/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
+
terminusgps/django/forms/renderer.py,sha256=20tZlfxiyDanJQMyEIO7HS77Bn1J_IiM3iU_qADdSmw,154
|
|
23
19
|
terminusgps/wialon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
20
|
terminusgps/wialon/constants.py,sha256=p2BhopeE6lXzjzdzb4ZKOz0rhJQIMUbXLrBy1Yzf57s,13730
|
|
25
21
|
terminusgps/wialon/flags.py,sha256=M50EdhxQ8IMnJnU0mrHK7-h8Asc6tvNiTOOfd1dBW6A,12815
|
|
@@ -36,7 +32,7 @@ terminusgps/wialon/items/route.py,sha256=nXFQNzIU2c-_rG-8r_cvZPq_hB7vQgMO5zIe7Sz
|
|
|
36
32
|
terminusgps/wialon/items/unit.py,sha256=Ze3t5aK3UX-z95BiDSaDCttCvAs-g6ZyA_NWx3uYp6Y,5382
|
|
37
33
|
terminusgps/wialon/items/unit_group.py,sha256=zP6nBETRQ3tI6V7BYq5yoyG78DGyZM-rU14TMRrpAZA,2075
|
|
38
34
|
terminusgps/wialon/items/user.py,sha256=HY3EWKD7RwcySjPL91Ulmll_gZZXoRaIr6v6I8tW2VM,5011
|
|
39
|
-
python_terminusgps-43.
|
|
40
|
-
python_terminusgps-43.
|
|
41
|
-
python_terminusgps-43.
|
|
42
|
-
python_terminusgps-43.
|
|
35
|
+
python_terminusgps-43.3.0.dist-info/METADATA,sha256=V-v07_b3Ae6h3OKO2l60Qsc_y4rBUhMBncqs8-HWyDU,938
|
|
36
|
+
python_terminusgps-43.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
37
|
+
python_terminusgps-43.3.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
38
|
+
python_terminusgps-43.3.0.dist-info/RECORD,,
|
|
@@ -11,10 +11,10 @@ def execute_controller(
|
|
|
11
11
|
Executes an Authorizenet API controller and returns its response.
|
|
12
12
|
|
|
13
13
|
:param controller: An Authorizenet API controller.
|
|
14
|
-
:type controller:
|
|
14
|
+
:type controller: ~authorizenet.apicontrollersbase.APIOperationBase
|
|
15
15
|
:raises AuthorizenetControllerExecutionError: If the API call fails.
|
|
16
16
|
:returns: An Authorizenet API response, if any.
|
|
17
|
-
:rtype:
|
|
17
|
+
:rtype: ~lxml.objectify.ObjectifiedElement | None
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
controller.setenvironment(get_environment())
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .forms import *
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
from django.conf import settings
|
|
2
|
-
from django.core.exceptions import ImproperlyConfigured
|
|
3
1
|
from django.forms.renderers import TemplatesSetting
|
|
4
2
|
|
|
5
|
-
if settings.configured and not hasattr(settings, "DEFAULT_FIELD_CLASS"):
|
|
6
|
-
raise ImproperlyConfigured("'DEFAULT_FIELD_CLASS' setting is required.")
|
|
7
|
-
|
|
8
3
|
|
|
9
4
|
class TerminusgpsFormRenderer(TemplatesSetting):
|
|
10
5
|
field_template_name = "terminusgps/field.html"
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
from collections.abc import Sequence
|
|
2
|
-
|
|
3
|
-
from authorizenet import apicontractsv1
|
|
4
|
-
from django import forms
|
|
5
|
-
|
|
6
|
-
from .widgets import AddressWidget, CreditCardWidget
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class CreditCardField(forms.MultiValueField):
|
|
10
|
-
require_all_fields = True
|
|
11
|
-
|
|
12
|
-
def __init__(self, fields=(), widget=CreditCardWidget(), *args, **kwargs) -> None:
|
|
13
|
-
if not fields:
|
|
14
|
-
fields = (
|
|
15
|
-
forms.CharField(label="Card #"),
|
|
16
|
-
forms.IntegerField(label="Expiry Month", min_value=1, max_value=12),
|
|
17
|
-
forms.IntegerField(label="Expiry Year"),
|
|
18
|
-
forms.CharField(label="CCV #"),
|
|
19
|
-
)
|
|
20
|
-
super().__init__(fields=fields, widget=widget, *args, **kwargs)
|
|
21
|
-
|
|
22
|
-
def compress(self, data_list: Sequence[str]) -> apicontractsv1.creditCardType:
|
|
23
|
-
"""Compresses ``data_list`` into a :py:obj:`~authorizenet.apicontractsv1.creditCardType`."""
|
|
24
|
-
return apicontractsv1.creditCardType(
|
|
25
|
-
**{
|
|
26
|
-
"cardNumber": data_list[0],
|
|
27
|
-
"expirationDate": f"{data_list[1]}-{data_list[2]}",
|
|
28
|
-
"cardCode": data_list[3],
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class AddressField(forms.MultiValueField):
|
|
34
|
-
require_all_fields = True
|
|
35
|
-
|
|
36
|
-
def __init__(self, fields=(), widget=AddressWidget(), *args, **kwargs) -> None:
|
|
37
|
-
if not fields:
|
|
38
|
-
fields = (
|
|
39
|
-
forms.CharField(label="Street", max_length=128),
|
|
40
|
-
forms.CharField(label="City", max_length=128),
|
|
41
|
-
forms.CharField(label="State", max_length=64),
|
|
42
|
-
forms.CharField(label="Zip #", min_length=5, max_length=10),
|
|
43
|
-
forms.CharField(label="Country", max_length=2),
|
|
44
|
-
)
|
|
45
|
-
super().__init__(fields=fields, widget=widget, *args, **kwargs)
|
|
46
|
-
|
|
47
|
-
def compress(self, data_list: Sequence[str]) -> apicontractsv1.customerAddressType:
|
|
48
|
-
"""Compresses ``data_list`` into a :py:obj:`~authorizenet.apicontractsv1.customerAddressType`."""
|
|
49
|
-
return apicontractsv1.customerAddressType(
|
|
50
|
-
**{
|
|
51
|
-
"address": data_list[0],
|
|
52
|
-
"city": data_list[1],
|
|
53
|
-
"state": data_list[2],
|
|
54
|
-
"zip": data_list[3],
|
|
55
|
-
"country": data_list[4],
|
|
56
|
-
}
|
|
57
|
-
)
|
|
File without changes
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
from authorizenet import apicontractsv1
|
|
2
|
-
from django import forms
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class CaptchaWidget(forms.widgets.CheckboxInput):
|
|
6
|
-
def get_context(self, name, value, attrs):
|
|
7
|
-
context = super().get_context(name, value, attrs)
|
|
8
|
-
print(f"{context = }")
|
|
9
|
-
return context
|
|
10
|
-
|
|
11
|
-
def check_test(self, value):
|
|
12
|
-
return bool(value)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class CreditCardWidget(forms.widgets.MultiWidget):
|
|
16
|
-
def __init__(self, widgets=(), attrs: dict | None = None) -> None:
|
|
17
|
-
if not widgets:
|
|
18
|
-
widgets = [
|
|
19
|
-
forms.TextInput(attrs=attrs),
|
|
20
|
-
forms.TextInput(attrs=attrs),
|
|
21
|
-
forms.TextInput(attrs=attrs),
|
|
22
|
-
forms.TextInput(attrs=attrs),
|
|
23
|
-
]
|
|
24
|
-
super().__init__(widgets=widgets, attrs=attrs)
|
|
25
|
-
|
|
26
|
-
def decompress(
|
|
27
|
-
self, value: apicontractsv1.creditCardType | None
|
|
28
|
-
) -> list[str | None]:
|
|
29
|
-
"""Decompresses a :py:attr:`~authorizenet.apicontractsv1.creditCardType` into a list of strings."""
|
|
30
|
-
if value is None:
|
|
31
|
-
return [None, None, None, None]
|
|
32
|
-
|
|
33
|
-
expiry_parts = value.expirationDate.split("-")
|
|
34
|
-
return [value.cardNumber, expiry_parts[0], expiry_parts[1], value.cardCode]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class AddressWidget(forms.widgets.MultiWidget):
|
|
38
|
-
def __init__(self, widgets=(), attrs: dict | None = None) -> None:
|
|
39
|
-
if not widgets:
|
|
40
|
-
widgets = [
|
|
41
|
-
forms.TextInput(attrs=attrs),
|
|
42
|
-
forms.TextInput(attrs=attrs),
|
|
43
|
-
forms.TextInput(attrs=attrs),
|
|
44
|
-
forms.TextInput(attrs=attrs),
|
|
45
|
-
forms.TextInput(attrs=attrs),
|
|
46
|
-
]
|
|
47
|
-
super().__init__(widgets=widgets, attrs=attrs)
|
|
48
|
-
|
|
49
|
-
def decompress(
|
|
50
|
-
self, value: apicontractsv1.customerAddressType | None
|
|
51
|
-
) -> list[str | None]:
|
|
52
|
-
"""Decompresses a :py:attr:`~authorizenet.apicontractsv1.customerAddressType` into a list of strings."""
|
|
53
|
-
if value is None:
|
|
54
|
-
return [None, None, None, None, None]
|
|
55
|
-
|
|
56
|
-
return [value.address, value.city, value.state, value.country, value.zip]
|
terminusgps/django/utils.py
DELETED
|
File without changes
|
{python_terminusgps-43.2.0.dist-info → python_terminusgps-43.3.0.dist-info}/licenses/COPYING
RENAMED
|
File without changes
|