python-terminusgps 43.1.0__py3-none-any.whl → 43.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,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 43.1.0
3
+ Version: 43.2.0
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
- Project-URL: Documentation, https://docs.terminusgps.com
5
+ Project-URL: Documentation, https://terminusgps.github.io/python-terminusgps
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
7
7
  Author-email: Blake Nall <blake@terminusgps.com>
8
8
  License-File: COPYING
@@ -16,9 +16,6 @@ Requires-Dist: django>=5.2.6
16
16
  Requires-Dist: python-wialon>=1.2.4
17
17
  Description-Content-Type: text/markdown
18
18
 
19
- # Terminus GPS Internal Tools
19
+ # python-terminusgps
20
20
 
21
21
  *python-terminusgps* adds libraries for working with web APIs used by [Terminus GPS](https://terminusgps.com/) developers.
22
-
23
- [Documentation](https://docs.terminusgps.com/)
24
-
@@ -1,15 +1,15 @@
1
1
  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
- terminusgps/authorizenet/constants.py,sha256=MHAij1DKLJNUFOAbtb1_pKHrfXU2T7L6d0_zM5P15Gw,489
4
+ terminusgps/authorizenet/constants.py,sha256=xU2oGpxsAlgJftI_S4WL8Ii5TJ3OD5FXnCUNceLzXbM,1015
5
5
  terminusgps/authorizenet/controllers.py,sha256=oEomwVPu6uT2z5BGKKm-zLWXhODvBajUQ4GxDOHTecQ,2011
6
6
  terminusgps/authorizenet/validators.py,sha256=Wq4rqEuqG3JzOO7O1wM6oQ0FciNxxOK0HnJqTuLa8CY,3916
7
7
  terminusgps/authorizenet/api/__init__.py,sha256=VXR4Yco1yz5R-R7vgaH2zTP9VFqzfvvGy_XJVjyb3i0,154
8
- terminusgps/authorizenet/api/address_profiles.py,sha256=ee3DRrblBZQsMMllUU2sJowFKHoohwbDKVamhk0Ldi8,4979
9
- terminusgps/authorizenet/api/customer_profiles.py,sha256=e965mlIyuivWK3GMlTlByxj91cOe52oUJ6w8wd7vpYk,4682
10
- terminusgps/authorizenet/api/payment_profiles.py,sha256=Gm_pAaW5hvUokCyM_WLun_-g9er0b8WjDOqekuuEBcU,6776
11
- terminusgps/authorizenet/api/subscriptions.py,sha256=f3ogGp4tyRqQGMbcSEfIbGRppnd71dGC9p4xIWoke4I,4721
12
- terminusgps/authorizenet/api/transactions.py,sha256=NOXfW8XNm5b4mic1H1BcJQ8AlhQ8bTpBp-0ipu9u3gQ,2861
8
+ terminusgps/authorizenet/api/address_profiles.py,sha256=_BmhMbhrWnUyk7WfY6I0cDxDtS9r2H8l69OnZV6wxRU,4779
9
+ terminusgps/authorizenet/api/customer_profiles.py,sha256=cmXFH4a_Ng26o4u6RMVPBqLWxYSearlhNgM8n7ArZKs,4502
10
+ terminusgps/authorizenet/api/payment_profiles.py,sha256=etyfvivAtXeo-GdUXxyNVkDfrjPg3fLXSnp-aRsnqxY,6516
11
+ terminusgps/authorizenet/api/subscriptions.py,sha256=wdiD3UaKSkPQhTZLrDWq8ZFNPW5JIIjOWyPvAEgb1xg,4541
12
+ terminusgps/authorizenet/api/transactions.py,sha256=y1Bq0niTWsWEi_tMJzXUTYj3_GoJnL5K4fPuGER77kw,2731
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
@@ -27,16 +27,16 @@ terminusgps/wialon/session.py,sha256=-WSjbWT5GpueD3xEM9EHBx0iPTOMB1BUr1swzyPZPZg
27
27
  terminusgps/wialon/utils.py,sha256=E7J9s4p7P-OePtttxcBogxu3WiXqf4xxr_Tksbisl60,9957
28
28
  terminusgps/wialon/validators.py,sha256=o5__H9HHnGYth8QAKErJG5rEub7FnT8ue0S3IQ8b67o,4232
29
29
  terminusgps/wialon/items/__init__.py,sha256=RTiY9ziXqKCB8VWGoExOIErDlUMBBfzzsA7nlOlCZ2w,41
30
- terminusgps/wialon/items/account.py,sha256=OSTTbw-nBFqzL1AnGYQ7-Gaymr-S5wx1a0uDzOFlxCM,7888
31
- terminusgps/wialon/items/base.py,sha256=579Dmapm_v8QDJYa0NJhdqSWYR0X6aVx53slD38pltw,8639
32
- terminusgps/wialon/items/factory.py,sha256=RhzINAW2N6MbVbUvPO3EuCpm1h_cMX4-R7QCdMfzatU,3831
33
- terminusgps/wialon/items/resource.py,sha256=I6va2TLt_yz-C3c02Thv8s-nm-6rZZ2UBEC44Cfow18,4813
34
- terminusgps/wialon/items/retranslator.py,sha256=nxp_SNsd9VBqEJcKOVLF6fxq4XS3gGjBX_Xk9h5zrEc,1850
35
- terminusgps/wialon/items/route.py,sha256=xixlex6bUeFHXucVQdbfQUSLxI1Rhwk6slhoFP2odp0,1307
36
- terminusgps/wialon/items/unit.py,sha256=kIjnMOjjI3siCaA6wXojzEK2xqFIm5mN4xNqzKDUa1Q,5473
37
- terminusgps/wialon/items/unit_group.py,sha256=L7-PAVCj8Bf50fa04Ials4VHg8LOWkw6hwNhtSyMksE,2133
38
- terminusgps/wialon/items/user.py,sha256=hZlFeXCgOAdivl_Anjp_We6Cy5U8IxWNDAgm5MFZfp0,5194
39
- python_terminusgps-43.1.0.dist-info/METADATA,sha256=Ow7FBghw7F_s3rulWQ-r-HRiWXLYGd39GcCSHafGzjU,976
40
- python_terminusgps-43.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- python_terminusgps-43.1.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
42
- python_terminusgps-43.1.0.dist-info/RECORD,,
30
+ terminusgps/wialon/items/account.py,sha256=FL_PZXimLarP3tZX1E9dLA977mSUOx98YJxVyc4WOxg,7588
31
+ terminusgps/wialon/items/base.py,sha256=YSK00q2qUR9SluXojfy2HjfVbMQfnHp4djTcpNSCer4,9164
32
+ terminusgps/wialon/items/factory.py,sha256=7Xjog8qJPUqKj6RVO92ZaN_fD6WWb9x9ARHkZ3VPeBo,4074
33
+ terminusgps/wialon/items/resource.py,sha256=L8myvk9I8snUKFPWBdhMmP1KCb5aC8OtOe4P7Lb2KoY,4792
34
+ terminusgps/wialon/items/retranslator.py,sha256=lWywPciEkazL0GbEV0r1TjBSNEpQcCQ5tDBOua0pGtE,1827
35
+ terminusgps/wialon/items/route.py,sha256=nXFQNzIU2c-_rG-8r_cvZPq_hB7vQgMO5zIe7Sz5KmU,1278
36
+ terminusgps/wialon/items/unit.py,sha256=Ze3t5aK3UX-z95BiDSaDCttCvAs-g6ZyA_NWx3uYp6Y,5382
37
+ terminusgps/wialon/items/unit_group.py,sha256=zP6nBETRQ3tI6V7BYq5yoyG78DGyZM-rU14TMRrpAZA,2075
38
+ terminusgps/wialon/items/user.py,sha256=HY3EWKD7RwcySjPL91Ulmll_gZZXoRaIr6v6I8tW2VM,5011
39
+ python_terminusgps-43.2.0.dist-info/METADATA,sha256=TFEZSdm0iQwTrZfMqRfI6kwSxUOxoKC7KV9SLSuADq0,938
40
+ python_terminusgps-43.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ python_terminusgps-43.2.0.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
42
+ python_terminusgps-43.2.0.dist-info/RECORD,,
@@ -21,13 +21,13 @@ def create_customer_shipping_address(
21
21
  `createCustomerShippingAddressRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-shipping-address>`_.
22
22
 
23
23
  :param customer_profile_id: An Authorizenet customer profile id.
24
- :type customer_profile_id: :py:obj:`int`
24
+ :type customer_profile_id: int
25
25
  :param address: An Authorizenet customer address element.
26
- :type address: :py:obj:`~authorizenet.apicontractsv1.customerAddressType`
27
- :param default: Whether to set the address profile as default. Default is :py:obj:`False`.
28
- :type default: :py:obj:`bool`
26
+ :type address: ~authorizenet.apicontractsv1.customerAddressType
27
+ :param default: Whether to set the address profile as default. Default is False.
28
+ :type default: bool
29
29
  :returns: An Authorizenet createCustomerShippingAddressResponse element.
30
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
30
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
31
31
 
32
32
  """
33
33
  request = apicontractsv1.createCustomerShippingAddressRequest()
@@ -48,11 +48,11 @@ def get_customer_shipping_address(
48
48
  `getCustomerShippingAddressRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-shipping-address>`_.
49
49
 
50
50
  :param customer_profile_id: An Authorizenet customer profile id.
51
- :type customer_profile_id: :py:obj:`int`
51
+ :type customer_profile_id: int
52
52
  :param address_profile_id: An Authorizenet customer address profile id.
53
- :type address_profile_id: :py:obj:`int`
53
+ :type address_profile_id: int
54
54
  :returns: An Authorizenet getCustomerShippingAddressResponse element.
55
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
55
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
56
56
 
57
57
  """
58
58
  request = apicontractsv1.getCustomerShippingAddressRequest()
@@ -74,13 +74,13 @@ def update_customer_shipping_address(
74
74
  `updateCustomerShippingAddressRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-shipping-address>`_.
75
75
 
76
76
  :param customer_profile_id: An Authorizenet customer profile id.
77
- :type customer_profile_id: :py:obj:`int`
77
+ :type customer_profile_id: int
78
78
  :param address: An Authorizenet customer address element.
79
- :type address: :py:obj:`~authorizenet.apicontractsv1.customerAddressType`
80
- :param default: Whether to set the address profile as default. Default is :py:obj:`False`.
81
- :type default: :py:obj:`bool`
79
+ :type address: ~authorizenet.apicontractsv1.customerAddressType
80
+ :param default: Whether to set the address profile as default. Default is False.
81
+ :type default: bool
82
82
  :returns: An Authorizenet updateCustomerShippingAddressResponse element.
83
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
83
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
84
84
 
85
85
  """
86
86
  request = apicontractsv1.updateCustomerShippingAddressRequest()
@@ -101,11 +101,11 @@ def delete_customer_shipping_address(
101
101
  `deleteCustomerShippingAddressRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-delete-customer-shipping-address>`_.
102
102
 
103
103
  :param customer_profile_id: An Authorizenet customer profile id.
104
- :type customer_profile_id: :py:obj:`int`
104
+ :type customer_profile_id: int
105
105
  :param address_profile_id: An Authorizenet customer address profile id.
106
- :type address_profile_id: :py:obj:`int`
106
+ :type address_profile_id: int
107
107
  :returns: An Authorizenet deleteCustomerShippingAddressResponse element.
108
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
108
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
109
109
 
110
110
  """
111
111
  request = apicontractsv1.deleteCustomerShippingAddressRequest()
@@ -20,13 +20,13 @@ def create_customer_profile(
20
20
  `createCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile>`_.
21
21
 
22
22
  :param merchant_id: A merchant designated customer id.
23
- :type merchant_id: :py:obj:`str`
23
+ :type merchant_id: str
24
24
  :param email: A customer email address.
25
- :type email: :py:obj:`str`
25
+ :type email: str
26
26
  :param description: An optional customer description.
27
- :type description: :py:obj:`str`
27
+ :type description: str
28
28
  :returns: An Authorizenet createCustomerProfileResponse element.
29
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
29
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
30
30
 
31
31
  """
32
32
  request = apicontractsv1.createCustomerProfileRequest()
@@ -48,11 +48,11 @@ def get_customer_profile(
48
48
  `getCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile>`_.
49
49
 
50
50
  :param customer_profile_id: An Authorizenet customer profile id.
51
- :type customer_profile_id: :py:obj:`int`
52
- :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
53
- :type include_issuer_info: :py:obj:`bool`
51
+ :type customer_profile_id: int
52
+ :param include_issuer_info: Whether to include issuer info in the response. Default is False.
53
+ :type include_issuer_info: bool
54
54
  :returns: An Authorizenet getCustomerProfileResponse element.
55
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
55
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
56
56
 
57
57
  """
58
58
  request = apicontractsv1.getCustomerProfileRequest()
@@ -70,7 +70,7 @@ def get_customer_profile_ids() -> ObjectifiedElement | None:
70
70
  `getCustomerProfileIdsRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile-ids>`_.
71
71
 
72
72
  :returns: An Authorizenet getCustomerProfileIdsResponse element.
73
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
73
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
74
74
 
75
75
  """
76
76
  request = apicontractsv1.getCustomerProfileIdsRequest()
@@ -88,9 +88,9 @@ def update_customer_profile(
88
88
  `updateCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-profile>`_.
89
89
 
90
90
  :param profile: An Authorizenet customer profile ex element.
91
- :type profile: :py:obj:`~authorizenet.apicontractsv1.customerProfileExType`
91
+ :type profile: ~authorizenet.apicontractsv1.customerProfileExType
92
92
  :returns: An Authorizenet updateCustomerProfileResponse element.
93
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
93
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
94
94
 
95
95
  """
96
96
  request = apicontractsv1.updateCustomerProfileRequest()
@@ -109,9 +109,9 @@ def delete_customer_profile(
109
109
  `deleteCustomerProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-delete-customer-profile>`_.
110
110
 
111
111
  :param customer_profile_id: An Authorizenet customer profile id.
112
- :type customer_profile_id: :py:obj:`int`
112
+ :type customer_profile_id: int
113
113
  :returns: An Authorizenet deleteCustomerProfileResponse element.
114
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
114
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
115
115
 
116
116
  """
117
117
  request = apicontractsv1.deleteCustomerProfileRequest()
@@ -25,12 +25,12 @@ def create_customer_payment_profile(
25
25
  `createCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-payment-profile>`_.
26
26
 
27
27
  :param customer_profile_id: An Authorizenet customer profile id.
28
- :type customer_profile_id: :py:obj:`int`
28
+ :type customer_profile_id: int
29
29
  :param payment_profile: An Authorizenet payment profile element.
30
- :type payment_profile: :py:obj:`~authorizenet.apicontractsv1.customerPaymentProfileType`
31
- :param validate: Whether to validate the payment profile. Default is :py:obj:`True`.
30
+ :type payment_profile: ~authorizenet.apicontractsv1.customerPaymentProfileType
31
+ :param validate: Whether to validate the payment profile. Default is True.
32
32
  :returns: An Authorizenet createCustomerPaymentProfileResponse element.
33
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
33
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
34
34
 
35
35
  """
36
36
  request = apicontractsv1.createCustomerPaymentProfileRequest()
@@ -54,13 +54,13 @@ def get_customer_payment_profile(
54
54
  `getCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-payment-profile>`_.
55
55
 
56
56
  :param customer_profile_id: An Authorizenet customer profile id.
57
- :type customer_profile_id: :py:obj:`int`
57
+ :type customer_profile_id: int
58
58
  :param payment_profile_id: An Authorizenet customer payment profile id.
59
- :type payment_profile_id: :py:obj:`int`
60
- :param include_issuer_info: Whether to include issuer info in the response. Default is :py:obj:`False`.
61
- :type include_issuer_info: :py:obj:`bool`
59
+ :type payment_profile_id: int
60
+ :param include_issuer_info: Whether to include issuer info in the response. Default is False.
61
+ :type include_issuer_info: bool
62
62
  :returns: An Authorizenet getCustomerPaymentProfileResponse element.
63
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
63
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
64
64
 
65
65
  """
66
66
  request = apicontractsv1.getCustomerPaymentProfileRequest()
@@ -81,11 +81,11 @@ def validate_customer_payment_profile(
81
81
  `validateCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-validate-customer-payment-profile>`_.
82
82
 
83
83
  :param customer_profile_id: An Authorizenet customer profile id.
84
- :type customer_profile_id: :py:obj:`int`
84
+ :type customer_profile_id: int
85
85
  :param payment_profile_id: An Authorizenet customer payment profile id.
86
- :type payment_profile_id: :py:obj:`int`
86
+ :type payment_profile_id: int
87
87
  :returns: An Authorizenet validateCustomerPaymentProfileResponse element.
88
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
88
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
89
89
 
90
90
  """
91
91
  request = apicontractsv1.validateCustomerPaymentProfileRequest()
@@ -109,15 +109,15 @@ def update_customer_payment_profile(
109
109
  `updateCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-profile>`_.
110
110
 
111
111
  :param customer_profile_id: An Authorizenet customer profile id.
112
- :type customer_profile_id: :py:obj:`int`
112
+ :type customer_profile_id: int
113
113
  :param payment_profile_id: An Authorizenet customer payment profile id.
114
- :type payment_profile_id: :py:obj:`int`
114
+ :type payment_profile_id: int
115
115
  :param payment_profile: An Authorizenet payment profile element.
116
- :type payment_profile: :py:obj:`~authorizenet.apicontractsv1.customerPaymentProfileType`
117
- :param validate: Whether to validate the payment profile. Default is :py:obj:`True`.
118
- :type validate: :py:obj:`bool`
116
+ :type payment_profile: ~authorizenet.apicontractsv1.customerPaymentProfileType
117
+ :param validate: Whether to validate the payment profile. Default is True.
118
+ :type validate: bool
119
119
  :returns: An Authorizenet updateCustomerPaymentProfileResponse element.
120
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
120
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
121
121
 
122
122
  """
123
123
  if not hasattr(payment_profile, "customerPaymentProfileId"):
@@ -142,11 +142,11 @@ def delete_customer_payment_profile(
142
142
  `deleteCustomerPaymentProfileRequest <https://developer.authorize.net/api/reference/index.html#customer-profiles-delete-customer-payment-profile>`_.
143
143
 
144
144
  :param customer_profile_id: An Authorizenet customer profile id.
145
- :type customer_profile_id: :py:obj:`int`
145
+ :type customer_profile_id: int
146
146
  :param payment_profile_id: An Authorizenet customer payment profile id.
147
- :type payment_profile_id: :py:obj:`int`
147
+ :type payment_profile_id: int
148
148
  :returns: An Authorizenet deleteCustomerPaymentProfileResponse element.
149
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
149
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
150
150
 
151
151
  """
152
152
  request = apicontractsv1.deleteCustomerPaymentProfileRequest()
@@ -20,9 +20,9 @@ def create_subscription(
20
20
  `ARBCreateSubscriptionRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-create-a-subscription>`_.
21
21
 
22
22
  :param subscription: An Authorizenet ARBSubscriptionType element.
23
- :type subscription: :py:obj:`~authorizenet.apicontractsv1.ARBSubscriptionType`
23
+ :type subscription: ~authorizenet.apicontractsv1.ARBSubscriptionType
24
24
  :returns: An Authorizenet ARBCreateSubscriptionResponse element.
25
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
25
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
26
26
 
27
27
  """
28
28
  request = apicontractsv1.ARBCreateSubscriptionRequest()
@@ -41,11 +41,11 @@ def get_subscription(
41
41
  `ARBGetSubscriptionRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-get-subscription>`_.
42
42
 
43
43
  :param subscription_id: An Authorizenet subscription id.
44
- :type subscription_id: :py:obj:`int`
45
- :param include_transactions: Whether to include the subscription transaction list in the response. Default is :py:obj:`True`.
46
- :type include_transactions: :py:obj:`bool`
44
+ :type subscription_id: int
45
+ :param include_transactions: Whether to include the subscription transaction list in the response. Default is True.
46
+ :type include_transactions: bool
47
47
  :returns: An Authorizenet ARBGetSubscriptionResponse element.
48
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
48
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
49
49
 
50
50
  """
51
51
  request = apicontractsv1.ARBGetSubscriptionRequest()
@@ -63,9 +63,9 @@ def get_subscription_status(subscription_id: int) -> ObjectifiedElement | None:
63
63
  `ARBGetSubscriptionStatusRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-get-subscription-status>`_.
64
64
 
65
65
  :param subscription_id: An Authorizenet subscription id.
66
- :type subscription_id: :py:obj:`int`
66
+ :type subscription_id: int
67
67
  :returns: An Authorizenet ARBGetSubscriptionStatusResponse element.
68
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
68
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
69
69
 
70
70
  """
71
71
  request = apicontractsv1.ARBGetSubscriptionStatusRequest()
@@ -84,11 +84,11 @@ def update_subscription(
84
84
  `ARBUpdateSubscriptionRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-update-a-subscription>`_.
85
85
 
86
86
  :param subscription_id: An Authorizenet subscription id.
87
- :type subscription_id: :py:obj:`int`
87
+ :type subscription_id: int
88
88
  :param subscription: An Authorizenet ARBSubscriptionType element.
89
- :type subscription: :py:obj:`~authorizenet.apicontractsv1.ARBSubscriptionType`
89
+ :type subscription: ~authorizenet.apicontractsv1.ARBSubscriptionType
90
90
  :returns: An Authorizenet ARBUpdateSubscriptionResponse element.
91
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
91
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
92
92
 
93
93
  """
94
94
  request = apicontractsv1.ARBUpdateSubscriptionRequest()
@@ -106,9 +106,9 @@ def cancel_subscription(subscription_id: int) -> ObjectifiedElement | None:
106
106
  `ARBCancelSubscriptionRequest <https://developer.authorize.net/api/reference/index.html#recurring-billing-cancel-a-subscription>`_.
107
107
 
108
108
  :param subscription_id: An Authorizenet subscription id.
109
- :type subscription_id: :py:obj:`int`
109
+ :type subscription_id: int
110
110
  :returns: An Authorizenet ARBCancelSubscriptionResponse element.
111
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
111
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
112
112
 
113
113
  """
114
114
  request = apicontractsv1.ARBCancelSubscriptionRequest()
@@ -18,11 +18,11 @@ def get_settled_batch_list(
18
18
  `getSettledBatchListRequest <https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-settled-batch-list>`_.
19
19
 
20
20
  :param start: First settlement date.
21
- :type start: :py:obj:`~datetime.datetime`
21
+ :type start: ~datetime.datetime
22
22
  :param end: Last settlement date.
23
- :type end: :py:obj:`~datetime.datetime`
23
+ :type end: ~datetime.datetime
24
24
  :returns: An Authorizenet getSettledBatchListResponse element.
25
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
25
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
26
26
 
27
27
  """
28
28
  request = apicontractsv1.getSettledBatchListRequest()
@@ -47,17 +47,17 @@ def get_transaction_list(
47
47
  `getTransactionListRequest <https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-transaction-list>`_.
48
48
 
49
49
  :param batch_id: An Authorizenet transaction batch id.
50
- :type batch_id :py:obj:`int`
51
- :param ordering: An Authorizenet transaction list ordering string. Default is :py:obj:`"submitTimeUTC"`.
52
- :type ordering: :py:obj:`str`
53
- :param descending: Whether to sort the transaction list in descending order. Default is :py:obj:`False` (ascending order).
54
- :type descending: :py:obj:`bool`
50
+ :type batch_id int
51
+ :param ordering: An Authorizenet transaction list ordering string. Default is "submitTimeUTC".
52
+ :type ordering: str
53
+ :param descending: Whether to sort the transaction list in descending order. Default is False (ascending order).
54
+ :type descending: bool
55
55
  :param limit: Total number of transactions to return in the list.
56
- :type limit: :py:obj:`int`
56
+ :type limit: int
57
57
  :param offset: Page number to return results from.
58
- :type offset: :py:obj:`int`
58
+ :type offset: int
59
59
  :returns: An Authorizenet getTransactionListResponse element.
60
- :rtype: :py:obj:`~lxml.objectify.ObjectifiedElement` | :py:obj:`None`
60
+ :rtype: ~lxml.objectify.ObjectifiedElement | None
61
61
 
62
62
  """
63
63
  sorting = apicontractsv1.TransactionListSorting()
@@ -1,3 +1,4 @@
1
+ from authorizenet import apicontractsv1
1
2
  from django.db import models
2
3
  from django.utils.translation import gettext_lazy as _
3
4
 
@@ -9,7 +10,21 @@ class AuthorizenetSubscriptionStatus(models.TextChoices):
9
10
  """An Authorizenet subscription status."""
10
11
 
11
12
  ACTIVE = "active", _("Active")
13
+ """Active subscription."""
12
14
  EXPIRED = "expired", _("Expired")
15
+ """Expired subscription."""
13
16
  SUSPENDED = "suspended", _("Suspended")
17
+ """Suspended subscription."""
14
18
  CANCELED = "canceled", _("Canceled")
19
+ """Canceled subscription."""
15
20
  TERMINATED = "terminated", _("Terminated")
21
+ """Terminated subscription."""
22
+
23
+
24
+ class AuthorizenetSubscriptionIntervalUnit(models.TextChoices):
25
+ """An Authorizenet subscription interval unit."""
26
+
27
+ DAYS = apicontractsv1.ARBSubscriptionUnitEnum.days, _("Days")
28
+ """Days interval unit."""
29
+ MONTHS = apicontractsv1.ARBSubscriptionUnitEnum.months, _("Months")
30
+ """Months interval unit."""
@@ -1,6 +1,6 @@
1
- from collections.abc import Iterable
2
- from decimal import Decimal
3
- from typing import override
1
+ import collections.abc
2
+ import decimal
3
+ import typing
4
4
 
5
5
  from terminusgps.wialon.items.base import WialonObject, requires_id
6
6
 
@@ -8,40 +8,46 @@ from terminusgps.wialon.items.base import WialonObject, requires_id
8
8
  class WialonAccount(WialonObject):
9
9
  """A Wialon `account <https://help.wialon.com/en/wialon-hosting/user-guide/management-system/accounts-and-resources>`_."""
10
10
 
11
- def create(self, resource_id: int | str, billing_plan: str) -> dict[str, str]:
11
+ def create(
12
+ self, resource_id: int | str, billing_plan: str
13
+ ) -> dict[str, str]:
12
14
  """
13
15
  Creates the account in Wialon and sets its id.
14
16
 
15
17
  :param resource_id: A Wialon resource id.
16
- :type creator_id: :py:obj:`int` | :py:obj:`str`
18
+ :type creator_id: int | str
17
19
  :param billing_plan: A Wialon account billing plan.
18
- :type billing_plan: :py:obj:`str`
20
+ :type billing_plan: str
19
21
  :raises ValueError: If ``resource_id`` wasn't a digit.
20
22
  :raises WialonAPIError: If something went wrong calling the Wialon API.
21
23
  :returns: A Wialon object dictionary.
22
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
24
+ :rtype: dict[str, str]
23
25
 
24
26
  """
25
27
  if isinstance(resource_id, str) and not resource_id.isdigit():
26
- raise ValueError(f"'resource_id' must be a digit, got '{resource_id}'.")
28
+ raise ValueError(
29
+ f"'resource_id' must be a digit, got '{resource_id}'."
30
+ )
27
31
  response = self.session.wialon_api.account_create_account(
28
32
  **{"itemId": resource_id, "plan": billing_plan}
29
33
  )
30
34
  self.id = resource_id
31
35
  return response
32
36
 
33
- @override
37
+ @typing.override
34
38
  @requires_id
35
- def delete(self, reasons: Iterable[str] | None = None) -> dict[str, str]:
39
+ def delete(
40
+ self, reasons: collections.abc.Collection[str] | None = None
41
+ ) -> dict[str, str]:
36
42
  """
37
43
  Deletes the account in Wialon.
38
44
 
39
- :param reasons: An iterable of reason strings.
40
- :type reasons: :py:obj:`~collections.abc.Iterable`[:py:obj:`str`]
45
+ :param reasons: An optional collection of reason strings. Default is :py:obj:`None`.
46
+ :type reasons: ~collections.abc.Collection[str] | None
41
47
  :raises AssertionError: If the Wialon account id wasn't set.
42
48
  :raises WialonAPIError: If something went wrong calling the Wialon API.
43
49
  :returns: An empty dictionary.
44
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
50
+ :rtype: dict[str, str]
45
51
 
46
52
  """
47
53
  return self.session.wialon_api.account_delete_account(
@@ -58,7 +64,7 @@ class WialonAccount(WialonObject):
58
64
  :raises AssertionError: If the Wialon account id wasn't set.
59
65
  :raises WialonAPIError: If something went wrong calling the Wialon API.
60
66
  :returns: An empty dictionary.
61
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
67
+ :rtype: dict[str, str]
62
68
 
63
69
  """
64
70
  return self.session.wialon_api.account_enable_account(
@@ -73,7 +79,7 @@ class WialonAccount(WialonObject):
73
79
  :raises AssertionError: If the Wialon account id wasn't set.
74
80
  :raises WialonAPIError: If something went wrong calling the Wialon API.
75
81
  :returns: An empty dictionary.
76
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
82
+ :rtype: dict[str, str]
77
83
 
78
84
  """
79
85
  return self.session.wialon_api.account_enable_account(
@@ -82,21 +88,24 @@ class WialonAccount(WialonObject):
82
88
 
83
89
  @requires_id
84
90
  def do_payment(
85
- self, balance_update: Decimal, days_update: int, description: str
91
+ self,
92
+ balance_update: decimal.Decimal,
93
+ days_update: int,
94
+ description: str,
86
95
  ) -> dict[str, str]:
87
96
  """
88
97
  Makes an account payment in Wialon.
89
98
 
90
99
  :param balance_update: Amount to update the account balance by. Can be negative.
91
- :type balance_update: :py:obj:`~decimal.Decimal`
100
+ :type balance_update: ~decimal.Decimal
92
101
  :param days_update: Amount of days to add to the account.
93
- :type days_update: :py:obj:`int`
102
+ :type days_update: str
94
103
  :param description: A description for the payment.
95
- :type description: :py:obj:`str`
104
+ :type description: str
96
105
  :raises AssertionError: If the Wialon account id wasn't set.
97
106
  :raises WialonAPIError: If something went wrong calling the Wialon API.
98
107
  :returns: An empty dictionary.
99
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
108
+ :rtype: dict[str, str]
100
109
 
101
110
  """
102
111
  return self.session.wialon_api.account_do_payment(
@@ -114,11 +123,11 @@ class WialonAccount(WialonObject):
114
123
  Enables or disables the account's dealer rights in Wialon.
115
124
 
116
125
  :param enabled: Whether to set the account as a dealer or not.
117
- :type enabled: :py:obj:`bool`
126
+ :type enabled: bool
118
127
  :raises AssertionError: If the Wialon account id wasn't set.
119
128
  :raises WialonAPIError: If something went wrong calling the Wialon API.
120
129
  :returns: An empty dictionary.
121
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
130
+ :rtype: dict[str, str]
122
131
 
123
132
  """
124
133
  return self.session.wialon_api.account_update_dealer_rights(
@@ -129,22 +138,22 @@ class WialonAccount(WialonObject):
129
138
  def set_flags(
130
139
  self,
131
140
  flags: int,
132
- block_balance: Decimal = Decimal("0.00"),
133
- deny_balance: Decimal = Decimal("0.00"),
141
+ block_balance: decimal.Decimal = decimal.Decimal("0.00"),
142
+ deny_balance: decimal.Decimal = decimal.Decimal("0.00"),
134
143
  ) -> dict[str, str]:
135
144
  """
136
145
  Sets settings flags for the account in Wialon.
137
146
 
138
147
  :param flags: A Wialon account settings flag integer.
139
- :type flags: :py:obj:`int`
140
- :param block_balance: Balance required for account blocking. Default is ``"0.00"``.
141
- :type block_balance: :py:obj:`~decimal.Decimal`
142
- :param deny_balance: Balance required for service denial. Default is ``"0.00"``.
143
- :type deny_balance: :py:obj:`~decimal.Decimal`
148
+ :type flags: int
149
+ :param block_balance: Balance required for account blocking. Default is ``0.00``.
150
+ :type block_balance: ~decimal.Decimal
151
+ :param deny_balance: Balance required for service denial. Default is ``0.00``.
152
+ :type deny_balance: ~decimal.Decimal
144
153
  :raises AssertionError: If the Wialon account id wasn't set.
145
154
  :raises WialonAPIError: If something went wrong calling the Wialon API.
146
155
  :returns: An empty dictionary.
147
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
156
+ :rtype: dict[str, str]
148
157
 
149
158
  """
150
159
  return self.session.wialon_api.account_update_flags(
@@ -162,11 +171,11 @@ class WialonAccount(WialonObject):
162
171
  Sets the account's billing plan to ``name``.
163
172
 
164
173
  :param name: A Wialon billing plan name.
165
- :type name: :py:obj:`str`
174
+ :type name: str
166
175
  :raises AssertionError: If the Wialon account id wasn't set.
167
176
  :raises WialonAPIError: If something went wrong calling the Wialon API.
168
177
  :returns: An empty dictionary.
169
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
178
+ :rtype: dict[str, str]
170
179
 
171
180
  """
172
181
  return self.session.wialon_api.account_update_plan(
@@ -179,11 +188,11 @@ class WialonAccount(WialonObject):
179
188
  Sets the account's minimum days to ``days`` in Wialon.
180
189
 
181
190
  :param days: Minimum number of days as an integer.
182
- :type days: :py:obj:`int`
191
+ :type days: int
183
192
  :raises AssertionError: If the Wialon account id wasn't set.
184
193
  :raises WialonAPIError: If something went wrong calling the Wialon API.
185
194
  :returns: An empty dictionary.
186
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
195
+ :rtype: dict[str, str]
187
196
 
188
197
  """
189
198
  return self.session.wialon_api.account_update_min_days(
@@ -196,11 +205,11 @@ class WialonAccount(WialonObject):
196
205
  Returns account data from Wialon.
197
206
 
198
207
  :param response_type: A response flag integer. Default is ``1``.
199
- :type response_type: :py:obj:`int`
208
+ :type response_type: int
200
209
  :raises AssertionError: If the Wialon account id wasn't set.
201
210
  :raises WialonAPIError: If something went wrong calling the Wialon API.
202
211
  :returns: A dictionary containing the account's data from Wialon.
203
- :rtype: :py:obj:`dict`[:py:obj:`str`, :py:obj:`str`]
212
+ :rtype: dict[str, str]
204
213
 
205
214
  """
206
215
  return self.session.wialon_api.account_get_account_data(