tesla-api-sdk 1.0.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.
Files changed (119) hide show
  1. tesla_api_sdk-1.0.0.dist-info/METADATA +145 -0
  2. tesla_api_sdk-1.0.0.dist-info/RECORD +119 -0
  3. tesla_api_sdk-1.0.0.dist-info/WHEEL +5 -0
  4. tesla_api_sdk-1.0.0.dist-info/licenses/LICENSE +28 -0
  5. tesla_api_sdk-1.0.0.dist-info/top_level.txt +1 -0
  6. teslafleetmanagementapi/__init__.py +13 -0
  7. teslafleetmanagementapi/api_helper.py +19 -0
  8. teslafleetmanagementapi/configuration.py +270 -0
  9. teslafleetmanagementapi/controllers/__init__.py +11 -0
  10. teslafleetmanagementapi/controllers/base_controller.py +70 -0
  11. teslafleetmanagementapi/controllers/charging_controller.py +140 -0
  12. teslafleetmanagementapi/controllers/energy_controller.py +572 -0
  13. teslafleetmanagementapi/controllers/oauth_authorization_controller.py +165 -0
  14. teslafleetmanagementapi/controllers/partner_controller.py +181 -0
  15. teslafleetmanagementapi/controllers/user_controller.py +158 -0
  16. teslafleetmanagementapi/controllers/vehicles_controller.py +832 -0
  17. teslafleetmanagementapi/exceptions/__init__.py +6 -0
  18. teslafleetmanagementapi/exceptions/api_exception.py +36 -0
  19. teslafleetmanagementapi/exceptions/oauth_provider_exception.py +75 -0
  20. teslafleetmanagementapi/http/__init__.py +11 -0
  21. teslafleetmanagementapi/http/api_response.py +67 -0
  22. teslafleetmanagementapi/http/auth/__init__.py +6 -0
  23. teslafleetmanagementapi/http/auth/bearer_auth.py +103 -0
  24. teslafleetmanagementapi/http/auth/oauth_2.py +311 -0
  25. teslafleetmanagementapi/http/http_call_back.py +20 -0
  26. teslafleetmanagementapi/http/http_client_provider.py +23 -0
  27. teslafleetmanagementapi/http/http_method_enum.py +25 -0
  28. teslafleetmanagementapi/http/http_request.py +55 -0
  29. teslafleetmanagementapi/http/http_response.py +45 -0
  30. teslafleetmanagementapi/http/proxy_settings.py +50 -0
  31. teslafleetmanagementapi/logging/__init__.py +6 -0
  32. teslafleetmanagementapi/logging/configuration/__init__.py +5 -0
  33. teslafleetmanagementapi/logging/configuration/api_logging_configuration.py +398 -0
  34. teslafleetmanagementapi/logging/sdk_logger.py +28 -0
  35. teslafleetmanagementapi/models/__init__.py +85 -0
  36. teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py +110 -0
  37. teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py +110 -0
  38. teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py +109 -0
  39. teslafleetmanagementapi/models/api_1_vehicles_nearby_charging_sites_response.py +109 -0
  40. teslafleetmanagementapi/models/api_1_vehicles_response.py +162 -0
  41. teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +109 -0
  42. teslafleetmanagementapi/models/api_1_vehicles_wake_up_response.py +109 -0
  43. teslafleetmanagementapi/models/backup_request.py +92 -0
  44. teslafleetmanagementapi/models/backup_response.py +95 -0
  45. teslafleetmanagementapi/models/calendar_history_response.py +96 -0
  46. teslafleetmanagementapi/models/charge_duration.py +92 -0
  47. teslafleetmanagementapi/models/charge_history.py +125 -0
  48. teslafleetmanagementapi/models/charge_history_response.py +96 -0
  49. teslafleetmanagementapi/models/charge_start_time.py +92 -0
  50. teslafleetmanagementapi/models/charging_dimension.py +128 -0
  51. teslafleetmanagementapi/models/charging_fee.py +641 -0
  52. teslafleetmanagementapi/models/charging_history_data.py +98 -0
  53. teslafleetmanagementapi/models/charging_history_item.py +336 -0
  54. teslafleetmanagementapi/models/charging_history_response.py +96 -0
  55. teslafleetmanagementapi/models/charging_invoice.py +151 -0
  56. teslafleetmanagementapi/models/charging_location.py +293 -0
  57. teslafleetmanagementapi/models/charging_period.py +136 -0
  58. teslafleetmanagementapi/models/charging_session.py +355 -0
  59. teslafleetmanagementapi/models/charging_sessions_data.py +182 -0
  60. teslafleetmanagementapi/models/charging_sessions_response.py +96 -0
  61. teslafleetmanagementapi/models/default_real_mode.py +45 -0
  62. teslafleetmanagementapi/models/driver.py +289 -0
  63. teslafleetmanagementapi/models/drivers_response.py +135 -0
  64. teslafleetmanagementapi/models/enterprise_payer_request.py +141 -0
  65. teslafleetmanagementapi/models/event.py +107 -0
  66. teslafleetmanagementapi/models/fleet_status_request.py +105 -0
  67. teslafleetmanagementapi/models/fleet_telemetry_error.py +118 -0
  68. teslafleetmanagementapi/models/fleet_telemetry_errors_response.py +96 -0
  69. teslafleetmanagementapi/models/fleet_telemetry_jws_request.py +128 -0
  70. teslafleetmanagementapi/models/generic_update_response.py +95 -0
  71. teslafleetmanagementapi/models/kind.py +45 -0
  72. teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +42 -0
  73. teslafleetmanagementapi/models/live_status_response.py +96 -0
  74. teslafleetmanagementapi/models/location.py +128 -0
  75. teslafleetmanagementapi/models/location_1.py +128 -0
  76. teslafleetmanagementapi/models/me_response.py +95 -0
  77. teslafleetmanagementapi/models/mobile_enabled.py +128 -0
  78. teslafleetmanagementapi/models/oauth_provider_error.py +67 -0
  79. teslafleetmanagementapi/models/oauth_token.py +115 -0
  80. teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py +95 -0
  81. teslafleetmanagementapi/models/operation_request.py +93 -0
  82. teslafleetmanagementapi/models/orders_response.py +111 -0
  83. teslafleetmanagementapi/models/pagination.py +225 -0
  84. teslafleetmanagementapi/models/price_component.py +151 -0
  85. teslafleetmanagementapi/models/products_response.py +128 -0
  86. teslafleetmanagementapi/models/public_key_response.py +96 -0
  87. teslafleetmanagementapi/models/region_response.py +96 -0
  88. teslafleetmanagementapi/models/register_partner_request.py +92 -0
  89. teslafleetmanagementapi/models/register_partner_response.py +96 -0
  90. teslafleetmanagementapi/models/response.py +105 -0
  91. teslafleetmanagementapi/models/response_1.py +92 -0
  92. teslafleetmanagementapi/models/response_2.py +95 -0
  93. teslafleetmanagementapi/models/response_3.py +164 -0
  94. teslafleetmanagementapi/models/response_api_1_dx_vehicles_options_response.py +112 -0
  95. teslafleetmanagementapi/models/response_api_1_dx_warranty_details_response.py +169 -0
  96. teslafleetmanagementapi/models/response_calendar_history_response.py +110 -0
  97. teslafleetmanagementapi/models/response_charge_history_response.py +98 -0
  98. teslafleetmanagementapi/models/response_fleet_telemetry_errors_response.py +98 -0
  99. teslafleetmanagementapi/models/response_live_status_response.py +310 -0
  100. teslafleetmanagementapi/models/response_me_response.py +131 -0
  101. teslafleetmanagementapi/models/response_orders_response.py +209 -0
  102. teslafleetmanagementapi/models/response_public_key_response.py +92 -0
  103. teslafleetmanagementapi/models/response_region_response.py +105 -0
  104. teslafleetmanagementapi/models/response_register_partner_response.py +331 -0
  105. teslafleetmanagementapi/models/signaling.py +118 -0
  106. teslafleetmanagementapi/models/simple_ok_response.py +105 -0
  107. teslafleetmanagementapi/models/site_info_response.py +105 -0
  108. teslafleetmanagementapi/models/storm_mode_request.py +92 -0
  109. teslafleetmanagementapi/models/tariff_element.py +136 -0
  110. teslafleetmanagementapi/models/tariffs.py +136 -0
  111. teslafleetmanagementapi/models/time_of_use_settings_request.py +95 -0
  112. teslafleetmanagementapi/models/total_cost.py +151 -0
  113. teslafleetmanagementapi/models/tou_settings.py +105 -0
  114. teslafleetmanagementapi/models/vehicle_base.py +266 -0
  115. teslafleetmanagementapi/models/vehicle_option.py +178 -0
  116. teslafleetmanagementapi/models/warranty_item.py +249 -0
  117. teslafleetmanagementapi/teslafleetmanagementapi_client.py +128 -0
  118. teslafleetmanagementapi/utilities/__init__.py +6 -0
  119. teslafleetmanagementapi/utilities/file_wrapper.py +45 -0
