Package com.smartcar.sdk.data
Class BatchResponse
- java.lang.Object
-
- com.smartcar.sdk.data.ApiData
-
- com.smartcar.sdk.data.BatchResponse
-
- All Implemented Interfaces:
java.io.Serializable
public class BatchResponse extends ApiData
Smartcar BatchResponse Object- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BatchResponse(com.google.gson.JsonArray responses)
Initializes a new BatchResponse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VehicleAttributes
attributes()
Get response from the / endpointVehicleBattery
battery()
Get response from the /battery endpointVehicleBatteryCapacity
batteryCapacity()
Get response from the /battery/capacity endpointVehicleCharge
charge()
Get response from the /charge endpointVehicleChargeLimit
chargeLimit()
Get response from the /charge/limit endpointVehicleEngineOil
engineOil()
Get response from the /engine/oil endpointVehicleFuel
fuel()
Get response from the /fuel endpointjava.lang.String
getRequestId()
Return the Smartcar request id from the response headersVehicleLocation
location()
Get response from the /location endpointVehicleLockStatus
lockStatus()
Get response from the /security endpointVehicleOdometer
odometer()
Get response from the /odometer endpointvoid
setRequestId(java.lang.String requestId)
Sets the Smartcar request id from the response headersVehicleTirePressure
tirePressure()
Get response from the /tires/pressure endpointjava.lang.String
toString()
Returns the stored data string.VehicleVin
vin()
Get response from the /vin endpoint
-
-
-
Method Detail
-
getRequestId
public java.lang.String getRequestId()
Return the Smartcar request id from the response headers- Returns:
- the request id
-
setRequestId
public void setRequestId(java.lang.String requestId)
Sets the Smartcar request id from the response headers- Parameters:
requestId
- the request id
-
battery
public VehicleBattery battery() throws SmartcarException
Get response from the /battery endpoint- Returns:
- the battery status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
batteryCapacity
public VehicleBatteryCapacity batteryCapacity() throws SmartcarException
Get response from the /battery/capacity endpoint- Returns:
- the battery capacity of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
charge
public VehicleCharge charge() throws SmartcarException
Get response from the /charge endpoint- Returns:
- the charge status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
fuel
public VehicleFuel fuel() throws SmartcarException
Get response from the /fuel endpoint- Returns:
- the fuel status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
attributes
public VehicleAttributes attributes() throws SmartcarException
Get response from the / endpoint- Returns:
- VehicleAttributes object
- Throws:
SmartcarException
- if the request for this endpoint +returned an HTTP error code
-
location
public VehicleLocation location() throws SmartcarException
Get response from the /location endpoint- Returns:
- the location of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
odometer
public VehicleOdometer odometer() throws SmartcarException
Get response from the /odometer endpoint- Returns:
- the odometer of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
engineOil
public VehicleEngineOil engineOil() throws SmartcarException
Get response from the /engine/oil endpoint- Returns:
- the engine oil status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
vin
public VehicleVin vin() throws SmartcarException
Get response from the /vin endpoint- Returns:
- the vin of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
tirePressure
public VehicleTirePressure tirePressure() throws SmartcarException
Get response from the /tires/pressure endpoint- Returns:
- the tire pressure status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
chargeLimit
public VehicleChargeLimit chargeLimit() throws SmartcarException
Get response from the /charge/limit endpoint- Returns:
- the charge limit of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
lockStatus
public VehicleLockStatus lockStatus() throws SmartcarException
Get response from the /security endpoint- Returns:
- the lock status of the vehicle
- Throws:
SmartcarException
- if the request for this endpoint returned an HTTP error code
-
-