fix: few fields missing for me

This commit is contained in:
gak 2023-08-29 12:32:19 +10:00
parent 6c1d312f7b
commit 44fe9bc48e
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -214,8 +214,8 @@ mod tests {
assert_eq!(v.user_id, 2222291283912);
assert_eq!(v.vehicle_id.0, 333331238921);
assert_eq!(v.vin, "T234567890123456789");
assert_eq!(v.display_name, "My Vehicle");
assert_eq!(v.option_codes, "ASDF,SDFG,DFGH");
assert_eq!(v.display_name.unwrap(), "My Vehicle");
assert_eq!(v.option_codes.unwrap(), "ASDF,SDFG,DFGH");
assert_eq!(v.color, None);
assert_eq!(v.access_type, "OWNER");
assert_eq!(v.tokens, vec!["asdf1234"]);

View file

@ -22,8 +22,8 @@ pub struct VehicleData {
pub vehicle_id: ExternalVehicleId,
pub user_id: i64,
pub vin: String,
pub display_name: String,
pub option_codes: String,
pub display_name: Option<String>,
pub option_codes: Option<String>,
/// gak: This was null for me, assuming String.
pub color: Option<String>,
pub access_type: String,
@ -81,9 +81,9 @@ pub struct ChargeState {
pub fast_charger_present: bool,
pub fast_charger_type: String,
pub ideal_battery_range: f64,
pub managed_charging_active: bool,
pub managed_charging_active: Option<bool>,
pub managed_charging_start_time: Option<u64>,
pub managed_charging_user_canceled: bool,
pub managed_charging_user_canceled: Option<bool>,
pub max_range_charge_counter: i64,
pub minutes_to_full_charge: i64,
pub not_enough_power_to_heat: Option<bool>,