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.
- tesla_api_sdk-1.0.0.dist-info/METADATA +145 -0
- tesla_api_sdk-1.0.0.dist-info/RECORD +119 -0
- tesla_api_sdk-1.0.0.dist-info/WHEEL +5 -0
- tesla_api_sdk-1.0.0.dist-info/licenses/LICENSE +28 -0
- tesla_api_sdk-1.0.0.dist-info/top_level.txt +1 -0
- teslafleetmanagementapi/__init__.py +13 -0
- teslafleetmanagementapi/api_helper.py +19 -0
- teslafleetmanagementapi/configuration.py +270 -0
- teslafleetmanagementapi/controllers/__init__.py +11 -0
- teslafleetmanagementapi/controllers/base_controller.py +70 -0
- teslafleetmanagementapi/controllers/charging_controller.py +140 -0
- teslafleetmanagementapi/controllers/energy_controller.py +572 -0
- teslafleetmanagementapi/controllers/oauth_authorization_controller.py +165 -0
- teslafleetmanagementapi/controllers/partner_controller.py +181 -0
- teslafleetmanagementapi/controllers/user_controller.py +158 -0
- teslafleetmanagementapi/controllers/vehicles_controller.py +832 -0
- teslafleetmanagementapi/exceptions/__init__.py +6 -0
- teslafleetmanagementapi/exceptions/api_exception.py +36 -0
- teslafleetmanagementapi/exceptions/oauth_provider_exception.py +75 -0
- teslafleetmanagementapi/http/__init__.py +11 -0
- teslafleetmanagementapi/http/api_response.py +67 -0
- teslafleetmanagementapi/http/auth/__init__.py +6 -0
- teslafleetmanagementapi/http/auth/bearer_auth.py +103 -0
- teslafleetmanagementapi/http/auth/oauth_2.py +311 -0
- teslafleetmanagementapi/http/http_call_back.py +20 -0
- teslafleetmanagementapi/http/http_client_provider.py +23 -0
- teslafleetmanagementapi/http/http_method_enum.py +25 -0
- teslafleetmanagementapi/http/http_request.py +55 -0
- teslafleetmanagementapi/http/http_response.py +45 -0
- teslafleetmanagementapi/http/proxy_settings.py +50 -0
- teslafleetmanagementapi/logging/__init__.py +6 -0
- teslafleetmanagementapi/logging/configuration/__init__.py +5 -0
- teslafleetmanagementapi/logging/configuration/api_logging_configuration.py +398 -0
- teslafleetmanagementapi/logging/sdk_logger.py +28 -0
- teslafleetmanagementapi/models/__init__.py +85 -0
- teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py +110 -0
- teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py +110 -0
- teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py +109 -0
- teslafleetmanagementapi/models/api_1_vehicles_nearby_charging_sites_response.py +109 -0
- teslafleetmanagementapi/models/api_1_vehicles_response.py +162 -0
- teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +109 -0
- teslafleetmanagementapi/models/api_1_vehicles_wake_up_response.py +109 -0
- teslafleetmanagementapi/models/backup_request.py +92 -0
- teslafleetmanagementapi/models/backup_response.py +95 -0
- teslafleetmanagementapi/models/calendar_history_response.py +96 -0
- teslafleetmanagementapi/models/charge_duration.py +92 -0
- teslafleetmanagementapi/models/charge_history.py +125 -0
- teslafleetmanagementapi/models/charge_history_response.py +96 -0
- teslafleetmanagementapi/models/charge_start_time.py +92 -0
- teslafleetmanagementapi/models/charging_dimension.py +128 -0
- teslafleetmanagementapi/models/charging_fee.py +641 -0
- teslafleetmanagementapi/models/charging_history_data.py +98 -0
- teslafleetmanagementapi/models/charging_history_item.py +336 -0
- teslafleetmanagementapi/models/charging_history_response.py +96 -0
- teslafleetmanagementapi/models/charging_invoice.py +151 -0
- teslafleetmanagementapi/models/charging_location.py +293 -0
- teslafleetmanagementapi/models/charging_period.py +136 -0
- teslafleetmanagementapi/models/charging_session.py +355 -0
- teslafleetmanagementapi/models/charging_sessions_data.py +182 -0
- teslafleetmanagementapi/models/charging_sessions_response.py +96 -0
- teslafleetmanagementapi/models/default_real_mode.py +45 -0
- teslafleetmanagementapi/models/driver.py +289 -0
- teslafleetmanagementapi/models/drivers_response.py +135 -0
- teslafleetmanagementapi/models/enterprise_payer_request.py +141 -0
- teslafleetmanagementapi/models/event.py +107 -0
- teslafleetmanagementapi/models/fleet_status_request.py +105 -0
- teslafleetmanagementapi/models/fleet_telemetry_error.py +118 -0
- teslafleetmanagementapi/models/fleet_telemetry_errors_response.py +96 -0
- teslafleetmanagementapi/models/fleet_telemetry_jws_request.py +128 -0
- teslafleetmanagementapi/models/generic_update_response.py +95 -0
- teslafleetmanagementapi/models/kind.py +45 -0
- teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +42 -0
- teslafleetmanagementapi/models/live_status_response.py +96 -0
- teslafleetmanagementapi/models/location.py +128 -0
- teslafleetmanagementapi/models/location_1.py +128 -0
- teslafleetmanagementapi/models/me_response.py +95 -0
- teslafleetmanagementapi/models/mobile_enabled.py +128 -0
- teslafleetmanagementapi/models/oauth_provider_error.py +67 -0
- teslafleetmanagementapi/models/oauth_token.py +115 -0
- teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py +95 -0
- teslafleetmanagementapi/models/operation_request.py +93 -0
- teslafleetmanagementapi/models/orders_response.py +111 -0
- teslafleetmanagementapi/models/pagination.py +225 -0
- teslafleetmanagementapi/models/price_component.py +151 -0
- teslafleetmanagementapi/models/products_response.py +128 -0
- teslafleetmanagementapi/models/public_key_response.py +96 -0
- teslafleetmanagementapi/models/region_response.py +96 -0
- teslafleetmanagementapi/models/register_partner_request.py +92 -0
- teslafleetmanagementapi/models/register_partner_response.py +96 -0
- teslafleetmanagementapi/models/response.py +105 -0
- teslafleetmanagementapi/models/response_1.py +92 -0
- teslafleetmanagementapi/models/response_2.py +95 -0
- teslafleetmanagementapi/models/response_3.py +164 -0
- teslafleetmanagementapi/models/response_api_1_dx_vehicles_options_response.py +112 -0
- teslafleetmanagementapi/models/response_api_1_dx_warranty_details_response.py +169 -0
- teslafleetmanagementapi/models/response_calendar_history_response.py +110 -0
- teslafleetmanagementapi/models/response_charge_history_response.py +98 -0
- teslafleetmanagementapi/models/response_fleet_telemetry_errors_response.py +98 -0
- teslafleetmanagementapi/models/response_live_status_response.py +310 -0
- teslafleetmanagementapi/models/response_me_response.py +131 -0
- teslafleetmanagementapi/models/response_orders_response.py +209 -0
- teslafleetmanagementapi/models/response_public_key_response.py +92 -0
- teslafleetmanagementapi/models/response_region_response.py +105 -0
- teslafleetmanagementapi/models/response_register_partner_response.py +331 -0
- teslafleetmanagementapi/models/signaling.py +118 -0
- teslafleetmanagementapi/models/simple_ok_response.py +105 -0
- teslafleetmanagementapi/models/site_info_response.py +105 -0
- teslafleetmanagementapi/models/storm_mode_request.py +92 -0
- teslafleetmanagementapi/models/tariff_element.py +136 -0
- teslafleetmanagementapi/models/tariffs.py +136 -0
- teslafleetmanagementapi/models/time_of_use_settings_request.py +95 -0
- teslafleetmanagementapi/models/total_cost.py +151 -0
- teslafleetmanagementapi/models/tou_settings.py +105 -0
- teslafleetmanagementapi/models/vehicle_base.py +266 -0
- teslafleetmanagementapi/models/vehicle_option.py +178 -0
- teslafleetmanagementapi/models/warranty_item.py +249 -0
- teslafleetmanagementapi/teslafleetmanagementapi_client.py +128 -0
- teslafleetmanagementapi/utilities/__init__.py +6 -0
- teslafleetmanagementapi/utilities/file_wrapper.py +45 -0
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: D410, E501, E101, D206
|
|
7
|
+
from apimatic_core.authentication.multiple.single_auth import (
|
|
8
|
+
Single,
|
|
9
|
+
)
|
|
10
|
+
from apimatic_core.request_builder import RequestBuilder
|
|
11
|
+
from apimatic_core.response_handler import ResponseHandler
|
|
12
|
+
from apimatic_core.types.parameter import Parameter
|
|
13
|
+
|
|
14
|
+
from teslafleetmanagementapi.api_helper import (
|
|
15
|
+
APIHelper,
|
|
16
|
+
)
|
|
17
|
+
from teslafleetmanagementapi.configuration import (
|
|
18
|
+
Server,
|
|
19
|
+
)
|
|
20
|
+
from teslafleetmanagementapi.controllers.base_controller import (
|
|
21
|
+
BaseController,
|
|
22
|
+
)
|
|
23
|
+
from teslafleetmanagementapi.http.http_method_enum import (
|
|
24
|
+
HttpMethodEnum,
|
|
25
|
+
)
|
|
26
|
+
from teslafleetmanagementapi.models.api_1_dx_vehicles_options_response import (
|
|
27
|
+
Api1DxVehiclesOptionsResponse,
|
|
28
|
+
)
|
|
29
|
+
from teslafleetmanagementapi.models.api_1_dx_warranty_details_response import (
|
|
30
|
+
Api1DxWarrantyDetailsResponse,
|
|
31
|
+
)
|
|
32
|
+
from teslafleetmanagementapi.models.api_1_vehicles_mobile_enabled_response import (
|
|
33
|
+
Api1VehiclesMobileEnabledResponse,
|
|
34
|
+
)
|
|
35
|
+
from teslafleetmanagementapi.models.api_1_vehicles_nearby_charging_sites_response import ( # noqa: E501
|
|
36
|
+
Api1VehiclesNearbyChargingSitesResponse,
|
|
37
|
+
)
|
|
38
|
+
from teslafleetmanagementapi.models.api_1_vehicles_response import (
|
|
39
|
+
Api1VehiclesResponse,
|
|
40
|
+
)
|
|
41
|
+
from teslafleetmanagementapi.models.api_1_vehicles_response_get_vehicle import (
|
|
42
|
+
Api1VehiclesResponseGetVehicle,
|
|
43
|
+
)
|
|
44
|
+
from teslafleetmanagementapi.models.api_1_vehicles_wake_up_response import (
|
|
45
|
+
Api1VehiclesWakeUpResponse,
|
|
46
|
+
)
|
|
47
|
+
from teslafleetmanagementapi.models.drivers_response import (
|
|
48
|
+
DriversResponse,
|
|
49
|
+
)
|
|
50
|
+
from teslafleetmanagementapi.models.simple_ok_response import (
|
|
51
|
+
SimpleOkResponse,
|
|
52
|
+
)
|
|
53
|
+
from teslafleetmanagementapi.models.site_info_response import (
|
|
54
|
+
SiteInfoResponse,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class VehiclesController(BaseController):
|
|
59
|
+
"""A Controller to access Endpoints in the teslafleetmanagementapi API."""
|
|
60
|
+
|
|
61
|
+
def __init__(self, config):
|
|
62
|
+
"""Initialize VehiclesController object."""
|
|
63
|
+
super(VehiclesController, self).__init__(config)
|
|
64
|
+
|
|
65
|
+
def list_vehicles(self):
|
|
66
|
+
"""Perform a GET request to /api/1/vehicles.
|
|
67
|
+
|
|
68
|
+
Returns:
|
|
69
|
+
ApiResponse: An object with the response value as well as other useful
|
|
70
|
+
information such as status codes and headers. Vehicles list
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
ApiException: When an error occurs while fetching the data from the
|
|
74
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
75
|
+
message, and the HTTP body that was received in the request.
|
|
76
|
+
|
|
77
|
+
"""
|
|
78
|
+
return super().new_api_call_builder.request(
|
|
79
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
80
|
+
.path("/api/1/vehicles")
|
|
81
|
+
.http_method(HttpMethodEnum.GET)
|
|
82
|
+
.header_param(Parameter()
|
|
83
|
+
.key("accept")
|
|
84
|
+
.value("application/json"))
|
|
85
|
+
.auth(Single("bearerAuth")),
|
|
86
|
+
).response(
|
|
87
|
+
ResponseHandler()
|
|
88
|
+
.deserializer(APIHelper.json_deserialize)
|
|
89
|
+
.deserialize_into(Api1VehiclesResponse.from_dictionary)
|
|
90
|
+
.is_api_response(True),
|
|
91
|
+
).execute()
|
|
92
|
+
|
|
93
|
+
def get_vehicle(self,
|
|
94
|
+
vehicle_tag):
|
|
95
|
+
"""Perform a GET request to /api/1/vehicles/{vehicle_tag}.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
vehicle_tag (str): The request template parameter.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
ApiResponse: An object with the response value as well as other useful
|
|
102
|
+
information such as status codes and headers. Vehicle info
|
|
103
|
+
|
|
104
|
+
Raises:
|
|
105
|
+
ApiException: When an error occurs while fetching the data from the
|
|
106
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
107
|
+
message, and the HTTP body that was received in the request.
|
|
108
|
+
|
|
109
|
+
"""
|
|
110
|
+
return super().new_api_call_builder.request(
|
|
111
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
112
|
+
.path("/api/1/vehicles/{vehicle_tag}")
|
|
113
|
+
.http_method(HttpMethodEnum.GET)
|
|
114
|
+
.template_param(Parameter()
|
|
115
|
+
.key("vehicle_tag")
|
|
116
|
+
.value(vehicle_tag)
|
|
117
|
+
.is_required(True)
|
|
118
|
+
.should_encode(True))
|
|
119
|
+
.header_param(Parameter()
|
|
120
|
+
.key("accept")
|
|
121
|
+
.value("application/json"))
|
|
122
|
+
.auth(Single("bearerAuth")),
|
|
123
|
+
).response(
|
|
124
|
+
ResponseHandler()
|
|
125
|
+
.deserializer(APIHelper.json_deserialize)
|
|
126
|
+
.deserialize_into(Api1VehiclesResponseGetVehicle.from_dictionary)
|
|
127
|
+
.is_api_response(True),
|
|
128
|
+
).execute()
|
|
129
|
+
|
|
130
|
+
def mobile_enabled(self,
|
|
131
|
+
vehicle_tag):
|
|
132
|
+
"""Perform a GET request to
|
|
133
|
+
/api/1/vehicles/{vehicle_tag}/mobile_enabled.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
vehicle_tag (str): The request template parameter.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
ApiResponse: An object with the response value as well as other useful
|
|
140
|
+
information such as status codes and headers. Mobile access status
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
ApiException: When an error occurs while fetching the data from the
|
|
144
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
145
|
+
message, and the HTTP body that was received in the request.
|
|
146
|
+
|
|
147
|
+
"""
|
|
148
|
+
return super().new_api_call_builder.request(
|
|
149
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
150
|
+
.path("/api/1/vehicles/{vehicle_tag}/mobile_enabled")
|
|
151
|
+
.http_method(HttpMethodEnum.GET)
|
|
152
|
+
.template_param(Parameter()
|
|
153
|
+
.key("vehicle_tag")
|
|
154
|
+
.value(vehicle_tag)
|
|
155
|
+
.is_required(True)
|
|
156
|
+
.should_encode(True))
|
|
157
|
+
.header_param(Parameter()
|
|
158
|
+
.key("accept")
|
|
159
|
+
.value("application/json"))
|
|
160
|
+
.auth(Single("bearerAuth")),
|
|
161
|
+
).response(
|
|
162
|
+
ResponseHandler()
|
|
163
|
+
.deserializer(APIHelper.json_deserialize)
|
|
164
|
+
.deserialize_into(Api1VehiclesMobileEnabledResponse.from_dictionary)
|
|
165
|
+
.is_api_response(True),
|
|
166
|
+
).execute()
|
|
167
|
+
|
|
168
|
+
def nearby_charging_sites(self,
|
|
169
|
+
vehicle_tag):
|
|
170
|
+
"""Perform a GET request to
|
|
171
|
+
/api/1/vehicles/{vehicle_tag}/nearby_charging_sites.
|
|
172
|
+
|
|
173
|
+
Args:
|
|
174
|
+
vehicle_tag (str): The request template parameter.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
ApiResponse: An object with the response value as well as other useful
|
|
178
|
+
information such as status codes and headers. Charging sites
|
|
179
|
+
|
|
180
|
+
Raises:
|
|
181
|
+
ApiException: When an error occurs while fetching the data from the
|
|
182
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
183
|
+
message, and the HTTP body that was received in the request.
|
|
184
|
+
|
|
185
|
+
"""
|
|
186
|
+
return super().new_api_call_builder.request(
|
|
187
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
188
|
+
.path("/api/1/vehicles/{vehicle_tag}/nearby_charging_sites")
|
|
189
|
+
.http_method(HttpMethodEnum.GET)
|
|
190
|
+
.template_param(Parameter()
|
|
191
|
+
.key("vehicle_tag")
|
|
192
|
+
.value(vehicle_tag)
|
|
193
|
+
.is_required(True)
|
|
194
|
+
.should_encode(True))
|
|
195
|
+
.header_param(Parameter()
|
|
196
|
+
.key("accept")
|
|
197
|
+
.value("application/json"))
|
|
198
|
+
.auth(Single("bearerAuth")),
|
|
199
|
+
).response(
|
|
200
|
+
ResponseHandler()
|
|
201
|
+
.deserializer(APIHelper.json_deserialize)
|
|
202
|
+
.deserialize_into(Api1VehiclesNearbyChargingSitesResponse.from_dictionary)
|
|
203
|
+
.is_api_response(True),
|
|
204
|
+
).execute()
|
|
205
|
+
|
|
206
|
+
def vehicle_live_data(self,
|
|
207
|
+
vehicle_tag):
|
|
208
|
+
"""Perform a GET request to /api/1/vehicles/{vehicle_tag}/vehicle_data.
|
|
209
|
+
|
|
210
|
+
Args:
|
|
211
|
+
vehicle_tag (str): The request template parameter.
|
|
212
|
+
|
|
213
|
+
Returns:
|
|
214
|
+
ApiResponse: An object with the response value as well as other useful
|
|
215
|
+
information such as status codes and headers. Realtime vehicle data
|
|
216
|
+
|
|
217
|
+
Raises:
|
|
218
|
+
ApiException: When an error occurs while fetching the data from the
|
|
219
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
220
|
+
message, and the HTTP body that was received in the request.
|
|
221
|
+
|
|
222
|
+
"""
|
|
223
|
+
return super().new_api_call_builder.request(
|
|
224
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
225
|
+
.path("/api/1/vehicles/{vehicle_tag}/vehicle_data")
|
|
226
|
+
.http_method(HttpMethodEnum.GET)
|
|
227
|
+
.template_param(Parameter()
|
|
228
|
+
.key("vehicle_tag")
|
|
229
|
+
.value(vehicle_tag)
|
|
230
|
+
.is_required(True)
|
|
231
|
+
.should_encode(True))
|
|
232
|
+
.header_param(Parameter()
|
|
233
|
+
.key("accept")
|
|
234
|
+
.value("application/json"))
|
|
235
|
+
.auth(Single("bearerAuth")),
|
|
236
|
+
).response(
|
|
237
|
+
ResponseHandler()
|
|
238
|
+
.deserializer(APIHelper.json_deserialize)
|
|
239
|
+
.deserialize_into(SiteInfoResponse.from_dictionary)
|
|
240
|
+
.is_api_response(True),
|
|
241
|
+
).execute()
|
|
242
|
+
|
|
243
|
+
def wake_up_vehicle(self,
|
|
244
|
+
vehicle_tag):
|
|
245
|
+
"""Perform a POST request to /api/1/vehicles/{vehicle_tag}/wake_up.
|
|
246
|
+
|
|
247
|
+
Args:
|
|
248
|
+
vehicle_tag (str): The request template parameter.
|
|
249
|
+
|
|
250
|
+
Returns:
|
|
251
|
+
ApiResponse: An object with the response value as well as other useful
|
|
252
|
+
information such as status codes and headers. Vehicle awakened
|
|
253
|
+
|
|
254
|
+
Raises:
|
|
255
|
+
ApiException: When an error occurs while fetching the data from the
|
|
256
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
257
|
+
message, and the HTTP body that was received in the request.
|
|
258
|
+
|
|
259
|
+
"""
|
|
260
|
+
return super().new_api_call_builder.request(
|
|
261
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
262
|
+
.path("/api/1/vehicles/{vehicle_tag}/wake_up")
|
|
263
|
+
.http_method(HttpMethodEnum.POST)
|
|
264
|
+
.template_param(Parameter()
|
|
265
|
+
.key("vehicle_tag")
|
|
266
|
+
.value(vehicle_tag)
|
|
267
|
+
.is_required(True)
|
|
268
|
+
.should_encode(True))
|
|
269
|
+
.header_param(Parameter()
|
|
270
|
+
.key("accept")
|
|
271
|
+
.value("application/json"))
|
|
272
|
+
.auth(Single("bearerAuth")),
|
|
273
|
+
).response(
|
|
274
|
+
ResponseHandler()
|
|
275
|
+
.deserializer(APIHelper.json_deserialize)
|
|
276
|
+
.deserialize_into(Api1VehiclesWakeUpResponse.from_dictionary)
|
|
277
|
+
.is_api_response(True),
|
|
278
|
+
).execute()
|
|
279
|
+
|
|
280
|
+
def vehicle_specs(self,
|
|
281
|
+
vin):
|
|
282
|
+
"""Perform a GET request to /api/1/vehicles/{vin}/specs.
|
|
283
|
+
|
|
284
|
+
Args:
|
|
285
|
+
vin (str): The request template parameter.
|
|
286
|
+
|
|
287
|
+
Returns:
|
|
288
|
+
ApiResponse: An object with the response value as well as other useful
|
|
289
|
+
information such as status codes and headers. Vehicle specifications
|
|
290
|
+
|
|
291
|
+
Raises:
|
|
292
|
+
ApiException: When an error occurs while fetching the data from the
|
|
293
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
294
|
+
message, and the HTTP body that was received in the request.
|
|
295
|
+
|
|
296
|
+
"""
|
|
297
|
+
return super().new_api_call_builder.request(
|
|
298
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
299
|
+
.path("/api/1/vehicles/{vin}/specs")
|
|
300
|
+
.http_method(HttpMethodEnum.GET)
|
|
301
|
+
.template_param(Parameter()
|
|
302
|
+
.key("vin")
|
|
303
|
+
.value(vin)
|
|
304
|
+
.is_required(True)
|
|
305
|
+
.should_encode(True))
|
|
306
|
+
.header_param(Parameter()
|
|
307
|
+
.key("accept")
|
|
308
|
+
.value("application/json"))
|
|
309
|
+
.auth(Single("bearerAuth")),
|
|
310
|
+
).response(
|
|
311
|
+
ResponseHandler()
|
|
312
|
+
.deserializer(APIHelper.json_deserialize)
|
|
313
|
+
.deserialize_into(SiteInfoResponse.from_dictionary)
|
|
314
|
+
.is_api_response(True),
|
|
315
|
+
).execute()
|
|
316
|
+
|
|
317
|
+
def vehicle_options(self,
|
|
318
|
+
vin):
|
|
319
|
+
"""Perform a GET request to /api/1/dx/vehicles/options.
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
vin (str): The request query parameter.
|
|
323
|
+
|
|
324
|
+
Returns:
|
|
325
|
+
ApiResponse: An object with the response value as well as other useful
|
|
326
|
+
information such as status codes and headers. Vehicle options
|
|
327
|
+
|
|
328
|
+
Raises:
|
|
329
|
+
ApiException: When an error occurs while fetching the data from the
|
|
330
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
331
|
+
message, and the HTTP body that was received in the request.
|
|
332
|
+
|
|
333
|
+
"""
|
|
334
|
+
return super().new_api_call_builder.request(
|
|
335
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
336
|
+
.path("/api/1/dx/vehicles/options")
|
|
337
|
+
.http_method(HttpMethodEnum.GET)
|
|
338
|
+
.query_param(Parameter()
|
|
339
|
+
.key("vin")
|
|
340
|
+
.value(vin)
|
|
341
|
+
.is_required(True))
|
|
342
|
+
.header_param(Parameter()
|
|
343
|
+
.key("accept")
|
|
344
|
+
.value("application/json"))
|
|
345
|
+
.auth(Single("bearerAuth")),
|
|
346
|
+
).response(
|
|
347
|
+
ResponseHandler()
|
|
348
|
+
.deserializer(APIHelper.json_deserialize)
|
|
349
|
+
.deserialize_into(Api1DxVehiclesOptionsResponse.from_dictionary)
|
|
350
|
+
.is_api_response(True),
|
|
351
|
+
).execute()
|
|
352
|
+
|
|
353
|
+
def warranty_details(self):
|
|
354
|
+
"""Perform a GET request to /api/1/dx/warranty/details.
|
|
355
|
+
|
|
356
|
+
Returns:
|
|
357
|
+
ApiResponse: An object with the response value as well as other useful
|
|
358
|
+
information such as status codes and headers. Warranty information
|
|
359
|
+
|
|
360
|
+
Raises:
|
|
361
|
+
ApiException: When an error occurs while fetching the data from the
|
|
362
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
363
|
+
message, and the HTTP body that was received in the request.
|
|
364
|
+
|
|
365
|
+
"""
|
|
366
|
+
return super().new_api_call_builder.request(
|
|
367
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
368
|
+
.path("/api/1/dx/warranty/details")
|
|
369
|
+
.http_method(HttpMethodEnum.GET)
|
|
370
|
+
.header_param(Parameter()
|
|
371
|
+
.key("accept")
|
|
372
|
+
.value("application/json"))
|
|
373
|
+
.auth(Single("bearerAuth")),
|
|
374
|
+
).response(
|
|
375
|
+
ResponseHandler()
|
|
376
|
+
.deserializer(APIHelper.json_deserialize)
|
|
377
|
+
.deserialize_into(Api1DxWarrantyDetailsResponse.from_dictionary)
|
|
378
|
+
.is_api_response(True),
|
|
379
|
+
).execute()
|
|
380
|
+
|
|
381
|
+
def get_allowed_drivers_for_a_vehicle(self,
|
|
382
|
+
vehicle_tag):
|
|
383
|
+
"""Perform a GET request to /api/1/vehicles/{vehicle_tag}/drivers.
|
|
384
|
+
|
|
385
|
+
Args:
|
|
386
|
+
vehicle_tag (str): The request template parameter.
|
|
387
|
+
|
|
388
|
+
Returns:
|
|
389
|
+
ApiResponse: An object with the response value as well as other useful
|
|
390
|
+
information such as status codes and headers. List of drivers
|
|
391
|
+
|
|
392
|
+
Raises:
|
|
393
|
+
ApiException: When an error occurs while fetching the data from the
|
|
394
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
395
|
+
message, and the HTTP body that was received in the request.
|
|
396
|
+
|
|
397
|
+
"""
|
|
398
|
+
return super().new_api_call_builder.request(
|
|
399
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
400
|
+
.path("/api/1/vehicles/{vehicle_tag}/drivers")
|
|
401
|
+
.http_method(HttpMethodEnum.GET)
|
|
402
|
+
.template_param(Parameter()
|
|
403
|
+
.key("vehicle_tag")
|
|
404
|
+
.value(vehicle_tag)
|
|
405
|
+
.is_required(True)
|
|
406
|
+
.should_encode(True))
|
|
407
|
+
.header_param(Parameter()
|
|
408
|
+
.key("accept")
|
|
409
|
+
.value("application/json"))
|
|
410
|
+
.auth(Single("bearerAuth")),
|
|
411
|
+
).response(
|
|
412
|
+
ResponseHandler()
|
|
413
|
+
.deserializer(APIHelper.json_deserialize)
|
|
414
|
+
.deserialize_into(DriversResponse.from_dictionary)
|
|
415
|
+
.is_api_response(True),
|
|
416
|
+
).execute()
|
|
417
|
+
|
|
418
|
+
def remove_driver_access_from_a_vehicle(self,
|
|
419
|
+
vehicle_tag):
|
|
420
|
+
"""Perform a DELETE request to /api/1/vehicles/{vehicle_tag}/drivers.
|
|
421
|
+
|
|
422
|
+
Args:
|
|
423
|
+
vehicle_tag (str): The request template parameter.
|
|
424
|
+
|
|
425
|
+
Returns:
|
|
426
|
+
ApiResponse: An object with the response value as well as other useful
|
|
427
|
+
information such as status codes and headers. Driver removed
|
|
428
|
+
|
|
429
|
+
Raises:
|
|
430
|
+
ApiException: When an error occurs while fetching the data from the
|
|
431
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
432
|
+
message, and the HTTP body that was received in the request.
|
|
433
|
+
|
|
434
|
+
"""
|
|
435
|
+
return super().new_api_call_builder.request(
|
|
436
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
437
|
+
.path("/api/1/vehicles/{vehicle_tag}/drivers")
|
|
438
|
+
.http_method(HttpMethodEnum.DELETE)
|
|
439
|
+
.template_param(Parameter()
|
|
440
|
+
.key("vehicle_tag")
|
|
441
|
+
.value(vehicle_tag)
|
|
442
|
+
.is_required(True)
|
|
443
|
+
.should_encode(True))
|
|
444
|
+
.header_param(Parameter()
|
|
445
|
+
.key("accept")
|
|
446
|
+
.value("application/json"))
|
|
447
|
+
.auth(Single("bearerAuth")),
|
|
448
|
+
).response(
|
|
449
|
+
ResponseHandler()
|
|
450
|
+
.deserializer(APIHelper.json_deserialize)
|
|
451
|
+
.deserialize_into(SimpleOkResponse.from_dictionary)
|
|
452
|
+
.is_api_response(True),
|
|
453
|
+
).execute()
|
|
454
|
+
|
|
455
|
+
def get_eligible_vehicle_subscriptions(self,
|
|
456
|
+
vin):
|
|
457
|
+
"""Perform a GET request to
|
|
458
|
+
/api/1/dx/vehicles/subscriptions/eligibility.
|
|
459
|
+
|
|
460
|
+
Args:
|
|
461
|
+
vin (str): The request query parameter.
|
|
462
|
+
|
|
463
|
+
Returns:
|
|
464
|
+
ApiResponse: An object with the response value as well as other useful
|
|
465
|
+
information such as status codes and headers. Eligible subscriptions
|
|
466
|
+
|
|
467
|
+
Raises:
|
|
468
|
+
ApiException: When an error occurs while fetching the data from the
|
|
469
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
470
|
+
message, and the HTTP body that was received in the request.
|
|
471
|
+
|
|
472
|
+
"""
|
|
473
|
+
return super().new_api_call_builder.request(
|
|
474
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
475
|
+
.path("/api/1/dx/vehicles/subscriptions/eligibility")
|
|
476
|
+
.http_method(HttpMethodEnum.GET)
|
|
477
|
+
.query_param(Parameter()
|
|
478
|
+
.key("vin")
|
|
479
|
+
.value(vin)
|
|
480
|
+
.is_required(True))
|
|
481
|
+
.header_param(Parameter()
|
|
482
|
+
.key("accept")
|
|
483
|
+
.value("application/json"))
|
|
484
|
+
.auth(Single("bearerAuth")),
|
|
485
|
+
).response(
|
|
486
|
+
ResponseHandler()
|
|
487
|
+
.deserializer(APIHelper.json_deserialize)
|
|
488
|
+
.deserialize_into(SiteInfoResponse.from_dictionary)
|
|
489
|
+
.is_api_response(True),
|
|
490
|
+
).execute()
|
|
491
|
+
|
|
492
|
+
def get_eligible_vehicle_upgrades(self,
|
|
493
|
+
vin):
|
|
494
|
+
"""Perform a GET request to /api/1/dx/vehicles/upgrades/eligibility.
|
|
495
|
+
|
|
496
|
+
Args:
|
|
497
|
+
vin (str): The request query parameter.
|
|
498
|
+
|
|
499
|
+
Returns:
|
|
500
|
+
ApiResponse: An object with the response value as well as other useful
|
|
501
|
+
information such as status codes and headers. Eligible upgrades
|
|
502
|
+
|
|
503
|
+
Raises:
|
|
504
|
+
ApiException: When an error occurs while fetching the data from the
|
|
505
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
506
|
+
message, and the HTTP body that was received in the request.
|
|
507
|
+
|
|
508
|
+
"""
|
|
509
|
+
return super().new_api_call_builder.request(
|
|
510
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
511
|
+
.path("/api/1/dx/vehicles/upgrades/eligibility")
|
|
512
|
+
.http_method(HttpMethodEnum.GET)
|
|
513
|
+
.query_param(Parameter()
|
|
514
|
+
.key("vin")
|
|
515
|
+
.value(vin)
|
|
516
|
+
.is_required(True))
|
|
517
|
+
.header_param(Parameter()
|
|
518
|
+
.key("accept")
|
|
519
|
+
.value("application/json"))
|
|
520
|
+
.auth(Single("bearerAuth")),
|
|
521
|
+
).response(
|
|
522
|
+
ResponseHandler()
|
|
523
|
+
.deserializer(APIHelper.json_deserialize)
|
|
524
|
+
.deserialize_into(SiteInfoResponse.from_dictionary)
|
|
525
|
+
.is_api_response(True),
|
|
526
|
+
).execute()
|
|
527
|
+
|
|
528
|
+
def set_enterprise_payer_roles(self,
|
|
529
|
+
vin,
|
|
530
|
+
body):
|
|
531
|
+
"""Perform a POST request to /api/1/dx/enterprise/v1/{vin}/payer.
|
|
532
|
+
|
|
533
|
+
Args:
|
|
534
|
+
vin (str): The request template parameter.
|
|
535
|
+
body (EnterprisePayerRequest): The request body parameter.
|
|
536
|
+
|
|
537
|
+
Returns:
|
|
538
|
+
ApiResponse: An object with the response value as well as other useful
|
|
539
|
+
information such as status codes and headers. Success
|
|
540
|
+
|
|
541
|
+
Raises:
|
|
542
|
+
ApiException: When an error occurs while fetching the data from the
|
|
543
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
544
|
+
message, and the HTTP body that was received in the request.
|
|
545
|
+
|
|
546
|
+
"""
|
|
547
|
+
return super().new_api_call_builder.request(
|
|
548
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
549
|
+
.path("/api/1/dx/enterprise/v1/{vin}/payer")
|
|
550
|
+
.http_method(HttpMethodEnum.POST)
|
|
551
|
+
.template_param(Parameter()
|
|
552
|
+
.key("vin")
|
|
553
|
+
.value(vin)
|
|
554
|
+
.is_required(True)
|
|
555
|
+
.should_encode(True))
|
|
556
|
+
.header_param(Parameter()
|
|
557
|
+
.key("Content-Type")
|
|
558
|
+
.value("application/json"))
|
|
559
|
+
.body_param(Parameter()
|
|
560
|
+
.value(body)
|
|
561
|
+
.is_required(True))
|
|
562
|
+
.body_serializer(APIHelper.json_serialize)
|
|
563
|
+
.auth(Single("bearerAuth")),
|
|
564
|
+
).response(
|
|
565
|
+
ResponseHandler()
|
|
566
|
+
.is_api_response(True),
|
|
567
|
+
).execute()
|
|
568
|
+
|
|
569
|
+
def get_enterprise_roles_for_a_vehicle(self,
|
|
570
|
+
vin):
|
|
571
|
+
"""Perform a GET request to /api/1/dx/enterprise/v1/{vin}/roles.
|
|
572
|
+
|
|
573
|
+
Args:
|
|
574
|
+
vin (str): The request template parameter.
|
|
575
|
+
|
|
576
|
+
Returns:
|
|
577
|
+
ApiResponse: An object with the response value as well as other useful
|
|
578
|
+
information such as status codes and headers. Enterprise roles
|
|
579
|
+
|
|
580
|
+
Raises:
|
|
581
|
+
ApiException: When an error occurs while fetching the data from the
|
|
582
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
583
|
+
message, and the HTTP body that was received in the request.
|
|
584
|
+
|
|
585
|
+
"""
|
|
586
|
+
return super().new_api_call_builder.request(
|
|
587
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
588
|
+
.path("/api/1/dx/enterprise/v1/{vin}/roles")
|
|
589
|
+
.http_method(HttpMethodEnum.GET)
|
|
590
|
+
.template_param(Parameter()
|
|
591
|
+
.key("vin")
|
|
592
|
+
.value(vin)
|
|
593
|
+
.is_required(True)
|
|
594
|
+
.should_encode(True))
|
|
595
|
+
.header_param(Parameter()
|
|
596
|
+
.key("accept")
|
|
597
|
+
.value("application/json"))
|
|
598
|
+
.auth(Single("bearerAuth")),
|
|
599
|
+
).response(
|
|
600
|
+
ResponseHandler()
|
|
601
|
+
.deserializer(APIHelper.json_deserialize)
|
|
602
|
+
.is_api_response(True),
|
|
603
|
+
).execute()
|
|
604
|
+
|
|
605
|
+
def get_fleet_status_for_vehicles(self,
|
|
606
|
+
body):
|
|
607
|
+
"""Perform a POST request to /api/1/vehicles/fleet_status.
|
|
608
|
+
|
|
609
|
+
Args:
|
|
610
|
+
body (FleetStatusRequest): The request body parameter.
|
|
611
|
+
|
|
612
|
+
Returns:
|
|
613
|
+
ApiResponse: An object with the response value as well as other useful
|
|
614
|
+
information such as status codes and headers. Fleet status
|
|
615
|
+
|
|
616
|
+
Raises:
|
|
617
|
+
ApiException: When an error occurs while fetching the data from the
|
|
618
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
619
|
+
message, and the HTTP body that was received in the request.
|
|
620
|
+
|
|
621
|
+
"""
|
|
622
|
+
return super().new_api_call_builder.request(
|
|
623
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
624
|
+
.path("/api/1/vehicles/fleet_status")
|
|
625
|
+
.http_method(HttpMethodEnum.POST)
|
|
626
|
+
.header_param(Parameter()
|
|
627
|
+
.key("Content-Type")
|
|
628
|
+
.value("application/json"))
|
|
629
|
+
.body_param(Parameter()
|
|
630
|
+
.value(body)
|
|
631
|
+
.is_required(True))
|
|
632
|
+
.header_param(Parameter()
|
|
633
|
+
.key("accept")
|
|
634
|
+
.value("application/json"))
|
|
635
|
+
.body_serializer(APIHelper.json_serialize)
|
|
636
|
+
.auth(Single("bearerAuth")),
|
|
637
|
+
).response(
|
|
638
|
+
ResponseHandler()
|
|
639
|
+
.deserializer(APIHelper.json_deserialize)
|
|
640
|
+
.is_api_response(True),
|
|
641
|
+
).execute()
|
|
642
|
+
|
|
643
|
+
def create_or_update_fleet_telemetry_configuration(self,
|
|
644
|
+
body):
|
|
645
|
+
"""Perform a POST request to /api/1/vehicles/fleet_telemetry_config.
|
|
646
|
+
|
|
647
|
+
Args:
|
|
648
|
+
body (Any): The request body parameter.
|
|
649
|
+
|
|
650
|
+
Returns:
|
|
651
|
+
ApiResponse: An object with the response value as well as other useful
|
|
652
|
+
information such as status codes and headers. Telemetry configuration
|
|
653
|
+
result
|
|
654
|
+
|
|
655
|
+
Raises:
|
|
656
|
+
ApiException: When an error occurs while fetching the data from the
|
|
657
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
658
|
+
message, and the HTTP body that was received in the request.
|
|
659
|
+
|
|
660
|
+
"""
|
|
661
|
+
return super().new_api_call_builder.request(
|
|
662
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
663
|
+
.path("/api/1/vehicles/fleet_telemetry_config")
|
|
664
|
+
.http_method(HttpMethodEnum.POST)
|
|
665
|
+
.header_param(Parameter()
|
|
666
|
+
.key("Content-Type")
|
|
667
|
+
.value("application/json"))
|
|
668
|
+
.body_param(Parameter()
|
|
669
|
+
.value(body)
|
|
670
|
+
.is_required(True))
|
|
671
|
+
.header_param(Parameter()
|
|
672
|
+
.key("accept")
|
|
673
|
+
.value("application/json"))
|
|
674
|
+
.body_serializer(APIHelper.json_serialize)
|
|
675
|
+
.auth(Single("bearerAuth")),
|
|
676
|
+
).response(
|
|
677
|
+
ResponseHandler()
|
|
678
|
+
.deserializer(APIHelper.json_deserialize)
|
|
679
|
+
.is_api_response(True),
|
|
680
|
+
).execute()
|
|
681
|
+
|
|
682
|
+
def get_fleet_telemetry_configuration(self,
|
|
683
|
+
vehicle_tag):
|
|
684
|
+
"""Perform a GET request to
|
|
685
|
+
/api/1/vehicles/{vehicle_tag}/fleet_telemetry_config.
|
|
686
|
+
|
|
687
|
+
Args:
|
|
688
|
+
vehicle_tag (str): The request template parameter.
|
|
689
|
+
|
|
690
|
+
Returns:
|
|
691
|
+
ApiResponse: An object with the response value as well as other useful
|
|
692
|
+
information such as status codes and headers. Fleet telemetry
|
|
693
|
+
configuration
|
|
694
|
+
|
|
695
|
+
Raises:
|
|
696
|
+
ApiException: When an error occurs while fetching the data from the
|
|
697
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
698
|
+
message, and the HTTP body that was received in the request.
|
|
699
|
+
|
|
700
|
+
"""
|
|
701
|
+
return super().new_api_call_builder.request(
|
|
702
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
703
|
+
.path("/api/1/vehicles/{vehicle_tag}/fleet_telemetry_config")
|
|
704
|
+
.http_method(HttpMethodEnum.GET)
|
|
705
|
+
.template_param(Parameter()
|
|
706
|
+
.key("vehicle_tag")
|
|
707
|
+
.value(vehicle_tag)
|
|
708
|
+
.is_required(True)
|
|
709
|
+
.should_encode(True))
|
|
710
|
+
.header_param(Parameter()
|
|
711
|
+
.key("accept")
|
|
712
|
+
.value("application/json"))
|
|
713
|
+
.auth(Single("bearerAuth")),
|
|
714
|
+
).response(
|
|
715
|
+
ResponseHandler()
|
|
716
|
+
.deserializer(APIHelper.json_deserialize)
|
|
717
|
+
.is_api_response(True),
|
|
718
|
+
).execute()
|
|
719
|
+
|
|
720
|
+
def delete_fleet_telemetry_configuration(self,
|
|
721
|
+
vehicle_tag):
|
|
722
|
+
"""Perform a DELETE request to
|
|
723
|
+
/api/1/vehicles/{vehicle_tag}/fleet_telemetry_config.
|
|
724
|
+
|
|
725
|
+
Args:
|
|
726
|
+
vehicle_tag (str): The request template parameter.
|
|
727
|
+
|
|
728
|
+
Returns:
|
|
729
|
+
ApiResponse: An object with the response value as well as other useful
|
|
730
|
+
information such as status codes and headers. Configuration deleted
|
|
731
|
+
|
|
732
|
+
Raises:
|
|
733
|
+
ApiException: When an error occurs while fetching the data from the
|
|
734
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
735
|
+
message, and the HTTP body that was received in the request.
|
|
736
|
+
|
|
737
|
+
"""
|
|
738
|
+
return super().new_api_call_builder.request(
|
|
739
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
740
|
+
.path("/api/1/vehicles/{vehicle_tag}/fleet_telemetry_config")
|
|
741
|
+
.http_method(HttpMethodEnum.DELETE)
|
|
742
|
+
.template_param(Parameter()
|
|
743
|
+
.key("vehicle_tag")
|
|
744
|
+
.value(vehicle_tag)
|
|
745
|
+
.is_required(True)
|
|
746
|
+
.should_encode(True))
|
|
747
|
+
.header_param(Parameter()
|
|
748
|
+
.key("accept")
|
|
749
|
+
.value("application/json"))
|
|
750
|
+
.auth(Single("bearerAuth")),
|
|
751
|
+
).response(
|
|
752
|
+
ResponseHandler()
|
|
753
|
+
.deserializer(APIHelper.json_deserialize)
|
|
754
|
+
.is_api_response(True),
|
|
755
|
+
).execute()
|
|
756
|
+
|
|
757
|
+
def configure_fleet_telemetry_using_signed_jws_token(self,
|
|
758
|
+
body):
|
|
759
|
+
"""Perform a POST request to
|
|
760
|
+
/api/1/vehicles/fleet_telemetry_config_jws.
|
|
761
|
+
|
|
762
|
+
Args:
|
|
763
|
+
body (FleetTelemetryJwsRequest): The request body parameter.
|
|
764
|
+
|
|
765
|
+
Returns:
|
|
766
|
+
ApiResponse: An object with the response value as well as other useful
|
|
767
|
+
information such as status codes and headers. Telemetry configuration
|
|
768
|
+
result
|
|
769
|
+
|
|
770
|
+
Raises:
|
|
771
|
+
ApiException: When an error occurs while fetching the data from the
|
|
772
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
773
|
+
message, and the HTTP body that was received in the request.
|
|
774
|
+
|
|
775
|
+
"""
|
|
776
|
+
return super().new_api_call_builder.request(
|
|
777
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
778
|
+
.path("/api/1/vehicles/fleet_telemetry_config_jws")
|
|
779
|
+
.http_method(HttpMethodEnum.POST)
|
|
780
|
+
.header_param(Parameter()
|
|
781
|
+
.key("Content-Type")
|
|
782
|
+
.value("application/json"))
|
|
783
|
+
.body_param(Parameter()
|
|
784
|
+
.value(body)
|
|
785
|
+
.is_required(True))
|
|
786
|
+
.header_param(Parameter()
|
|
787
|
+
.key("accept")
|
|
788
|
+
.value("application/json"))
|
|
789
|
+
.body_serializer(APIHelper.json_serialize)
|
|
790
|
+
.auth(Single("bearerAuth")),
|
|
791
|
+
).response(
|
|
792
|
+
ResponseHandler()
|
|
793
|
+
.deserializer(APIHelper.json_deserialize)
|
|
794
|
+
.is_api_response(True),
|
|
795
|
+
).execute()
|
|
796
|
+
|
|
797
|
+
def get_fleet_telemetry_errors_for_a_vehicle(self,
|
|
798
|
+
vehicle_tag):
|
|
799
|
+
"""Perform a GET request to
|
|
800
|
+
/api/1/vehicles/{vehicle_tag}/fleet_telemetry_errors.
|
|
801
|
+
|
|
802
|
+
Args:
|
|
803
|
+
vehicle_tag (str): The request template parameter.
|
|
804
|
+
|
|
805
|
+
Returns:
|
|
806
|
+
ApiResponse: An object with the response value as well as other useful
|
|
807
|
+
information such as status codes and headers. Fleet telemetry errors
|
|
808
|
+
|
|
809
|
+
Raises:
|
|
810
|
+
ApiException: When an error occurs while fetching the data from the
|
|
811
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
812
|
+
message, and the HTTP body that was received in the request.
|
|
813
|
+
|
|
814
|
+
"""
|
|
815
|
+
return super().new_api_call_builder.request(
|
|
816
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
817
|
+
.path("/api/1/vehicles/{vehicle_tag}/fleet_telemetry_errors")
|
|
818
|
+
.http_method(HttpMethodEnum.GET)
|
|
819
|
+
.template_param(Parameter()
|
|
820
|
+
.key("vehicle_tag")
|
|
821
|
+
.value(vehicle_tag)
|
|
822
|
+
.is_required(True)
|
|
823
|
+
.should_encode(True))
|
|
824
|
+
.header_param(Parameter()
|
|
825
|
+
.key("accept")
|
|
826
|
+
.value("application/json"))
|
|
827
|
+
.auth(Single("bearerAuth")),
|
|
828
|
+
).response(
|
|
829
|
+
ResponseHandler()
|
|
830
|
+
.deserializer(APIHelper.json_deserialize)
|
|
831
|
+
.is_api_response(True),
|
|
832
|
+
).execute()
|