All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.flight.offers.FlightOffersPrice Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package examples.flight.offers;

import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.FlightOfferSearch;
import com.amadeus.resources.FlightPrice;

public class FlightOffersPrice {
  /**
   * 

* An example to call hotel Booking API * /v1/shopping/flight-offers/pricing endpoints. *

* *

* Access via the Amadeus client object. *

* *
   * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
   * amadeus.shopping.flightOffersSearch.pricing;
*/ public static void main(String[] args) throws ResponseException { Amadeus amadeus = Amadeus .builder("REPLACE_BY_YOUR_API_KEY","REPLACE_BY_YOUR_API_SECRET") .build(); FlightOfferSearch[] flightOffersSearches = amadeus.shopping.flightOffersSearch.get( Params.with("originLocationCode", "SYD") .and("destinationLocationCode", "BKK") .and("departureDate", "2020-11-01") .and("returnDate", "2020-11-08") .and("adults", 1) .and("max", 1)); FlightPrice flightPricing = amadeus.shopping.flightOffersSearch.pricing.post( flightOffersSearches, Params.with("include", "detailed-fare-rules") .and("forceClass", "false") ); System.out.println(flightPricing.getResponse()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy