├── .editorconfig ├── .github ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── SUPPORT.md ├── VersionLibraryVerifier.java ├── images │ ├── dependencies.svg │ └── support.svg └── workflows │ ├── build_gradle.yml │ └── publish-release.yml ├── .gitignore ├── .sdkmanrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── build.gradle ├── config └── checkstyle │ └── checkstyle.xml ├── docs ├── allclasses-frame.html ├── allclasses-noframe.html ├── com │ └── amadeus │ │ ├── Airport.html │ │ ├── Amadeus.html │ │ ├── Analytics.html │ │ ├── Booking.html │ │ ├── Configuration.html │ │ ├── Constants.html │ │ ├── DutyOfCare.html │ │ ├── EReputation.html │ │ ├── HTTPClient.html │ │ ├── Location.html │ │ ├── Media.html │ │ ├── Params.html │ │ ├── ReferenceData.html │ │ ├── Request.html │ │ ├── Response.html │ │ ├── Safety.html │ │ ├── Schedule.html │ │ ├── Shopping.html │ │ ├── Travel.html │ │ ├── airport │ │ ├── DirectDestinations.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── predictions │ │ │ ├── AirportOnTime.html │ │ │ ├── Predictions.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── analytics │ │ ├── ItineraryPriceMetrics.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── booking │ │ ├── FlightOrder.html │ │ ├── FlightOrders.html │ │ ├── HotelBookings.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── client │ │ ├── AccessToken.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── dutyOfCare │ │ ├── Diseases.html │ │ ├── diseases │ │ │ ├── Covid19AreaReport.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── ereputation │ │ ├── HotelSentiments.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── exceptions │ │ ├── AuthenticationException.html │ │ ├── ClientException.html │ │ ├── NetworkException.html │ │ ├── NotFoundException.html │ │ ├── ParserException.html │ │ ├── ResponseException.html │ │ ├── ServerException.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── location │ │ ├── Analytics.html │ │ ├── analytics │ │ │ ├── CategoryRatedAreas.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── media │ │ ├── Files.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ ├── referenceData │ │ ├── Airlines.html │ │ ├── Location.html │ │ ├── Locations.html │ │ ├── RecommendedLocations.html │ │ ├── Urls.html │ │ ├── locations │ │ │ ├── Airports.html │ │ │ ├── Hotels.html │ │ │ ├── PointOfInterest.html │ │ │ ├── PointsOfInterest.html │ │ │ ├── hotels │ │ │ │ ├── ByCity.html │ │ │ │ ├── ByGeocode.html │ │ │ │ ├── ByHotels.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ └── package-tree.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── pointsOfInterest │ │ │ │ ├── BySquare.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── urls │ │ │ ├── CheckinLinks.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── resources │ │ ├── Activity.ElementaryPrice.html │ │ ├── Activity.GeoCode.html │ │ ├── Activity.html │ │ ├── AirTraffic.Analytics.Flights.html │ │ ├── AirTraffic.Analytics.Travelers.html │ │ ├── AirTraffic.Analytics.html │ │ ├── AirTraffic.html │ │ ├── Airline.html │ │ ├── CheckinLink.html │ │ ├── DatedFlight.AircraftEquipment.html │ │ ├── DatedFlight.Arrival.html │ │ ├── DatedFlight.Delay.html │ │ ├── DatedFlight.Departure.html │ │ ├── DatedFlight.FlightDesignator.html │ │ ├── DatedFlight.FlightPoint.html │ │ ├── DatedFlight.Gate.html │ │ ├── DatedFlight.Leg.html │ │ ├── DatedFlight.Partnership.html │ │ ├── DatedFlight.Segment.html │ │ ├── DatedFlight.Terminal.html │ │ ├── DatedFlight.Timing.html │ │ ├── DatedFlight.html │ │ ├── Destination.html │ │ ├── DiseaseAreaReport.Area.html │ │ ├── DiseaseAreaReport.AreaAccessRestriction.html │ │ ├── DiseaseAreaReport.AreaPolicy.html │ │ ├── DiseaseAreaReport.AreaRestriction.html │ │ ├── DiseaseAreaReport.AreaVaccinated.html │ │ ├── DiseaseAreaReport.Border.html │ │ ├── DiseaseAreaReport.DatedInformation.html │ │ ├── DiseaseAreaReport.DatedQuarantineRestriction.html │ │ ├── DiseaseAreaReport.DatedTracingApplicationRestriction.html │ │ ├── DiseaseAreaReport.DeclarationDocuments.html │ │ ├── DiseaseAreaReport.DiseaseCase.html │ │ ├── DiseaseAreaReport.DiseaseInfection.html │ │ ├── DiseaseAreaReport.DiseaseTestingRestriction.html │ │ ├── DiseaseAreaReport.DiseaseVaccination.html │ │ ├── DiseaseAreaReport.EntryRestriction.html │ │ ├── DiseaseAreaReport.ExitRestriction.html │ │ ├── DiseaseAreaReport.GeoCode.html │ │ ├── DiseaseAreaReport.Link.html │ │ ├── DiseaseAreaReport.MaskRestriction.html │ │ ├── DiseaseAreaReport.Sources.html │ │ ├── DiseaseAreaReport.Transportation.html │ │ ├── DiseaseAreaReport.ValidityPeriod.html │ │ ├── DiseaseAreaReport.html │ │ ├── FlightAvailability.AircraftEquipment.html │ │ ├── FlightAvailability.AvailabilityClass.html │ │ ├── FlightAvailability.Co2Emission.html │ │ ├── FlightAvailability.ExtendedSegment.html │ │ ├── FlightAvailability.FlightEndpoint.html │ │ ├── FlightAvailability.FlightStop.html │ │ ├── FlightAvailability.OperatingFlight.html │ │ ├── FlightAvailability.TourAllotment.html │ │ ├── FlightAvailability.html │ │ ├── FlightDate.Price.html │ │ ├── FlightDate.html │ │ ├── FlightDestination.Price.html │ │ ├── FlightDestination.html │ │ ├── FlightOfferSearch.AdditionalService.html │ │ ├── FlightOfferSearch.AdditionalServiceRequest.html │ │ ├── FlightOfferSearch.Aircraft.html │ │ ├── FlightOfferSearch.AirportInfo.html │ │ ├── FlightOfferSearch.AllotmentDetails.html │ │ ├── FlightOfferSearch.Amenity.html │ │ ├── FlightOfferSearch.BaggageAllowance.html │ │ ├── FlightOfferSearch.Co2Emissions.html │ │ ├── FlightOfferSearch.Description.html │ │ ├── FlightOfferSearch.FareDetailsBySegment.html │ │ ├── FlightOfferSearch.FareRules.html │ │ ├── FlightOfferSearch.Fee.html │ │ ├── FlightOfferSearch.FlightStop.html │ │ ├── FlightOfferSearch.Itinerary.html │ │ ├── FlightOfferSearch.OperatingFlight.html │ │ ├── FlightOfferSearch.PricingOptions.html │ │ ├── FlightOfferSearch.SearchPrice.html │ │ ├── FlightOfferSearch.SearchSegment.html │ │ ├── FlightOfferSearch.Tax.html │ │ ├── FlightOfferSearch.TermAndCondition.html │ │ ├── FlightOfferSearch.TravelerPricing.html │ │ ├── FlightOfferSearch.html │ │ ├── FlightOrder.AssociatedRecord.html │ │ ├── FlightOrder.Contact.html │ │ ├── FlightOrder.Document.html │ │ ├── FlightOrder.Name.html │ │ ├── FlightOrder.Phone.html │ │ ├── FlightOrder.Traveler.html │ │ ├── FlightOrder.html │ │ ├── FlightPayment.html │ │ ├── FlightPrice.BookingRequirements.html │ │ ├── FlightPrice.PassengerConditions.html │ │ ├── FlightPrice.html │ │ ├── Hotel.Address.html │ │ ├── Hotel.Distance.html │ │ ├── Hotel.GeoCode.html │ │ ├── Hotel.html │ │ ├── HotelBooking.AssociatedRecord.html │ │ ├── HotelBooking.html │ │ ├── HotelOffer.AddressType.html │ │ ├── HotelOffer.BaseTotalAmount.html │ │ ├── HotelOffer.CancellationPolicy.html │ │ ├── HotelOffer.CheckInOutPolicy.html │ │ ├── HotelOffer.Commission.html │ │ ├── HotelOffer.EstimatedRoomType.html │ │ ├── HotelOffer.GuaranteePolicy.html │ │ ├── HotelOffer.Guests.html │ │ ├── HotelOffer.Hotel.html │ │ ├── HotelOffer.HotelContact.html │ │ ├── HotelOffer.HotelDistance.html │ │ ├── HotelOffer.HotelPrice.html │ │ ├── HotelOffer.HotelTax.html │ │ ├── HotelOffer.MediaURI.html │ │ ├── HotelOffer.Offer.html │ │ ├── HotelOffer.PaymentPolicy.html │ │ ├── HotelOffer.PolicyDetails.html │ │ ├── HotelOffer.PriceVariation.html │ │ ├── HotelOffer.PriceVariations.html │ │ ├── HotelOffer.RateFamily.html │ │ ├── HotelOffer.RoomDetails.html │ │ ├── HotelOffer.TextWithLanguageType.html │ │ ├── HotelOffer.html │ │ ├── HotelOfferSearch.CancellationPolicy.html │ │ ├── HotelOfferSearch.CheckInOutPolicy.html │ │ ├── HotelOfferSearch.Commission.html │ │ ├── HotelOfferSearch.DepositPolicy.html │ │ ├── HotelOfferSearch.EstimatedRoomType.html │ │ ├── HotelOfferSearch.GuaranteePolicy.html │ │ ├── HotelOfferSearch.Guests.html │ │ ├── HotelOfferSearch.HoldPolicy.html │ │ ├── HotelOfferSearch.Hotel.html │ │ ├── HotelOfferSearch.HotelPrice.html │ │ ├── HotelOfferSearch.HotelTax.html │ │ ├── HotelOfferSearch.Markup.html │ │ ├── HotelOfferSearch.Offer.html │ │ ├── HotelOfferSearch.PaymentPolicy.html │ │ ├── HotelOfferSearch.PolicyDetails.html │ │ ├── HotelOfferSearch.Price.html │ │ ├── HotelOfferSearch.PriceVariation.html │ │ ├── HotelOfferSearch.PriceVariations.html │ │ ├── HotelOfferSearch.QualifiedFreeText.html │ │ ├── HotelOfferSearch.RateFamily.html │ │ ├── HotelOfferSearch.RoomDetails.html │ │ ├── HotelOfferSearch.html │ │ ├── HotelSentiment.Sentiment.html │ │ ├── HotelSentiment.html │ │ ├── ItineraryPriceMetric.Location.html │ │ ├── ItineraryPriceMetric.PriceMetrics.html │ │ ├── ItineraryPriceMetric.html │ │ ├── Location.Address.html │ │ ├── Location.Analytics.Flights.html │ │ ├── Location.Analytics.Travelers.html │ │ ├── Location.Analytics.html │ │ ├── Location.Distance.html │ │ ├── Location.GeoCode.html │ │ ├── Location.html │ │ ├── Period.Analytics.Travelers.html │ │ ├── Period.Analytics.html │ │ ├── Period.html │ │ ├── PointOfInterest.GeoCode.html │ │ ├── PointOfInterest.html │ │ ├── Prediction.html │ │ ├── Resource.html │ │ ├── SafePlace.GeoCode.html │ │ ├── SafePlace.SafetyScores.html │ │ ├── SafePlace.html │ │ ├── ScoredLocation.CategoryScores.NightLife.html │ │ ├── ScoredLocation.CategoryScores.Restaurant.html │ │ ├── ScoredLocation.CategoryScores.Shopping.html │ │ ├── ScoredLocation.CategoryScores.Sight.html │ │ ├── ScoredLocation.CategoryScores.html │ │ ├── ScoredLocation.GeoCode.html │ │ ├── ScoredLocation.html │ │ ├── SeatMap.Aircraft.html │ │ ├── SeatMap.AircraftCabinAmenities.html │ │ ├── SeatMap.AmenityBeverage.html │ │ ├── SeatMap.AmenityEntertainment.html │ │ ├── SeatMap.AmenityFood.html │ │ ├── SeatMap.AmenityPower.html │ │ ├── SeatMap.AmenitySeat.html │ │ ├── SeatMap.AmenityWifi.html │ │ ├── SeatMap.Arrival.html │ │ ├── SeatMap.AvailableSeatsCounter.html │ │ ├── SeatMap.Deck.html │ │ ├── SeatMap.DeckConfiguration.html │ │ ├── SeatMap.Departure.html │ │ ├── SeatMap.Media.html │ │ ├── SeatMap.QualifiedFreeText.html │ │ ├── SeatMap.html │ │ ├── Traveler.Contact.html │ │ ├── Traveler.Document.html │ │ ├── Traveler.Name.html │ │ ├── Traveler.Phone.html │ │ ├── Traveler.html │ │ ├── TripDetail.Address.html │ │ ├── TripDetail.Air.html │ │ ├── TripDetail.Aircraft.html │ │ ├── TripDetail.Arrival.html │ │ ├── TripDetail.ArrivalAir.html │ │ ├── TripDetail.ArrivalAirportLocation.html │ │ ├── TripDetail.AssociatedEquipment.html │ │ ├── TripDetail.AssociationRef.html │ │ ├── TripDetail.Baggage.html │ │ ├── TripDetail.Cancellation.html │ │ ├── TripDetail.Car.html │ │ ├── TripDetail.CarVehicle.html │ │ ├── TripDetail.Carrier.html │ │ ├── TripDetail.Contact.html │ │ ├── TripDetail.ContactHotel.html │ │ ├── TripDetail.Departure.html │ │ ├── TripDetail.DepartureAir.html │ │ ├── TripDetail.DepartureAirportLocation.html │ │ ├── TripDetail.Description.html │ │ ├── TripDetail.Driver.html │ │ ├── TripDetail.Dropoff.html │ │ ├── TripDetail.Email.html │ │ ├── TripDetail.End.html │ │ ├── TripDetail.FlightDesignator.html │ │ ├── TripDetail.Guests.html │ │ ├── TripDetail.Hotel.html │ │ ├── TripDetail.Location.html │ │ ├── TripDetail.Marketing.html │ │ ├── TripDetail.Meal.html │ │ ├── TripDetail.Name.html │ │ ├── TripDetail.Operating.html │ │ ├── TripDetail.Phone.html │ │ ├── TripDetail.Pickup.html │ │ ├── TripDetail.Policies.html │ │ ├── TripDetail.Price.html │ │ ├── TripDetail.Product.html │ │ ├── TripDetail.Room.html │ │ ├── TripDetail.Seat.html │ │ ├── TripDetail.Stakeholder.html │ │ ├── TripDetail.Start.html │ │ ├── TripDetail.Train.html │ │ ├── TripDetail.TravelAgency.html │ │ ├── TripDetail.Trip.html │ │ ├── TripDetail.TypeEstimated.html │ │ ├── TripDetail.Vehicle.html │ │ ├── TripDetail.Weight.html │ │ ├── TripDetail.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── safety │ │ ├── SafetyRatedLocation.html │ │ ├── SafetyRatedLocations.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── safetyRatedLocations │ │ │ ├── BySquare.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── schedule │ │ ├── Flights.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── shopping │ │ ├── Activities.html │ │ ├── Activity.html │ │ ├── Availability.html │ │ ├── FlightDates.html │ │ ├── FlightDestinations.html │ │ ├── FlightOffers.html │ │ ├── FlightOffersSearch.html │ │ ├── HotelOffer.html │ │ ├── HotelOfferSearch.html │ │ ├── HotelOffers.html │ │ ├── HotelOffersByHotel.html │ │ ├── HotelOffersSearch.html │ │ ├── SeatMaps.html │ │ ├── activities │ │ │ ├── BySquare.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── availability │ │ │ ├── FlightAvailabilities.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── flightOffers │ │ │ ├── Prediction.html │ │ │ ├── Pricing.html │ │ │ ├── Upselling.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ └── travel │ │ ├── Predictions.html │ │ ├── TripParser.html │ │ ├── analytics │ │ ├── AirTraffic.html │ │ ├── Analytics.html │ │ ├── airTraffic │ │ │ ├── Booked.html │ │ │ ├── BusiestPeriod.html │ │ │ ├── Traveled.html │ │ │ ├── package-frame.html │ │ │ ├── package-summary.html │ │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── predictions │ │ ├── FlightDelay.html │ │ ├── TripPurpose.html │ │ ├── package-frame.html │ │ ├── package-summary.html │ │ └── package-tree.html ├── constant-values.html ├── deprecated-list.html ├── help-doc.html ├── index-all.html ├── index.html ├── overview-frame.html ├── overview-summary.html ├── overview-tree.html ├── package-list ├── script.js ├── serialized-form.html └── stylesheet.css ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lombok.config ├── settings.gradle └── src ├── main └── java │ └── com │ └── amadeus │ ├── Airline.java │ ├── Airport.java │ ├── Amadeus.java │ ├── Analytics.java │ ├── Booking.java │ ├── Configuration.java │ ├── Constants.java │ ├── EReputation.java │ ├── HTTPClient.java │ ├── HttpVerbs.java │ ├── Location.java │ ├── Ordering.java │ ├── Params.java │ ├── ReferenceData.java │ ├── Request.java │ ├── Response.java │ ├── Schedule.java │ ├── Shopping.java │ ├── Travel.java │ ├── airline │ └── Destinations.java │ ├── airport │ ├── DirectDestinations.java │ └── predictions │ │ ├── AirportOnTime.java │ │ └── Predictions.java │ ├── analytics │ └── ItineraryPriceMetrics.java │ ├── booking │ ├── FlightOrder.java │ ├── FlightOrders.java │ ├── HotelBookings.java │ └── HotelOrders.java │ ├── client │ └── AccessToken.java │ ├── ereputation │ └── HotelSentiments.java │ ├── exceptions │ ├── AuthenticationException.java │ ├── ClientException.java │ ├── NetworkException.java │ ├── NotFoundException.java │ ├── ParserException.java │ ├── ResponseException.java │ └── ServerException.java │ ├── location │ ├── Analytics.java │ └── analytics │ │ └── CategoryRatedAreas.java │ ├── ordering │ ├── TransferOrder.java │ ├── TransferOrders.java │ └── transferOrders │ │ ├── Transfers.java │ │ └── transfers │ │ └── Cancellation.java │ ├── referencedata │ ├── Airlines.java │ ├── Location.java │ ├── Locations.java │ ├── RecommendedLocations.java │ ├── Urls.java │ ├── locations │ │ ├── Airports.java │ │ ├── Cities.java │ │ ├── Hotel.java │ │ ├── Hotels.java │ │ ├── PointOfInterest.java │ │ ├── PointsOfInterest.java │ │ ├── hotels │ │ │ ├── ByCity.java │ │ │ ├── ByGeocode.java │ │ │ └── ByHotels.java │ │ └── pointsOfInterest │ │ │ └── BySquare.java │ └── urls │ │ └── CheckinLinks.java │ ├── resources │ ├── Activity.java │ ├── AirTraffic.java │ ├── Airline.java │ ├── CheckinLink.java │ ├── City.java │ ├── DatedFlight.java │ ├── Destination.java │ ├── FlightAvailability.java │ ├── FlightDate.java │ ├── FlightDestination.java │ ├── FlightOfferSearch.java │ ├── FlightOrder.java │ ├── FlightPayment.java │ ├── FlightPrice.java │ ├── Hotel.java │ ├── HotelBooking.java │ ├── HotelOfferSearch.java │ ├── HotelOrder.java │ ├── HotelSentiment.java │ ├── ItineraryPriceMetric.java │ ├── Location.java │ ├── Period.java │ ├── PointOfInterest.java │ ├── Prediction.java │ ├── Resource.java │ ├── ScoredLocation.java │ ├── SeatMap.java │ ├── TransferCancellation.java │ ├── TransferOffersPost.java │ └── TransferOrder.java │ ├── schedule │ └── Flights.java │ ├── shopping │ ├── Activities.java │ ├── Activity.java │ ├── Availability.java │ ├── FlightDates.java │ ├── FlightDestinations.java │ ├── FlightOffers.java │ ├── FlightOffersSearch.java │ ├── HotelOfferSearch.java │ ├── HotelOffersSearch.java │ ├── SeatMaps.java │ ├── TransferOffers.java │ ├── activities │ │ └── BySquare.java │ ├── availability │ │ └── FlightAvailabilities.java │ └── flightOffers │ │ ├── Prediction.java │ │ ├── Pricing.java │ │ └── Upselling.java │ └── travel │ ├── Predictions.java │ ├── analytics │ ├── AirTraffic.java │ ├── Analytics.java │ └── airTraffic │ │ ├── Booked.java │ │ ├── BusiestPeriod.java │ │ └── Traveled.java │ └── predictions │ ├── FlightDelay.java │ └── TripPurpose.java └── test ├── java └── com │ └── amadeus │ ├── AccessTokenTest.java │ ├── AmadeusTest.java │ ├── ConfigurationTest.java │ ├── ExceptionsTest.java │ ├── HTTPClientTest.java │ ├── HTTPClientThreadSafeIT.java │ ├── NamespaceTest.java │ ├── ParamsTest.java │ ├── RequestTest.java │ ├── ResponseTest.java │ ├── airline │ └── DestinationsIT.java │ ├── booking │ ├── FlightOrdersIT.java │ └── HotelOrdersIT.java │ ├── ordering │ ├── TransferOrdersIT.java │ └── transferOrders │ │ └── transfers │ │ └── CancellationIT.java │ ├── referenceData │ └── locations │ │ ├── CitiesIT.java │ │ ├── HotelIT.java │ │ ├── PointOfInterestIT.java │ │ ├── hotels │ │ ├── ByCityIT.java │ │ ├── ByGeocodeIT.java │ │ └── ByHotelsIT.java │ │ └── pointsOfInterest │ │ └── BySquareIT.java │ ├── shopping │ ├── ActivityIT.java │ ├── FlightOfferSearchIT.java │ ├── HotelOfferSearchIT.java │ ├── HotelOffersSearchIT.java │ ├── SeatMapsIT.java │ ├── TransferOffersIT.java │ ├── activities │ │ └── BySquareIT.java │ ├── availability │ │ └── FlightAvailabilitiesIT.java │ └── flightOffers │ │ ├── PredictionIT.java │ │ ├── PricingIT.java │ │ └── UpsellingIT.java │ └── travel │ └── TripPurposeIT.java └── resources └── __files ├── activities_response_by_id_ok.json ├── activities_response_by_square_ok.json ├── airline_routes_response_ok.json ├── airline_routes_response_ok2.json ├── auth_ok.json ├── city_search_response_empty.json ├── city_search_response_ok.json ├── flightPayment_ok.json ├── flight_create_order_request.json ├── flight_create_order_response.json ├── flight_search_availability_request_ok.json ├── flight_search_availability_response_ok.json ├── flight_search_offer_pricing_response_ok.json ├── flight_search_offer_request_ok.json ├── flight_search_offer_response_ok.json ├── flight_search_offer_upselling_request_ok.json ├── flight_search_offer_upselling_response_ok.json ├── hotel_offer_search_response_ok.json ├── hotel_offers_search_response_ok.json ├── hotel_orders_request_ok.json ├── hotel_orders_response_ok.json ├── hotels_by_city_response_ok.json ├── hotels_by_geocode_response_ok.json ├── hotels_by_hotels_response_ok.json ├── poi_by_id_response.json ├── pois_by_square_response_ok.json ├── reference_data_hotel_default_response_ok.json ├── reference_data_hotel_multiple_hotel_response_ok.json ├── reference_data_hotel_single_hotel_response_ok.json ├── seatmap_request_ok.json ├── seatmap_response_ok.json ├── seatmap_response_ok2.json ├── transfer_offers_request_ok.json ├── transfer_offers_response_ok.json ├── transfer_orders_management_request_ok.json ├── transfer_orders_management_response_ok.json ├── transfer_orders_request_ok.json ├── transfer_orders_response_ok.json └── trip_purpose_response_ok.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.java] 13 | indent_style = space 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | 3 | # The '*' pattern is global owners. 4 | 5 | # These owners will be the default owners for everything in 6 | # the repo and will be requested for 7 | # review when someone opens a pull request. 8 | 9 | # Global Rule 10 | * @tsolakoua @minjikarin @jabrena -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | [Describe the issue] 4 | 5 | ## Steps to Reproduce 6 | 7 | 1. [First step] 8 | 2. [Second step] 9 | 3. [and so on...] 10 | 11 | __Expected Behavior:__ [What you expect to happen] 12 | 13 | __Actual Behavior:__ [What actually happens] 14 | 15 | __Stable Behavior?__ [What percentage of the time does it reproduce?] 16 | 17 | ## Versions 18 | 19 | [What version of Java/JVM are you running? What Operating System are you on?] 20 | 21 | ## Checklist 22 | 23 | Please make sure you checked the following: 24 | 25 | * Did you download the latest version of this library? 26 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes # 2 | 3 | ## Changes for this pull request 4 | 5 | ## Checklist 6 | 7 | Remove this if you have done all of these: 8 | 9 | * Ensure all tests pass and linting 10 | * Add any changes to the README 11 | * Add any changes or new comments to SDK methods 12 | * Ensure this PR only changes what it is intended to change 13 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Amadeus Support 2 | 3 | Our [developer support team](https://developer.amadeus.com/developers) is here to help you. You can find us on [Twitter](#), [StackOverflow](#), and [email](#). 4 | -------------------------------------------------------------------------------- /.github/images/dependencies.svg: -------------------------------------------------------------------------------- 1 | dependenciesdependencies00 2 | -------------------------------------------------------------------------------- /.github/images/support.svg: -------------------------------------------------------------------------------- 1 | contactcontactsupportsupport 2 | -------------------------------------------------------------------------------- /.github/workflows/build_gradle.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: build 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | types: [opened, synchronize, reopened] 12 | 13 | jobs: 14 | build: 15 | 16 | runs-on: ubuntu-latest 17 | 18 | strategy: 19 | matrix: 20 | java: [ '8', '11' ] 21 | env: 22 | JDK_VERSION: ${{ matrix.java }} 23 | name: Java ${{ matrix.java }} build 24 | steps: 25 | - uses: actions/checkout@v3 26 | - name: Set up Java 27 | uses: actions/setup-java@v3 28 | with: 29 | java-version: ${{ matrix.java }} 30 | distribution: 'adopt' 31 | cache: gradle 32 | - name: Grant execute permission for gradlew 33 | run: chmod +x gradlew 34 | - name: Build with Gradle 35 | run: ./gradlew build 36 | - name: Version Library Verifier 37 | shell: bash 38 | run: | 39 | curl -Ls https://sh.jbang.dev | bash -s - app setup 40 | ~/.jbang/bin/jbang .github/VersionLibraryVerifier.java amadeus-java/ 41 | -------------------------------------------------------------------------------- /.github/workflows/publish-release.yml: -------------------------------------------------------------------------------- 1 | name: Publish Release 2 | on: 3 | push: 4 | # Sequence of patterns matched against refs/tags 5 | tags: 6 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 7 | jobs: 8 | publish: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | - name: Set up Java 14 | uses: actions/setup-java@v1 15 | with: 16 | java-version: 1.8 17 | - name: Grant execute permission for gradlew 18 | run: chmod +x gradlew 19 | - name: Upload release 20 | run: ./gradlew publish --no-daemon --no-parallel 21 | env: 22 | ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} 23 | ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} 24 | ORG_GRADLE_PROJECT_SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }} 25 | ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} 26 | ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} 27 | ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} 28 | - name: Publish release 29 | run: ./gradlew closeAndReleaseRepository 30 | env: 31 | ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} 32 | ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} 33 | ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} 34 | ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Grade files 2 | .gradle 3 | build 4 | .project 5 | .settings 6 | .classpath 7 | .idea 8 | out 9 | .DS_Store 10 | amadeus-java.iml 11 | Bin/ 12 | .vscode/ 13 | .env 14 | -------------------------------------------------------------------------------- /.sdkmanrc: -------------------------------------------------------------------------------- 1 | java=8.0.322-tem -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2017 Amadeus IT Group SA 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'io.franzbecker.gradle-lombok' version '5.0.0' 4 | id 'checkstyle' 5 | id 'com.vanniktech.maven.publish' version '0.18.0' 6 | id 'jacoco' 7 | id "org.sonarqube" version "3.4.0.2513" 8 | } 9 | 10 | compileJava { 11 | sourceCompatibility = "1.8" 12 | targetCompatibility = "1.8" 13 | } 14 | 15 | compileTestJava { 16 | sourceCompatibility = "1.8" 17 | targetCompatibility = "1.8" 18 | } 19 | 20 | tasks.withType(JavaCompile) { 21 | options.encoding = 'UTF-8' 22 | } 23 | 24 | repositories { 25 | mavenCentral() 26 | } 27 | 28 | dependencies { 29 | implementation 'com.google.code.gson:gson:2.9.0' 30 | compileOnly "org.projectlombok:lombok:1.18.24" 31 | annotationProcessor 'org.projectlombok:lombok:1.18.24' 32 | testCompileOnly 'org.projectlombok:lombok:1.18.24' 33 | testAnnotationProcessor 'org.projectlombok:lombok:1.18.24' 34 | testImplementation 'org.mockito:mockito-core:4.6.1' 35 | testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' 36 | testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' 37 | testImplementation 'org.assertj:assertj-core:3.22.0' 38 | testImplementation 'com.github.tomakehurst:wiremock:2.27.2' 39 | testImplementation 'org.slf4j:slf4j-api:1.7.36' 40 | testImplementation 'org.slf4j:slf4j-simple:1.7.36' 41 | } 42 | 43 | checkstyle { 44 | toolVersion = '8.8' 45 | } 46 | 47 | import io.franzbecker.gradle.lombok.task.DelombokTask 48 | 49 | task delombok(type: DelombokTask, dependsOn: compileJava) { 50 | ext.outputDir = file("$buildDir/delombok") 51 | outputs.dir(outputDir) 52 | sourceSets.main.java.srcDirs.each { 53 | inputs.dir(it) 54 | args(it, "-d", outputDir) 55 | } 56 | } 57 | 58 | javadoc { 59 | dependsOn delombok 60 | source = delombok.outputDir 61 | failOnError = false 62 | options.memberLevel = JavadocMemberLevel.PUBLIC 63 | } 64 | 65 | jacoco { 66 | toolVersion = "0.8.7" 67 | } 68 | 69 | test.finalizedBy jacocoTestReport 70 | 71 | test { 72 | useJUnitPlatform() 73 | reports { 74 | junitXml.enabled = false 75 | html.enabled = true 76 | } 77 | } 78 | 79 | signing { 80 | if (project.hasProperty('SIGNING_PRIVATE_KEY') && project.hasProperty('SIGNING_PASSWORD')) { 81 | useInMemoryPgpKeys(project.getProperty('SIGNING_PRIVATE_KEY'), project.getProperty('SIGNING_PASSWORD')) 82 | } 83 | } 84 | 85 | sonarqube { 86 | properties { 87 | property "sonar.projectKey", "amadeus4dev_amadeus-java" 88 | property "sonar.organization", "amadeus4dev" 89 | property "sonar.host.url", "https://sonarcloud.io" 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /docs/com/amadeus/airport/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.airport (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.airport

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/airport/predictions/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.airport.predictions (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.airport.predictions

12 |
13 |

Classes

14 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/com/amadeus/analytics/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.analytics (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.analytics

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/booking/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.booking (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.booking

12 |
13 |

Classes

14 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com/amadeus/client/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.client (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.client

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/dutyOfCare/diseases/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.dutyOfCare.diseases (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.dutyOfCare.diseases

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/dutyOfCare/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.dutyOfCare (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.dutyOfCare

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/ereputation/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.ereputation (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.ereputation

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/exceptions/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.exceptions (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.exceptions

12 |
13 |

Exceptions

14 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/com/amadeus/location/analytics/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.location.analytics (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.location.analytics

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/location/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.location (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.location

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/media/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.media (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.media

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus

12 |
13 |

Classes

14 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/com/amadeus/referenceData/locations/hotels/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.referenceData.locations.hotels (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.referenceData.locations.hotels

12 |
13 |

Classes

14 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com/amadeus/referenceData/locations/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.referenceData.locations (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.referenceData.locations

12 |
13 |

Classes

14 | 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/com/amadeus/referenceData/locations/pointsOfInterest/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.referenceData.locations.pointsOfInterest (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.referenceData.locations.pointsOfInterest

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/referenceData/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.referenceData (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.referenceData

12 |
13 |

Classes

14 | 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/com/amadeus/referenceData/urls/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.referenceData.urls (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.referenceData.urls

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/safety/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.safety (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.safety

12 |
13 |

Classes

14 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/com/amadeus/safety/safetyRatedLocations/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.safety.safetyRatedLocations (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.safety.safetyRatedLocations

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/schedule/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.schedule (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.schedule

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/shopping/activities/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.shopping.activities (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.shopping.activities

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/shopping/availability/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.shopping.availability (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.shopping.availability

12 |
13 |

Classes

14 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/com/amadeus/shopping/flightOffers/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.shopping.flightOffers (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.shopping.flightOffers

12 |
13 |

Classes

14 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com/amadeus/shopping/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.shopping (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.shopping

12 |
13 |

Classes

14 | 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/com/amadeus/travel/analytics/airTraffic/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.travel.analytics.airTraffic (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.travel.analytics.airTraffic

12 |
13 |

Classes

14 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com/amadeus/travel/analytics/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.travel.analytics (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.travel.analytics

12 |
13 |

Classes

14 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/com/amadeus/travel/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.travel (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.travel

12 |
13 |

Classes

14 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/com/amadeus/travel/predictions/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.amadeus.travel.predictions (amadeus-java 6.1.0 API) 7 | 8 | 9 | 10 | 11 |

com.amadeus.travel.predictions

12 |
13 |

Classes

14 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/package-list: -------------------------------------------------------------------------------- 1 | com.amadeus 2 | com.amadeus.airport 3 | com.amadeus.airport.predictions 4 | com.amadeus.analytics 5 | com.amadeus.booking 6 | com.amadeus.client 7 | com.amadeus.dutyOfCare 8 | com.amadeus.dutyOfCare.diseases 9 | com.amadeus.ereputation 10 | com.amadeus.exceptions 11 | com.amadeus.location 12 | com.amadeus.location.analytics 13 | com.amadeus.media 14 | com.amadeus.referenceData 15 | com.amadeus.referenceData.locations 16 | com.amadeus.referenceData.locations.hotels 17 | com.amadeus.referenceData.locations.pointsOfInterest 18 | com.amadeus.referenceData.urls 19 | com.amadeus.resources 20 | com.amadeus.safety 21 | com.amadeus.safety.safetyRatedLocations 22 | com.amadeus.schedule 23 | com.amadeus.shopping 24 | com.amadeus.shopping.activities 25 | com.amadeus.shopping.availability 26 | com.amadeus.shopping.flightOffers 27 | com.amadeus.travel 28 | com.amadeus.travel.analytics 29 | com.amadeus.travel.analytics.airTraffic 30 | com.amadeus.travel.predictions 31 | -------------------------------------------------------------------------------- /docs/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | GROUP=com.amadeus 2 | VERSION_NAME=10.0.0 3 | 4 | POM_URL=https://github.com/amadeus4dev/amadeus-java 5 | POM_SCM_URL=git@github.com:amadeus4dev/amadeus-java.git 6 | POM_SCM_CONNECTION=scm:git:git@github.com:amadeus4dev/amadeus-java.git 7 | POM_SCM_DEV_CONNECTION=scm:git:git@github.com:amadeus4dev/amadeus-java.git 8 | POM_LICENCE_NAME=The MIT License 9 | POM_LICENCE_URL=https://opensource.org/licenses/MIT 10 | POM_LICENCE_DIST=repo 11 | POM_DEVELOPER_ID=amadeus 12 | POM_DEVELOPER_NAME=Amadeus 13 | POM_DEVELOPER_EMAIL=developers@amadeus.com 14 | 15 | POM_DESCRIPTION=Amadeus Java Bindings 16 | POM_NAME=amadeus-java 17 | POM_ARTIFACT_ID=amadeus-java 18 | POM_PACKAGING=jar 19 | POM_ORGANIZATION_URL=https://developer.amadeus.com 20 | 21 | VENDOR_NAME=Amadeus IT Group SA (https://amadeus.com) 22 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amadeus4dev/amadeus-java/12d0cef45a73bbe3e42343125bf6545193bb0bc2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | lombok.addLombokGeneratedAnnotation = true 2 | lombok.nonNull.exceptionType = NullPointerException 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | * 4 | * The settings file is used to specify which projects to include in your build. 5 | * 6 | * Detailed information about configuring a multi-project build in Gradle can be found 7 | * in the user guide at https://docs.gradle.org/4.6/userguide/multi_project_builds.html 8 | */ 9 | 10 | rootProject.name = 'amadeus-java' 11 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Airline.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.airline.Destinations; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v1/airline endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.airline
18 | * 19 | * @hide 20 | */ 21 | public class Airline { 22 | /** 23 | * Constructor. 24 | * @hide 25 | */ 26 | public Airline(Amadeus client) { 27 | this.destinations = new Destinations(client); 28 | } 29 | 30 | /** 31 | *

32 | * A namespaced client for the 33 | * /v1/airline/destinations endpoints. 34 | *

35 | */ 36 | public Destinations destinations; 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Airport.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.airport.DirectDestinations; 4 | import com.amadeus.airport.predictions.Predictions; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/airport endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object. 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
18 |  * amadeus.airport
19 | * 20 | * @hide 21 | */ 22 | public class Airport { 23 | /** 24 | *

25 | * A namespaced client for the 26 | * /v1/airport/predictions endpoints. 27 | *

28 | */ 29 | public Predictions predictions; 30 | 31 | /** 32 | *

33 | * A namespaced client for the 34 | * /v1/airport/direct-destinations endpoints. 35 | *

36 | */ 37 | public DirectDestinations directDestinations; 38 | 39 | /** 40 | * Constructor. 41 | * @hide 42 | */ 43 | public Airport(Amadeus client) { 44 | this.predictions = new Predictions(client); 45 | this.directDestinations = new DirectDestinations(client); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Analytics.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.analytics.ItineraryPriceMetrics; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v1/analytics endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.analytics;
18 | * 19 | * @hide 20 | */ 21 | public class Analytics { 22 | /** 23 | *

24 | * A namespaced client for the 25 | * /v1/analytics/itineraryPriceMetrics endpoints. 26 | *

27 | */ 28 | public ItineraryPriceMetrics itineraryPriceMetrics; 29 | 30 | /** 31 | * Constructor. 32 | * @hide 33 | */ 34 | public Analytics(Amadeus client) { 35 | this.itineraryPriceMetrics = new ItineraryPriceMetrics(client); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Booking.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.booking.FlightOrder; 4 | import com.amadeus.booking.FlightOrders; 5 | import com.amadeus.booking.HotelBookings; 6 | import com.amadeus.booking.HotelOrders; 7 | 8 | public class Booking { 9 | private Amadeus client; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/booking/flightOrder endpoints. 15 | *

16 | */ 17 | public FlightOrder flightOrder; 18 | 19 | /** 20 | *

21 | * A namespaced client for the 22 | * /v1/booking/flightOrders endpoints. 23 | *

24 | */ 25 | public FlightOrders flightOrders; 26 | 27 | /** 28 | *

29 | * A namespaced client for the 30 | * /v1/booking/hotelBookings endpoints. 31 | *

32 | */ 33 | public HotelBookings hotelBookings; 34 | 35 | /** 36 | *

37 | * A namespaced client for the 38 | * /v2/booking/hotelOrders endpoints. 39 | *

40 | */ 41 | public HotelOrders hotelOrders; 42 | 43 | /** 44 | * Constructor. 45 | * @hide 46 | */ 47 | public Booking(Amadeus client) { 48 | this.client = client; 49 | this.flightOrders = new FlightOrders(client); 50 | this.hotelBookings = new HotelBookings(client); 51 | this.hotelOrders = new HotelOrders(client); 52 | } 53 | 54 | public FlightOrder flightOrder(String flightOrderId) { 55 | return new FlightOrder(client, flightOrderId); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Constants.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | /** 8 | * A class for constant variables. 9 | * 10 | *
11 |  *  To use: Constants.VARIABLE
12 |  * 
13 | */ 14 | public final class Constants { 15 | 16 | 17 | public static final String HTTPS = "https"; 18 | public static final String HTTP = "http"; 19 | 20 | public static final String USER_AGENT = "User-Agent"; 21 | public static final String ACCEPT = "Accept"; 22 | public static final String AUTHORIZATION = "Authorization"; 23 | public static final String CONTENT_TYPE = "Content-Type"; 24 | public static final String X_HTTP_METHOD_OVERRIDE = "X-HTTP-Method-Override"; 25 | 26 | // Pagination 27 | public static final String FIRST = "first"; 28 | public static final String LAST = "last"; 29 | public static final String NEXT = "next"; 30 | public static final String PREVIOUS = "previous"; 31 | 32 | // Authorization 33 | public static final String GRANT_TYPE = "grant_type"; 34 | public static final String CLIENT_CREDENTIALS = "client_credentials"; 35 | public static final String CLIENT_ID = "client_id"; 36 | public static final String CLIENT_SECRET = "client_secret"; 37 | public static final String AUTH_URL = "/v1/security/oauth2/token"; 38 | public static final String ACCESS_TOKEN = "access_token"; 39 | public static final String EXPIRES_IN = "expires_in"; 40 | 41 | // APIs which need an X-HTTP-Method-Override GET HEADER 42 | protected static final List APIS_WITH_EXTRA_HEADER = new ArrayList(Arrays.asList( 43 | "/v2/shopping/flight-offers", 44 | "/v1/shopping/seatmaps", 45 | "/v1/shopping/availability/flight-availabilities", 46 | "/v2/shopping/flight-offers/prediction", 47 | "/v1/shopping/flight-offers/pricing", 48 | "/v1/shopping/flight-offers/upselling")); 49 | 50 | /** 51 | * The caller references the constants using Consts.EMPTY_STRING, 52 | * and so on. Thus, the caller should be prevented from constructing objects of 53 | * this class, by declaring this private constructor. 54 | */ 55 | private Constants() { 56 | throw new AssertionError(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/EReputation.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.ereputation.HotelSentiments; 4 | 5 | public class EReputation { 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v2/e-reputation/hotel-sentiments endpoints. 10 | *

11 | */ 12 | public HotelSentiments hotelSentiments; 13 | 14 | public EReputation(Amadeus client) { 15 | this.hotelSentiments = new HotelSentiments(client); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/HttpVerbs.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | public enum HttpVerbs { 4 | // HTTP verbs 5 | GET, 6 | POST, 7 | PUT, 8 | DELETE 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Location.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.location.Analytics; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v1/location endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.location;
18 | * 19 | * @hide 20 | */ 21 | public class Location { 22 | /** 23 | *

24 | * A namespaced client for the 25 | * /v1/location/analytics endpoints. 26 | *

27 | */ 28 | public Analytics analytics; 29 | 30 | /** 31 | * Constructor. 32 | * @hide 33 | */ 34 | public Location(Amadeus client) { 35 | this.analytics = new Analytics(client); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Ordering.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.ordering.TransferOrder; 4 | import com.amadeus.ordering.TransferOrders; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/ordering endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object. 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
18 |  * amadeus.ordering;
19 | * 20 | * @hide 21 | */ 22 | public class Ordering { 23 | private Amadeus client; 24 | 25 | /** 26 | *

27 | * A namespaced client for the 28 | * /v1/ordering/transfer-orders endpoints. 29 | *

30 | */ 31 | public TransferOrders transferOrders; 32 | 33 | /** 34 | *

35 | * A namespaced client for the 36 | * /v1/ordering/transafer-orders/:orderId endpoints. 37 | *

38 | */ 39 | public TransferOrder transferOrder(String orderId) { 40 | return new TransferOrder(client, orderId); 41 | } 42 | 43 | /** 44 | * Constructor. 45 | * @hide 46 | */ 47 | public Ordering(Amadeus client) { 48 | this.transferOrders = new TransferOrders(client); 49 | this.client = client; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ReferenceData.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.referencedata.Airlines; 4 | import com.amadeus.referencedata.Location; 5 | import com.amadeus.referencedata.Locations; 6 | import com.amadeus.referencedata.RecommendedLocations; 7 | import com.amadeus.referencedata.Urls; 8 | 9 | /** 10 | *

11 | * A namespaced client for the 12 | * /v2/reference-data endpoints. 13 | *

14 | * 15 | *

16 | * Access via the Amadeus client object. 17 | *

18 | * 19 | *
20 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
21 |  * amadeus.referenceData;
22 | * 23 | * @hide 24 | */ 25 | public class ReferenceData { 26 | private Amadeus client; 27 | 28 | /** 29 | *

30 | * A namespaced client for the 31 | * /v2/reference-data/urls endpoints. 32 | *

33 | */ 34 | public Urls urls; 35 | 36 | /** 37 | *

38 | * A namespaced client for the 39 | * /v2/reference-data/locations endpoints. 40 | *

41 | */ 42 | public Locations locations; 43 | 44 | /** 45 | *

46 | * A namespaced client for the 47 | * /v2/reference-data/airlines endpoints. 48 | *

49 | */ 50 | public Airlines airlines; 51 | 52 | /** 53 | *

54 | * A namespaced client for the 55 | * /v1/reference-data/recommended-locations endpoints. 56 | *

57 | */ 58 | public RecommendedLocations recommendedLocations; 59 | 60 | 61 | /** 62 | * Constructor. 63 | * @hide 64 | */ 65 | public ReferenceData(Amadeus client) { 66 | this.client = client; 67 | this.urls = new Urls(client); 68 | this.locations = new Locations(client); 69 | this.airlines = new Airlines(client); 70 | this.recommendedLocations = new RecommendedLocations(client); 71 | } 72 | 73 | /** 74 | *

75 | * A namespaced client for the 76 | * /v2/reference-data/location/:hotel_id endpoints. 77 | *

78 | */ 79 | public Location location(String locationId) { 80 | return new Location(client, locationId); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Schedule.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.schedule.Flights; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v2/schedule endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.schedule;
18 | * 19 | * @hide 20 | */ 21 | public class Schedule { 22 | /** 23 | *

24 | * A namespaced client for the 25 | * /v2/schedule/flights endpoints. 26 | *

27 | */ 28 | public Flights flights; 29 | 30 | /** 31 | * Constructor. 32 | * @hide 33 | */ 34 | public Schedule(Amadeus client) { 35 | this.flights = new Flights(client); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/Travel.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import com.amadeus.travel.Predictions; 4 | import com.amadeus.travel.analytics.Analytics; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v2/travel endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object. 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
18 |  * amadeus.travel;
19 | * 20 | * @hide 21 | */ 22 | public class Travel { 23 | /** 24 | *

25 | * A namespaced client for the 26 | * /v2/travel/analytics endpoints. 27 | *

28 | */ 29 | public Analytics analytics; 30 | /** 31 | *

32 | * A namespaced client for the 33 | * /v1/travel/predictions endpoints. 34 | *

35 | */ 36 | public Predictions predictions; 37 | 38 | /** 39 | * Constructor. 40 | * @hide 41 | */ 42 | public Travel(Amadeus client) { 43 | this.analytics = new Analytics(client); 44 | this.predictions = new Predictions(client); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/airline/Destinations.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.airline; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Destination; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/airline/destinations endpoint. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.airline.destinations;
23 | */ 24 | public class Destinations { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public Destinations(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Get airline destinations. 38 | *

39 | * 40 | *
41 |    * amadeus.airline.destinations.get(Params
42 |    *     .with("airlineCode", "BA")
43 |    *     .and("max", 2));
44 |    * 
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public Destination[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/airline/destinations", params); 52 | return (Destination[]) Resource.fromArray(response, Destination[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see Destinations#get() 58 | */ 59 | public Destination[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/airport/DirectDestinations.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.airport; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Destination; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/airport/direct-destinations endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.airport.directDestinations;
23 | */ 24 | public class DirectDestinations { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public DirectDestinations(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Find all destinations served by a given airport. 38 | *

39 | * 40 | *
41 |    * amadeus.airport.directDestinations.get(Params
42 |    *     .with("departureAirportCode", "MAD")
43 |    *     .and("max","2"));
44 |    * 
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public Destination[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/airport/direct-destinations", params); 52 | return (Destination[]) Resource.fromArray(response, Destination[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see DirectDestinations#get() 58 | */ 59 | public Destination[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/airport/predictions/AirportOnTime.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.airport.predictions; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Prediction; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/airport/predictions/on-time endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.airport.predictions.onTime;
23 | */ 24 | public class AirportOnTime { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public AirportOnTime(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a percentage of on-time flight from a given airport. 38 | *

39 | * 40 | *
41 |    * OnTime airportOnTime = amadeus.airport.predictions.onTime.get(Params
42 |    *     .with("airportCode", "NCE")
43 |    *     .and("date", "2020-09-01"));
44 |    * 
45 | * @param params the parameters to send to the API 46 | * @return an API response object 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public Prediction get(Params params) throws ResponseException { 50 | Response response = client.get("/v1/airport/predictions/on-time", params); 51 | return (Prediction) Resource.fromObject(response, Prediction.class); 52 | } 53 | 54 | /** 55 | * Convenience method for calling get without any parameters. 56 | * @see AirportOnTime#get() 57 | */ 58 | public Prediction get() throws ResponseException { 59 | return get(null); 60 | } 61 | } -------------------------------------------------------------------------------- /src/main/java/com/amadeus/airport/predictions/Predictions.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.airport.predictions; 2 | 3 | import com.amadeus.Amadeus; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v1/airport/predictions endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.airport.predictions;
18 | * 19 | * @hide 20 | */ 21 | public class Predictions { 22 | /** 23 | *

24 | * A namespaced client for the 25 | * /v1/airport/predictions/on-time endpoints. 26 | *

27 | */ 28 | public AirportOnTime onTime; 29 | 30 | 31 | /** 32 | * Constructor. 33 | * @hide 34 | */ 35 | public Predictions(Amadeus client) { 36 | this.onTime = new AirportOnTime(client); 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/amadeus/analytics/ItineraryPriceMetrics.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.analytics; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.ItineraryPriceMetric; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/analytics/itinerary-price-metrics endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.analytics.itineraryPriceMetrics;
23 | */ 24 | public class ItineraryPriceMetrics { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public ItineraryPriceMetrics(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Retrieves itinerary price metrics. 38 | *

39 | * 40 | *
41 |    * amadeus.analytics.itineraryPriceMetrics.get(Params
42 |    *     .with("originIataCode", "MAD")
43 |    *     .and("destinationIataCode", "CDG")
44 |    *     .and("departureDate", "2021-03-21"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public ItineraryPriceMetric[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/analytics/itinerary-price-metrics", params); 52 | return (ItineraryPriceMetric[]) Resource.fromArray(response, ItineraryPriceMetric[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see ItineraryPriceMetric#get() 58 | */ 59 | public ItineraryPriceMetric[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/booking/HotelBookings.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.booking; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Response; 5 | import com.amadeus.exceptions.ResponseException; 6 | import com.amadeus.resources.HotelBooking; 7 | import com.amadeus.resources.Resource; 8 | import com.google.gson.JsonObject; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/booking/hotel-bookings endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
22 |  * amadeus.booking.hotelBookings;
23 | */ 24 | public class HotelBookings { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @hide 31 | */ 32 | public HotelBookings(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * The Hotel Booking API allows you to perform hotel booking. 39 | *

40 | * 41 | *
42 |    * amadeus.booking.hotelBookings.post(body);
43 | * 44 | * @param body the parameters to send to the API as a JSonObject 45 | * @return an API resource 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public HotelBooking[] post(JsonObject body) throws ResponseException { 49 | Response response = client.post("/v1/booking/hotel-bookings", body); 50 | return (HotelBooking[]) Resource.fromArray(response, HotelBooking[].class); 51 | } 52 | 53 | /** 54 | *

55 | * The Hotel Booking API allows you to perform hotel booking. 56 | *

57 | * 58 | *
59 |    * amadeus.booking.hotelBookings.post(body);
60 | * 61 | * @param body the parameters to send to the API as a String 62 | * @return an API resource 63 | * @throws ResponseException when an exception occurs 64 | */ 65 | public HotelBooking[] post(String body) throws ResponseException { 66 | Response response = client.post("/v1/booking/hotel-bookings", body); 67 | return (HotelBooking[]) Resource.fromArray(response, HotelBooking[].class); 68 | } 69 | 70 | /** 71 | * Convenience method for calling post without any parameters. 72 | * 73 | * @see HotelBookings#post() 74 | */ 75 | public HotelBooking[] post() throws ResponseException { 76 | return post((String) null); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/booking/HotelOrders.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.booking; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Response; 5 | import com.amadeus.exceptions.ResponseException; 6 | import com.amadeus.resources.HotelOrder; 7 | import com.amadeus.resources.Resource; 8 | import com.google.gson.JsonObject; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v2/booking/hotel-orders endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
22 |  * amadeus.booking.HotelOrders;
23 | */ 24 | public class HotelOrders { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @hide 31 | */ 32 | public HotelOrders(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * The Hotel Booking API allows you to perform hotel booking. 39 | *

40 | * 41 | *
42 |    * amadeus.booking.hotelOrders.post(body);
43 | * 44 | * @param body the parameters to send to the API as a JSonObject 45 | * @return an API resource 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public HotelOrder post(JsonObject body) throws ResponseException { 49 | Response response = client.post("/v2/booking/hotel-orders", body); 50 | return (HotelOrder) Resource.fromObject(response, HotelOrder.class); 51 | } 52 | 53 | /** 54 | *

55 | * The Hotel Booking API allows you to perform hotel booking. 56 | *

57 | * 58 | *
59 |    * amadeus.booking.hotelOrders.post(body);
60 | * 61 | * @param body the parameters to send to the API as a String 62 | * @return an API resource 63 | * @throws ResponseException when an exception occurs 64 | */ 65 | public HotelOrder post(String body) throws ResponseException { 66 | Response response = client.post("/v2/booking/hotel-orders", body); 67 | return (HotelOrder) Resource.fromObject(response, HotelOrder.class); 68 | } 69 | 70 | /** 71 | * Convenience method for calling post without any parameters. 72 | * 73 | * @see HotelBookings#post() 74 | */ 75 | public HotelOrder post() throws ResponseException { 76 | return post((String) null); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ereputation/HotelSentiments.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.ereputation; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.HotelSentiment; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v2/e-reputation/hotel-sentiments endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.ereputation.hotelSentiments;
23 | */ 24 | 25 | public class HotelSentiments { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public HotelSentiments(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Hotel ratings based on automated sentiment analysis algorithm 39 | * applied on the online reviews. 40 | *

41 | * 42 | *
43 |    * amadeus.ereputation.hotelSentiments.get(Params
44 |    *   .with("hotelIds", "ELONMFS,ADNYCCTB"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public HotelSentiment[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v2/e-reputation/hotel-sentiments", params); 52 | return (HotelSentiment[]) Resource.fromArray(response, HotelSentiment[].class); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/AuthenticationException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when the client did not provide the right credentials. 7 | */ 8 | public class AuthenticationException extends ResponseException { 9 | /** 10 | * Constructor. 11 | * @hides as only used internally 12 | */ 13 | public AuthenticationException(Response response) { 14 | super(response); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/ClientException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when the client did not provide the right parameters. 7 | */ 8 | public class ClientException extends ResponseException { 9 | /** 10 | * Constructor. 11 | * @hides as only used internally 12 | */ 13 | public ClientException(Response response) { 14 | super(response); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/NetworkException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when there is some kind of error in the network. 7 | */ 8 | public class NetworkException extends ResponseException { 9 | /** 10 | * Constructor. 11 | * @hides as only used internally 12 | */ 13 | public NetworkException(Response response) { 14 | super(response); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when the path could not be found. 7 | */ 8 | public class NotFoundException extends ResponseException { 9 | public NotFoundException(Response response) { 10 | super(response); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/ParserException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when the response type was JSON but could not be parsed. 7 | */ 8 | public class ParserException extends ResponseException { 9 | /** 10 | * Constructor. 11 | * @hides as only used internally 12 | */ 13 | public ParserException(Response response) { 14 | super(response); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/exceptions/ServerException.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.exceptions; 2 | 3 | import com.amadeus.Response; 4 | 5 | /** 6 | * This error occurs when there is an error on the server. 7 | */ 8 | public class ServerException extends ResponseException { 9 | /** 10 | * Constructor. 11 | * @hides as only used internally 12 | */ 13 | public ServerException(Response response) { 14 | super(response); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/location/Analytics.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.location; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.location.analytics.CategoryRatedAreas; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/location/analytics endpoints. 10 | *

11 | */ 12 | public class Analytics { 13 | /** 14 | *

15 | * A namespaced client for the 16 | * /v1/location/analytics/category-rated-areas endpoints. 17 | *

18 | */ 19 | public CategoryRatedAreas categoryRatedAreas; 20 | 21 | /** 22 | * Constructor. 23 | * @hide 24 | */ 25 | public Analytics(Amadeus client) { 26 | this.categoryRatedAreas = new CategoryRatedAreas(client); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/location/analytics/CategoryRatedAreas.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.location.analytics; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | import com.amadeus.resources.ScoredLocation; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/location/analytics/category-rated-areas endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.location.analytics.categoryRatedAreas;
23 | */ 24 | public class CategoryRatedAreas { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public CategoryRatedAreas(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Provides a popularity scores 38 | * for a given latitude and longitude. 39 | *

40 | * 41 | *
42 |    * amadeus.location.analytics.categoryRatedAreas.get(Params
43 |    *     .with("latitude", "41.397158")
44 |    *     .and("longitude", "2.160873");
45 |    * 
46 | * 47 | * @param params the parameters to send to the API 48 | * @return an API response object 49 | * @throws ResponseException when an exception occurs 50 | */ 51 | public ScoredLocation[] get(Params params) throws ResponseException { 52 | Response response = client.get("/v1/location/analytics/category-rated-areas", params); 53 | return (ScoredLocation[]) Resource.fromArray(response, ScoredLocation[].class); 54 | } 55 | 56 | /** 57 | * Convenience method for calling get without any parameters. 58 | * @see CategoryRatedAreas#get() 59 | */ 60 | public ScoredLocation[] get() throws ResponseException { 61 | return get(null); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ordering/TransferOrder.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.ordering; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.ordering.transferOrders.Transfers; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/ordering/transfer-orders/:orderId endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
18 |  * amadeus.ordering.transferOrder(orderId);
19 | * 20 | * @hide 21 | */ 22 | public class TransferOrder { 23 | public Amadeus client; 24 | public String orderId; 25 | public Transfers transfers; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public TransferOrder(Amadeus client, String orderId) { 32 | this.orderId = orderId; 33 | this.client = client; 34 | this.transfers = new Transfers(client, orderId); 35 | } 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ordering/TransferOrders.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.ordering; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | import com.amadeus.resources.TransferOrder; 9 | import com.google.gson.JsonObject; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/ordering/transfer-orders endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
23 |  * amadeus.ordering.transferOrders;
24 | */ 25 | public class TransferOrders { 26 | private Amadeus client; 27 | 28 | private static final String TRANSFER_ORDERS_URL = "/v1/ordering/transfer-orders"; 29 | 30 | /** 31 | * Constructor. 32 | * 33 | * @hide 34 | */ 35 | public TransferOrders(Amadeus client) { 36 | this.client = client; 37 | } 38 | 39 | /** 40 | *

41 | * The Amadeus Transfer Offers API allows travelers to book private transfers. 42 | *

43 | * 44 | *
45 |    * amadeus.ordering.transferOrders.post(body);
46 | * 47 | * @param body the parameters to send to the API as a JsonObject 48 | * @param params URL parameters 49 | * @return an API resource 50 | * @throws ResponseException when an exception occurs 51 | */ 52 | public TransferOrder post(JsonObject body, Params params) throws ResponseException { 53 | Response response = client.post(TRANSFER_ORDERS_URL, params, body); 54 | return (TransferOrder) Resource.fromObject(response, TransferOrder.class); 55 | } 56 | 57 | /** 58 | *

59 | * The Amadeus Transfer Offers API allows travelers to book private transfers. 60 | *

61 | * 62 | *
63 |    * amadeus.ordering.transferOrders.post(body);
64 | * 65 | * @param body the parameters to send to the API as a String 66 | * @param params URL parameters 67 | * @return an API resource 68 | * @throws ResponseException when an exception occurs 69 | */ 70 | public TransferOrder post(String body, Params params) throws ResponseException { 71 | Response response = client.post(TRANSFER_ORDERS_URL, params, body); 72 | return (TransferOrder) Resource.fromObject(response, TransferOrder.class); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ordering/transferOrders/Transfers.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.ordering.transferOrders; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.ordering.transferOrders.transfers.Cancellation; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/ordering/transfer-orders/{orderId}/transfers/cancellation endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
18 |  * amadeus.ordering.transferOrders(orderId).urls;
19 | * 20 | * @hide 21 | */ 22 | public class Transfers { 23 | /** 24 | *

25 | * A namespaced client for the 26 | * /v1/ordering/transfer-orders/{orderId}/transfers/cancellation endpoints. 27 | *

28 | */ 29 | public Cancellation cancellation; 30 | 31 | /** 32 | * Constructor. 33 | * @hide 34 | */ 35 | public Transfers(Amadeus client, String orderId) { 36 | this.cancellation = new Cancellation(client, orderId); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/ordering/transferOrders/transfers/Cancellation.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.ordering.transferOrders.transfers; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | import com.amadeus.resources.TransferCancellation; 9 | import com.google.gson.JsonObject; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/ordering/transfer-orders/{orderId}/transfers/cancellation endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
23 |  * amadeus.ordering.transferOrder(orderId).transfers.cancellation;
24 | */ 25 | public class Cancellation { 26 | private Amadeus client; 27 | private String orderId; 28 | 29 | /** 30 | * Constructor. 31 | * 32 | * @hide 33 | */ 34 | public Cancellation(Amadeus client, String orderId) { 35 | this.client = client; 36 | this.orderId = orderId; 37 | } 38 | 39 | /** 40 | *

41 | * The Amadeus Transfer Management API allows cancel private transfers. 42 | *

43 | * 44 | *
45 |    * amadeus.ordering.transferOrder(orderId).transfers.cancellation.post(params);
46 | * 47 | * @param params URL parameters 48 | * @return an API resource 49 | * @throws ResponseException when an exception occurs 50 | */ 51 | public TransferCancellation post(Params params) throws ResponseException { 52 | String path = String.format("/v1/ordering/transfer-orders/%s/transfers/cancellation", orderId); 53 | Response response = client.post(path, params); 54 | return (TransferCancellation) Resource.fromObject(response, TransferCancellation.class); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/Airlines.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Airline; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/reference-data/airlines endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.referenceData.airlines;
24 | */ 25 | public class Airlines { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public Airlines(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns the airline name and code. 39 | *

40 | * 41 | *
42 |    * amadeus.referenceData.airlines.get(Params
43 |    *   .with("airlineCodes", "BA"));
44 | * 45 | * @param params the parameters to send to the API 46 | * @return an API response object 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public Airline[] get(Params params) throws ResponseException { 50 | Response response = client.get("/v1/reference-data/airlines", params); 51 | return (Airline[]) Resource.fromArray(response, Airline[].class); 52 | } 53 | 54 | /** 55 | * Convenience method for calling get without any parameters. 56 | * @see Airlines#get() 57 | */ 58 | public Airline[] get() throws ResponseException { 59 | return get(null); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/Location.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.referencedata.locations.Airports; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v2/reference-data/locations/:location_id endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
22 |  * amadeus.referenceData.location(locationId);
23 | * 24 | * @hide 25 | */ 26 | public class Location { 27 | private Amadeus client; 28 | private String locationId; 29 | 30 | /** 31 | * Constructor. 32 | * @hide 33 | */ 34 | public Location(Amadeus client, String locationId) { 35 | this.locationId = locationId; 36 | this.client = client; 37 | } 38 | 39 | /** 40 | *

41 | * Returns details for a specific airport. 42 | *

43 | * 44 | *
45 |    * amadeus.referenceData.locations("ALHR').get();
46 | * 47 | * @param params the parameters to send to the API 48 | * @return an API response object 49 | * @throws ResponseException when an exception occurs 50 | */ 51 | public com.amadeus.resources.Location get(Params params) throws ResponseException { 52 | String path = String.format("/v1/reference-data/locations/%s", locationId); 53 | Response response = client.get(path, params); 54 | return (com.amadeus.resources.Location) 55 | Resource.fromObject(response, com.amadeus.resources.Location.class); 56 | } 57 | 58 | /** 59 | * Convenience method for calling get without any parameters. 60 | * @see Airports#get() 61 | */ 62 | public com.amadeus.resources.Location get() throws ResponseException { 63 | return get(null); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/RecommendedLocations.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Location; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/reference-data/recommended-locations endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.referenceData.recommendedLocations;
24 | */ 25 | public class RecommendedLocations { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public RecommendedLocations(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns a list of destination recommendations. 39 | *

40 | * 41 | *
42 |    * amadeus.referenceData.recommendedLocations.get(Params
43 |    *   .with("cityCodes", "PAR")
44 |    *   .and("travelerCountryCode", "FR"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public Location[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/reference-data/recommended-locations", params); 52 | return (Location[]) Resource.fromArray(response, Location[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see Location#get() 58 | */ 59 | public Location[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/Urls.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.referencedata.urls.CheckinLinks; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v2/reference-data/urls endpoints. 10 | *

11 | * 12 | *

13 | * Access via the Amadeus client object 14 | *

15 | * 16 | *
17 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
18 |  * amadeus.referenceData.urls;
19 | * 20 | * @hide 21 | */ 22 | public class Urls { 23 | /** 24 | *

25 | * A namespaced client for the 26 | * /v2/reference-data/urls/checkin-links endpoints. 27 | *

28 | */ 29 | public CheckinLinks checkinLinks; 30 | 31 | /** 32 | * Constructor. 33 | * @hide 34 | */ 35 | public Urls(Amadeus client) { 36 | this.checkinLinks = new CheckinLinks(client); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/Airports.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Location; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/reference-data/locations/airports endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.referenceData.locations.airports;
24 | */ 25 | public class Airports { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public Airports(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns a list of relevant airports near to a given point. 39 | *

40 | * 41 | *
42 |    * amadeus.referenceData.locations.airports.get(Params
43 |    *   .with("longitude", 49.0000)
44 |    *   .and("latitude", 2.55));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public Location[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/reference-data/locations/airports", params); 52 | return (Location[]) Resource.fromArray(response, Location[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see Airports#get() 58 | */ 59 | public Location[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/Cities.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.City; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/reference-data/locations/cities endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.referenceData.locations.cities;
23 | */ 24 | public class Cities { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public Cities(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of relevant cities that match a specific word or string of letters. 38 | *

39 | * 40 | *
41 |    * amadeus.referenceData.locations.cities.get(Params
42 |    *   .with("keyword", "PARIS");
43 | * 44 | * @param params the parameters to send to the API 45 | * @return an API response object 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public City[] get(Params params) throws ResponseException { 49 | Response response = client.get("/v1/reference-data/locations/cities", params); 50 | return (City[]) Resource.fromArray(response, City[].class); 51 | } 52 | 53 | /** 54 | * Convenience method for calling get without any parameters. 55 | * @see Cities#get() 56 | */ 57 | public City[] get() throws ResponseException { 58 | return get(null); 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/Hotel.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | 9 | /** 10 | *

11 | * A namespaced client for the 12 | * /v1/reference-data/locations/hotel endpoints. 13 | *

14 | * 15 | *

16 | * Access via the Amadeus client object. 17 | *

18 | * 19 | *
20 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
21 |  * amadeus.referenceData.locations.hotel;
22 | */ 23 | public class Hotel { 24 | private Amadeus client; 25 | 26 | /** 27 | * Constructor. 28 | * @hide 29 | */ 30 | public Hotel(Amadeus client) { 31 | this.client = client; 32 | } 33 | 34 | /** 35 | *

36 | * Returns a list of relevant hotels inside a city. 37 | *

38 | * 39 | *
40 |    * amadeus.referenceData.locations.hotel.get(Params
41 |    *   .with("cityCode", "PAR"));
42 | * 43 | * @param params the parameters to send to the API 44 | * @return an API response object 45 | * @throws ResponseException when an exception occurs 46 | */ 47 | public com.amadeus.resources.Hotel[] get(Params params) throws ResponseException { 48 | Response response = client.get("/v1/reference-data/locations/hotel", params); 49 | return (com.amadeus.resources.Hotel[]) 50 | Resource.fromArray(response, com.amadeus.resources.Hotel[].class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/Hotels.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.referencedata.locations.hotels.ByCity; 5 | import com.amadeus.referencedata.locations.hotels.ByGeocode; 6 | import com.amadeus.referencedata.locations.hotels.ByHotels; 7 | 8 | /** 9 | *

10 | * A namespaced client for the 11 | * /v1/reference-data/locations/hotels endpoints. 12 | *

13 | * 14 | *

15 | * Access via the Amadeus client object. 16 | *

17 | * 18 | *
19 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
20 |  * amadeus.referenceData.locations.hotels;
21 | */ 22 | public class Hotels { 23 | /** 24 | *

25 | * A namespaced client for the 26 | * /v1/reference-data/locations/hotels/by-city endpoints. 27 | *

28 | */ 29 | public ByCity byCity; 30 | 31 | /** 32 | *

33 | * A namespaced client for the 34 | * /v1/reference-data/locations/hotels/by-hotels endpoints. 35 | *

36 | */ 37 | public ByHotels byHotels; 38 | 39 | /** 40 | *

41 | * A namespaced client for the 42 | * /v1/reference-data/locations/hotels/by-geocode endpoints. 43 | *

44 | */ 45 | public ByGeocode byGeocode; 46 | 47 | /** 48 | * Constructor. 49 | * @hide 50 | */ 51 | public Hotels(Amadeus client) { 52 | this.byCity = new ByCity(client); 53 | this.byHotels = new ByHotels(client); 54 | this.byGeocode = new ByGeocode(client); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/PointOfInterest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | 9 | /** 10 | *

11 | * A namespaced client for the 12 | * /v1/reference-data/locations/pois endpoints. 13 | *

14 | * 15 | *

16 | * Access via the Amadeus client object. 17 | *

18 | * 19 | *
20 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
21 |  * amadeus.referenceData.locations.pointOfInterest;
22 | */ 23 | public class PointOfInterest { 24 | private Amadeus client; 25 | private String id; 26 | 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public PointOfInterest(Amadeus client, String id) { 33 | this.client = client; 34 | this.id = id; 35 | } 36 | 37 | /** 38 | *

39 | * Returns a single Point of Interest from a given id. 40 | *

41 | * 42 | *
43 |    * amadeus.referenceData.locations.pointOfInterest("9CB40CB5D0").get();
44 | * 45 | * @param params the parameters to send to the API 46 | * @return an API response object 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public com.amadeus.resources.PointOfInterest get(Params params) throws ResponseException { 50 | String path = String.format("/v1/reference-data/locations/pois/%s", id); 51 | Response response = client.get(path, params); 52 | return (com.amadeus.resources.PointOfInterest) Resource.fromObject( 53 | response, com.amadeus.resources.PointOfInterest.class); 54 | } 55 | 56 | /** 57 | * Convenience method for calling get without any parameters. 58 | * @see PointOfInterest#get() 59 | */ 60 | public com.amadeus.resources.PointOfInterest get() throws ResponseException { 61 | return get(null); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/PointsOfInterest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.referencedata.locations.pointsofinterest.BySquare; 8 | import com.amadeus.resources.PointOfInterest; 9 | import com.amadeus.resources.Resource; 10 | import com.google.gson.Gson; 11 | 12 | /** 13 | *

14 | * A namespaced client for the 15 | * /v1/reference-data/locations/pois endpoints. 16 | *

17 | * 18 | *

19 | * Access via the Amadeus client object. 20 | *

21 | * 22 | *
23 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
24 |  * amadeus.referenceData.locations.pointsOfInterest;
25 | */ 26 | public class PointsOfInterest { 27 | private Amadeus client; 28 | 29 | 30 | /** 31 | *

32 | * A namespaced client for the 33 | * /v1/reference-data/locations/pois/by-square endpoints. 34 | *

35 | */ 36 | public BySquare bySquare; 37 | 38 | /** 39 | * Constructor. 40 | * @hide 41 | */ 42 | public PointsOfInterest(Amadeus client) { 43 | this.client = client; 44 | this.bySquare = new BySquare(client); 45 | } 46 | 47 | 48 | /** 49 | *

50 | * Returns a list of relevant point of interests near to a given point. 51 | *

52 | * 53 | *
54 |    * amadeus.referenceData.locations.pointsOfInterest.get(Params
55 |    *   .with("longitude", 2.160873)
56 |    *   .and("latitude", 41.397158));
57 | * 58 | * @param params the parameters to send to the API 59 | * @return an API response object 60 | * @throws ResponseException when an exception occurs 61 | */ 62 | public PointOfInterest[] get(Params params) throws ResponseException { 63 | Response response = client.get("/v1/reference-data/locations/pois", params); 64 | return (PointOfInterest[]) Resource.fromArray(response, PointOfInterest[].class); 65 | } 66 | 67 | /** 68 | * Convenience method for calling get without any parameters. 69 | * @see PointsOfInterest#get() 70 | */ 71 | public PointOfInterest[] get() throws ResponseException { 72 | return get(null); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/hotels/ByCity.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations.hotels; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Hotel; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/reference-data/locations/hotels/by-city endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.referenceData.locations.hotels.byCity;
23 | */ 24 | public class ByCity { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public ByCity(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of relevant hotels inside a city. 38 | *

39 | * 40 | *
41 |    * amadeus.referenceData.locations.hotels.byCity.get(Params
42 |    *   .with("cityCode", "PAR"));
43 | * 44 | * @param params the parameters to send to the API 45 | * @return an API response object 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public Hotel[] get(Params params) throws ResponseException { 49 | Response response = client.get("/v1/reference-data/locations/hotels/by-city", params); 50 | return (Hotel[]) Resource.fromArray(response, Hotel[].class); 51 | } 52 | 53 | /** 54 | * Convenience method for calling get without any parameters. 55 | * @see ByCity#get() 56 | */ 57 | public Hotel[] get() throws ResponseException { 58 | return get(null); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/hotels/ByGeocode.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations.hotels; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Hotel; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/reference-data/locations/hotels/by-geocode endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.referenceData.locations.hotels.byGeocode;
23 | */ 24 | public class ByGeocode { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public ByGeocode(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of hotels result of the search using geocode. 38 | *

39 | * 40 | *
41 |    * amadeus.referenceData.locations.hotels.byGeocode.get(Params
42 |    *   .with("latitude", "41.397158")
43 |    *   .and("longitude", "2.160873"));
44 | * 45 | * @param params the parameters to send to the API 46 | * @return an API response object 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public Hotel[] get(Params params) throws ResponseException { 50 | Response response = client.get("/v1/reference-data/locations/hotels/by-geocode", params); 51 | return (Hotel[]) Resource.fromArray(response, Hotel[].class); 52 | } 53 | 54 | /** 55 | * Convenience method for calling get without any parameters. 56 | * @see ByGeocode#get() 57 | */ 58 | public Hotel[] get() throws ResponseException { 59 | return get(null); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/hotels/ByHotels.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations.hotels; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Hotel; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/reference-data/locations/hotels/by-hotels endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.referenceData.locations.hotels.byHotels;
23 | */ 24 | public class ByHotels { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public ByHotels(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of hotels result of the search using unique Id. 38 | *

39 | * 40 | *
41 |    * amadeus.referenceData.locations.hotels.byHotels.get(Params
42 |    *   .with("hotelIds", "ACPAR733"));
43 | * 44 | * @param params the parameters to send to the API 45 | * @return an API response object 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public Hotel[] get(Params params) throws ResponseException { 49 | Response response = client.get("/v1/reference-data/locations/hotels/by-hotels", params); 50 | return (Hotel[]) Resource.fromArray(response, Hotel[].class); 51 | } 52 | 53 | /** 54 | * Convenience method for calling get without any parameters. 55 | * @see ByHotels#get() 56 | */ 57 | public Hotel[] get() throws ResponseException { 58 | return get(null); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/locations/pointsOfInterest/BySquare.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations.pointsofinterest; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.PointOfInterest; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/reference-data/locations/pois/by-square endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.referenceData.locations.pointsOfInterest.bySquare;
23 | */ 24 | public class BySquare { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public BySquare(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of relevant point of interests within a square defined by 38 | * cardinal points. 39 | *

40 | * 41 | *
42 |    * amadeus.referenceData.locations.pointsOfInterest.bySquare.get(Params
43 |    *   .with("north", 41.397158)
44 |    *   .and("west", 2.160873)
45 |    *   .and("south", 41.394582)
46 |    *   .and("east", 2.177181));
47 | * 48 | * @param params the parameters to send to the API 49 | * @return an API response object 50 | * @throws ResponseException when an exception occurs 51 | */ 52 | public PointOfInterest[] get(Params params) throws ResponseException { 53 | Response response = client.get("/v1/reference-data/locations/pois/by-square", params); 54 | return (PointOfInterest[]) Resource.fromArray(response, PointOfInterest[].class); 55 | } 56 | 57 | /** 58 | * Convenience method for calling get without any parameters. 59 | * @see PointsOfInterest#get() 60 | */ 61 | public PointOfInterest[] get() throws ResponseException { 62 | return get(null); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/referencedata/urls/CheckinLinks.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.urls; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.CheckinLink; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v2/reference-data/urls/checkin-links endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
23 |  * amadeus.referenceData.urls.checkinLinks;
24 | */ 25 | public class CheckinLinks { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public CheckinLinks(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns the checkin links for an airline, for the 39 | * language of your choice. 40 | *

41 | * 42 | *
43 |    * amadeus.referenceData.urls.checkinLinks.get(Params.with("airlineCode", "BA"));
44 | * 45 | * @param params the parameters to send to the API 46 | * @return an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public CheckinLink[] get(Params params) throws ResponseException { 50 | Response response = client.get("/v2/reference-data/urls/checkin-links", params); 51 | return (CheckinLink[]) Resource.fromArray(response, CheckinLink[].class); 52 | } 53 | 54 | /** 55 | * Convenience method for calling get without any parameters. 56 | * @see CheckinLinks#get() 57 | */ 58 | public CheckinLink[] get() throws ResponseException { 59 | return get(null); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Activity.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An Activity object as returned by the Tours and Activities API. 8 | * @see com.amadeus.shopping.Activity#get() 9 | */ 10 | @ToString 11 | public class Activity extends Resource { 12 | private @Getter String type; 13 | private @Getter String id; 14 | private @Getter String name; 15 | private @Getter String shortDescription; 16 | private @Getter String description; 17 | private @Getter GeoCode geoCode; 18 | private @Getter String rating; 19 | private @Getter String bookingLink; 20 | private @Getter String minimumDuration; 21 | private @Getter ElementaryPrice price; 22 | private @Getter String[] pictures; 23 | 24 | protected Activity() {} 25 | 26 | /** 27 | * An Activity-related object as returned by the Tours and Activities API. 28 | * @see com.amadeus.shopping.Activity#get() 29 | */ 30 | @ToString 31 | public class GeoCode { 32 | private @Getter double latitude; 33 | private @Getter double longitude; 34 | 35 | protected GeoCode() {} 36 | } 37 | 38 | @ToString 39 | public class ElementaryPrice { 40 | private @Getter String amount; 41 | private @Getter String currencyCode; 42 | 43 | protected ElementaryPrice() {} 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/AirTraffic.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | 7 | 8 | /** 9 | * An AirTraffic object as returned by the AirTraffic API. 10 | * @see Traveled#get() 11 | */ 12 | @ToString 13 | public class AirTraffic extends Resource { 14 | private @Getter String type; 15 | private @Getter String subType; 16 | private @Getter String destination; 17 | private @Getter Analytics analytics; 18 | 19 | protected AirTraffic() {} 20 | 21 | /** 22 | * An AirTraffic-related object as returned by the AirTraffic API. 23 | * @see Traveled#get() 24 | */ 25 | @ToString 26 | public class Analytics { 27 | private @Getter Flights flights; 28 | private @Getter Travelers travelers; 29 | 30 | protected Analytics() {} 31 | 32 | /** 33 | * An AirTraffic-related object as returned by the AirTraffic API. 34 | * @see Traveled#get() 35 | */ 36 | @ToString 37 | public class Flights { 38 | private @Getter Double score; 39 | 40 | protected Flights() {} 41 | } 42 | 43 | /** 44 | * An AirTraffic-related object as returned by the AirTraffic API. 45 | * @see Traveled#get() 46 | */ 47 | @ToString 48 | public class Travelers { 49 | private @Getter Double score; 50 | 51 | protected Travelers() {} 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Airline.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An Airline object as returned by the Airline Code LookUp API. 8 | * @see com.amadeus.referenceData.airlines#get() 9 | */ 10 | @ToString 11 | public class Airline extends Resource { 12 | private @Getter String type; 13 | private @Getter String iataCode; 14 | private @Getter String icaoCode; 15 | private @Getter String businessName; 16 | private @Getter String commonName; 17 | 18 | protected Airline() {} 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/CheckinLink.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An CheckinLink object as returned by the CheckinLink API. 8 | * @see com.amadeus.referencedata.urls.CheckinLinks#get() 9 | */ 10 | @ToString 11 | public class CheckinLink extends Resource { 12 | private @Getter String type; 13 | private @Getter String id; 14 | private @Getter String href; 15 | private @Getter String channel; 16 | 17 | protected CheckinLink() {} 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/City.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A City object as returned by the City Search API. 8 | * @see com.amadeus.referencedata.locations.Cities#get() 9 | */ 10 | @ToString 11 | public class City extends Resource { 12 | private @Getter String type; 13 | private @Getter Relationship[] relationships; 14 | private @Getter String subType; 15 | private @Getter String name; 16 | private @Getter String iataCode; 17 | private @Getter Address address; 18 | private @Getter Location.GeoCode geoCode; 19 | 20 | protected City() {} 21 | 22 | @ToString 23 | public class Relationship { 24 | private @Getter String id; 25 | private @Getter String type; 26 | private @Getter String href; 27 | 28 | protected Relationship() {} 29 | } 30 | 31 | @ToString 32 | public class Address { 33 | private @Getter String postalCode; 34 | private @Getter String countryCode; 35 | private @Getter String stateCode; 36 | 37 | protected Address() {} 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Destination.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A Destination object as returned by the Airport Routes API. 8 | * @see com.amadeus.airport.DirectDestinations#get() 9 | * @see com.amadeus.airline.Destinations#get() 10 | */ 11 | 12 | @ToString 13 | public class Destination extends Resource { 14 | private @Getter String type; 15 | private @Getter String subtype; 16 | private @Getter String name; 17 | private @Getter String iataCode; 18 | 19 | protected Destination() {} 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/FlightDate.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import java.util.Date; 4 | import lombok.Getter; 5 | import lombok.ToString; 6 | 7 | /** 8 | * An FlightDate object as returned by the FlightDates API. 9 | * @see com.amadeus.shopping.FlightDates#get() 10 | */ 11 | @ToString 12 | public class FlightDate extends Resource { 13 | private @Getter String type; 14 | private @Getter String origin; 15 | private @Getter String destination; 16 | private @Getter Date departureDate; 17 | private @Getter Date returnDate; 18 | private @Getter Price price; 19 | 20 | protected FlightDate() {} 21 | 22 | /** 23 | * An FlightDate-related object as returned by the FlightDates API. 24 | * @see com.amadeus.shopping.FlightDates#get() 25 | */ 26 | @ToString 27 | public class Price { 28 | private @Getter double total; 29 | 30 | protected Price() {} 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/FlightDestination.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import java.util.Date; 4 | import lombok.Getter; 5 | import lombok.ToString; 6 | 7 | /** 8 | * An FlightDestination object as returned by the FlightDestinations API. 9 | * @see com.amadeus.shopping.FlightDestinations#get() 10 | */ 11 | @ToString 12 | public class FlightDestination extends Resource { 13 | private @Getter String type; 14 | private @Getter String origin; 15 | private @Getter String destination; 16 | private @Getter Date departureDate; 17 | private @Getter Date returnDate; 18 | private @Getter Price price; 19 | 20 | protected FlightDestination() {} 21 | 22 | /** 23 | * An FlightDestination-related object as returned by the FlightDestinations API. 24 | * @see com.amadeus.shopping.FlightDestinations#get() 25 | */ 26 | @ToString 27 | public class Price { 28 | private @Getter double total; 29 | 30 | protected Price() {} 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/FlightPayment.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An FlightPayment object as returned by the Flight Offers Price API. 8 | * @see amadeus.shopping.flightOffersSearch.pricing#post() 9 | */ 10 | @ToString 11 | public class FlightPayment extends Resource { 12 | private @Getter String brand; 13 | private @Getter Integer binNumber; 14 | private @Getter String[] flightOfferIds; 15 | 16 | protected FlightPayment() {} 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/FlightPrice.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | @ToString 7 | public class FlightPrice extends Resource { 8 | private @Getter String type; 9 | private @Getter FlightOfferSearch[] flightOffers; 10 | private @Getter BookingRequirements bookingRequirements; 11 | 12 | protected FlightPrice() {} 13 | 14 | @ToString 15 | public class BookingRequirements { 16 | 17 | private @Getter Boolean invoiceAddressRequired; 18 | private @Getter Boolean mailingAddressRequired; 19 | private @Getter Boolean emailAddressRequired; 20 | private @Getter Boolean phoneCountryCodeRequired; 21 | private @Getter Boolean mobilePhoneNumberRequired; 22 | private @Getter Boolean phoneNumberRequired; 23 | private @Getter Boolean postalCodeRequired; 24 | private @Getter PassengerConditions[] travelerRequirements; 25 | 26 | protected BookingRequirements() {} 27 | } 28 | 29 | @ToString 30 | public class PassengerConditions { 31 | private @Getter String travelerId; 32 | private @Getter Boolean genderRequired; 33 | private @Getter Boolean documentRequired; 34 | private @Getter Boolean documentIssuanceCityRequired; 35 | private @Getter Boolean dateOfBirthRequired; 36 | private @Getter Boolean redressRequiredIfAny; 37 | private @Getter Boolean airFranceDiscountRequired; 38 | private @Getter Boolean spanishResidentDiscountRequired; 39 | private @Getter Boolean residenceRequired; 40 | 41 | protected PassengerConditions(){} 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Hotel.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A Hotel object as returned by the Hotel List API. 8 | * @see com.amadeus.referencedata.locations.hotels.ByHotels#get() 9 | * @see com.amadeus.referencedata.locations.hotels.ByCity#get() 10 | * @see com.amadeus.referencedata.locations.hotels.ByGeocode#get() 11 | */ 12 | @ToString 13 | public class Hotel extends Resource { 14 | private @Getter String subtype; 15 | private @Getter String name; 16 | private @Getter String timeZoneName; 17 | private @Getter String iataCode; 18 | private @Getter Address address; 19 | private @Getter GeoCode geoCode; 20 | private @Getter String googlePlaceId; 21 | private @Getter String openjetAirportId; 22 | private @Getter String uicCode; 23 | private @Getter String hotelId; 24 | private @Getter String chainCode; 25 | private @Getter Distance distance; 26 | private @Getter String lastUpdate; 27 | 28 | protected Hotel() {} 29 | 30 | @ToString 31 | public class Address { 32 | private @Getter String category; 33 | private @Getter String[] lines; 34 | private @Getter String postalCode; 35 | private @Getter String countryCode; 36 | private @Getter String cityName; 37 | private @Getter String stateCode; 38 | private @Getter String postalBox; 39 | private @Getter String text; 40 | private @Getter String state; 41 | 42 | protected Address() {} 43 | } 44 | 45 | @ToString 46 | public class GeoCode { 47 | private @Getter float latitude; 48 | private @Getter float longitude; 49 | 50 | protected GeoCode() {} 51 | } 52 | 53 | @ToString 54 | public class Distance { 55 | private @Getter String unit; 56 | private @Getter double value; 57 | private @Getter String displayValue; 58 | private @Getter String isUnlimited; 59 | 60 | protected Distance() {} 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/HotelBooking.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An HotelBooking object as returned by the Hotel Booking API. 8 | * @see com.amadeus.booking.HotelBookings#get() 9 | */ 10 | @ToString 11 | public class HotelBooking extends Resource { 12 | private @Getter String type; 13 | private @Getter String id; 14 | private @Getter String providerConfirmationId; 15 | private @Getter AssociatedRecord[] associatedRecords; 16 | 17 | protected HotelBooking() {} 18 | 19 | @ToString 20 | public class AssociatedRecord { 21 | private @Getter String reference; 22 | private @Getter String originSystemCode; 23 | 24 | protected AssociatedRecord() {} 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/HotelOrder.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import com.amadeus.resources.HotelOfferSearch.Offer; 4 | import lombok.Getter; 5 | import lombok.ToString; 6 | 7 | /** 8 | * An HotelOrder object as returned by the Hotel Booking v2 API. 9 | * @see com.amadeus.booking.HotelOrders#get() 10 | */ 11 | @ToString 12 | public class HotelOrder extends Resource { 13 | private @Getter String self; 14 | private @Getter String type; 15 | private @Getter String id; 16 | private @Getter HotelBooking[] hotelBookings; 17 | private @Getter AssociatedRecord[] associatedRecords; 18 | private @Getter Guest[] guests; 19 | 20 | protected HotelOrder() {} 21 | 22 | @ToString 23 | public static class HotelBooking { 24 | private @Getter String type; 25 | private @Getter String id; 26 | private @Getter String bookingStatus; 27 | private @Getter RoomAssociation[] roomAssociations; 28 | private @Getter Offer hotelOffer; 29 | private @Getter Hotel hotel; 30 | 31 | protected HotelBooking() {} 32 | } 33 | 34 | @ToString 35 | public static class RoomAssociation { 36 | private @Getter String hotelOfferId; 37 | private GuestReference[] guestReferences; 38 | private @Getter String specialRequest; 39 | 40 | protected RoomAssociation() {} 41 | } 42 | 43 | @ToString 44 | public static class GuestReference { 45 | private @Getter String guestReference; 46 | private @Getter String hotelLoyaltyId; 47 | 48 | protected GuestReference() {} 49 | } 50 | 51 | @ToString 52 | public static class Guest { 53 | private @Getter int tid; 54 | private @Getter int id; 55 | private @Getter FrequentTraveler[] frequentTraveler; 56 | private @Getter String phone; 57 | private @Getter String email; 58 | private @Getter String title; 59 | private @Getter String firstName; 60 | private @Getter String lastName; 61 | private @Getter Integer childAge; 62 | 63 | protected Guest() {} 64 | } 65 | 66 | @ToString 67 | public static class FrequentTraveler { 68 | private @Getter String airlineCode; 69 | private @Getter String frequentTravelerId; 70 | 71 | protected FrequentTraveler() {} 72 | } 73 | 74 | @ToString 75 | public static class AssociatedRecord { 76 | private @Getter String reference; 77 | private @Getter String originSystemCode; 78 | 79 | protected AssociatedRecord() {} 80 | } 81 | 82 | @ToString 83 | public static class Hotel { 84 | private @Getter String hotelId; 85 | private @Getter String chainCode; 86 | private @Getter String name; 87 | private @Getter String self; 88 | 89 | protected Hotel() {} 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/HotelSentiment.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An HotelSentiment object as returned by the Hotel Ratings API. 8 | * @see HotelSentiments#get() 9 | */ 10 | 11 | @ToString 12 | public class HotelSentiment extends Resource { 13 | private @Getter String hotelId; 14 | private @Getter String type; 15 | private @Getter int overallRating; 16 | private @Getter int numberOfReviews; 17 | private @Getter Sentiment sentiments; 18 | 19 | protected HotelSentiment() {} 20 | 21 | @ToString 22 | public class Sentiment { 23 | private @Getter int staff; 24 | private @Getter int location; 25 | private @Getter int service; 26 | private @Getter int roomComforts; 27 | private @Getter int sleepQuality; 28 | private @Getter int swimmingPool; 29 | private @Getter int valueForMoney; 30 | private @Getter int facilities; 31 | private @Getter int catering; 32 | private @Getter int pointsOfInterest; 33 | 34 | protected Sentiment() {} 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/ItineraryPriceMetric.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A ItineraryPriceMetric object as returned by the Flight Price Analysis API. 8 | * @see com.amadeus.analytics.ItineraryPriceMetrics#get() 9 | */ 10 | @ToString 11 | public class ItineraryPriceMetric extends Resource { 12 | private @Getter String type; 13 | private @Getter Location origin; 14 | private @Getter Location destination; 15 | private @Getter String departureDate; 16 | private @Getter String transportType; 17 | private @Getter String currencyCode; 18 | private @Getter Boolean oneWay; 19 | private @Getter PriceMetrics[] priceMetrics; 20 | 21 | protected ItineraryPriceMetric() {} 22 | 23 | @ToString 24 | public class Location { 25 | private @Getter String iataCode; 26 | 27 | protected Location() {} 28 | } 29 | 30 | @ToString 31 | public class PriceMetrics { 32 | private @Getter String amount; 33 | private @Getter String quartileRanking; 34 | 35 | protected PriceMetrics() {} 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Period.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An Period object as returned by the BusiestPeriod API. 8 | * @see Traveled#get() 9 | */ 10 | @ToString 11 | public class Period extends Resource { 12 | private @Getter String type; 13 | private @Getter String period; 14 | private @Getter Analytics analytics; 15 | 16 | protected Period() {} 17 | 18 | /** 19 | * An Period-related object as returned by the Busiest Period API. 20 | * @see Traveled#get() 21 | */ 22 | @ToString 23 | public class Analytics { 24 | private @Getter Travelers travelers; 25 | 26 | protected Analytics() {} 27 | 28 | /** 29 | * An Period-related object as returned by the BusiestPeriod API. 30 | * @see Traveled#get() 31 | */ 32 | @ToString 33 | public class Travelers { 34 | private @Getter Double score; 35 | 36 | protected Travelers() {} 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/PointOfInterest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A PointOfInterest object as returned by the Location API. 8 | * @see com.amadeus.referencedata.locations.PointOfInterest#get() 9 | */ 10 | @ToString 11 | public class PointOfInterest extends Resource { 12 | private @Getter String type; 13 | private @Getter String subType; 14 | private @Getter String name; 15 | private @Getter GeoCode geoCode; 16 | private @Getter String category; 17 | private @Getter String[] tags; 18 | 19 | protected PointOfInterest() {} 20 | 21 | /** 22 | * An PointOfInterest-related object as returned by the PointOfInterest API. 23 | * @see com.amadeus.referencedata.locations.PointOfInterest#get() 24 | */ 25 | @ToString 26 | public class GeoCode { 27 | private @Getter double latitude; 28 | private @Getter double longitude; 29 | 30 | protected GeoCode() {} 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Prediction.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * An Period object as returned by the Prediction APIs. 8 | * 9 | * @see com.amadeus.travel.predictions.TripPurpose#get() 10 | */ 11 | @ToString 12 | public class Prediction extends Resource { 13 | private @Getter String type; 14 | private @Getter String subType; 15 | private @Getter String id; 16 | private @Getter String result; 17 | private @Getter String probability; 18 | 19 | protected Prediction() {} 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/Resource.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import com.amadeus.Response; 4 | import com.google.gson.Gson; 5 | import com.google.gson.GsonBuilder; 6 | import com.google.gson.JsonArray; 7 | import com.google.gson.JsonElement; 8 | import lombok.Getter; 9 | 10 | /** 11 | * A generic resource as returned by all namespaced APIs. 12 | */ 13 | public class Resource { 14 | /** 15 | * The original response that this object is populated from. 16 | */ 17 | private transient @Getter Response response; 18 | /** 19 | * The class used for deserialization. 20 | * @hide as only used internally 21 | */ 22 | private transient @Getter Class deSerializationClass; 23 | 24 | protected Resource() {} 25 | 26 | /** 27 | * Turns a response into a Gson deserialized array of resources, 28 | * attaching the response to each resource. 29 | * @hide as only used internally 30 | */ 31 | public static Resource[] fromArray(Response response, Class klass) { 32 | Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create(); 33 | JsonElement responseData = response.getData(); 34 | if (responseData == null) { 35 | responseData = new JsonArray(0); 36 | } 37 | Resource[] resources = (Resource[]) gson.fromJson(responseData, klass); 38 | for (Resource resource : resources) { 39 | resource.response = response; 40 | resource.deSerializationClass = klass; 41 | } 42 | return resources; 43 | } 44 | 45 | /** 46 | * Turns a response into a Gson deserialized resource, 47 | * attaching the response to the resource. 48 | * @hide as only used internally 49 | */ 50 | public static Resource fromObject(Response response, Class klass) { 51 | Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd").create(); 52 | Resource resource = (Resource) gson.fromJson(response.getData(), klass); 53 | resource.response = response; 54 | resource.deSerializationClass = klass; 55 | return resource; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/ScoredLocation.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | /** 7 | * A ScoreLocation object as returned by the Location Score API. 8 | * @see com.amadeus.location.analytics.CategoryRatedAreas#get() 9 | */ 10 | @ToString 11 | public class ScoredLocation extends Resource { 12 | private @Getter GeoCode geoCode; 13 | private @Getter int radius; 14 | private @Getter CategoryScores categoryScores; 15 | private @Getter String type; 16 | 17 | protected ScoredLocation() {} 18 | 19 | @ToString 20 | public class GeoCode { 21 | private @Getter float latitude; 22 | private @Getter float longitude; 23 | 24 | protected GeoCode() {} 25 | } 26 | 27 | @ToString 28 | public class CategoryScores { 29 | private @Getter Sight sight; 30 | private @Getter Restaurant restaurant; 31 | private @Getter Shopping shopping; 32 | private @Getter NightLife nightLife; 33 | 34 | protected CategoryScores() {} 35 | 36 | @ToString 37 | public class Sight { 38 | private @Getter int overall; 39 | private @Getter int historical; 40 | private @Getter int beachAndPark; 41 | 42 | protected Sight() {} 43 | } 44 | 45 | @ToString 46 | public class Restaurant { 47 | private @Getter int overall; 48 | private @Getter int vegetarian; 49 | 50 | protected Restaurant() {} 51 | } 52 | 53 | @ToString 54 | public class Shopping { 55 | private @Getter int overall; 56 | private @Getter int luxury; 57 | 58 | protected Shopping() {} 59 | } 60 | 61 | @ToString 62 | public class NightLife { 63 | private @Getter int overall; 64 | 65 | protected NightLife() {} 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/resources/TransferCancellation.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.resources; 2 | 3 | import lombok.Getter; 4 | import lombok.ToString; 5 | 6 | 7 | /** 8 | * A TransferCancellation object as returned by the Transfer Management API. 9 | * @see com.amadeus.ordering.transferOrders.transfers.transfer.Cancellation#post() 10 | */ 11 | @ToString 12 | public class TransferCancellation extends Resource { 13 | private @Getter String confirmNbr; 14 | private @Getter String reservationStatus; 15 | 16 | protected TransferCancellation() {} 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/schedule/Flights.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.schedule; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.DatedFlight; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v2/schedule/flights endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.schedule.flights;
23 | */ 24 | public class Flights { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public Flights(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Retrieves status of a given flight. 38 | *

39 | * 40 | *
41 |    * amadeus.schedule.flights.get(Params
42 |    *     .with("carrierCode", "AZ")
43 |    *     .and("flightNumber", "319")
44 |    *     .and("scheduledDepartureDate", "2021-03-13"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public DatedFlight[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v2/schedule/flights", params); 52 | return (DatedFlight[]) Resource.fromArray(response, DatedFlight[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see DatedFlight#get() 58 | */ 59 | public DatedFlight[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/Activities.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Activity; 8 | import com.amadeus.resources.Resource; 9 | import com.amadeus.shopping.activities.BySquare; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/shopping/activities endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.shopping.activities;
24 | */ 25 | public class Activities { 26 | private Amadeus client; 27 | 28 | 29 | /** 30 | *

31 | * A namespaced client for the 32 | * /v1/shopping/activities/by-square endpoints. 33 | *

34 | */ 35 | public BySquare bySquare; 36 | 37 | /** 38 | * Constructor. 39 | * @hide 40 | */ 41 | public Activities(Amadeus client) { 42 | this.client = client; 43 | this.bySquare = new BySquare(client); 44 | } 45 | 46 | 47 | /** 48 | *

49 | * Returns a list of activities near to a given point. 50 | *

51 | * 52 | *
53 |    * amadeus.amadeus.shopping.activities.get(Params
54 |    *   .with("longitude", 2.160873)
55 |    *   .and("latitude", 41.397158));
56 | * 57 | * @param params the parameters to send to the API 58 | * @return an API response object 59 | * @throws ResponseException when an exception occurs 60 | */ 61 | public Activity[] get(Params params) throws ResponseException { 62 | Response response = client.get("/v1/shopping/activities", params); 63 | return (Activity[]) Resource.fromArray(response, Activity[].class); 64 | } 65 | 66 | /** 67 | * Convenience method for calling get without any parameters. 68 | * @see Activities#get() 69 | */ 70 | public Activity[] get() throws ResponseException { 71 | return get(null); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/Activity.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | 9 | /** 10 | *

11 | * A namespaced client for the 12 | * /v1/shopping/activities endpoints. 13 | *

14 | * 15 | *

16 | * Access via the Amadeus client object. 17 | *

18 | * 19 | *
20 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
21 |  * amadeus.shopping.activity;
22 | */ 23 | public class Activity { 24 | private Amadeus client; 25 | private String id; 26 | 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public Activity(Amadeus client, String id) { 33 | this.client = client; 34 | this.id = id; 35 | } 36 | 37 | /** 38 | *

39 | * Returns a single activity from a given id. 40 | *

41 | * 42 | *
43 |    * amadeus.shopping.activity.("4615").get();
44 | * 45 | * @param params the parameters to send to the API 46 | * @return an API response object 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public com.amadeus.resources.Activity get(Params params) throws ResponseException { 50 | String path = String.format("/v1/shopping/activities/%s", id); 51 | Response response = client.get(path, params); 52 | return (com.amadeus.resources.Activity) Resource.fromObject( 53 | response, com.amadeus.resources.Activity.class); 54 | } 55 | 56 | /** 57 | * Convenience method for calling get without any parameters. 58 | * @see Activity#get() 59 | */ 60 | public com.amadeus.resources.Activity get() throws ResponseException { 61 | return get(null); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/Availability.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.shopping.availability.FlightAvailabilities; 5 | 6 | /** 7 | *

8 | * A namespaced client for the 9 | * /v1/shopping/availability endpoints. 10 | *

11 | */ 12 | public class Availability { 13 | /** 14 | *

15 | * A namespaced client for the 16 | * /v1/shopping/availability/flight-availabilities endpoints. 17 | *

18 | */ 19 | public FlightAvailabilities flightAvailabilities; 20 | 21 | /** 22 | * Constructor. 23 | * @hide 24 | */ 25 | public Availability(Amadeus client) { 26 | this.flightAvailabilities = new FlightAvailabilities(client); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/FlightDates.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.FlightDate; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/shopping/flight-dates endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.shopping.flightDates;
23 | */ 24 | public class FlightDates { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public FlightDates(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Find the cheapest flight dates from an 38 | * origin to a destination. 39 | *

40 | * 41 | *
42 |    * amadeus.shopping.flightDates.get(Params
43 |    *   .with("origin", "LHR")
44 |    *   .and("destination", "PAR"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public FlightDate[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/shopping/flight-dates", params); 52 | return (FlightDate[]) Resource.fromArray(response, FlightDate[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see FlightDates#get() 58 | */ 59 | public FlightDate[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/FlightDestinations.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.FlightDestination; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/shopping/flight-destinations endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.shopping.flightDestinations;
24 | */ 25 | public class FlightDestinations { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public FlightDestinations(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Find the cheapest destinations where 39 | * you can fly to. 40 | *

41 | * 42 | *
43 |    * amadeus.shopping.flightDestinations.get(Params
44 |    *   .with("origin", "LHR"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public FlightDestination[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/shopping/flight-destinations", params); 52 | return (FlightDestination[]) Resource.fromArray(response, FlightDestination[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see FlightDestinations#get() 58 | */ 59 | public FlightDestination[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/FlightOffers.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.shopping.flightoffers.Prediction; 5 | import com.amadeus.shopping.flightoffers.Upselling; 6 | 7 | /** 8 | *

9 | * A namespaced client for the 10 | * /v1/shopping/flight-offers endpoints. 11 | *

12 | * 13 | *

14 | * Access via the Amadeus client object. 15 | *

16 | * 17 | *
18 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
19 |  * amadeus.shopping.flightOffers;
20 | */ 21 | public class FlightOffers { 22 | public Prediction prediction; 23 | public Upselling upselling; 24 | 25 | /** 26 | * Constructor. 27 | * @hide 28 | */ 29 | public FlightOffers(Amadeus client) { 30 | this.prediction = new Prediction(client); 31 | this.upselling = new Upselling(client); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/HotelOfferSearch.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Resource; 8 | 9 | /** 10 | *

11 | * A namespaced client for the 12 | * /v3/shopping/hotel-offers/:offer_id endpoints. 13 | *

14 | * 15 | *

16 | * Access via the Amadeus client object 17 | *

18 | * 19 | *
20 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
21 |  * amadeus.shopping.HotelOfferSearch(offerId);
22 | * 23 | * @hide 24 | */ 25 | public class HotelOfferSearch { 26 | private Amadeus client; 27 | private String offerId; 28 | 29 | /** 30 | * Constructor. 31 | * @hide 32 | */ 33 | public HotelOfferSearch(Amadeus client, String offerId) { 34 | this.offerId = offerId; 35 | this.client = client; 36 | } 37 | 38 | /** 39 | *

40 | * Returns details for a specific offer. 41 | *

42 | * 43 | *
44 |    * amadeus.shopping.HotelOfferSearch("XXX").get();
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public com.amadeus.resources.HotelOfferSearch get(Params params) throws ResponseException { 51 | String path = String.format("/v3/shopping/hotel-offers/%s", offerId); 52 | Response response = client.get(path, params); 53 | return (com.amadeus.resources.HotelOfferSearch) Resource.fromObject( 54 | response, com.amadeus.resources.HotelOfferSearch.class); 55 | } 56 | 57 | /** 58 | * Convenience method for calling get without any parameters. 59 | * @see HotelOffer#get() 60 | */ 61 | public com.amadeus.resources.HotelOfferSearch get() throws ResponseException { 62 | return get(null); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/HotelOffersSearch.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.HotelOfferSearch; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v3/shopping/hotel-offers endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.shopping.hotelOffersSearch;
23 | */ 24 | public class HotelOffersSearch { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public HotelOffersSearch(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Search for hotels and retrieve availability and rates information. 38 | *

39 | * 40 | *
41 |    * amadeus.shopping.hotelOffers.get(Params
42 |    *   .with("hotelIds", "MCLONGHM")
43 |    *   .and("adults", 1)
44 |    *   .and("checkInDate", "2022-11-22")
45 |    *   .and("roomQuantity", 1)
46 |    *   .and("paymentPolicy", "NONE")
47 |    *   .and("bestRateOnly", true)); 
48 | * 49 | * @param params the parameters to send to the API 50 | * @return an API response object 51 | * @throws ResponseException when an exception occurs 52 | */ 53 | public HotelOfferSearch[] get(Params params) throws ResponseException { 54 | Response response = client.get("/v3/shopping/hotel-offers", params); 55 | return (HotelOfferSearch[]) Resource.fromArray(response, HotelOfferSearch[].class); 56 | } 57 | 58 | /** 59 | * Convenience method for calling get without any parameters. 60 | * @see HotelOffersSearch#get() 61 | */ 62 | public HotelOfferSearch[] get() throws ResponseException { 63 | return get(null); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/TransferOffers.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Response; 5 | import com.amadeus.exceptions.ResponseException; 6 | import com.amadeus.resources.Resource; 7 | import com.amadeus.resources.TransferOffersPost; 8 | import com.google.gson.JsonObject; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/shopping/transfer-offers endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
22 |  * amadeus.shopping.transferOffers;
23 | */ 24 | public class TransferOffers { 25 | private Amadeus client; 26 | private static final String TRANSFER_OFFERS_URL = "/v1/shopping/transfer-offers"; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @hide 32 | */ 33 | public TransferOffers(Amadeus client) { 34 | this.client = client; 35 | } 36 | 37 | /** 38 | *

39 | * The Amadeus Transfer Offers API allows travelers to search and bookig private transfers. 40 | *

41 | * 42 | *
43 |    * amadeus.shopping.transferOffers.post(body);
44 | * 45 | * @param body the parameters to send to the API as a JsonObject 46 | * @return an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public TransferOffersPost[] post(JsonObject body) throws ResponseException { 50 | Response response = client.post(TRANSFER_OFFERS_URL, body); 51 | return 52 | (TransferOffersPost[]) Resource.fromArray(response, TransferOffersPost[].class); 53 | } 54 | 55 | /** 56 | *

57 | * The Amadeus Transfer Offers API allows travelers to search and bookig private transfers. 58 | *

59 | * 60 | *
61 |    * amadeus.shopping.transferOffers.post(body);
62 | * 63 | * @param body the parameters to send to the API as a String 64 | * @return an API resource 65 | * @throws ResponseException when an exception occurs 66 | */ 67 | public TransferOffersPost[] post(String body) throws ResponseException { 68 | Response response = client.post(TRANSFER_OFFERS_URL, body); 69 | return 70 | (TransferOffersPost[]) Resource.fromArray(response, TransferOffersPost[].class); 71 | } 72 | 73 | /** 74 | * Convenience method for calling post without any parameters. 75 | * 76 | * @see TransferOffersPost#post() 77 | */ 78 | public TransferOffersPost[] post() throws ResponseException { 79 | return post((String) null); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/activities/BySquare.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping.activities; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Activity; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/shopping/activities/by-square endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.shopping.activities.bySquare;
23 | */ 24 | public class BySquare { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public BySquare(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Returns a list of activities within a square defined by 38 | * cardinal points. 39 | *

40 | * 41 | *
42 |    * amadeus.shopping.activities.bySquare.get(Params
43 |    *   .with("north", 41.397158)
44 |    *   .and("west", 2.160873)
45 |    *   .and("south", 41.394582)
46 |    *   .and("east", 2.177181));
47 | * 48 | * @param params the parameters to send to the API 49 | * @return an API response object 50 | * @throws ResponseException when an exception occurs 51 | */ 52 | public Activity[] get(Params params) throws ResponseException { 53 | Response response = client.get("/v1/shopping/activities/by-square", params); 54 | return (Activity[]) Resource.fromArray(response, Activity[].class); 55 | } 56 | 57 | /** 58 | * Convenience method for calling get without any parameters. 59 | * @see Activities#get() 60 | */ 61 | public Activity[] get() throws ResponseException { 62 | return get(null); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/shopping/flightOffers/Upselling.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping.flightoffers; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Response; 5 | import com.amadeus.exceptions.ResponseException; 6 | import com.amadeus.resources.FlightOfferSearch; 7 | import com.amadeus.resources.Resource; 8 | import com.google.gson.JsonObject; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/shopping/flight-offers/upselling endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder(API_KEY, API_SECRET).build();
22 |  * amadeus.shopping.availability.flightOffers.upselling;
23 | */ 24 | public class Upselling { 25 | 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @hide 32 | */ 33 | public Upselling(Amadeus client) { 34 | this.client = client; 35 | } 36 | 37 | /** 38 | *

39 | * Branded Fares Upsell API is easily integrated into the Amadeus REST/JSON flight booking engine 40 | * and provides branded fare options for flights returned by the Flight Offers Search API. 41 | *

42 | * 43 | *
44 |    * amadeus.shopping.flightOffers.upselling.post(body);
45 | * 46 | * @param body the parameters to send to the API as a JSonObject 47 | * @return an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public FlightOfferSearch[] post(JsonObject body) throws ResponseException { 51 | Response response = client.post("/v1/shopping/flight-offers/upselling", body); 52 | return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class); 53 | } 54 | 55 | /** 56 | *

57 | * Branded Fares Upsell API is easily integrated into the Amadeus REST/JSON flight booking engine 58 | * and provides branded fare options for flights returned by the Flight Offers Search API. 59 | *

60 | * 61 | *
62 |    * amadeus.shopping.flightOffers.upselling.post(body);
63 | * 64 | * @param body the parameters to send to the API as a String 65 | * @return an API resource 66 | * @throws ResponseException when an exception occurs 67 | */ 68 | public FlightOfferSearch[] post(String body) throws ResponseException { 69 | Response response = client.post("/v1/shopping/flight-offers/upselling", body); 70 | return (FlightOfferSearch[]) Resource.fromArray(response, FlightOfferSearch[].class); 71 | } 72 | 73 | /** 74 | * Convenience method for calling post without any parameters. 75 | * 76 | * @see Upselling#post() 77 | */ 78 | public FlightOfferSearch[] post() throws ResponseException { 79 | return post((String) null); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/Predictions.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.travel.predictions.FlightDelay; 5 | import com.amadeus.travel.predictions.TripPurpose; 6 | 7 | /** 8 | *

9 | * A namespaced client for the 10 | * /v1/travel/predictions endpoints. 11 | *

12 | * 13 | *

14 | * Access via the Amadeus client object. 15 | *

16 | * 17 | *
18 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
19 |  * amadeus.travel.predictions;
20 | * 21 | * @hide 22 | */ 23 | public class Predictions { 24 | /** 25 | *

26 | * A namespaced client for the 27 | * /v1/travel/predictions/trip-purpose endpoints. 28 | *

29 | */ 30 | public TripPurpose tripPurpose; 31 | 32 | /** A namespaced client for the 33 | * /v1/travel/predictions/flight-delay endpoints. 34 | *

35 | */ 36 | public FlightDelay flightDelay; 37 | 38 | /** 39 | * Constructor. 40 | * 41 | * @hide 42 | */ 43 | public Predictions(Amadeus client) { 44 | this.tripPurpose = new TripPurpose(client); 45 | this.flightDelay = new FlightDelay(client); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/analytics/AirTraffic.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.analytics; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.travel.analytics.airtraffic.Booked; 5 | import com.amadeus.travel.analytics.airtraffic.BusiestPeriod; 6 | import com.amadeus.travel.analytics.airtraffic.Traveled; 7 | 8 | /** 9 | *

10 | * A namespaced client for the 11 | * /v1/travel/analytics/air-traffic endpoints. 12 | *

13 | * 14 | *

15 | * Access via the Amadeus client object. 16 | *

17 | * 18 | *
19 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
20 |  * amadeus.travel.analytics.airTraffic;
21 | * 22 | * @hide 23 | */ 24 | public class AirTraffic { 25 | /** 26 | *

27 | * A namespaced client for the 28 | * /v1/travel/analytics/air-traffic/traveled endpoints. 29 | *

30 | */ 31 | public Traveled traveled; 32 | 33 | /** 34 | *

35 | * A namespaced client for the 36 | * /v1/travel/analytics/air-traffic/booked endpoints. 37 | *

38 | */ 39 | public Booked booked; 40 | 41 | /** 42 | *

43 | * A namespaced client for the 44 | * /v1/travel/analytics/air-traffic/busiest-period endpoints. 45 | *

46 | */ 47 | public BusiestPeriod busiestPeriod; 48 | 49 | /** 50 | * Constructor. 51 | * @hide 52 | */ 53 | public AirTraffic(Amadeus client) { 54 | this.traveled = new Traveled(client); 55 | this.booked = new Booked(client); 56 | this.busiestPeriod = new BusiestPeriod(client); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/analytics/Analytics.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.analytics; 2 | 3 | import com.amadeus.Amadeus; 4 | 5 | /** 6 | *

7 | * A namespaced client for the 8 | * /v1/travel/analytics endpoints. 9 | *

10 | * 11 | *

12 | * Access via the Amadeus client object. 13 | *

14 | * 15 | *
16 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
17 |  * amadeus.travel.analytics;
18 | * 19 | * @hide 20 | */ 21 | public class Analytics { 22 | /** 23 | *

24 | * A namespaced client for the 25 | * /v1/travel/analytics/air-traffics endpoints. 26 | *

27 | */ 28 | public AirTraffic airTraffic; 29 | 30 | 31 | /** 32 | * Constructor. 33 | * @hide 34 | */ 35 | public Analytics(Amadeus client) { 36 | this.airTraffic = new AirTraffic(client); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/analytics/airTraffic/Booked.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.analytics.airtraffic; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.AirTraffic; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/travel/analytics/air-traffic/booked endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.travel.analytics.airTraffis.booked;
24 | */ 25 | public class Booked { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public Booked(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns a list of air traffic reports. 39 | *

40 | * 41 | *
42 |    * amadeus.travel.analytics.airTraffic.booked.get(Params
43 |    *   .with("originCityCode", "LHR")
44 |    *   .and("period", "2017-03"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public AirTraffic[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/travel/analytics/air-traffic/booked", params); 52 | return (AirTraffic[]) Resource.fromArray(response, AirTraffic[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see Booked#get() 58 | */ 59 | public AirTraffic[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/analytics/airTraffic/BusiestPeriod.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.analytics.airtraffic; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Period; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/travel/analytics/air-traffic/busiest-period endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.travel.analytics.airTraffis.busiestPeriod;
23 | */ 24 | public class BusiestPeriod { 25 | private Amadeus client; 26 | public static final String ARRIVING = "ARRIVING"; 27 | public static final String DEPARTING = "DEPARTING"; 28 | 29 | /** 30 | * Constructor. 31 | * @hide 32 | */ 33 | public BusiestPeriod(Amadeus client) { 34 | this.client = client; 35 | } 36 | 37 | /** 38 | *

39 | * Returns a list of busiest periods reports. 40 | *

41 | * 42 | *
43 |    * amadeus.travel.analytics.airTraffic.busiestPeriod.get(Params
44 |    *   .with("cityCode", "PAR")
45 |    *   .and("period", "2017"));
46 | * 47 | * @param params the parameters to send to the API 48 | * @return an API response object 49 | * @throws ResponseException when an exception occurs 50 | */ 51 | public Period[] get(Params params) throws ResponseException { 52 | Response response = client.get("/v1/travel/analytics/air-traffic/busiest-period", params); 53 | return (Period[]) Resource.fromArray(response, Period[].class); 54 | } 55 | 56 | /** 57 | * Convenience method for calling get without any parameters. 58 | * @see Traveled#get() 59 | */ 60 | public Period[] get() throws ResponseException { 61 | return get(null); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/analytics/airTraffic/Traveled.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.analytics.airtraffic; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.AirTraffic; 8 | import com.amadeus.resources.Resource; 9 | import com.google.gson.Gson; 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/travel/analytics/air-traffic/traveled endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.travel.analytics.airTraffis.traveled;
24 | */ 25 | public class Traveled { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * @hide 31 | */ 32 | public Traveled(Amadeus client) { 33 | this.client = client; 34 | } 35 | 36 | /** 37 | *

38 | * Returns a list of air traffic reports. 39 | *

40 | * 41 | *
42 |    * amadeus.travel.analytics.airTraffic.traveled.get(Params
43 |    *   .with("originCityCode", "LHR")
44 |    *   .and("period", "2017-03"));
45 | * 46 | * @param params the parameters to send to the API 47 | * @return an API response object 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public AirTraffic[] get(Params params) throws ResponseException { 51 | Response response = client.get("/v1/travel/analytics/air-traffic/traveled", params); 52 | return (AirTraffic[]) Resource.fromArray(response, AirTraffic[].class); 53 | } 54 | 55 | /** 56 | * Convenience method for calling get without any parameters. 57 | * @see Traveled#get() 58 | */ 59 | public AirTraffic[] get() throws ResponseException { 60 | return get(null); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/predictions/FlightDelay.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.predictions; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Prediction; 8 | import com.amadeus.resources.Resource; 9 | 10 | /** 11 | *

12 | * A namespaced client for the 13 | * /v1/travel/predictions/flight-delay endpoints. 14 | *

15 | * 16 | *

17 | * Access via the Amadeus client object. 18 | *

19 | * 20 | *
21 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
22 |  * amadeus.travel.predictions.flightDelay;
23 | */ 24 | public class FlightDelay { 25 | private Amadeus client; 26 | 27 | /** 28 | * Constructor. 29 | * @hide 30 | */ 31 | public FlightDelay(Amadeus client) { 32 | this.client = client; 33 | } 34 | 35 | /** 36 | *

37 | * Predicts delay of a given flight. 38 | *

39 | * 40 | *
41 |    * Delay[] flightDelay = amadeus.travel.predictions.flightDelay.get(Params
42 |    *     .with("originLocationCode", "NCE")
43 |    *     .and("destinationLocationCode", "IST")
44 |    *     .and("departureDate", "2020-08-01")
45 |    *     .and("departureTime", "18:20:00"))
46 |    *     .and("arrivalDate", "2020-08-01")
47 |    *     .and("arrivalTime", "22:15:00")
48 |    *     .and("aircraftCode", "321"))
49 |    *     .and("carrierCode", "TK")
50 |    *     .and("flightNumber", "1816")
51 |    *     .and("duration", "PT31H10M"));
52 |    * 
53 | * @param params the parameters to send to the API 54 | * @return an API response object 55 | * @throws ResponseException when an exception occurs 56 | */ 57 | public Prediction[] get(Params params) throws ResponseException { 58 | Response response = client.get("/v1/travel/predictions/flight-delay", params); 59 | return (Prediction[]) Resource.fromArray(response, Prediction[].class); 60 | } 61 | 62 | /** 63 | * Convenience method for calling get without any parameters. 64 | * @see FlightDelay#get() 65 | */ 66 | public Prediction[] get() throws ResponseException { 67 | return get(null); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/amadeus/travel/predictions/TripPurpose.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel.predictions; 2 | 3 | import com.amadeus.Amadeus; 4 | import com.amadeus.Params; 5 | import com.amadeus.Response; 6 | import com.amadeus.exceptions.ResponseException; 7 | import com.amadeus.resources.Prediction; 8 | import com.amadeus.resources.Resource; 9 | 10 | 11 | /** 12 | *

13 | * A namespaced client for the 14 | * /v1/travel/predictions/trip-purpose endpoints. 15 | *

16 | * 17 | *

18 | * Access via the Amadeus client object. 19 | *

20 | * 21 | *
22 |  * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
23 |  * amadeus.travel.predictions.tripPurpose;
24 | */ 25 | public class TripPurpose { 26 | private Amadeus client; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @hide 32 | */ 33 | public TripPurpose(Amadeus client) { 34 | this.client = client; 35 | } 36 | 37 | /** 38 | *

39 | * Returns a trip purpose prediction. 40 | *

41 | * 42 | *
43 |    * amadeus.travel.predictions.tripPurpose.get(Params
44 |    *   .with("originLocationCode", "NYC")
45 |    *   .and("destinationLocationCode", "MAD")
46 |    *   .and("departureDate", "2020-08-01")
47 |    *   .and("returnDate", "2020-08-12"));
48 |    *   
49 | * 50 | * @param params the parameters to send to the API 51 | * @return an API response object 52 | * @throws ResponseException when an exception occurs 53 | */ 54 | public Prediction get(Params params) throws ResponseException { 55 | Response response = client.get("/v1/travel/predictions/trip-purpose", params); 56 | return (Prediction) Resource.fromObject(response, Prediction.class); 57 | } 58 | 59 | /** 60 | * Convenience method for calling get without any parameters. 61 | * 62 | * @see TripPurpose#get() 63 | */ 64 | public Prediction get() throws ResponseException { 65 | return get(null); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/AccessTokenTest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.mockito.ArgumentMatchers.any; 5 | import static org.mockito.ArgumentMatchers.anyString; 6 | import static org.mockito.Mockito.isNull; 7 | import static org.mockito.Mockito.mock; 8 | import static org.mockito.Mockito.times; 9 | import static org.mockito.Mockito.verify; 10 | import static org.mockito.Mockito.when; 11 | 12 | import com.amadeus.client.AccessToken; 13 | import com.amadeus.exceptions.ResponseException; 14 | import com.google.gson.JsonObject; 15 | import org.junit.jupiter.api.BeforeEach; 16 | import org.junit.jupiter.api.Test; 17 | 18 | public class AccessTokenTest { 19 | Amadeus client; 20 | Configuration configuration; 21 | Response response; 22 | JsonObject json; 23 | 24 | /** 25 | * Access Token Test. 26 | */ 27 | @BeforeEach public void setupClientAndResponses() throws ResponseException { 28 | client = mock(Amadeus.class); 29 | configuration = new Configuration("client_id", "client_secret"); 30 | when(client.getConfiguration()).thenReturn(configuration); 31 | 32 | response = mock(Response.class); 33 | json = new JsonObject(); 34 | json.addProperty("access_token", "my_token"); 35 | json.addProperty("expires_in", 600); 36 | when(response.getResult()).thenReturn(json); 37 | 38 | when(client.unauthenticatedRequest(HttpVerbs.POST, 39 | "/v1/security/oauth2/token", Params 40 | .with("grant_type", "client_credentials") 41 | .and("client_id", "client_id") 42 | .and("client_secret", "client_secret"), 43 | null, null)).thenReturn(response); 44 | } 45 | 46 | @Test public void testNewToken() throws ResponseException { 47 | assertEquals(new AccessToken(client).getBearerToken(), "Bearer my_token"); 48 | } 49 | 50 | @Test public void testCachedToken() throws ResponseException { 51 | AccessToken accessToken = new AccessToken(client); 52 | accessToken.getBearerToken(); 53 | accessToken.getBearerToken(); 54 | 55 | verify(client, times(1)) 56 | .unauthenticatedRequest(any(HttpVerbs.class), anyString(), 57 | any(Params.class), isNull(), isNull()); 58 | } 59 | 60 | @Test public void testExpiredToken() throws ResponseException { 61 | AccessToken accessToken = new AccessToken(client); 62 | json.addProperty("expires_in", 0); 63 | 64 | accessToken.getBearerToken(); 65 | accessToken.getBearerToken(); 66 | 67 | verify(client, times(2)) 68 | .unauthenticatedRequest(any(HttpVerbs.class), anyString(), 69 | any(Params.class), isNull(), isNull()); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/AmadeusTest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.assertNotNull; 5 | import static org.junit.jupiter.api.Assertions.assertThrows; 6 | import static org.junit.jupiter.api.Assertions.assertTrue; 7 | 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | import org.junit.jupiter.api.Test; 11 | 12 | public class AmadeusTest { 13 | /** 14 | * Amadeus Test. 15 | */ 16 | @Test public void testBuilder() { 17 | Configuration config = Amadeus.builder("id", "secret"); 18 | assertNotNull(config, 19 | "should return a Configuration"); 20 | } 21 | 22 | @Test public void testBuilderWithNullClientId() { 23 | assertThrows(IllegalArgumentException.class, () -> Amadeus.builder(null, "secret").build()); 24 | } 25 | 26 | @Test public void testBuilderWithNullClientSecret() { 27 | assertThrows(IllegalArgumentException.class, () -> Amadeus.builder("client", null).build()); 28 | } 29 | 30 | @Test public void testBuilderWithEnvironment() { 31 | Map environment = new HashMap() { 32 | { 33 | put("AMADEUS_CLIENT_ID", "123"); 34 | put("AMADEUS_CLIENT_SECRET", "234"); 35 | put("AMADEUS_LOG_LEVEL", "debug"); 36 | put("AMADEUS_PORT", "123"); 37 | put("AMADEUS_HOST", "my.custom.host.com"); 38 | } 39 | }; 40 | Configuration config = Amadeus.builder(environment); 41 | assertNotNull(config, "should return a Configuration"); 42 | 43 | Amadeus amadeus = Amadeus.builder(environment).build(); 44 | assertEquals(amadeus.getConfiguration().getLogLevel(), "debug"); 45 | assertEquals(amadeus.getConfiguration().getPort(), 123); 46 | assertEquals(amadeus.getConfiguration().getHost(), "my.custom.host.com"); 47 | } 48 | 49 | @Test 50 | public void testBuilderWithInvalidEnvironment() { 51 | 52 | // Given 53 | Map environment = new HashMap<>(); //System.getenv(); 54 | environment.put("AMADEUS_CLIENT_ID", "MY_CLIENT_ID"); 55 | environment.put("AMADEUS_CLIENT_SECRET", "MY_CLIENT_SECRET"); 56 | 57 | // When 58 | boolean result = Amadeus.builder(environment).build() instanceof Amadeus; 59 | 60 | // Then 61 | assertTrue(result, "should return a Configuration"); 62 | } 63 | 64 | @Test public void testVersion() { 65 | assertEquals(Amadeus.VERSION, "10.0.0", "should have a version number"); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/ParamsTest.java: -------------------------------------------------------------------------------- 1 | package com.amadeus; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | import static org.junit.jupiter.api.Assertions.assertThrows; 5 | 6 | import java.util.Arrays; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class ParamsTest { 10 | /** 11 | * Params Test. 12 | */ 13 | @Test public void testNullKeyValueWith() { 14 | assertThrows(NullPointerException.class, () -> Params.with(null, "123")); 15 | } 16 | 17 | @Test public void testNullKeyValueAnd() { 18 | assertThrows(NullPointerException.class, () -> Params.with("foo", "123").and(null, "234")); 19 | } 20 | 21 | @Test public void testToQueryString() { 22 | Params params = Params.with("foo", "123").and("bar", "234"); 23 | assertEquals(params.toQueryString(), "bar=234&foo=123"); 24 | } 25 | 26 | @Test public void testToQueryStringWithList() { 27 | Params params = Params.with("foo", Arrays.asList("id1", "id2")); 28 | assertEquals(params.toQueryString(), "foo=id1%2Cid2"); 29 | } 30 | 31 | @Test public void testToQueryStringWithEncodingError() { 32 | Params params = Params.with("foo", "123"); 33 | params.encoding = "foobar"; 34 | assertEquals(params.toQueryString(), ""); 35 | } 36 | 37 | @Test public void testToString() { 38 | Params params = Params.with("foo", "123").and("bar", "234"); 39 | assertEquals(params.toString(), "bar=234&foo=123"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/referenceData/locations/PointOfInterestIT.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.referencedata.locations; 2 | 3 | import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; 4 | import static com.github.tomakehurst.wiremock.client.WireMock.get; 5 | import static com.github.tomakehurst.wiremock.client.WireMock.post; 6 | import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; 7 | import static org.junit.jupiter.api.Assertions.assertNotNull; 8 | 9 | import com.amadeus.Amadeus; 10 | import com.amadeus.exceptions.ResponseException; 11 | import com.amadeus.resources.PointOfInterest; 12 | import com.github.tomakehurst.wiremock.WireMockServer; 13 | 14 | import org.junit.jupiter.api.AfterEach; 15 | import org.junit.jupiter.api.BeforeEach; 16 | import org.junit.jupiter.api.Test; 17 | 18 | //https://developers.amadeus.com/self-service/category/destination-content/api-doc/points-of-interest/api-reference 19 | public class PointOfInterestIT { 20 | WireMockServer wireMockServer; 21 | 22 | private Amadeus amadeus; 23 | 24 | /** 25 | * In every test, we will authenticate. 26 | */ 27 | @BeforeEach 28 | public void setup() { 29 | wireMockServer = new WireMockServer(8080); 30 | wireMockServer.start(); 31 | 32 | // API at https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262 33 | String address = "/v1/security/oauth2/token" 34 | + "?grant_type=client_credentials&client_secret=DEMO&client_id=DEMO"; 35 | wireMockServer.stubFor(post(urlEqualTo(address)) 36 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 37 | .withStatus(200) 38 | .withBodyFile("auth_ok.json"))); 39 | 40 | amadeus = Amadeus 41 | .builder("DEMO", "DEMO") 42 | .setHost("localhost") 43 | .setPort(8080) 44 | .setSsl(false) 45 | .setLogLevel("debug") 46 | .build(); 47 | } 48 | 49 | @AfterEach 50 | public void teardown() { 51 | wireMockServer.stop(); 52 | } 53 | 54 | @Test 55 | public void givenClientWhenCallPointOfInterestByIdThenOK() 56 | throws ResponseException { 57 | 58 | // Given 59 | String id = "9CB40CB5D0"; 60 | 61 | String address = "/v1/reference-data/locations/pois/" + id; 62 | wireMockServer.stubFor(get(urlEqualTo(address)) 63 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 64 | .withStatus(200) 65 | .withBodyFile("poi_by_id_response.json"))); 66 | 67 | // When 68 | PointOfInterest result = amadeus.referenceData.locations.pointOfInterest(id).get(); 69 | 70 | // Then 71 | assertNotNull(result); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/shopping/ActivityIT.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.shopping; 2 | 3 | import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; 4 | import static com.github.tomakehurst.wiremock.client.WireMock.get; 5 | import static com.github.tomakehurst.wiremock.client.WireMock.post; 6 | import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; 7 | import static org.junit.jupiter.api.Assertions.assertNotNull; 8 | 9 | import com.amadeus.Amadeus; 10 | import com.amadeus.exceptions.ResponseException; 11 | import com.amadeus.resources.Activity; 12 | import com.github.tomakehurst.wiremock.WireMockServer; 13 | 14 | import org.junit.jupiter.api.AfterEach; 15 | import org.junit.jupiter.api.BeforeEach; 16 | import org.junit.jupiter.api.Test; 17 | 18 | //https://developers.amadeus.com/self-service/category/destination-content/api-doc/tours-and-activities/api-reference 19 | public class ActivityIT { 20 | 21 | WireMockServer wireMockServer; 22 | 23 | private Amadeus amadeus; 24 | 25 | /** 26 | * In every tests, we will authenticate. 27 | */ 28 | @BeforeEach 29 | public void setup() { 30 | wireMockServer = new WireMockServer(8080); 31 | wireMockServer.start(); 32 | 33 | // API at https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262 34 | String address = "/v1/security/oauth2/token" 35 | + "?grant_type=client_credentials&client_secret=DEMO&client_id=DEMO"; 36 | wireMockServer.stubFor(post(urlEqualTo(address)) 37 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 38 | .withStatus(200) 39 | .withBodyFile("auth_ok.json"))); 40 | 41 | amadeus = Amadeus 42 | .builder("DEMO", "DEMO") 43 | .setHost("localhost") 44 | .setPort(8080) 45 | .setSsl(false) 46 | .setLogLevel("debug") 47 | .build(); 48 | } 49 | 50 | @AfterEach 51 | public void teardown() { 52 | wireMockServer.stop(); 53 | } 54 | 55 | @Test 56 | public void givenClientWhenCallActivitiesByIdWithParamsThenOK() 57 | throws ResponseException { 58 | 59 | // Given 60 | String id = "4615"; 61 | 62 | String address = "/v1/shopping/activities/" + id; 63 | wireMockServer.stubFor(get(urlEqualTo(address)) 64 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 65 | .withStatus(200) 66 | .withBodyFile("activities_response_by_id_ok.json"))); 67 | 68 | // When 69 | Activity result = amadeus.shopping.activity(id).get(); 70 | 71 | // Then 72 | assertNotNull(result); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/test/java/com/amadeus/travel/TripPurposeIT.java: -------------------------------------------------------------------------------- 1 | package com.amadeus.travel; 2 | 3 | import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; 4 | import static com.github.tomakehurst.wiremock.client.WireMock.get; 5 | import static com.github.tomakehurst.wiremock.client.WireMock.post; 6 | import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; 7 | import static org.junit.jupiter.api.Assertions.assertNotNull; 8 | 9 | import com.amadeus.Amadeus; 10 | import com.amadeus.exceptions.ResponseException; 11 | import com.amadeus.resources.Prediction; 12 | import com.github.tomakehurst.wiremock.WireMockServer; 13 | 14 | import org.junit.jupiter.api.AfterEach; 15 | import org.junit.jupiter.api.BeforeEach; 16 | import org.junit.jupiter.api.Test; 17 | 18 | //https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction/api-reference 19 | public class TripPurposeIT { 20 | 21 | WireMockServer wireMockServer; 22 | 23 | private Amadeus amadeus; 24 | 25 | /** 26 | * In every tests, we will authenticate. 27 | */ 28 | @BeforeEach 29 | public void setup() { 30 | wireMockServer = new WireMockServer(8080); 31 | wireMockServer.start(); 32 | 33 | // API at https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262 34 | String address = "/v1/security/oauth2/token" 35 | + "?grant_type=client_credentials&client_secret=DEMO&client_id=DEMO"; 36 | wireMockServer.stubFor(post(urlEqualTo(address)) 37 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 38 | .withStatus(200) 39 | .withBodyFile("auth_ok.json"))); 40 | 41 | amadeus = Amadeus 42 | .builder("DEMO", "DEMO") 43 | .setHost("localhost") 44 | .setPort(8080) 45 | .setSsl(false) 46 | .setLogLevel("debug") 47 | .build(); 48 | } 49 | 50 | @AfterEach 51 | public void teardown() { 52 | wireMockServer.stop(); 53 | } 54 | 55 | @Test 56 | public void givenClientWhenCallPredictionsTripPurposeWithoutParamsThenOK() 57 | throws ResponseException { 58 | 59 | // Given 60 | String address = "/v1/travel/predictions/trip-purpose"; 61 | wireMockServer.stubFor(get(urlEqualTo(address)) 62 | .willReturn(aResponse().withHeader("Content-Type", "application/json") 63 | .withStatus(200) 64 | .withBodyFile("trip_purpose_response_ok.json"))); 65 | 66 | // When 67 | Prediction result = amadeus.travel.predictions.tripPurpose.get(); 68 | 69 | // Then 70 | assertNotNull(result); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /src/test/resources/__files/activities_response_by_id_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "self": "https://test.api.amadeus.com/v1/shopping/activities/4615" 4 | }, 5 | "data": { 6 | "id": "4615", 7 | "type": "activity", 8 | "self": { 9 | "href": "https://test.api.amadeus.com/v1/shopping/activities/4615", 10 | "methods": [ 11 | "GET" 12 | ] 13 | }, 14 | "name": "Skip the Line: Gaudi’s La Pedrera Audio Tour in Barcelona", 15 | "shortDescription": "Explore La Pedrera — otherwise known as Casa Milà — one of Gaudi’s most iconic Barcelona buildings, on this 1.5-hour skip-the-line audio tour. Walk through the entrance reserved for skip-the-line ticket holders, and view the interior of this early 20th-century masterpiece at leisure, as an audio guide chronicles the architect’s vision and building’s construction. View the spiraling chimneys of the Warrior Rooftop and enjoy the best panoramic views of Barcelona; learn about Gaudi’s life at the Gaudi Space in the amazing Whale Attic; see a recreated Gaudi-designed apartment; visit the courtyards, a true spectacle of light, shapes and colours.", 16 | "geoCode": { 17 | "latitude": "41.395037", 18 | "longitude": "2.161683" 19 | }, 20 | "rating": "4.600000", 21 | "pictures": [ 22 | "https://media.tacdn.com/media/attractions-splice-spp-674x446/07/99/57/de.jpg" 23 | ], 24 | "bookingLink": "https://b2c.mla.cloud/c/PeEBOhSM?c=2WxbgL36", 25 | "price": { 26 | "currencyCode": "EUR", 27 | "amount": "22.00" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/resources/__files/activities_response_by_square_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "23642", 5 | "type": "activity", 6 | "self": { 7 | "href": "https://test.api.amadeus.com/v1/shopping/activities/23642", 8 | "methods": [ 9 | "GET" 10 | ] 11 | }, 12 | "name": "Skip-the-line tickets to the Prado Museum", 13 | "shortDescription": "Book your tickets for the Prado Museum in Madrid, discover masterpieces by Velázquez, Goya, Mantegna, Raphael, Tintoretto and access all temporary exhibitions.", 14 | "geoCode": { 15 | "latitude": "40.414000", 16 | "longitude": "-3.691000" 17 | }, 18 | "rating": "4.500000", 19 | "pictures": [ 20 | "https://images.musement.com/cover/0001/07/prado-museum-tickets_header-6456.jpeg?w=500" 21 | ], 22 | "bookingLink": "https://b2c.mla.cloud/c/QCejqyor?c=2WxbgL36", 23 | "price": { 24 | "currencyCode": "EUR", 25 | "amount": "16.00" 26 | } 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/test/resources/__files/airline_routes_response_ok2.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "count": 2, 4 | "links": { 5 | "self": "https://test.api.amadeus.com/v1/airline/destinations?airlineCode=BA&max=2" 6 | } 7 | }, 8 | "data": [ 9 | { 10 | "type": "location", 11 | "subtype": "city", 12 | "name": "ANAPA", 13 | "iataCode": "AAQ" 14 | }, 15 | { 16 | "type": "location", 17 | "subtype": "city", 18 | "name": "ABIDJAN", 19 | "iataCode": "ABJ" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/__files/auth_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "amadeusOAuth2Token", 3 | "username": "archivojab@gmail.com", 4 | "application_name": "Demo App", 5 | "client_id": "Hs0sNkpTXeu0t2Hw2rLITofK8QELG8e9", 6 | "token_type": "Bearer", 7 | "access_token": "z626ZO2ezDzu4Isr5SN9T2LB1rXa", 8 | "expires_in": 1799, 9 | "state": "approved", 10 | "scope": "" 11 | } 12 | -------------------------------------------------------------------------------- /src/test/resources/__files/city_search_response_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "code": 1797, 5 | "title": "DATA NOT FOUND", 6 | "detail": "No Cities available", 7 | "source": { 8 | "parameter": "keyword" 9 | }, 10 | "status": 200 11 | } 12 | ], 13 | "meta": { 14 | "count": 0, 15 | "links": { 16 | "self": "https://test.api.amadeus.com/v1/reference-data/locations/cities?countryCode=AZ&keyword=SANC&max=1000" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/__files/flightPayment_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "brand": "brand 1", 3 | "binNumber": 1010101, 4 | "flightOfferIds": [ 5 | "demo 1", 6 | "demo 2", 7 | "demo 3" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/test/resources/__files/flight_search_availability_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "originDestinations": [ 3 | { 4 | "id": "1", 5 | "originLocationCode": "MIA", 6 | "destinationLocationCode": "ATL", 7 | "departureDateTime": { 8 | "date": "2021-11-01" 9 | } 10 | } 11 | ], 12 | "travelers": [ 13 | { 14 | "id": "1", 15 | "travelerType": "ADULT" 16 | } 17 | ], 18 | "sources": [ 19 | "GDS" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/test/resources/__files/flight_search_offer_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencyCode": "USD", 3 | "originDestinations": [ 4 | { 5 | "id": "1", 6 | "originLocationCode": "RIO", 7 | "destinationLocationCode": "MAD", 8 | "departureDateTimeRange": { 9 | "date": "2021-11-01", 10 | "time": "10:00:00" 11 | } 12 | }, 13 | { 14 | "id": "2", 15 | "originLocationCode": "MAD", 16 | "destinationLocationCode": "RIO", 17 | "departureDateTimeRange": { 18 | "date": "2021-11-05", 19 | "time": "17:00:00" 20 | } 21 | } 22 | ], 23 | "travelers": [ 24 | { 25 | "id": "1", 26 | "travelerType": "ADULT" 27 | }, 28 | { 29 | "id": "2", 30 | "travelerType": "CHILD" 31 | } 32 | ], 33 | "sources": [ 34 | "GDS" 35 | ], 36 | "searchCriteria": { 37 | "maxFlightOffers": 2, 38 | "flightFilters": { 39 | "cabinRestrictions": [ 40 | { 41 | "cabin": "BUSINESS", 42 | "coverage": "MOST_SEGMENTS", 43 | "originDestinationIds": [ 44 | "1" 45 | ] 46 | } 47 | ], 48 | "carrierRestrictions": { 49 | "excludedCarrierCodes": [ 50 | "AA", 51 | "TP", 52 | "AZ" 53 | ] 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/test/resources/__files/hotel_offer_search_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "type": "hotel-offers", 4 | "hotel": { 5 | "type": "hotel", 6 | "hotelId": "MCLONGHM", 7 | "chainCode": "MC", 8 | "name": "JW MARRIOTT GROSVENOR HOUSE", 9 | "cityCode": "LON", 10 | "address": { 11 | "countryCode": "GB" 12 | }, 13 | "amenities": [ 14 | "CRIBS_AVAILABLE" 15 | ] 16 | }, 17 | "available": true, 18 | "offers": [ 19 | { 20 | "id": "QF3MNOBDQ8", 21 | "checkInDate": "2022-11-22", 22 | "checkOutDate": "2022-11-23", 23 | "rateCode": "RAC", 24 | "rateFamilyEstimated": { 25 | "code": "PRO", 26 | "type": "P" 27 | }, 28 | "description": { 29 | "text": "Deluxe Queen Room, 1 Queen(s), 20sqm/215sqft-29 sqm/312sqft, Wireless internet, for a fee, Wire d internet, for a fee, Coffee/tea maker, 49in/1 A credit card is required for payment to guarantee the Prepay Non-refundable Non-changeable rate. Prepay rates will be charged the full cost of the reservation within 24 hours of making the reservation. If payment is unsuccessful within 48 hours of making the reservation, the hotel reserves the right to cancel the reservation. Date changes to the reservation are not allowed. Cancellation will result in forfeiture of the prepayment. The credit card used at the time of making the reservation must be valid for the entire stay.", 30 | "lang": "EN" 31 | }, 32 | "room": { 33 | "type": "AP7", 34 | "typeEstimated": { 35 | "beds": 1, 36 | "bedType": "DOUBLE" 37 | }, 38 | "description": { 39 | "text": "Prepay Non-refundable Non-changeable, prepay in full", 40 | "lang": "EN" 41 | } 42 | }, 43 | "guests": { 44 | "adults": 1 45 | }, 46 | "price": { 47 | "currency": "GBP", 48 | "base": "352.00", 49 | "total": "352.00", 50 | "variations": { 51 | "changes": [ 52 | { 53 | "startDate": "2022-11-22", 54 | "endDate": "2022-11-23", 55 | "base": "352.00" 56 | } 57 | ] 58 | } 59 | }, 60 | "policies": { 61 | "paymentType": "deposit", 62 | "cancellation": { 63 | "description": { 64 | "text": "NON-REFUNDABLE RATE" 65 | }, 66 | "type": "FULL_STAY" 67 | } 68 | } 69 | } 70 | ] 71 | }, 72 | "meta": { 73 | "lang": "EN" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/test/resources/__files/hotel_offers_search_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "type": "hotel-offers", 5 | "hotel": { 6 | "type": "hotel", 7 | "hotelId": "MCLONGHM", 8 | "chainCode": "MC", 9 | "dupeId": "700031300", 10 | "name": "JW Marriott Grosvenor House London", 11 | "cityCode": "LON", 12 | "latitude": 51.50988, 13 | "longitude": -0.15509 14 | }, 15 | "available": true, 16 | "offers": [ 17 | { 18 | "id": "77K4PVDC9E", 19 | "checkInDate": "2022-11-22", 20 | "checkOutDate": "2022-11-23", 21 | "rateCode": "RAC", 22 | "rateFamilyEstimated": { 23 | "code": "PRO", 24 | "type": "P" 25 | }, 26 | "room": { 27 | "type": "AP7", 28 | "typeEstimated": { 29 | "category": "DELUXE_ROOM", 30 | "beds": 1, 31 | "bedType": "DOUBLE" 32 | }, 33 | "description": { 34 | "text": "Prepay Non-refundable Non-changeable, prepay in full\nDeluxe Queen Room, 1 Queen(s),\n20sqm/215sqft-29sqm/312sqft, Wireless", 35 | "lang": "EN" 36 | } 37 | }, 38 | "guests": { 39 | "adults": 1 40 | }, 41 | "price": { 42 | "currency": "GBP", 43 | "base": "352.00", 44 | "total": "352.00", 45 | "variations": { 46 | "average": { 47 | "base": "352.00" 48 | }, 49 | "changes": [ 50 | { 51 | "startDate": "2022-11-22", 52 | "endDate": "2022-11-23", 53 | "total": "352.00" 54 | } 55 | ] 56 | } 57 | }, 58 | "policies": { 59 | "paymentType": "deposit", 60 | "cancellation": { 61 | "description": { 62 | "text": "NON-REFUNDABLE RATE" 63 | }, 64 | "type": "FULL_STAY" 65 | } 66 | }, 67 | "self": "https://test.api.amadeus.com/v3/shopping/hotel-offers/77K4PVDC9E" 68 | } 69 | ], 70 | "self": "https://test.api.amadeus.com/v3/shopping/hotel-offers?hotelIds=MCLONGHM&adults=1&checkInDate=2022-11-22&paymentPolicy=NONE&roomQuantity=1" 71 | } 72 | ] 73 | } 74 | -------------------------------------------------------------------------------- /src/test/resources/__files/hotel_orders_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "type": "hotel-order", 4 | "guests": [ 5 | { 6 | "tid": 1, 7 | "title": "MR", 8 | "firstName": "BOB", 9 | "lastName": "SMITH", 10 | "phone": "+33679278416", 11 | "email": "bob.smith@email.com" 12 | } 13 | ], 14 | "travelAgent": { 15 | "contact": { 16 | "email": "bob.smith@email.com" 17 | } 18 | }, 19 | "roomAssociations": [ 20 | { 21 | "guestReferences": [ 22 | { 23 | "guestReference": "1" 24 | } 25 | ], 26 | "hotelOfferId": "4L8PRJPEN7" 27 | } 28 | ], 29 | "payment": { 30 | "method": "CREDIT_CARD", 31 | "paymentCard": { 32 | "paymentCardInfo": { 33 | "vendorCode": "VI", 34 | "cardNumber": "4151289722471370", 35 | "expiryDate": "2026-08", 36 | "holderName": "BOB SMITH" 37 | } 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/test/resources/__files/hotels_by_hotels_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "chainCode": "AC", 5 | "iataCode": "PAR", 6 | "dupeId": 700060076, 7 | "name": "MAYET", 8 | "hotelId": "ACPARF58", 9 | "geoCode": { 10 | "latitude": 48.84724, 11 | "longitude": 2.31836 12 | }, 13 | "address": { 14 | "countryCode": "FR" 15 | } 16 | } 17 | ], 18 | "meta": { 19 | "count": 1, 20 | "links": { 21 | "self": "http://test.api.amadeus.com/reference-data/locations/hotels/by-hotels?hotelIds=ACPARF58" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/resources/__files/poi_by_id_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "type": "location", 4 | "subType": "POINT_OF_INTEREST", 5 | "id": "9CB40CB5D0", 6 | "self": { 7 | "href": "https://test.api.amadeus.com/v1/reference-data/locations/pois/9CB40CB5D0", 8 | "methods": [ 9 | "GET" 10 | ] 11 | }, 12 | "geoCode": { 13 | "latitude": 41.39165, 14 | "longitude": 2.164772 15 | }, 16 | "name": "Casa Batlló", 17 | "category": "SIGHTS", 18 | "rank": 1, 19 | "tags": [ 20 | "sightseeing", 21 | "sights", 22 | "museum", 23 | "landmark", 24 | "tourguide", 25 | "restaurant", 26 | "attraction", 27 | "activities", 28 | "commercialplace", 29 | "shopping", 30 | "souvenir" 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/test/resources/__files/reference_data_hotel_multiple_hotel_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": 3422865, 5 | "name": "CITADINES BASTILLE MARAIS PARI", 6 | "iataCode": "PAR", 7 | "subType": "HOTEL_GDS", 8 | "relevance": 70, 9 | "type": "location", 10 | "hotelIds": [ 11 | "AZPAROBA" 12 | ], 13 | "address": { 14 | "cityName": "PARIS", 15 | "countryCode": "FR" 16 | }, 17 | "geoCode": { 18 | "latitude": 48.8581, 19 | "longitude": 2.37113 20 | } 21 | }, 22 | { 23 | "id": 3408848, 24 | "name": "CONCORDE OPERA PARIS OPERA PARIS", 25 | "iataCode": "MIA", 26 | "subType": "HOTEL_GDS", 27 | "relevance": 40, 28 | "type": "location", 29 | "hotelIds": [ 30 | "EAMIACCT" 31 | ], 32 | "address": { 33 | "cityName": "PARIS", 34 | "countryCode": "FR" 35 | }, 36 | "geoCode": { 37 | "latitude": 48.85721, 38 | "longitude": 2.34144 39 | } 40 | }, 41 | { 42 | "id": 3544748, 43 | "name": "CONCORDE OPERA PARIS OPERA PARIS", 44 | "iataCode": "JEG", 45 | "subType": "HOTEL_GDS", 46 | "relevance": 40, 47 | "type": "location", 48 | "hotelIds": [ 49 | "ZZJEG119" 50 | ], 51 | "address": { 52 | "cityName": "PARIS", 53 | "countryCode": "FR" 54 | }, 55 | "geoCode": { 56 | "latitude": 48.8569, 57 | "longitude": 2.35085 58 | } 59 | }, 60 | { 61 | "id": 3451863, 62 | "name": "IBIS PARIS CDG PARIS NORD 2", 63 | "iataCode": "CDG", 64 | "subType": "HOTEL_GDS", 65 | "relevance": 40, 66 | "type": "location", 67 | "hotelIds": [ 68 | "RTCDGPND" 69 | ], 70 | "address": { 71 | "cityName": "ROISSY EN FRANCE", 72 | "countryCode": "FR" 73 | }, 74 | "geoCode": { 75 | "latitude": 48.98904, 76 | "longitude": 2.51303 77 | } 78 | }, 79 | { 80 | "id": 3408849, 81 | "name": "CONCORDE OPERA PARIS OPERA PARIS", 82 | "iataCode": "MIA", 83 | "subType": "HOTEL_GDS", 84 | "relevance": 40, 85 | "type": "location", 86 | "hotelIds": [ 87 | "EAMIAMAP" 88 | ], 89 | "address": { 90 | "cityName": "PARIS", 91 | "countryCode": "FR" 92 | }, 93 | "geoCode": { 94 | "latitude": 25.77775, 95 | "longitude": -80.30379 96 | } 97 | } 98 | ] 99 | } 100 | -------------------------------------------------------------------------------- /src/test/resources/__files/reference_data_hotel_single_hotel_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": 3422865, 5 | "name": "CITADINES BASTILLE MARAIS PARI", 6 | "iataCode": "PAR", 7 | "subType": "HOTEL_GDS", 8 | "relevance": 70, 9 | "type": "location", 10 | "hotelIds": [ 11 | "AZPAROBA" 12 | ], 13 | "address": { 14 | "cityName": "PARIS", 15 | "countryCode": "FR" 16 | }, 17 | "geoCode": { 18 | "latitude": 48.8581, 19 | "longitude": 2.37113 20 | } 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /src/test/resources/__files/transfer_offers_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "startLocationCode": "CDG", 3 | "endAddressLine": "Avenue Anatole France, 5", 4 | "endCityName": "Paris", 5 | "endZipCode": "75007", 6 | "endCountryCode": "FR", 7 | "endName": "Souvenirs De La Tour", 8 | "endGooglePlaceId": "ChIJL-DOWeBv5kcRfTbh97PimNc", 9 | "endGeoCode": "48.859466,2.2976965", 10 | "transferType": "PRIVATE", 11 | "startDateTime": "2021-11-10T10:30:00", 12 | "providerCodes": "TXO", 13 | "passengers": 2, 14 | "stopOvers": [ 15 | { 16 | "duration": "PT2H30M", 17 | "sequenceNumber": 1, 18 | "addressLine": "Avenue de la Bourdonnais, 19", 19 | "countryCode": "FR", 20 | "cityName": "Paris", 21 | "zipCode": "75007", 22 | "googlePlaceId": "DOWeBv5kcRfTbh97PimN", 23 | "name": "De La Tours", 24 | "geoCode": "48.859477,2.2976985", 25 | "stateCode": "FR" 26 | } 27 | ], 28 | "startConnectedSegment": { 29 | "transportationType": "FLIGHT", 30 | "transportationNumber": "AF380", 31 | "departure": { 32 | "localDateTime": "2021-11-10T09:00:00", 33 | "iataCode": "NCE" 34 | }, 35 | "arrival": { 36 | "localDateTime": "2021-11-10T10:00:00", 37 | "iataCode": "CDG" 38 | } 39 | }, 40 | "passengerCharacteristics": [ 41 | { 42 | "passengerTypeCode": "ADT", 43 | "age": 20 44 | }, 45 | { 46 | "passengerTypeCode": "CHD", 47 | "age": 10 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /src/test/resources/__files/transfer_orders_management_request_ok.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amadeus4dev/amadeus-java/12d0cef45a73bbe3e42343125bf6545193bb0bc2/src/test/resources/__files/transfer_orders_management_request_ok.json -------------------------------------------------------------------------------- /src/test/resources/__files/transfer_orders_management_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "confirmNbr": "2904892", 4 | "reservationStatus": "CANCELLED" 5 | } 6 | } -------------------------------------------------------------------------------- /src/test/resources/__files/transfer_orders_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "note": "Note to driver", 4 | "passengers": [ 5 | { 6 | "firstName": "John", 7 | "lastName": "Doe", 8 | "title": "MR", 9 | "contacts": { 10 | "phoneNumber": "+33123456789", 11 | "email": "user@email.com" 12 | }, 13 | "billingAddress": { 14 | "line": "Avenue de la Bourdonnais, 19", 15 | "zip": "75007", 16 | "countryCode": "FR", 17 | "cityName": "Paris" 18 | } 19 | } 20 | ], 21 | "agency": { 22 | "contacts": [ 23 | { 24 | "email": { 25 | "address": "abc@test.com" 26 | } 27 | } 28 | ] 29 | }, 30 | "payment": { 31 | "methodOfPayment": "CREDIT_CARD", 32 | "creditCard": { 33 | "number": "4111111111111111", 34 | "holderName": "JOHN DOE", 35 | "vendorCode": "VI", 36 | "expiryDate": "1018", 37 | "cvv": "111" 38 | } 39 | }, 40 | "extraServices": [ 41 | { 42 | "code": "EWT", 43 | "itemId": "EWT0291" 44 | } 45 | ], 46 | "equipment": [ 47 | { 48 | "code": "BBS" 49 | } 50 | ], 51 | "corporation": { 52 | "address": { 53 | "line": "5 Avenue Anatole France", 54 | "zip": "75007", 55 | "countryCode": "FR", 56 | "cityName": "Paris" 57 | }, 58 | "info": { 59 | "AU": "FHOWMD024", 60 | "CE": "280421GH" 61 | } 62 | }, 63 | "startConnectedSegment": { 64 | "transportationType": "FLIGHT", 65 | "transportationNumber": "AF380", 66 | "departure": { 67 | "uicCode": "7400001", 68 | "iataCode": "CDG", 69 | "localDateTime": "2021-03-27T20:03:00" 70 | }, 71 | "arrival": { 72 | "uicCode": "7400001", 73 | "iataCode": "CDG", 74 | "localDateTime": "2021-03-27T20:03:00" 75 | } 76 | }, 77 | "endConnectedSegment": { 78 | "transportationType": "FLIGHT", 79 | "transportationNumber": "AF380", 80 | "departure": { 81 | "uicCode": "7400001", 82 | "iataCode": "CDG", 83 | "localDateTime": "2021-03-27T20:03:00" 84 | }, 85 | "arrival": { 86 | "uicCode": "7400001", 87 | "iataCode": "CDG", 88 | "localDateTime": "2021-03-27T20:03:00" 89 | } 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /src/test/resources/__files/trip_purpose_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "links": { 4 | "self": "https://test.api.amadeus.com/v1/travel/predictions/trip-purpose?originLocationCode=NYC&destinationLocationCode=MAD&departureDate=2020-08-01&returnDate=2020-08-12&searchDate=2020-06-11" 5 | } 6 | }, 7 | "data": { 8 | "id": "NCECDG25012019", 9 | "type": "prediction", 10 | "subtype": "trip-purpose", 11 | "result": "BUSINESS", 12 | "probability" : 0.7891235 13 | } 14 | } 15 | --------------------------------------------------------------------------------