Vehicle

data class Vehicle(val vehicleId: String, val lat: Double? = null, val lon: Double? = null, val isReserved: Boolean, val isDisabled: Boolean, val rentalUris: RentalUris? = null, val vehicleTypeId: String? = null, val lastReported: Timestamp? = null, val currentRangeMeters: Double? = null, val currentFuelPercent: Double? = null, val stationId: String? = null, val homeStationId: String? = null, val pricingPlanId: String? = null, val vehicleEquipment: List<VehicleEquipment>? = null, val availableUntil: Timestamp? = null)(source)

Represents a vehicle that is currently not part of an active rental.

Constructors

Link copied to clipboard
constructor(vehicleId: String, lat: Double? = null, lon: Double? = null, isReserved: Boolean, isDisabled: Boolean, rentalUris: RentalUris? = null, vehicleTypeId: String? = null, lastReported: Timestamp? = null, currentRangeMeters: Double? = null, currentFuelPercent: Double? = null, stationId: String? = null, homeStationId: String? = null, pricingPlanId: String? = null, vehicleEquipment: List<VehicleEquipment>? = null, availableUntil: Timestamp? = null)

Properties

Link copied to clipboard
@SerialName(value = "available_until")
val availableUntil: Timestamp?

The date and time when any rental of the vehicle must be completed.

Link copied to clipboard
@SerialName(value = "current_fuel_percent")
val currentFuelPercent: Double?

The current percentage, expressed from 0 to 1, of fuel or battery power remaining in the vehicle.

Link copied to clipboard
@SerialName(value = "current_range_meters")
val currentRangeMeters: Double?

The furthest distance in meters that the vehicle can travel with the vehicle's current charge or fuel (without recharging or refueling).

Link copied to clipboard
@SerialName(value = "home_station_id")
val homeStationId: String?

The station_id of the station this vehicle must be returned to as defined in station_information.json.

Link copied to clipboard
@SerialName(value = "is_disabled")
val isDisabled: Boolean

Is the vehicle currently disabled?

Link copied to clipboard
@SerialName(value = "is_reserved")
val isReserved: Boolean

Is the vehicle currently reserved?

Link copied to clipboard
@SerialName(value = "last_reported")
val lastReported: Timestamp?

The last time this vehicle reported its status to the operator's backend.

Link copied to clipboard
val lat: Double?

Latitude of the vehicle in decimal degrees.

Link copied to clipboard
val lon: Double?

Longitude of the vehicle in decimal degrees.

Link copied to clipboard
@SerialName(value = "pricing_plan_id")
val pricingPlanId: String?

The plan_id of the pricing plan this vehicle is eligible for as described in system_pricing_plans.json.

Link copied to clipboard
@SerialName(value = "rental_uris")
val rentalUris: RentalUris?

JSON object that contains rental URIs for Android, iOS, and web in the android, ios, and web fields.

Link copied to clipboard
@SerialName(value = "station_id")
val stationId: String?

Identifier referencing the station_id field in station_information.json.

Link copied to clipboard
@SerialName(value = "vehicle_equipment")
val vehicleEquipment: List<VehicleEquipment>?

List of vehicle equipment provided by the operator in addition to the accessories already provided in the vehicle (field vehicle_accessories of vehicle_types.json) but subject to more frequent updates.

Link copied to clipboard
@SerialName(value = "vehicle_id")
val vehicleId: String

Identifier of a vehicle.

Link copied to clipboard
@SerialName(value = "vehicle_type_id")
val vehicleTypeId: String?

The vehicle_type_id of this vehicle, as described in vehicle_types.json.