public final class PricesResult extends Object
PricesRequest. In case of success, isOk() will return true.
Else, the error information are supplied as described in BaseResult
Result.ResponseStatus| Constructor and Description |
|---|
PricesResult() |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getData()
Returns the original data supplier for gas prices
Won't be filled for requests by
CorrectionRequest |
Optional<GasPrices> |
getGasPrice(String id)
Will return the gas prices for a station, defined by the Station ID.
|
Map<String,GasPrices> |
getGasPrices()
Will return an unmodifyable map of gas prices, which uses the
Station ID as key
|
Optional<String> |
getLicense()
Will return the APIs license information.
|
Optional<String> |
getMessage()
In case of an error, will return the error message
|
Optional<Result.ResponseStatus> |
getStatus()
Returns whether the request was successful
Won't be filled for requests by
CorrectionRequest |
Boolean |
isOk()
Returns whether the request was successful
|
public Map<String,GasPrices> getGasPrices()
public Optional<GasPrices> getGasPrice(String id)
public Optional<Result.ResponseStatus> getStatus()
Won't be filled for requests by CorrectionRequest
public Optional<String> getMessage()
getMessage in interface Resultpublic Optional<String> getLicense()
Won't be filled for requests by CorrectionRequest
getLicense in interface Resultpublic Optional<String> getData()
Won't be filled for requests by CorrectionRequest
Copyright © 2017. All rights reserved.