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,310 @@
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 ResponseLiveStatusResponse(object):
13
+ """Implementation of the 'Response_LiveStatusResponse' model.
14
+
15
+ Attributes:
16
+ solar_power (float): The model property of type float.
17
+ energy_left (float): The model property of type float.
18
+ total_pack_energy (float): The model property of type float.
19
+ percentage_charged (float): The model property of type float.
20
+ backup_capable (bool): The model property of type bool.
21
+ battery_power (float): The model property of type float.
22
+ load_power (float): The model property of type float.
23
+ grid_status (str): The model property of type str.
24
+ grid_power (float): The model property of type float.
25
+ island_status (str): The model property of type str.
26
+ storm_mode_active (bool): The model property of type bool.
27
+ timestamp (datetime): The model property of type datetime.
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
+ "solar_power": "solar_power",
36
+ "energy_left": "energy_left",
37
+ "total_pack_energy": "total_pack_energy",
38
+ "percentage_charged": "percentage_charged",
39
+ "backup_capable": "backup_capable",
40
+ "battery_power": "battery_power",
41
+ "load_power": "load_power",
42
+ "grid_status": "grid_status",
43
+ "grid_power": "grid_power",
44
+ "island_status": "island_status",
45
+ "storm_mode_active": "storm_mode_active",
46
+ "timestamp": "timestamp",
47
+ }
48
+
49
+ _optionals = [
50
+ "battery_power",
51
+ "load_power",
52
+ "grid_status",
53
+ "grid_power",
54
+ "island_status",
55
+ "storm_mode_active",
56
+ "timestamp",
57
+ ]
58
+
59
+ def __init__(
60
+ self,
61
+ solar_power=None,
62
+ energy_left=None,
63
+ total_pack_energy=None,
64
+ percentage_charged=None,
65
+ backup_capable=None,
66
+ battery_power=APIHelper.SKIP,
67
+ load_power=APIHelper.SKIP,
68
+ grid_status=APIHelper.SKIP,
69
+ grid_power=APIHelper.SKIP,
70
+ island_status=APIHelper.SKIP,
71
+ storm_mode_active=APIHelper.SKIP,
72
+ timestamp=APIHelper.SKIP,
73
+ additional_properties=None):
74
+ """Initialize a ResponseLiveStatusResponse instance."""
75
+ # Initialize members of the class
76
+ self.solar_power = solar_power
77
+ self.energy_left = energy_left
78
+ self.total_pack_energy = total_pack_energy
79
+ self.percentage_charged = percentage_charged
80
+ self.backup_capable = backup_capable
81
+ if battery_power is not APIHelper.SKIP:
82
+ self.battery_power = battery_power
83
+ if load_power is not APIHelper.SKIP:
84
+ self.load_power = load_power
85
+ if grid_status is not APIHelper.SKIP:
86
+ self.grid_status = grid_status
87
+ if grid_power is not APIHelper.SKIP:
88
+ self.grid_power = grid_power
89
+ if island_status is not APIHelper.SKIP:
90
+ self.island_status = island_status
91
+ if storm_mode_active is not APIHelper.SKIP:
92
+ self.storm_mode_active = storm_mode_active
93
+ if timestamp is not APIHelper.SKIP:
94
+ self.timestamp =\
95
+ APIHelper.apply_datetime_converter(
96
+ timestamp, APIHelper.RFC3339DateTime)\
97
+ if timestamp else None
98
+
99
+ # Add additional model properties to the instance
100
+ if additional_properties is None:
101
+ additional_properties = {}
102
+ self.additional_properties = additional_properties
103
+
104
+ @classmethod
105
+ def from_dictionary(cls,
106
+ dictionary):
107
+ """Create an instance of this model from a dictionary
108
+
109
+ Args:
110
+ dictionary (dictionary): A dictionary representation of the object
111
+ as obtained from the deserialization of the server's response. The
112
+ keys MUST match property names in the API description.
113
+
114
+ Returns:
115
+ object: An instance of this structure class.
116
+
117
+ """
118
+ if not isinstance(dictionary, dict) or dictionary is None:
119
+ return None
120
+
121
+ # Extract variables from the dictionary
122
+ solar_power =\
123
+ dictionary.get("solar_power")\
124
+ if dictionary.get("solar_power")\
125
+ else None
126
+ energy_left =\
127
+ dictionary.get("energy_left")\
128
+ if dictionary.get("energy_left")\
129
+ else None
130
+ total_pack_energy =\
131
+ dictionary.get("total_pack_energy")\
132
+ if dictionary.get("total_pack_energy")\
133
+ else None
134
+ percentage_charged =\
135
+ dictionary.get("percentage_charged")\
136
+ if dictionary.get("percentage_charged")\
137
+ else None
138
+ backup_capable =\
139
+ dictionary.get("backup_capable")\
140
+ if "backup_capable" in dictionary.keys()\
141
+ else None
142
+ battery_power =\
143
+ dictionary.get("battery_power")\
144
+ if dictionary.get("battery_power")\
145
+ else APIHelper.SKIP
146
+ load_power =\
147
+ dictionary.get("load_power")\
148
+ if dictionary.get("load_power")\
149
+ else APIHelper.SKIP
150
+ grid_status =\
151
+ dictionary.get("grid_status")\
152
+ if dictionary.get("grid_status")\
153
+ else APIHelper.SKIP
154
+ grid_power =\
155
+ dictionary.get("grid_power")\
156
+ if dictionary.get("grid_power")\
157
+ else APIHelper.SKIP
158
+ island_status =\
159
+ dictionary.get("island_status")\
160
+ if dictionary.get("island_status")\
161
+ else APIHelper.SKIP
162
+ storm_mode_active =\
163
+ dictionary.get("storm_mode_active")\
164
+ if "storm_mode_active" in dictionary.keys()\
165
+ else APIHelper.SKIP
166
+ timestamp = APIHelper.RFC3339DateTime.from_value(
167
+ dictionary.get("timestamp")).datetime\
168
+ if dictionary.get("timestamp") else APIHelper.SKIP
169
+
170
+ additional_properties = APIHelper.get_additional_properties(
171
+ dictionary={k: v for k, v in dictionary.items()
172
+ if k not in cls._names.values()},
173
+ unboxing_function=lambda value: value)
174
+
175
+ # Return an object of this model
176
+ return cls(solar_power,
177
+ energy_left,
178
+ total_pack_energy,
179
+ percentage_charged,
180
+ backup_capable,
181
+ battery_power,
182
+ load_power,
183
+ grid_status,
184
+ grid_power,
185
+ island_status,
186
+ storm_mode_active,
187
+ timestamp,
188
+ additional_properties)
189
+
190
+ def __repr__(self):
191
+ """Return a unambiguous string representation."""
192
+ _solar_power=self.solar_power
193
+ _energy_left=self.energy_left
194
+ _total_pack_energy=self.total_pack_energy
195
+ _percentage_charged=self.percentage_charged
196
+ _backup_capable=self.backup_capable
197
+ _battery_power=(
198
+ self.battery_power
199
+ if hasattr(self, "battery_power")
200
+ else None
201
+ )
202
+ _load_power=(
203
+ self.load_power
204
+ if hasattr(self, "load_power")
205
+ else None
206
+ )
207
+ _grid_status=(
208
+ self.grid_status
209
+ if hasattr(self, "grid_status")
210
+ else None
211
+ )
212
+ _grid_power=(
213
+ self.grid_power
214
+ if hasattr(self, "grid_power")
215
+ else None
216
+ )
217
+ _island_status=(
218
+ self.island_status
219
+ if hasattr(self, "island_status")
220
+ else None
221
+ )
222
+ _storm_mode_active=(
223
+ self.storm_mode_active
224
+ if hasattr(self, "storm_mode_active")
225
+ else None
226
+ )
227
+ _timestamp=(
228
+ self.timestamp
229
+ if hasattr(self, "timestamp")
230
+ else None
231
+ )
232
+ _additional_properties=self.additional_properties
233
+ return (
234
+ f"{self.__class__.__name__}("
235
+ f"solar_power={_solar_power!r}, "
236
+ f"energy_left={_energy_left!r}, "
237
+ f"total_pack_energy={_total_pack_energy!r}, "
238
+ f"percentage_charged={_percentage_charged!r}, "
239
+ f"backup_capable={_backup_capable!r}, "
240
+ f"battery_power={_battery_power!r}, "
241
+ f"load_power={_load_power!r}, "
242
+ f"grid_status={_grid_status!r}, "
243
+ f"grid_power={_grid_power!r}, "
244
+ f"island_status={_island_status!r}, "
245
+ f"storm_mode_active={_storm_mode_active!r}, "
246
+ f"timestamp={_timestamp!r}, "
247
+ f"additional_properties={_additional_properties!r}, "
248
+ f")"
249
+ )
250
+
251
+ def __str__(self):
252
+ """Return a human-readable string representation."""
253
+ _solar_power=self.solar_power
254
+ _energy_left=self.energy_left
255
+ _total_pack_energy=self.total_pack_energy
256
+ _percentage_charged=self.percentage_charged
257
+ _backup_capable=self.backup_capable
258
+ _battery_power=(
259
+ self.battery_power
260
+ if hasattr(self, "battery_power")
261
+ else None
262
+ )
263
+ _load_power=(
264
+ self.load_power
265
+ if hasattr(self, "load_power")
266
+ else None
267
+ )
268
+ _grid_status=(
269
+ self.grid_status
270
+ if hasattr(self, "grid_status")
271
+ else None
272
+ )
273
+ _grid_power=(
274
+ self.grid_power
275
+ if hasattr(self, "grid_power")
276
+ else None
277
+ )
278
+ _island_status=(
279
+ self.island_status
280
+ if hasattr(self, "island_status")
281
+ else None
282
+ )
283
+ _storm_mode_active=(
284
+ self.storm_mode_active
285
+ if hasattr(self, "storm_mode_active")
286
+ else None
287
+ )
288
+ _timestamp=(
289
+ self.timestamp
290
+ if hasattr(self, "timestamp")
291
+ else None
292
+ )
293
+ _additional_properties=self.additional_properties
294
+ return (
295
+ f"{self.__class__.__name__}("
296
+ f"solar_power={_solar_power!s}, "
297
+ f"energy_left={_energy_left!s}, "
298
+ f"total_pack_energy={_total_pack_energy!s}, "
299
+ f"percentage_charged={_percentage_charged!s}, "
300
+ f"backup_capable={_backup_capable!s}, "
301
+ f"battery_power={_battery_power!s}, "
302
+ f"load_power={_load_power!s}, "
303
+ f"grid_status={_grid_status!s}, "
304
+ f"grid_power={_grid_power!s}, "
305
+ f"island_status={_island_status!s}, "
306
+ f"storm_mode_active={_storm_mode_active!s}, "
307
+ f"timestamp={_timestamp!s}, "
308
+ f"additional_properties={_additional_properties!s}, "
309
+ f")"
310
+ )
@@ -0,0 +1,131 @@
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 ResponseMeResponse(object):
13
+ """Implementation of the 'Response_MeResponse' model.
14
+
15
+ Attributes:
16
+ email (str): The model property of type str.
17
+ full_name (str): The model property of type str.
18
+ profile_image_url (str): The model property of type str.
19
+ vault_uuid (uuid|str): The model property of type uuid|str.
20
+ additional_properties (Dict[str, Any]): The additional properties for the
21
+ model.
22
+
23
+ """
24
+
25
+ # Create a mapping from Model property names to API property names
26
+ _names = {
27
+ "email": "email",
28
+ "full_name": "full_name",
29
+ "profile_image_url": "profile_image_url",
30
+ "vault_uuid": "vault_uuid",
31
+ }
32
+
33
+ def __init__(
34
+ self,
35
+ email=None,
36
+ full_name=None,
37
+ profile_image_url=None,
38
+ vault_uuid=None,
39
+ additional_properties=None):
40
+ """Initialize a ResponseMeResponse instance."""
41
+ # Initialize members of the class
42
+ self.email = email
43
+ self.full_name = full_name
44
+ self.profile_image_url = profile_image_url
45
+ self.vault_uuid = vault_uuid
46
+
47
+ # Add additional model properties to the instance
48
+ if additional_properties is None:
49
+ additional_properties = {}
50
+ self.additional_properties = additional_properties
51
+
52
+ @classmethod
53
+ def from_dictionary(cls,
54
+ dictionary):
55
+ """Create an instance of this model from a dictionary
56
+
57
+ Args:
58
+ dictionary (dictionary): A dictionary representation of the object
59
+ as obtained from the deserialization of the server's response. The
60
+ keys MUST match property names in the API description.
61
+
62
+ Returns:
63
+ object: An instance of this structure class.
64
+
65
+ """
66
+ if not isinstance(dictionary, dict) or dictionary is None:
67
+ return None
68
+
69
+ # Extract variables from the dictionary
70
+ email =\
71
+ dictionary.get("email")\
72
+ if dictionary.get("email")\
73
+ else None
74
+ full_name =\
75
+ dictionary.get("full_name")\
76
+ if dictionary.get("full_name")\
77
+ else None
78
+ profile_image_url =\
79
+ dictionary.get("profile_image_url")\
80
+ if dictionary.get("profile_image_url")\
81
+ else None
82
+ vault_uuid =\
83
+ dictionary.get("vault_uuid")\
84
+ if dictionary.get("vault_uuid")\
85
+ else None
86
+
87
+ additional_properties = APIHelper.get_additional_properties(
88
+ dictionary={k: v for k, v in dictionary.items()
89
+ if k not in cls._names.values()},
90
+ unboxing_function=lambda value: value)
91
+
92
+ # Return an object of this model
93
+ return cls(email,
94
+ full_name,
95
+ profile_image_url,
96
+ vault_uuid,
97
+ additional_properties)
98
+
99
+ def __repr__(self):
100
+ """Return a unambiguous string representation."""
101
+ _email=self.email
102
+ _full_name=self.full_name
103
+ _profile_image_url=self.profile_image_url
104
+ _vault_uuid=self.vault_uuid
105
+ _additional_properties=self.additional_properties
106
+ return (
107
+ f"{self.__class__.__name__}("
108
+ f"email={_email!r}, "
109
+ f"full_name={_full_name!r}, "
110
+ f"profile_image_url={_profile_image_url!r}, "
111
+ f"vault_uuid={_vault_uuid!r}, "
112
+ f"additional_properties={_additional_properties!r}, "
113
+ f")"
114
+ )
115
+
116
+ def __str__(self):
117
+ """Return a human-readable string representation."""
118
+ _email=self.email
119
+ _full_name=self.full_name
120
+ _profile_image_url=self.profile_image_url
121
+ _vault_uuid=self.vault_uuid
122
+ _additional_properties=self.additional_properties
123
+ return (
124
+ f"{self.__class__.__name__}("
125
+ f"email={_email!s}, "
126
+ f"full_name={_full_name!s}, "
127
+ f"profile_image_url={_profile_image_url!s}, "
128
+ f"vault_uuid={_vault_uuid!s}, "
129
+ f"additional_properties={_additional_properties!s}, "
130
+ f")"
131
+ )
@@ -0,0 +1,209 @@
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 ResponseOrdersResponse(object):
13
+ """Implementation of the 'Response_OrdersResponse' model.
14
+
15
+ Attributes:
16
+ vehicle_map_id (int): The model property of type int.
17
+ reference_number (str): The model property of type str.
18
+ vin (str): The model property of type str.
19
+ order_status (str): The model property of type str.
20
+ order_substatus (str): The model property of type str.
21
+ model_code (str): The model property of type str.
22
+ country_code (str): The model property of type str.
23
+ locale (str): The model property of type str.
24
+ mkt_options (str): The model property of type str.
25
+ is_b_2_b (bool): The model property of type bool.
26
+ additional_properties (Dict[str, Any]): The additional properties for the
27
+ model.
28
+
29
+ """
30
+
31
+ # Create a mapping from Model property names to API property names
32
+ _names = {
33
+ "vehicle_map_id": "vehicleMapId",
34
+ "reference_number": "referenceNumber",
35
+ "vin": "vin",
36
+ "order_status": "orderStatus",
37
+ "order_substatus": "orderSubstatus",
38
+ "model_code": "modelCode",
39
+ "country_code": "countryCode",
40
+ "locale": "locale",
41
+ "mkt_options": "mktOptions",
42
+ "is_b_2_b": "isB2b",
43
+ }
44
+
45
+ def __init__(
46
+ self,
47
+ vehicle_map_id=None,
48
+ reference_number=None,
49
+ vin=None,
50
+ order_status=None,
51
+ order_substatus=None,
52
+ model_code=None,
53
+ country_code=None,
54
+ locale=None,
55
+ mkt_options=None,
56
+ is_b_2_b=None,
57
+ additional_properties=None):
58
+ """Initialize a ResponseOrdersResponse instance."""
59
+ # Initialize members of the class
60
+ self.vehicle_map_id = vehicle_map_id
61
+ self.reference_number = reference_number
62
+ self.vin = vin
63
+ self.order_status = order_status
64
+ self.order_substatus = order_substatus
65
+ self.model_code = model_code
66
+ self.country_code = country_code
67
+ self.locale = locale
68
+ self.mkt_options = mkt_options
69
+ self.is_b_2_b = is_b_2_b
70
+
71
+ # Add additional model properties to the instance
72
+ if additional_properties is None:
73
+ additional_properties = {}
74
+ self.additional_properties = additional_properties
75
+
76
+ @classmethod
77
+ def from_dictionary(cls,
78
+ dictionary):
79
+ """Create an instance of this model from a dictionary
80
+
81
+ Args:
82
+ dictionary (dictionary): A dictionary representation of the object
83
+ as obtained from the deserialization of the server's response. The
84
+ keys MUST match property names in the API description.
85
+
86
+ Returns:
87
+ object: An instance of this structure class.
88
+
89
+ """
90
+ if not isinstance(dictionary, dict) or dictionary is None:
91
+ return None
92
+
93
+ # Extract variables from the dictionary
94
+ vehicle_map_id =\
95
+ dictionary.get("vehicleMapId")\
96
+ if dictionary.get("vehicleMapId")\
97
+ else None
98
+ reference_number =\
99
+ dictionary.get("referenceNumber")\
100
+ if dictionary.get("referenceNumber")\
101
+ else None
102
+ vin =\
103
+ dictionary.get("vin")\
104
+ if dictionary.get("vin")\
105
+ else None
106
+ order_status =\
107
+ dictionary.get("orderStatus")\
108
+ if dictionary.get("orderStatus")\
109
+ else None
110
+ order_substatus =\
111
+ dictionary.get("orderSubstatus")\
112
+ if dictionary.get("orderSubstatus")\
113
+ else None
114
+ model_code =\
115
+ dictionary.get("modelCode")\
116
+ if dictionary.get("modelCode")\
117
+ else None
118
+ country_code =\
119
+ dictionary.get("countryCode")\
120
+ if dictionary.get("countryCode")\
121
+ else None
122
+ locale =\
123
+ dictionary.get("locale")\
124
+ if dictionary.get("locale")\
125
+ else None
126
+ mkt_options =\
127
+ dictionary.get("mktOptions")\
128
+ if dictionary.get("mktOptions")\
129
+ else None
130
+ is_b_2_b =\
131
+ dictionary.get("isB2b")\
132
+ if "isB2b" in dictionary.keys()\
133
+ else None
134
+
135
+ additional_properties = APIHelper.get_additional_properties(
136
+ dictionary={k: v for k, v in dictionary.items()
137
+ if k not in cls._names.values()},
138
+ unboxing_function=lambda value: value)
139
+
140
+ # Return an object of this model
141
+ return cls(vehicle_map_id,
142
+ reference_number,
143
+ vin,
144
+ order_status,
145
+ order_substatus,
146
+ model_code,
147
+ country_code,
148
+ locale,
149
+ mkt_options,
150
+ is_b_2_b,
151
+ additional_properties)
152
+
153
+ def __repr__(self):
154
+ """Return a unambiguous string representation."""
155
+ _vehicle_map_id=self.vehicle_map_id
156
+ _reference_number=self.reference_number
157
+ _vin=self.vin
158
+ _order_status=self.order_status
159
+ _order_substatus=self.order_substatus
160
+ _model_code=self.model_code
161
+ _country_code=self.country_code
162
+ _locale=self.locale
163
+ _mkt_options=self.mkt_options
164
+ _is_b_2_b=self.is_b_2_b
165
+ _additional_properties=self.additional_properties
166
+ return (
167
+ f"{self.__class__.__name__}("
168
+ f"vehicle_map_id={_vehicle_map_id!r}, "
169
+ f"reference_number={_reference_number!r}, "
170
+ f"vin={_vin!r}, "
171
+ f"order_status={_order_status!r}, "
172
+ f"order_substatus={_order_substatus!r}, "
173
+ f"model_code={_model_code!r}, "
174
+ f"country_code={_country_code!r}, "
175
+ f"locale={_locale!r}, "
176
+ f"mkt_options={_mkt_options!r}, "
177
+ f"is_b_2_b={_is_b_2_b!r}, "
178
+ f"additional_properties={_additional_properties!r}, "
179
+ f")"
180
+ )
181
+
182
+ def __str__(self):
183
+ """Return a human-readable string representation."""
184
+ _vehicle_map_id=self.vehicle_map_id
185
+ _reference_number=self.reference_number
186
+ _vin=self.vin
187
+ _order_status=self.order_status
188
+ _order_substatus=self.order_substatus
189
+ _model_code=self.model_code
190
+ _country_code=self.country_code
191
+ _locale=self.locale
192
+ _mkt_options=self.mkt_options
193
+ _is_b_2_b=self.is_b_2_b
194
+ _additional_properties=self.additional_properties
195
+ return (
196
+ f"{self.__class__.__name__}("
197
+ f"vehicle_map_id={_vehicle_map_id!s}, "
198
+ f"reference_number={_reference_number!s}, "
199
+ f"vin={_vin!s}, "
200
+ f"order_status={_order_status!s}, "
201
+ f"order_substatus={_order_substatus!s}, "
202
+ f"model_code={_model_code!s}, "
203
+ f"country_code={_country_code!s}, "
204
+ f"locale={_locale!s}, "
205
+ f"mkt_options={_mkt_options!s}, "
206
+ f"is_b_2_b={_is_b_2_b!s}, "
207
+ f"additional_properties={_additional_properties!s}, "
208
+ f")"
209
+ )