public class TripPurpose
extends java.lang.Object
A namespaced client for the
/v1/travel/predictions/trip-purpose endpoints.
Access via the Amadeus client object.
Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
amadeus.travel.predictions.tripPurpose;| Constructor and Description |
|---|
TripPurpose(Amadeus client)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Prediction |
get()
Convenience method for calling
get without any parameters. |
Prediction |
get(Params params)
Returns a trip purpose prediction.
|
public TripPurpose(Amadeus client)
public Prediction get(Params params) throws ResponseException
Returns a trip purpose prediction.
amadeus.travel.predictions.tripPurpose.get(Params
.with("originLocationCode", "NYC")
.and("destinationLocationCode", "MAD")
.and("departureDate", "2020-08-01")
.and("returnDate", "2020-08-12"));
params - the parameters to send to the APIResponseException - when an exception occurspublic Prediction get() throws ResponseException
get without any parameters.ResponseExceptionget()