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,98 @@
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_history_item import (
11
+ ChargingHistoryItem,
12
+ )
13
+
14
+
15
+ class ChargingHistoryData(object):
16
+ """Implementation of the 'ChargingHistoryData' model.
17
+
18
+ Attributes:
19
+ data (List[ChargingHistoryItem]): The model property of type
20
+ List[ChargingHistoryItem].
21
+ additional_properties (Dict[str, Any]): The additional properties for the
22
+ model.
23
+
24
+ """
25
+
26
+ # Create a mapping from Model property names to API property names
27
+ _names = {
28
+ "data": "data",
29
+ }
30
+
31
+ def __init__(
32
+ self,
33
+ data=None,
34
+ additional_properties=None):
35
+ """Initialize a ChargingHistoryData instance."""
36
+ # Initialize members of the class
37
+ self.data = data
38
+
39
+ # Add additional model properties to the instance
40
+ if additional_properties is None:
41
+ additional_properties = {}
42
+ self.additional_properties = additional_properties
43
+
44
+ @classmethod
45
+ def from_dictionary(cls,
46
+ dictionary):
47
+ """Create an instance of this model from a dictionary
48
+
49
+ Args:
50
+ dictionary (dictionary): A dictionary representation of the object
51
+ as obtained from the deserialization of the server's response. The
52
+ keys MUST match property names in the API description.
53
+
54
+ Returns:
55
+ object: An instance of this structure class.
56
+
57
+ """
58
+ if not isinstance(dictionary, dict) or dictionary is None:
59
+ return None
60
+
61
+ # Extract variables from the dictionary
62
+ data = None
63
+ if dictionary.get("data") is not None:
64
+ data = [
65
+ ChargingHistoryItem.from_dictionary(x)
66
+ for x in dictionary.get("data")
67
+ ]
68
+
69
+ additional_properties = APIHelper.get_additional_properties(
70
+ dictionary={k: v for k, v in dictionary.items()
71
+ if k not in cls._names.values()},
72
+ unboxing_function=lambda value: value)
73
+
74
+ # Return an object of this model
75
+ return cls(data,
76
+ additional_properties)
77
+
78
+ def __repr__(self):
79
+ """Return a unambiguous string representation."""
80
+ _data=self.data
81
+ _additional_properties=self.additional_properties
82
+ return (
83
+ f"{self.__class__.__name__}("
84
+ f"data={_data!r}, "
85
+ f"additional_properties={_additional_properties!r}, "
86
+ f")"
87
+ )
88
+
89
+ def __str__(self):
90
+ """Return a human-readable string representation."""
91
+ _data=self.data
92
+ _additional_properties=self.additional_properties
93
+ return (
94
+ f"{self.__class__.__name__}("
95
+ f"data={_data!s}, "
96
+ f"additional_properties={_additional_properties!s}, "
97
+ f")"
98
+ )
@@ -0,0 +1,336 @@
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_fee import (
11
+ ChargingFee,
12
+ )
13
+ from teslafleetmanagementapi.models.charging_invoice import (
14
+ ChargingInvoice,
15
+ )
16
+
17
+
18
+ class ChargingHistoryItem(object):
19
+ """Implementation of the 'ChargingHistoryItem' model.
20
+
21
+ Attributes:
22
+ session_id (int): The model property of type int.
23
+ vin (str): The model property of type str.
24
+ site_location_name (str): The model property of type str.
25
+ charge_start_date_time (datetime): The model property of type datetime.
26
+ charge_stop_date_time (datetime): The model property of type datetime.
27
+ unlatch_date_time (datetime): The model property of type datetime.
28
+ country_code (str): The model property of type str.
29
+ fees (List[ChargingFee]): The model property of type List[ChargingFee].
30
+ billing_type (str): The model property of type str.
31
+ invoices (List[ChargingInvoice]): The model property of type
32
+ List[ChargingInvoice].
33
+ vehicle_make_type (str): The model property of type str.
34
+ additional_properties (Dict[str, Any]): The additional properties for the
35
+ model.
36
+
37
+ """
38
+
39
+ # Create a mapping from Model property names to API property names
40
+ _names = {
41
+ "session_id": "sessionId",
42
+ "vin": "vin",
43
+ "site_location_name": "siteLocationName",
44
+ "charge_start_date_time": "chargeStartDateTime",
45
+ "charge_stop_date_time": "chargeStopDateTime",
46
+ "unlatch_date_time": "unlatchDateTime",
47
+ "country_code": "countryCode",
48
+ "fees": "fees",
49
+ "billing_type": "billingType",
50
+ "invoices": "invoices",
51
+ "vehicle_make_type": "vehicleMakeType",
52
+ }
53
+
54
+ _optionals = [
55
+ "site_location_name",
56
+ "charge_start_date_time",
57
+ "charge_stop_date_time",
58
+ "unlatch_date_time",
59
+ "country_code",
60
+ "fees",
61
+ "billing_type",
62
+ "invoices",
63
+ "vehicle_make_type",
64
+ ]
65
+
66
+ def __init__(
67
+ self,
68
+ session_id=None,
69
+ vin=None,
70
+ site_location_name=APIHelper.SKIP,
71
+ charge_start_date_time=APIHelper.SKIP,
72
+ charge_stop_date_time=APIHelper.SKIP,
73
+ unlatch_date_time=APIHelper.SKIP,
74
+ country_code=APIHelper.SKIP,
75
+ fees=APIHelper.SKIP,
76
+ billing_type=APIHelper.SKIP,
77
+ invoices=APIHelper.SKIP,
78
+ vehicle_make_type=APIHelper.SKIP,
79
+ additional_properties=None):
80
+ """Initialize a ChargingHistoryItem instance."""
81
+ # Initialize members of the class
82
+ self.session_id = session_id
83
+ self.vin = vin
84
+ if site_location_name is not APIHelper.SKIP:
85
+ self.site_location_name = site_location_name
86
+ if charge_start_date_time is not APIHelper.SKIP:
87
+ self.charge_start_date_time =\
88
+ APIHelper.apply_datetime_converter(
89
+ charge_start_date_time, APIHelper.RFC3339DateTime)\
90
+ if charge_start_date_time else None
91
+ if charge_stop_date_time is not APIHelper.SKIP:
92
+ self.charge_stop_date_time =\
93
+ APIHelper.apply_datetime_converter(
94
+ charge_stop_date_time, APIHelper.RFC3339DateTime)\
95
+ if charge_stop_date_time else None
96
+ if unlatch_date_time is not APIHelper.SKIP:
97
+ self.unlatch_date_time =\
98
+ APIHelper.apply_datetime_converter(
99
+ unlatch_date_time, APIHelper.RFC3339DateTime)\
100
+ if unlatch_date_time else None
101
+ if country_code is not APIHelper.SKIP:
102
+ self.country_code = country_code
103
+ if fees is not APIHelper.SKIP:
104
+ self.fees = fees
105
+ if billing_type is not APIHelper.SKIP:
106
+ self.billing_type = billing_type
107
+ if invoices is not APIHelper.SKIP:
108
+ self.invoices = invoices
109
+ if vehicle_make_type is not APIHelper.SKIP:
110
+ self.vehicle_make_type = vehicle_make_type
111
+
112
+ # Add additional model properties to the instance
113
+ if additional_properties is None:
114
+ additional_properties = {}
115
+ self.additional_properties = additional_properties
116
+
117
+ @classmethod
118
+ def from_dictionary(cls,
119
+ dictionary):
120
+ """Create an instance of this model from a dictionary
121
+
122
+ Args:
123
+ dictionary (dictionary): A dictionary representation of the object
124
+ as obtained from the deserialization of the server's response. The
125
+ keys MUST match property names in the API description.
126
+
127
+ Returns:
128
+ object: An instance of this structure class.
129
+
130
+ """
131
+ if not isinstance(dictionary, dict) or dictionary is None:
132
+ return None
133
+
134
+ # Extract variables from the dictionary
135
+ session_id =\
136
+ dictionary.get("sessionId")\
137
+ if dictionary.get("sessionId")\
138
+ else None
139
+ vin =\
140
+ dictionary.get("vin")\
141
+ if dictionary.get("vin")\
142
+ else None
143
+ site_location_name =\
144
+ dictionary.get("siteLocationName")\
145
+ if dictionary.get("siteLocationName")\
146
+ else APIHelper.SKIP
147
+ charge_start_date_time = APIHelper.RFC3339DateTime.from_value(
148
+ dictionary.get("chargeStartDateTime")).datetime\
149
+ if dictionary.get("chargeStartDateTime") else APIHelper.SKIP
150
+ charge_stop_date_time = APIHelper.RFC3339DateTime.from_value(
151
+ dictionary.get("chargeStopDateTime")).datetime\
152
+ if dictionary.get("chargeStopDateTime") else APIHelper.SKIP
153
+ unlatch_date_time = APIHelper.RFC3339DateTime.from_value(
154
+ dictionary.get("unlatchDateTime")).datetime\
155
+ if dictionary.get("unlatchDateTime") else APIHelper.SKIP
156
+ country_code =\
157
+ dictionary.get("countryCode")\
158
+ if dictionary.get("countryCode")\
159
+ else APIHelper.SKIP
160
+ fees = None
161
+ if dictionary.get("fees") is not None:
162
+ fees = [
163
+ ChargingFee.from_dictionary(x)
164
+ for x in dictionary.get("fees")
165
+ ]
166
+ else:
167
+ fees = APIHelper.SKIP
168
+ billing_type =\
169
+ dictionary.get("billingType")\
170
+ if dictionary.get("billingType")\
171
+ else APIHelper.SKIP
172
+ invoices = None
173
+ if dictionary.get("invoices") is not None:
174
+ invoices = [
175
+ ChargingInvoice.from_dictionary(x)
176
+ for x in dictionary.get("invoices")
177
+ ]
178
+ else:
179
+ invoices = APIHelper.SKIP
180
+ vehicle_make_type =\
181
+ dictionary.get("vehicleMakeType")\
182
+ if dictionary.get("vehicleMakeType")\
183
+ else APIHelper.SKIP
184
+
185
+ additional_properties = APIHelper.get_additional_properties(
186
+ dictionary={k: v for k, v in dictionary.items()
187
+ if k not in cls._names.values()},
188
+ unboxing_function=lambda value: value)
189
+
190
+ # Return an object of this model
191
+ return cls(session_id,
192
+ vin,
193
+ site_location_name,
194
+ charge_start_date_time,
195
+ charge_stop_date_time,
196
+ unlatch_date_time,
197
+ country_code,
198
+ fees,
199
+ billing_type,
200
+ invoices,
201
+ vehicle_make_type,
202
+ additional_properties)
203
+
204
+ def __repr__(self):
205
+ """Return a unambiguous string representation."""
206
+ _session_id=self.session_id
207
+ _vin=self.vin
208
+ _site_location_name=(
209
+ self.site_location_name
210
+ if hasattr(self, "site_location_name")
211
+ else None
212
+ )
213
+ _charge_start_date_time=(
214
+ self.charge_start_date_time
215
+ if hasattr(self, "charge_start_date_time")
216
+ else None
217
+ )
218
+ _charge_stop_date_time=(
219
+ self.charge_stop_date_time
220
+ if hasattr(self, "charge_stop_date_time")
221
+ else None
222
+ )
223
+ _unlatch_date_time=(
224
+ self.unlatch_date_time
225
+ if hasattr(self, "unlatch_date_time")
226
+ else None
227
+ )
228
+ _country_code=(
229
+ self.country_code
230
+ if hasattr(self, "country_code")
231
+ else None
232
+ )
233
+ _fees=(
234
+ self.fees
235
+ if hasattr(self, "fees")
236
+ else None
237
+ )
238
+ _billing_type=(
239
+ self.billing_type
240
+ if hasattr(self, "billing_type")
241
+ else None
242
+ )
243
+ _invoices=(
244
+ self.invoices
245
+ if hasattr(self, "invoices")
246
+ else None
247
+ )
248
+ _vehicle_make_type=(
249
+ self.vehicle_make_type
250
+ if hasattr(self, "vehicle_make_type")
251
+ else None
252
+ )
253
+ _additional_properties=self.additional_properties
254
+ return (
255
+ f"{self.__class__.__name__}("
256
+ f"session_id={_session_id!r}, "
257
+ f"vin={_vin!r}, "
258
+ f"site_location_name={_site_location_name!r}, "
259
+ f"charge_start_date_time={_charge_start_date_time!r}, "
260
+ f"charge_stop_date_time={_charge_stop_date_time!r}, "
261
+ f"unlatch_date_time={_unlatch_date_time!r}, "
262
+ f"country_code={_country_code!r}, "
263
+ f"fees={_fees!r}, "
264
+ f"billing_type={_billing_type!r}, "
265
+ f"invoices={_invoices!r}, "
266
+ f"vehicle_make_type={_vehicle_make_type!r}, "
267
+ f"additional_properties={_additional_properties!r}, "
268
+ f")"
269
+ )
270
+
271
+ def __str__(self):
272
+ """Return a human-readable string representation."""
273
+ _session_id=self.session_id
274
+ _vin=self.vin
275
+ _site_location_name=(
276
+ self.site_location_name
277
+ if hasattr(self, "site_location_name")
278
+ else None
279
+ )
280
+ _charge_start_date_time=(
281
+ self.charge_start_date_time
282
+ if hasattr(self, "charge_start_date_time")
283
+ else None
284
+ )
285
+ _charge_stop_date_time=(
286
+ self.charge_stop_date_time
287
+ if hasattr(self, "charge_stop_date_time")
288
+ else None
289
+ )
290
+ _unlatch_date_time=(
291
+ self.unlatch_date_time
292
+ if hasattr(self, "unlatch_date_time")
293
+ else None
294
+ )
295
+ _country_code=(
296
+ self.country_code
297
+ if hasattr(self, "country_code")
298
+ else None
299
+ )
300
+ _fees=(
301
+ self.fees
302
+ if hasattr(self, "fees")
303
+ else None
304
+ )
305
+ _billing_type=(
306
+ self.billing_type
307
+ if hasattr(self, "billing_type")
308
+ else None
309
+ )
310
+ _invoices=(
311
+ self.invoices
312
+ if hasattr(self, "invoices")
313
+ else None
314
+ )
315
+ _vehicle_make_type=(
316
+ self.vehicle_make_type
317
+ if hasattr(self, "vehicle_make_type")
318
+ else None
319
+ )
320
+ _additional_properties=self.additional_properties
321
+ return (
322
+ f"{self.__class__.__name__}("
323
+ f"session_id={_session_id!s}, "
324
+ f"vin={_vin!s}, "
325
+ f"site_location_name={_site_location_name!s}, "
326
+ f"charge_start_date_time={_charge_start_date_time!s}, "
327
+ f"charge_stop_date_time={_charge_stop_date_time!s}, "
328
+ f"unlatch_date_time={_unlatch_date_time!s}, "
329
+ f"country_code={_country_code!s}, "
330
+ f"fees={_fees!s}, "
331
+ f"billing_type={_billing_type!s}, "
332
+ f"invoices={_invoices!s}, "
333
+ f"vehicle_make_type={_vehicle_make_type!s}, "
334
+ f"additional_properties={_additional_properties!s}, "
335
+ f")"
336
+ )
@@ -0,0 +1,96 @@
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_history_data import (
11
+ ChargingHistoryData,
12
+ )
13
+
14
+
15
+ class ChargingHistoryResponse(object):
16
+ """Implementation of the 'ChargingHistoryResponse' model.
17
+
18
+ Attributes:
19
+ response (ChargingHistoryData): The model property of type
20
+ ChargingHistoryData.
21
+ additional_properties (Dict[str, Any]): The additional properties for the
22
+ model.
23
+
24
+ """
25
+
26
+ # Create a mapping from Model property names to API property names
27
+ _names = {
28
+ "response": "response",
29
+ }
30
+
31
+ def __init__(
32
+ self,
33
+ response=None,
34
+ additional_properties=None):
35
+ """Initialize a ChargingHistoryResponse instance."""
36
+ # Initialize members of the class
37
+ self.response = response
38
+
39
+ # Add additional model properties to the instance
40
+ if additional_properties is None:
41
+ additional_properties = {}
42
+ self.additional_properties = additional_properties
43
+
44
+ @classmethod
45
+ def from_dictionary(cls,
46
+ dictionary):
47
+ """Create an instance of this model from a dictionary
48
+
49
+ Args:
50
+ dictionary (dictionary): A dictionary representation of the object
51
+ as obtained from the deserialization of the server's response. The
52
+ keys MUST match property names in the API description.
53
+
54
+ Returns:
55
+ object: An instance of this structure class.
56
+
57
+ """
58
+ if not isinstance(dictionary, dict) or dictionary is None:
59
+ return None
60
+
61
+ # Extract variables from the dictionary
62
+ response =\
63
+ ChargingHistoryData.from_dictionary(
64
+ dictionary.get("response"))\
65
+ if dictionary.get("response") else None
66
+
67
+ additional_properties = APIHelper.get_additional_properties(
68
+ dictionary={k: v for k, v in dictionary.items()
69
+ if k not in cls._names.values()},
70
+ unboxing_function=lambda value: value)
71
+
72
+ # Return an object of this model
73
+ return cls(response,
74
+ additional_properties)
75
+
76
+ def __repr__(self):
77
+ """Return a unambiguous string representation."""
78
+ _response=self.response
79
+ _additional_properties=self.additional_properties
80
+ return (
81
+ f"{self.__class__.__name__}("
82
+ f"response={_response!r}, "
83
+ f"additional_properties={_additional_properties!r}, "
84
+ f")"
85
+ )
86
+
87
+ def __str__(self):
88
+ """Return a human-readable string representation."""
89
+ _response=self.response
90
+ _additional_properties=self.additional_properties
91
+ return (
92
+ f"{self.__class__.__name__}("
93
+ f"response={_response!s}, "
94
+ f"additional_properties={_additional_properties!s}, "
95
+ f")"
96
+ )
@@ -0,0 +1,151 @@
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
+
11
+
12
+ class ChargingInvoice(object):
13
+ """Implementation of the 'ChargingInvoice' model.
14
+
15
+ Attributes:
16
+ file_name (str): The model property of type str.
17
+ content_id (str): The model property of type str.
18
+ invoice_type (str): The model property of type str.
19
+ additional_properties (Dict[str, Any]): The additional properties for the
20
+ model.
21
+
22
+ """
23
+
24
+ # Create a mapping from Model property names to API property names
25
+ _names = {
26
+ "file_name": "fileName",
27
+ "content_id": "contentId",
28
+ "invoice_type": "invoiceType",
29
+ }
30
+
31
+ _optionals = [
32
+ "file_name",
33
+ "content_id",
34
+ "invoice_type",
35
+ ]
36
+
37
+ def __init__(
38
+ self,
39
+ file_name=APIHelper.SKIP,
40
+ content_id=APIHelper.SKIP,
41
+ invoice_type=APIHelper.SKIP,
42
+ additional_properties=None):
43
+ """Initialize a ChargingInvoice instance."""
44
+ # Initialize members of the class
45
+ if file_name is not APIHelper.SKIP:
46
+ self.file_name = file_name
47
+ if content_id is not APIHelper.SKIP:
48
+ self.content_id = content_id
49
+ if invoice_type is not APIHelper.SKIP:
50
+ self.invoice_type = invoice_type
51
+
52
+ # Add additional model properties to the instance
53
+ if additional_properties is None:
54
+ additional_properties = {}
55
+ self.additional_properties = additional_properties
56
+
57
+ @classmethod
58
+ def from_dictionary(cls,
59
+ dictionary):
60
+ """Create an instance of this model from a dictionary
61
+
62
+ Args:
63
+ dictionary (dictionary): A dictionary representation of the object
64
+ as obtained from the deserialization of the server's response. The
65
+ keys MUST match property names in the API description.
66
+
67
+ Returns:
68
+ object: An instance of this structure class.
69
+
70
+ """
71
+ if not isinstance(dictionary, dict) or dictionary is None:
72
+ return None
73
+
74
+ # Extract variables from the dictionary
75
+ file_name =\
76
+ dictionary.get("fileName")\
77
+ if dictionary.get("fileName")\
78
+ else APIHelper.SKIP
79
+ content_id =\
80
+ dictionary.get("contentId")\
81
+ if dictionary.get("contentId")\
82
+ else APIHelper.SKIP
83
+ invoice_type =\
84
+ dictionary.get("invoiceType")\
85
+ if dictionary.get("invoiceType")\
86
+ else APIHelper.SKIP
87
+
88
+ additional_properties = APIHelper.get_additional_properties(
89
+ dictionary={k: v for k, v in dictionary.items()
90
+ if k not in cls._names.values()},
91
+ unboxing_function=lambda value: value)
92
+
93
+ # Return an object of this model
94
+ return cls(file_name,
95
+ content_id,
96
+ invoice_type,
97
+ additional_properties)
98
+
99
+ def __repr__(self):
100
+ """Return a unambiguous string representation."""
101
+ _file_name=(
102
+ self.file_name
103
+ if hasattr(self, "file_name")
104
+ else None
105
+ )
106
+ _content_id=(
107
+ self.content_id
108
+ if hasattr(self, "content_id")
109
+ else None
110
+ )
111
+ _invoice_type=(
112
+ self.invoice_type
113
+ if hasattr(self, "invoice_type")
114
+ else None
115
+ )
116
+ _additional_properties=self.additional_properties
117
+ return (
118
+ f"{self.__class__.__name__}("
119
+ f"file_name={_file_name!r}, "
120
+ f"content_id={_content_id!r}, "
121
+ f"invoice_type={_invoice_type!r}, "
122
+ f"additional_properties={_additional_properties!r}, "
123
+ f")"
124
+ )
125
+
126
+ def __str__(self):
127
+ """Return a human-readable string representation."""
128
+ _file_name=(
129
+ self.file_name
130
+ if hasattr(self, "file_name")
131
+ else None
132
+ )
133
+ _content_id=(
134
+ self.content_id
135
+ if hasattr(self, "content_id")
136
+ else None
137
+ )
138
+ _invoice_type=(
139
+ self.invoice_type
140
+ if hasattr(self, "invoice_type")
141
+ else None
142
+ )
143
+ _additional_properties=self.additional_properties
144
+ return (
145
+ f"{self.__class__.__name__}("
146
+ f"file_name={_file_name!s}, "
147
+ f"content_id={_content_id!s}, "
148
+ f"invoice_type={_invoice_type!s}, "
149
+ f"additional_properties={_additional_properties!s}, "
150
+ f")"
151
+ )