@@ -0,0 +1,293 @@
1
+ """teslafleetmanagementapi.
2
+
3
+ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
4
+ """
5
+
6
+ # ruff: noqa: E501
7
+ from teslafleetmanagementapi.api_helper import (
8
+ APIHelper,
9
+ )
10
+ from teslafleetmanagementapi.models.location_1 import (
11
+ Location1,
12
+ )
13
+
14
+
15
+ class ChargingLocation(object):
16
+ """Implementation of the 'ChargingLocation' model.
17
+
18
+ Attributes:
19
+ name (str): The model property of type str.
20
+ mtype (str): The model property of type str.
21
+ distance_miles (float): The model property of type float.
22
+ amenities (str): The model property of type str.
23
+ available_stalls (int): The model property of type int.
24
+ total_stalls (int): The model property of type int.
25
+ site_closed (bool): The model property of type bool.
26
+ billing_info (str): The model property of type str.
27
+ location (Location1): The model property of type Location1.
28
+ additional_properties (Dict[str, Any]): The additional properties for the
29
+ model.
30
+
31
+ """
32
+
33
+ # Create a mapping from Model property names to API property names
34
+ _names = {
35
+ "name": "name",
36
+ "mtype": "type",
37
+ "distance_miles": "distance_miles",
38
+ "amenities": "amenities",
39
+ "available_stalls": "available_stalls",
40
+ "total_stalls": "total_stalls",
41
+ "site_closed": "site_closed",
42
+ "billing_info": "billing_info",
43
+ "location": "location",
44
+ }
45
+
46
+ _optionals = [
47
+ "name",
48
+ "mtype",
49
+ "distance_miles",
50
+ "amenities",
51
+ "available_stalls",
52
+ "total_stalls",
53
+ "site_closed",
54
+ "billing_info",
55
+ "location",
56
+ ]
57
+
58
+ def __init__(
59
+ self,
60
+ name=APIHelper.SKIP,
61
+ mtype=APIHelper.SKIP,
62
+ distance_miles=APIHelper.SKIP,
63
+ amenities=APIHelper.SKIP,
64
+ available_stalls=APIHelper.SKIP,
65
+ total_stalls=APIHelper.SKIP,
66
+ site_closed=APIHelper.SKIP,
67
+ billing_info=APIHelper.SKIP,
68
+ location=APIHelper.SKIP,
69
+ additional_properties=None):
70
+ """Initialize a ChargingLocation instance."""
71
+ # Initialize members of the class
72
+ if name is not APIHelper.SKIP:
73
+ self.name = name
74
+ if mtype is not APIHelper.SKIP:
75
+ self.mtype = mtype
76
+ if distance_miles is not APIHelper.SKIP:
77
+ self.distance_miles = distance_miles
78
+ if amenities is not APIHelper.SKIP:
79
+ self.amenities = amenities
80
+ if available_stalls is not APIHelper.SKIP:
81
+ self.available_stalls = available_stalls
82
+ if total_stalls is not APIHelper.SKIP:
83
+ self.total_stalls = total_stalls
84
+ if site_closed is not APIHelper.SKIP:
85
+ self.site_closed = site_closed
86
+ if billing_info is not APIHelper.SKIP:
87
+ self.billing_info = billing_info
88
+ if location is not APIHelper.SKIP:
89
+ self.location = location
90
+
91
+ # Add additional model properties to the instance
92
+ if additional_properties is None:
93
+ additional_properties = {}
94
+ self.additional_properties = additional_properties
95
+
96
+ @classmethod
97
+ def from_dictionary(cls,
98
+ dictionary):
99
+ """Create an instance of this model from a dictionary
100
+
101
+ Args:
102
+ dictionary (dictionary): A dictionary representation of the object
103
+ as obtained from the deserialization of the server's response. The
104
+ keys MUST match property names in the API description.
105
+
106
+ Returns:
107
+ object: An instance of this structure class.
108
+
109
+ """
110
+ if not isinstance(dictionary, dict) or dictionary is None:
111
+ return None
112
+
113
+ # Extract variables from the dictionary
114
+ name =\
115
+ dictionary.get("name")\
116
+ if dictionary.get("name")\
117
+ else APIHelper.SKIP
118
+ mtype =\
119
+ dictionary.get("type")\
120
+ if dictionary.get("type")\
121
+ else APIHelper.SKIP
122
+ distance_miles =\
123
+ dictionary.get("distance_miles")\
124
+ if dictionary.get("distance_miles")\
125
+ else APIHelper.SKIP
126
+ amenities =\
127
+ dictionary.get("amenities")\
128
+ if dictionary.get("amenities")\
129
+ else APIHelper.SKIP
130
+ available_stalls =\
131
+ dictionary.get("available_stalls")\
132
+ if dictionary.get("available_stalls")\
133
+ else APIHelper.SKIP
134
+ total_stalls =\
135
+ dictionary.get("total_stalls")\
136
+ if dictionary.get("total_stalls")\
137
+ else APIHelper.SKIP
138
+ site_closed =\
139
+ dictionary.get("site_closed")\
140
+ if "site_closed" in dictionary.keys()\
141
+ else APIHelper.SKIP
142
+ billing_info =\
143
+ dictionary.get("billing_info")\
144
+ if dictionary.get("billing_info")\
145
+ else APIHelper.SKIP
146
+ location =\
147
+ Location1.from_dictionary(
148
+ dictionary.get("location"))\
149
+ if "location" in dictionary.keys()\
150
+ else APIHelper.SKIP
151
+
152
+ additional_properties = APIHelper.get_additional_properties(
153
+ dictionary={k: v for k, v in dictionary.items()
154
+ if k not in cls._names.values()},
155
+ unboxing_function=lambda value: value)
156
+
157
+ # Return an object of this model
158
+ return cls(name,
159
+ mtype,
160
+ distance_miles,
161
+ amenities,
162
+ available_stalls,
163
+ total_stalls,
164
+ site_closed,
165
+ billing_info,
166
+ location,
167
+ additional_properties)
168
+
169
+ def __repr__(self):
170
+ """Return a unambiguous string representation."""
171
+ _name=(
172
+ self.name
173
+ if hasattr(self, "name")
174
+ else None
175
+ )
176
+ _mtype=(
177
+ self.mtype
178
+ if hasattr(self, "mtype")
179
+ else None
180
+ )
181
+ _distance_miles=(
182
+ self.distance_miles
183
+ if hasattr(self, "distance_miles")
184
+ else None
185
+ )
186
+ _amenities=(
187
+ self.amenities
188
+ if hasattr(self, "amenities")
189
+ else None
190
+ )
191
+ _available_stalls=(
192
+ self.available_stalls
193
+ if hasattr(self, "available_stalls")
194
+ else None
195
+ )
196
+ _total_stalls=(
197
+ self.total_stalls
198
+ if hasattr(self, "total_stalls")
199
+ else None
200
+ )
201
+ _site_closed=(
202
+ self.site_closed
203
+ if hasattr(self, "site_closed")
204
+ else None
205
+ )
206
+ _billing_info=(
207
+ self.billing_info
208
+ if hasattr(self, "billing_info")
209
+ else None
210
+ )
211
+ _location=(
212
+ self.location
213
+ if hasattr(self, "location")
214
+ else None
215
+ )
216
+ _additional_properties=self.additional_properties
217
+ return (
218
+ f"{self.__class__.__name__}("
219
+ f"name={_name!r}, "
220
+ f"mtype={_mtype!r}, "
221
+ f"distance_miles={_distance_miles!r}, "
222
+ f"amenities={_amenities!r}, "
223
+ f"available_stalls={_available_stalls!r}, "
224
+ f"total_stalls={_total_stalls!r}, "
225
+ f"site_closed={_site_closed!r}, "
226
+ f"billing_info={_billing_info!r}, "
227
+ f"location={_location!r}, "
228
+ f"additional_properties={_additional_properties!r}, "
229
+ f")"
230
+ )
231
+
232
+ def __str__(self):
233
+ """Return a human-readable string representation."""
234
+ _name=(
235
+ self.name
236
+ if hasattr(self, "name")
237
+ else None
238
+ )
239
+ _mtype=(
240
+ self.mtype
241
+ if hasattr(self, "mtype")
242
+ else None
243
+ )
244
+ _distance_miles=(
245
+ self.distance_miles
246
+ if hasattr(self, "distance_miles")
247
+ else None
248
+ )
249
+ _amenities=(
250
+ self.amenities
251
+ if hasattr(self, "amenities")
252
+ else None
253
+ )
254
+ _available_stalls=(
255
+ self.available_stalls
256
+ if hasattr(self, "available_stalls")
257
+ else None
258
+ )
259
+ _total_stalls=(
260
+ self.total_stalls
261
+ if hasattr(self, "total_stalls")
262
+ else None
263
+ )
264
+ _site_closed=(
265
+ self.site_closed
266
+ if hasattr(self, "site_closed")
267
+ else None
268
+ )
269
+ _billing_info=(
270
+ self.billing_info
271
+ if hasattr(self, "billing_info")
272
+ else None
273
+ )
274
+ _location=(
275
+ self.location
276
+ if hasattr(self, "location")
277
+ else None
278
+ )
279
+ _additional_properties=self.additional_properties
280
+ return (
281
+ f"{self.__class__.__name__}("
282
+ f"name={_name!s}, "
283
+ f"mtype={_mtype!s}, "
284
+ f"distance_miles={_distance_miles!s}, "
285
+ f"amenities={_amenities!s}, "
286
+ f"available_stalls={_available_stalls!s}, "
287
+ f"total_stalls={_total_stalls!s}, "
288
+ f"site_closed={_site_closed!s}, "
289
+ f"billing_info={_billing_info!s}, "
290
+ f"location={_location!s}, "
291
+ f"additional_properties={_additional_properties!s}, "
292
+ f")"
293
+ )
@@ -0,0 +1,136 @@
1
+ """teslafleetmanagementapi.
2
+
3
+ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
4
+ """
5
+
6
+ # ruff: noqa: E501
7
+ from teslafleetmanagementapi.api_helper import (
8
+ APIHelper,
9
+ )
10
+ from teslafleetmanagementapi.models.charging_dimension import (
11
+ ChargingDimension,
12
+ )
13
+
14
+
15
+ class ChargingPeriod(object):
16
+ """Implementation of the 'ChargingPeriod' model.
17
+
18
+ Attributes:
19
+ start_date_time (str): The model property of type str.
20
+ dimensions (List[ChargingDimension]): The model property of type
21
+ List[ChargingDimension].
22
+ additional_properties (Dict[str, Any]): The additional properties for the
23
+ model.
24
+
25
+ """
26
+
27
+ # Create a mapping from Model property names to API property names
28
+ _names = {
29
+ "start_date_time": "start_date_time",
30
+ "dimensions": "dimensions",
31
+ }
32
+
33
+ _optionals = [
34
+ "start_date_time",
35
+ "dimensions",
36
+ ]
37
+
38
+ def __init__(
39
+ self,
40
+ start_date_time=APIHelper.SKIP,
41
+ dimensions=APIHelper.SKIP,
42
+ additional_properties=None):
43
+ """Initialize a ChargingPeriod instance."""
44
+ # Initialize members of the class
45
+ if start_date_time is not APIHelper.SKIP:
46
+ self.start_date_time = start_date_time
47
+ if dimensions is not APIHelper.SKIP:
48
+ self.dimensions = dimensions
49
+
50
+ # Add additional model properties to the instance
51
+ if additional_properties is None:
52
+ additional_properties = {}
53
+ self.additional_properties = additional_properties
54
+
55
+ @classmethod
56
+ def from_dictionary(cls,
57
+ dictionary):
58
+ """Create an instance of this model from a dictionary
59
+
60
+ Args:
61
+ dictionary (dictionary): A dictionary representation of the object
62
+ as obtained from the deserialization of the server's response. The
63
+ keys MUST match property names in the API description.
64
+
65
+ Returns:
66
+ object: An instance of this structure class.
67
+
68
+ """
69
+ if not isinstance(dictionary, dict) or dictionary is None:
70
+ return None
71
+
72
+ # Extract variables from the dictionary
73
+ start_date_time =\
74
+ dictionary.get("start_date_time")\
75
+ if dictionary.get("start_date_time")\
76
+ else APIHelper.SKIP
77
+ dimensions = None
78
+ if dictionary.get("dimensions") is not None:
79
+ dimensions = [
80
+ ChargingDimension.from_dictionary(x)
81
+ for x in dictionary.get("dimensions")
82
+ ]
83
+ else:
84
+ dimensions = APIHelper.SKIP
85
+
86
+ additional_properties = APIHelper.get_additional_properties(
87
+ dictionary={k: v for k, v in dictionary.items()
88
+ if k not in cls._names.values()},
89
+ unboxing_function=lambda value: value)
90
+
91
+ # Return an object of this model
92
+ return cls(start_date_time,
93
+ dimensions,
94
+ additional_properties)
95
+
96
+ def __repr__(self):
97
+ """Return a unambiguous string representation."""
98
+ _start_date_time=(
99
+ self.start_date_time
100
+ if hasattr(self, "start_date_time")
101
+ else None
102
+ )
103
+ _dimensions=(
104
+ self.dimensions
105
+ if hasattr(self, "dimensions")
106
+ else None
107
+ )
108
+ _additional_properties=self.additional_properties
109
+ return (
110
+ f"{self.__class__.__name__}("
111
+ f"start_date_time={_start_date_time!r}, "
112
+ f"dimensions={_dimensions!r}, "
113
+ f"additional_properties={_additional_properties!r}, "
114
+ f")"
115
+ )
116
+
117
+ def __str__(self):
118
+ """Return a human-readable string representation."""
119
+ _start_date_time=(
120
+ self.start_date_time
121
+ if hasattr(self, "start_date_time")
122
+ else None
123
+ )
124
+ _dimensions=(
125
+ self.dimensions
126
+ if hasattr(self, "dimensions")
127
+ else None
128
+ )
129
+ _additional_properties=self.additional_properties
130
+ return (
131
+ f"{self.__class__.__name__}("
132
+ f"start_date_time={_start_date_time!s}, "
133
+ f"dimensions={_dimensions!s}, "
134
+ f"additional_properties={_additional_properties!s}, "
135
+ f")"
136
+ )