tesla-api-sdk 1.0.0
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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +160 -0
- data/bin/console +15 -0
- data/lib/tesla_fleet_management_api/api_helper.rb +10 -0
- data/lib/tesla_fleet_management_api/client.rb +110 -0
- data/lib/tesla_fleet_management_api/configuration.rb +181 -0
- data/lib/tesla_fleet_management_api/controllers/base_controller.rb +65 -0
- data/lib/tesla_fleet_management_api/controllers/charging_controller.rb +62 -0
- data/lib/tesla_fleet_management_api/controllers/energy_controller.rb +315 -0
- data/lib/tesla_fleet_management_api/controllers/oauth_authorization_controller.rb +87 -0
- data/lib/tesla_fleet_management_api/controllers/partner_controller.rb +82 -0
- data/lib/tesla_fleet_management_api/controllers/user_controller.rb +73 -0
- data/lib/tesla_fleet_management_api/controllers/vehicles_controller.rb +431 -0
- data/lib/tesla_fleet_management_api/exceptions/api_exception.rb +21 -0
- data/lib/tesla_fleet_management_api/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/tesla_fleet_management_api/http/api_response.rb +19 -0
- data/lib/tesla_fleet_management_api/http/auth/bearer_auth.rb +53 -0
- data/lib/tesla_fleet_management_api/http/auth/oauth_2.rb +154 -0
- data/lib/tesla_fleet_management_api/http/http_call_back.rb +10 -0
- data/lib/tesla_fleet_management_api/http/http_method_enum.rb +10 -0
- data/lib/tesla_fleet_management_api/http/http_request.rb +10 -0
- data/lib/tesla_fleet_management_api/http/http_response.rb +10 -0
- data/lib/tesla_fleet_management_api/http/proxy_settings.rb +22 -0
- data/lib/tesla_fleet_management_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/tesla_fleet_management_api/logging/sdk_logger.rb +17 -0
- data/lib/tesla_fleet_management_api/models/api1_dx_vehicles_options_response.rb +76 -0
- data/lib/tesla_fleet_management_api/models/api1_dx_warranty_details_response.rb +76 -0
- data/lib/tesla_fleet_management_api/models/api1_vehicles_mobile_enabled_response.rb +75 -0
- data/lib/tesla_fleet_management_api/models/api1_vehicles_nearby_charging_sites_response.rb +75 -0
- data/lib/tesla_fleet_management_api/models/api1_vehicles_response.rb +104 -0
- data/lib/tesla_fleet_management_api/models/api1_vehicles_response_get_vehicle.rb +75 -0
- data/lib/tesla_fleet_management_api/models/api1_vehicles_wake_up_response.rb +75 -0
- data/lib/tesla_fleet_management_api/models/backup_request.rb +75 -0
- data/lib/tesla_fleet_management_api/models/backup_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/base_model.rb +110 -0
- data/lib/tesla_fleet_management_api/models/calendar_history_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/charge_duration.rb +73 -0
- data/lib/tesla_fleet_management_api/models/charge_history.rb +96 -0
- data/lib/tesla_fleet_management_api/models/charge_history_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/charge_start_time.rb +73 -0
- data/lib/tesla_fleet_management_api/models/charging_dimension.rb +85 -0
- data/lib/tesla_fleet_management_api/models/charging_fee.rb +312 -0
- data/lib/tesla_fleet_management_api/models/charging_history_data.rb +81 -0
- data/lib/tesla_fleet_management_api/models/charging_history_item.rb +222 -0
- data/lib/tesla_fleet_management_api/models/charging_history_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/charging_invoice.rb +95 -0
- data/lib/tesla_fleet_management_api/models/charging_location.rb +158 -0
- data/lib/tesla_fleet_management_api/models/charging_period.rb +96 -0
- data/lib/tesla_fleet_management_api/models/charging_session.rb +187 -0
- data/lib/tesla_fleet_management_api/models/charging_sessions_data.rb +116 -0
- data/lib/tesla_fleet_management_api/models/charging_sessions_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/default_real_mode.rb +36 -0
- data/lib/tesla_fleet_management_api/models/driver.rb +164 -0
- data/lib/tesla_fleet_management_api/models/drivers_response.rb +94 -0
- data/lib/tesla_fleet_management_api/models/enterprise_payer_request.rb +94 -0
- data/lib/tesla_fleet_management_api/models/event.rb +89 -0
- data/lib/tesla_fleet_management_api/models/fleet_status_request.rb +74 -0
- data/lib/tesla_fleet_management_api/models/fleet_telemetry_error.rb +90 -0
- data/lib/tesla_fleet_management_api/models/fleet_telemetry_errors_response.rb +74 -0
- data/lib/tesla_fleet_management_api/models/fleet_telemetry_jws_request.rb +85 -0
- data/lib/tesla_fleet_management_api/models/generic_update_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/kind.rb +36 -0
- data/lib/tesla_fleet_management_api/models/kind_get_wall_connector_charging_history.rb +26 -0
- data/lib/tesla_fleet_management_api/models/live_status_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/location.rb +85 -0
- data/lib/tesla_fleet_management_api/models/location1.rb +85 -0
- data/lib/tesla_fleet_management_api/models/me_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/mobile_enabled.rb +85 -0
- data/lib/tesla_fleet_management_api/models/oauth_provider_error.rb +62 -0
- data/lib/tesla_fleet_management_api/models/oauth_token.rb +96 -0
- data/lib/tesla_fleet_management_api/models/off_grid_vehicle_charging_reserve_request.rb +79 -0
- data/lib/tesla_fleet_management_api/models/operation_request.rb +75 -0
- data/lib/tesla_fleet_management_api/models/orders_response.rb +91 -0
- data/lib/tesla_fleet_management_api/models/pagination.rb +127 -0
- data/lib/tesla_fleet_management_api/models/price_component.rb +95 -0
- data/lib/tesla_fleet_management_api/models/products_response.rb +85 -0
- data/lib/tesla_fleet_management_api/models/public_key_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/region_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/register_partner_request.rb +73 -0
- data/lib/tesla_fleet_management_api/models/register_partner_response.rb +73 -0
- data/lib/tesla_fleet_management_api/models/response.rb +82 -0
- data/lib/tesla_fleet_management_api/models/response1.rb +75 -0
- data/lib/tesla_fleet_management_api/models/response2.rb +74 -0
- data/lib/tesla_fleet_management_api/models/response3.rb +115 -0
- data/lib/tesla_fleet_management_api/models/response_api1_dx_vehicles_options_response.rb +84 -0
- data/lib/tesla_fleet_management_api/models/response_api1_dx_warranty_details_response.rb +124 -0
- data/lib/tesla_fleet_management_api/models/response_calendar_history_response.rb +91 -0
- data/lib/tesla_fleet_management_api/models/response_charge_history_response.rb +83 -0
- data/lib/tesla_fleet_management_api/models/response_fleet_telemetry_errors_response.rb +83 -0
- data/lib/tesla_fleet_management_api/models/response_live_status_response.rb +196 -0
- data/lib/tesla_fleet_management_api/models/response_me_response.rb +102 -0
- data/lib/tesla_fleet_management_api/models/response_orders_response.rb +157 -0
- data/lib/tesla_fleet_management_api/models/response_public_key_response.rb +74 -0
- data/lib/tesla_fleet_management_api/models/response_region_response.rb +83 -0
- data/lib/tesla_fleet_management_api/models/response_register_partner_response.rb +223 -0
- data/lib/tesla_fleet_management_api/models/signaling.rb +94 -0
- data/lib/tesla_fleet_management_api/models/simple_ok_response.rb +75 -0
- data/lib/tesla_fleet_management_api/models/site_info_response.rb +75 -0
- data/lib/tesla_fleet_management_api/models/storm_mode_request.rb +73 -0
- data/lib/tesla_fleet_management_api/models/tariff_element.rb +95 -0
- data/lib/tesla_fleet_management_api/models/tariffs.rb +94 -0
- data/lib/tesla_fleet_management_api/models/time_of_use_settings_request.rb +74 -0
- data/lib/tesla_fleet_management_api/models/total_cost.rb +95 -0
- data/lib/tesla_fleet_management_api/models/tou_settings.rb +77 -0
- data/lib/tesla_fleet_management_api/models/vehicle_base.rb +147 -0
- data/lib/tesla_fleet_management_api/models/vehicle_option.rb +107 -0
- data/lib/tesla_fleet_management_api/models/warranty_item.rb +155 -0
- data/lib/tesla_fleet_management_api/utilities/date_time_helper.rb +11 -0
- data/lib/tesla_fleet_management_api/utilities/file_wrapper.rb +28 -0
- data/lib/tesla_fleet_management_api.rb +153 -0
- metadata +195 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# tesla_fleet_management_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TeslaFleetManagementApi
|
|
8
|
+
# ResponseLiveStatusResponse Model.
|
|
9
|
+
class ResponseLiveStatusResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [Float]
|
|
15
|
+
attr_accessor :solar_power
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [Float]
|
|
19
|
+
attr_accessor :energy_left
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [Float]
|
|
23
|
+
attr_accessor :total_pack_energy
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [Float]
|
|
27
|
+
attr_accessor :percentage_charged
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for this method
|
|
30
|
+
# @return [TrueClass | FalseClass]
|
|
31
|
+
attr_accessor :backup_capable
|
|
32
|
+
|
|
33
|
+
# TODO: Write general description for this method
|
|
34
|
+
# @return [Float]
|
|
35
|
+
attr_accessor :battery_power
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for this method
|
|
38
|
+
# @return [Float]
|
|
39
|
+
attr_accessor :load_power
|
|
40
|
+
|
|
41
|
+
# TODO: Write general description for this method
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :grid_status
|
|
44
|
+
|
|
45
|
+
# TODO: Write general description for this method
|
|
46
|
+
# @return [Float]
|
|
47
|
+
attr_accessor :grid_power
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for this method
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :island_status
|
|
52
|
+
|
|
53
|
+
# TODO: Write general description for this method
|
|
54
|
+
# @return [TrueClass | FalseClass]
|
|
55
|
+
attr_accessor :storm_mode_active
|
|
56
|
+
|
|
57
|
+
# TODO: Write general description for this method
|
|
58
|
+
# @return [DateTime]
|
|
59
|
+
attr_accessor :timestamp
|
|
60
|
+
|
|
61
|
+
# A mapping from model property names to API property names.
|
|
62
|
+
def self.names
|
|
63
|
+
@_hash = {} if @_hash.nil?
|
|
64
|
+
@_hash['solar_power'] = 'solar_power'
|
|
65
|
+
@_hash['energy_left'] = 'energy_left'
|
|
66
|
+
@_hash['total_pack_energy'] = 'total_pack_energy'
|
|
67
|
+
@_hash['percentage_charged'] = 'percentage_charged'
|
|
68
|
+
@_hash['backup_capable'] = 'backup_capable'
|
|
69
|
+
@_hash['battery_power'] = 'battery_power'
|
|
70
|
+
@_hash['load_power'] = 'load_power'
|
|
71
|
+
@_hash['grid_status'] = 'grid_status'
|
|
72
|
+
@_hash['grid_power'] = 'grid_power'
|
|
73
|
+
@_hash['island_status'] = 'island_status'
|
|
74
|
+
@_hash['storm_mode_active'] = 'storm_mode_active'
|
|
75
|
+
@_hash['timestamp'] = 'timestamp'
|
|
76
|
+
@_hash
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# An array for optional fields
|
|
80
|
+
def self.optionals
|
|
81
|
+
%w[
|
|
82
|
+
battery_power
|
|
83
|
+
load_power
|
|
84
|
+
grid_status
|
|
85
|
+
grid_power
|
|
86
|
+
island_status
|
|
87
|
+
storm_mode_active
|
|
88
|
+
timestamp
|
|
89
|
+
]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# An array for nullable fields
|
|
93
|
+
def self.nullables
|
|
94
|
+
[]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def initialize(solar_power:, energy_left:, total_pack_energy:,
|
|
98
|
+
percentage_charged:, backup_capable:, battery_power: SKIP,
|
|
99
|
+
load_power: SKIP, grid_status: SKIP, grid_power: SKIP,
|
|
100
|
+
island_status: SKIP, storm_mode_active: SKIP,
|
|
101
|
+
timestamp: SKIP, additional_properties: nil)
|
|
102
|
+
# Add additional model properties to the instance
|
|
103
|
+
additional_properties = {} if additional_properties.nil?
|
|
104
|
+
|
|
105
|
+
@solar_power = solar_power
|
|
106
|
+
@energy_left = energy_left
|
|
107
|
+
@total_pack_energy = total_pack_energy
|
|
108
|
+
@percentage_charged = percentage_charged
|
|
109
|
+
@backup_capable = backup_capable
|
|
110
|
+
@battery_power = battery_power unless battery_power == SKIP
|
|
111
|
+
@load_power = load_power unless load_power == SKIP
|
|
112
|
+
@grid_status = grid_status unless grid_status == SKIP
|
|
113
|
+
@grid_power = grid_power unless grid_power == SKIP
|
|
114
|
+
@island_status = island_status unless island_status == SKIP
|
|
115
|
+
@storm_mode_active = storm_mode_active unless storm_mode_active == SKIP
|
|
116
|
+
@timestamp = timestamp unless timestamp == SKIP
|
|
117
|
+
@additional_properties = additional_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Creates an instance of the object from a hash.
|
|
121
|
+
def self.from_hash(hash)
|
|
122
|
+
return nil unless hash
|
|
123
|
+
|
|
124
|
+
# Extract variables from the hash.
|
|
125
|
+
solar_power = hash.key?('solar_power') ? hash['solar_power'] : nil
|
|
126
|
+
energy_left = hash.key?('energy_left') ? hash['energy_left'] : nil
|
|
127
|
+
total_pack_energy =
|
|
128
|
+
hash.key?('total_pack_energy') ? hash['total_pack_energy'] : nil
|
|
129
|
+
percentage_charged =
|
|
130
|
+
hash.key?('percentage_charged') ? hash['percentage_charged'] : nil
|
|
131
|
+
backup_capable =
|
|
132
|
+
hash.key?('backup_capable') ? hash['backup_capable'] : nil
|
|
133
|
+
battery_power = hash.key?('battery_power') ? hash['battery_power'] : SKIP
|
|
134
|
+
load_power = hash.key?('load_power') ? hash['load_power'] : SKIP
|
|
135
|
+
grid_status = hash.key?('grid_status') ? hash['grid_status'] : SKIP
|
|
136
|
+
grid_power = hash.key?('grid_power') ? hash['grid_power'] : SKIP
|
|
137
|
+
island_status = hash.key?('island_status') ? hash['island_status'] : SKIP
|
|
138
|
+
storm_mode_active =
|
|
139
|
+
hash.key?('storm_mode_active') ? hash['storm_mode_active'] : SKIP
|
|
140
|
+
timestamp = if hash.key?('timestamp')
|
|
141
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
142
|
+
else
|
|
143
|
+
SKIP
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Create a new hash for additional properties, removing known properties.
|
|
147
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
148
|
+
|
|
149
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
150
|
+
new_hash, proc { |value| value }
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
# Create object from extracted values.
|
|
154
|
+
ResponseLiveStatusResponse.new(solar_power: solar_power,
|
|
155
|
+
energy_left: energy_left,
|
|
156
|
+
total_pack_energy: total_pack_energy,
|
|
157
|
+
percentage_charged: percentage_charged,
|
|
158
|
+
backup_capable: backup_capable,
|
|
159
|
+
battery_power: battery_power,
|
|
160
|
+
load_power: load_power,
|
|
161
|
+
grid_status: grid_status,
|
|
162
|
+
grid_power: grid_power,
|
|
163
|
+
island_status: island_status,
|
|
164
|
+
storm_mode_active: storm_mode_active,
|
|
165
|
+
timestamp: timestamp,
|
|
166
|
+
additional_properties: additional_properties)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def to_custom_timestamp
|
|
170
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Provides a human-readable string representation of the object.
|
|
174
|
+
def to_s
|
|
175
|
+
class_name = self.class.name.split('::').last
|
|
176
|
+
"<#{class_name} solar_power: #{@solar_power}, energy_left: #{@energy_left},"\
|
|
177
|
+
" total_pack_energy: #{@total_pack_energy}, percentage_charged: #{@percentage_charged},"\
|
|
178
|
+
" backup_capable: #{@backup_capable}, battery_power: #{@battery_power}, load_power:"\
|
|
179
|
+
" #{@load_power}, grid_status: #{@grid_status}, grid_power: #{@grid_power}, island_status:"\
|
|
180
|
+
" #{@island_status}, storm_mode_active: #{@storm_mode_active}, timestamp: #{@timestamp},"\
|
|
181
|
+
" additional_properties: #{@additional_properties}>"
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
185
|
+
def inspect
|
|
186
|
+
class_name = self.class.name.split('::').last
|
|
187
|
+
"<#{class_name} solar_power: #{@solar_power.inspect}, energy_left: #{@energy_left.inspect},"\
|
|
188
|
+
" total_pack_energy: #{@total_pack_energy.inspect}, percentage_charged:"\
|
|
189
|
+
" #{@percentage_charged.inspect}, backup_capable: #{@backup_capable.inspect}, battery_power:"\
|
|
190
|
+
" #{@battery_power.inspect}, load_power: #{@load_power.inspect}, grid_status:"\
|
|
191
|
+
" #{@grid_status.inspect}, grid_power: #{@grid_power.inspect}, island_status:"\
|
|
192
|
+
" #{@island_status.inspect}, storm_mode_active: #{@storm_mode_active.inspect}, timestamp:"\
|
|
193
|
+
" #{@timestamp.inspect}, additional_properties: #{@additional_properties}>"
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# tesla_fleet_management_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TeslaFleetManagementApi
|
|
7
|
+
# ResponseMeResponse Model.
|
|
8
|
+
class ResponseMeResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :email
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :full_name
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :profile_image_url
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [UUID | String]
|
|
26
|
+
attr_accessor :vault_uuid
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['email'] = 'email'
|
|
32
|
+
@_hash['full_name'] = 'full_name'
|
|
33
|
+
@_hash['profile_image_url'] = 'profile_image_url'
|
|
34
|
+
@_hash['vault_uuid'] = 'vault_uuid'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(email:, full_name:, profile_image_url:, vault_uuid:,
|
|
49
|
+
additional_properties: nil)
|
|
50
|
+
# Add additional model properties to the instance
|
|
51
|
+
additional_properties = {} if additional_properties.nil?
|
|
52
|
+
|
|
53
|
+
@email = email
|
|
54
|
+
@full_name = full_name
|
|
55
|
+
@profile_image_url = profile_image_url
|
|
56
|
+
@vault_uuid = vault_uuid
|
|
57
|
+
@additional_properties = additional_properties
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
email = hash.key?('email') ? hash['email'] : nil
|
|
66
|
+
full_name = hash.key?('full_name') ? hash['full_name'] : nil
|
|
67
|
+
profile_image_url =
|
|
68
|
+
hash.key?('profile_image_url') ? hash['profile_image_url'] : nil
|
|
69
|
+
vault_uuid = hash.key?('vault_uuid') ? hash['vault_uuid'] : nil
|
|
70
|
+
|
|
71
|
+
# Create a new hash for additional properties, removing known properties.
|
|
72
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
73
|
+
|
|
74
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
75
|
+
new_hash, proc { |value| value }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Create object from extracted values.
|
|
79
|
+
ResponseMeResponse.new(email: email,
|
|
80
|
+
full_name: full_name,
|
|
81
|
+
profile_image_url: profile_image_url,
|
|
82
|
+
vault_uuid: vault_uuid,
|
|
83
|
+
additional_properties: additional_properties)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Provides a human-readable string representation of the object.
|
|
87
|
+
def to_s
|
|
88
|
+
class_name = self.class.name.split('::').last
|
|
89
|
+
"<#{class_name} email: #{@email}, full_name: #{@full_name}, profile_image_url:"\
|
|
90
|
+
" #{@profile_image_url}, vault_uuid: #{@vault_uuid}, additional_properties:"\
|
|
91
|
+
" #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
95
|
+
def inspect
|
|
96
|
+
class_name = self.class.name.split('::').last
|
|
97
|
+
"<#{class_name} email: #{@email.inspect}, full_name: #{@full_name.inspect},"\
|
|
98
|
+
" profile_image_url: #{@profile_image_url.inspect}, vault_uuid: #{@vault_uuid.inspect},"\
|
|
99
|
+
" additional_properties: #{@additional_properties}>"
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# tesla_fleet_management_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TeslaFleetManagementApi
|
|
7
|
+
# ResponseOrdersResponse Model.
|
|
8
|
+
class ResponseOrdersResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :vehicle_map_id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :reference_number
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :vin
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :order_status
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :order_substatus
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :model_code
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :country_code
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for this method
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :locale
|
|
43
|
+
|
|
44
|
+
# TODO: Write general description for this method
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :mkt_options
|
|
47
|
+
|
|
48
|
+
# TODO: Write general description for this method
|
|
49
|
+
# @return [TrueClass | FalseClass]
|
|
50
|
+
attr_accessor :is_b2b
|
|
51
|
+
|
|
52
|
+
# A mapping from model property names to API property names.
|
|
53
|
+
def self.names
|
|
54
|
+
@_hash = {} if @_hash.nil?
|
|
55
|
+
@_hash['vehicle_map_id'] = 'vehicleMapId'
|
|
56
|
+
@_hash['reference_number'] = 'referenceNumber'
|
|
57
|
+
@_hash['vin'] = 'vin'
|
|
58
|
+
@_hash['order_status'] = 'orderStatus'
|
|
59
|
+
@_hash['order_substatus'] = 'orderSubstatus'
|
|
60
|
+
@_hash['model_code'] = 'modelCode'
|
|
61
|
+
@_hash['country_code'] = 'countryCode'
|
|
62
|
+
@_hash['locale'] = 'locale'
|
|
63
|
+
@_hash['mkt_options'] = 'mktOptions'
|
|
64
|
+
@_hash['is_b2b'] = 'isB2b'
|
|
65
|
+
@_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# An array for optional fields
|
|
69
|
+
def self.optionals
|
|
70
|
+
[]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for nullable fields
|
|
74
|
+
def self.nullables
|
|
75
|
+
[]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def initialize(vehicle_map_id:, reference_number:, vin:, order_status:,
|
|
79
|
+
order_substatus:, model_code:, country_code:, locale:,
|
|
80
|
+
mkt_options:, is_b2b:, additional_properties: nil)
|
|
81
|
+
# Add additional model properties to the instance
|
|
82
|
+
additional_properties = {} if additional_properties.nil?
|
|
83
|
+
|
|
84
|
+
@vehicle_map_id = vehicle_map_id
|
|
85
|
+
@reference_number = reference_number
|
|
86
|
+
@vin = vin
|
|
87
|
+
@order_status = order_status
|
|
88
|
+
@order_substatus = order_substatus
|
|
89
|
+
@model_code = model_code
|
|
90
|
+
@country_code = country_code
|
|
91
|
+
@locale = locale
|
|
92
|
+
@mkt_options = mkt_options
|
|
93
|
+
@is_b2b = is_b2b
|
|
94
|
+
@additional_properties = additional_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Creates an instance of the object from a hash.
|
|
98
|
+
def self.from_hash(hash)
|
|
99
|
+
return nil unless hash
|
|
100
|
+
|
|
101
|
+
# Extract variables from the hash.
|
|
102
|
+
vehicle_map_id = hash.key?('vehicleMapId') ? hash['vehicleMapId'] : nil
|
|
103
|
+
reference_number =
|
|
104
|
+
hash.key?('referenceNumber') ? hash['referenceNumber'] : nil
|
|
105
|
+
vin = hash.key?('vin') ? hash['vin'] : nil
|
|
106
|
+
order_status = hash.key?('orderStatus') ? hash['orderStatus'] : nil
|
|
107
|
+
order_substatus =
|
|
108
|
+
hash.key?('orderSubstatus') ? hash['orderSubstatus'] : nil
|
|
109
|
+
model_code = hash.key?('modelCode') ? hash['modelCode'] : nil
|
|
110
|
+
country_code = hash.key?('countryCode') ? hash['countryCode'] : nil
|
|
111
|
+
locale = hash.key?('locale') ? hash['locale'] : nil
|
|
112
|
+
mkt_options = hash.key?('mktOptions') ? hash['mktOptions'] : nil
|
|
113
|
+
is_b2b = hash.key?('isB2b') ? hash['isB2b'] : nil
|
|
114
|
+
|
|
115
|
+
# Create a new hash for additional properties, removing known properties.
|
|
116
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
117
|
+
|
|
118
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
119
|
+
new_hash, proc { |value| value }
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Create object from extracted values.
|
|
123
|
+
ResponseOrdersResponse.new(vehicle_map_id: vehicle_map_id,
|
|
124
|
+
reference_number: reference_number,
|
|
125
|
+
vin: vin,
|
|
126
|
+
order_status: order_status,
|
|
127
|
+
order_substatus: order_substatus,
|
|
128
|
+
model_code: model_code,
|
|
129
|
+
country_code: country_code,
|
|
130
|
+
locale: locale,
|
|
131
|
+
mkt_options: mkt_options,
|
|
132
|
+
is_b2b: is_b2b,
|
|
133
|
+
additional_properties: additional_properties)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Provides a human-readable string representation of the object.
|
|
137
|
+
def to_s
|
|
138
|
+
class_name = self.class.name.split('::').last
|
|
139
|
+
"<#{class_name} vehicle_map_id: #{@vehicle_map_id}, reference_number: #{@reference_number},"\
|
|
140
|
+
" vin: #{@vin}, order_status: #{@order_status}, order_substatus: #{@order_substatus},"\
|
|
141
|
+
" model_code: #{@model_code}, country_code: #{@country_code}, locale: #{@locale},"\
|
|
142
|
+
" mkt_options: #{@mkt_options}, is_b2b: #{@is_b2b}, additional_properties:"\
|
|
143
|
+
" #{@additional_properties}>"
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
147
|
+
def inspect
|
|
148
|
+
class_name = self.class.name.split('::').last
|
|
149
|
+
"<#{class_name} vehicle_map_id: #{@vehicle_map_id.inspect}, reference_number:"\
|
|
150
|
+
" #{@reference_number.inspect}, vin: #{@vin.inspect}, order_status:"\
|
|
151
|
+
" #{@order_status.inspect}, order_substatus: #{@order_substatus.inspect}, model_code:"\
|
|
152
|
+
" #{@model_code.inspect}, country_code: #{@country_code.inspect}, locale:"\
|
|
153
|
+
" #{@locale.inspect}, mkt_options: #{@mkt_options.inspect}, is_b2b: #{@is_b2b.inspect},"\
|
|
154
|
+
" additional_properties: #{@additional_properties}>"
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# tesla_fleet_management_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TeslaFleetManagementApi
|
|
7
|
+
# ResponsePublicKeyResponse Model.
|
|
8
|
+
class ResponsePublicKeyResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :public_key
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['public_key'] = 'public_key'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(public_key:, additional_properties: nil)
|
|
34
|
+
# Add additional model properties to the instance
|
|
35
|
+
additional_properties = {} if additional_properties.nil?
|
|
36
|
+
|
|
37
|
+
@public_key = public_key
|
|
38
|
+
@additional_properties = additional_properties
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
public_key = hash.key?('public_key') ? hash['public_key'] : nil
|
|
47
|
+
|
|
48
|
+
# Create a new hash for additional properties, removing known properties.
|
|
49
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
50
|
+
|
|
51
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
52
|
+
new_hash, proc { |value| value }
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Create object from extracted values.
|
|
56
|
+
ResponsePublicKeyResponse.new(public_key: public_key,
|
|
57
|
+
additional_properties: additional_properties)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Provides a human-readable string representation of the object.
|
|
61
|
+
def to_s
|
|
62
|
+
class_name = self.class.name.split('::').last
|
|
63
|
+
"<#{class_name} public_key: #{@public_key}, additional_properties:"\
|
|
64
|
+
" #{@additional_properties}>"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
68
|
+
def inspect
|
|
69
|
+
class_name = self.class.name.split('::').last
|
|
70
|
+
"<#{class_name} public_key: #{@public_key.inspect}, additional_properties:"\
|
|
71
|
+
" #{@additional_properties}>"
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# tesla_fleet_management_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TeslaFleetManagementApi
|
|
7
|
+
# ResponseRegionResponse Model.
|
|
8
|
+
class ResponseRegionResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :region
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :fleet_api_base_url
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['region'] = 'region'
|
|
24
|
+
@_hash['fleet_api_base_url'] = 'fleet_api_base_url'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(region:, fleet_api_base_url:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
42
|
+
@region = region
|
|
43
|
+
@fleet_api_base_url = fleet_api_base_url
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Creates an instance of the object from a hash.
|
|
48
|
+
def self.from_hash(hash)
|
|
49
|
+
return nil unless hash
|
|
50
|
+
|
|
51
|
+
# Extract variables from the hash.
|
|
52
|
+
region = hash.key?('region') ? hash['region'] : nil
|
|
53
|
+
fleet_api_base_url =
|
|
54
|
+
hash.key?('fleet_api_base_url') ? hash['fleet_api_base_url'] : nil
|
|
55
|
+
|
|
56
|
+
# Create a new hash for additional properties, removing known properties.
|
|
57
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
58
|
+
|
|
59
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
60
|
+
new_hash, proc { |value| value }
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Create object from extracted values.
|
|
64
|
+
ResponseRegionResponse.new(region: region,
|
|
65
|
+
fleet_api_base_url: fleet_api_base_url,
|
|
66
|
+
additional_properties: additional_properties)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Provides a human-readable string representation of the object.
|
|
70
|
+
def to_s
|
|
71
|
+
class_name = self.class.name.split('::').last
|
|
72
|
+
"<#{class_name} region: #{@region}, fleet_api_base_url: #{@fleet_api_base_url},"\
|
|
73
|
+
" additional_properties: #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} region: #{@region.inspect}, fleet_api_base_url:"\
|
|
80
|
+
" #{@fleet_api_base_url.inspect}, additional_properties: #{@additional_properties}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|