├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── SUPPORT.md └── workflows │ ├── build.yml │ └── publish.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json ├── docs ├── classes │ ├── Amadeus-Airport-DirectDestinations.html │ ├── Amadeus-Airport-Predictions-OnTime.html │ ├── Amadeus-Airport-Predictions.html │ ├── Amadeus-Airport.html │ ├── Amadeus-Amadeus.html │ ├── Amadeus-AmadeusBuilder.html │ ├── Amadeus-Booking-FlightOrders.html │ ├── Amadeus-Booking-HotelBookings.html │ ├── Amadeus-Booking.html │ ├── Amadeus-Client-AccessToken.html │ ├── Amadeus-Client-BasicHTTPClient.html │ ├── Amadeus-Client-HTTPClient.html │ ├── Amadeus-Client-Request.html │ ├── Amadeus-Client-Response.html │ ├── Amadeus-Configuration.html │ ├── Amadeus-Constants.html │ ├── Amadeus-DutyOfCare-Diseases-Covid19AreaReport.html │ ├── Amadeus-DutyOfCare-Diseases.html │ ├── Amadeus-DutyOfCare.html │ ├── Amadeus-EReputation-HotelSentiments.html │ ├── Amadeus-EReputation.html │ ├── Amadeus-Exceptions-AuthenticationException.html │ ├── Amadeus-Exceptions-ClientException.html │ ├── Amadeus-Exceptions-NetworkException.html │ ├── Amadeus-Exceptions-NotFoundException.html │ ├── Amadeus-Exceptions-ResponseException.html │ ├── Amadeus-Exceptions-ServerException.html │ ├── Amadeus-ReferenceData-Airlines.html │ ├── Amadeus-ReferenceData-Location.html │ ├── Amadeus-ReferenceData-Locations-Airports.html │ ├── Amadeus-ReferenceData-Locations-Hotel.html │ ├── Amadeus-ReferenceData-Locations-Hotels-ByCity.html │ ├── Amadeus-ReferenceData-Locations-Hotels-ByGeocode.html │ ├── Amadeus-ReferenceData-Locations-Hotels-ByHotels.html │ ├── Amadeus-ReferenceData-Locations-Hotels.html │ ├── Amadeus-ReferenceData-Locations.html │ ├── Amadeus-ReferenceData-RecommendedLocations.html │ ├── Amadeus-ReferenceData.html │ ├── Amadeus-Resources-Activity.html │ ├── Amadeus-Resources-AircraftEquipment.html │ ├── Amadeus-Resources-Airline.html │ ├── Amadeus-Resources-Area.html │ ├── Amadeus-Resources-AreaAccessRestriction.html │ ├── Amadeus-Resources-AreaPolicy.html │ ├── Amadeus-Resources-AreaRestriction.html │ ├── Amadeus-Resources-AreaVaccinated.html │ ├── Amadeus-Resources-Border.html │ ├── Amadeus-Resources-Co2Emission.html │ ├── Amadeus-Resources-DatedFlight.html │ ├── Amadeus-Resources-DatedFlightLeg.html │ ├── Amadeus-Resources-DatedFlightSegment.html │ ├── Amadeus-Resources-DatedFlightSegmentPartnership.html │ ├── Amadeus-Resources-DatedInformation.html │ ├── Amadeus-Resources-DatedQuarantineRestriction.html │ ├── Amadeus-Resources-DatedTracingApplicationRestriction.html │ ├── Amadeus-Resources-DeclarationDocuments.html │ ├── Amadeus-Resources-DelayPrediction.html │ ├── Amadeus-Resources-Description.html │ ├── Amadeus-Resources-Destination.html │ ├── Amadeus-Resources-DiseaseAreaReport.html │ ├── Amadeus-Resources-DiseaseCase.html │ ├── Amadeus-Resources-DiseaseDataSources.html │ ├── Amadeus-Resources-DiseaseInfection.html │ ├── Amadeus-Resources-DiseaseTestingRestriction.html │ ├── Amadeus-Resources-DiseaseVaccination.html │ ├── Amadeus-Resources-ElementaryPrice.html │ ├── Amadeus-Resources-EntryRestriction.html │ ├── Amadeus-Resources-ExitRestriction.html │ ├── Amadeus-Resources-FareRules.html │ ├── Amadeus-Resources-FlightAdditionalService.html │ ├── Amadeus-Resources-FlightAdditionalServicesRequest.html │ ├── Amadeus-Resources-FlightAllotmentDetails.html │ ├── Amadeus-Resources-FlightAvailability.html │ ├── Amadeus-Resources-FlightAvailabilityClass.html │ ├── Amadeus-Resources-FlightBaggageAllowance.html │ ├── Amadeus-Resources-FlightBookingRequirements.html │ ├── Amadeus-Resources-FlightDate.html │ ├── Amadeus-Resources-FlightDateLinks.html │ ├── Amadeus-Resources-FlightDesignator.html │ ├── Amadeus-Resources-FlightDestination.html │ ├── Amadeus-Resources-FlightDestinationLinks.html │ ├── Amadeus-Resources-FlightEndpoint.html │ ├── Amadeus-Resources-FlightExtendedSegment.html │ ├── Amadeus-Resources-FlightFareDetailsBySegment.html │ ├── Amadeus-Resources-FlightFee.html │ ├── Amadeus-Resources-FlightItineraries.html │ ├── Amadeus-Resources-FlightOffer.html │ ├── Amadeus-Resources-FlightOfferPricingOutput.html │ ├── Amadeus-Resources-FlightOfferTax.html │ ├── Amadeus-Resources-FlightOrder.html │ ├── Amadeus-Resources-FlightOrderAssociatedRecord.html │ ├── Amadeus-Resources-FlightPayment.html │ ├── Amadeus-Resources-FlightPoint.html │ ├── Amadeus-Resources-FlightPointArrival.html │ ├── Amadeus-Resources-FlightPointDeparture.html │ ├── Amadeus-Resources-FlightPointGate.html │ ├── Amadeus-Resources-FlightPointTerminal.html │ ├── Amadeus-Resources-FlightPointTiming.html │ ├── Amadeus-Resources-FlightPointTimingDelay.html │ ├── Amadeus-Resources-FlightPrice.html │ ├── Amadeus-Resources-FlightPricingOptions.html │ ├── Amadeus-Resources-FlightStop.html │ ├── Amadeus-Resources-FlightTourAllotment.html │ ├── Amadeus-Resources-GeoCode.html │ ├── Amadeus-Resources-Hotel.html │ ├── Amadeus-Resources-HotelAddress.html │ ├── Amadeus-Resources-HotelBookingAssociatedRecord.html │ ├── Amadeus-Resources-HotelBookingLight.html │ ├── Amadeus-Resources-HotelContent.html │ ├── Amadeus-Resources-HotelDistance.html │ ├── Amadeus-Resources-HotelNameAutocomplete.html │ ├── Amadeus-Resources-HotelOffer.html │ ├── Amadeus-Resources-HotelOfferAveragePrice.html │ ├── Amadeus-Resources-HotelOfferTax.html │ ├── Amadeus-Resources-HotelOffers.html │ ├── Amadeus-Resources-HotelProductCancellationPolicy.html │ ├── Amadeus-Resources-HotelProductCheckInOutPolicy.html │ ├── Amadeus-Resources-HotelProductCommission.html │ ├── Amadeus-Resources-HotelProductDepositPolicy.html │ ├── Amadeus-Resources-HotelProductEstimatedRoomType.html │ ├── Amadeus-Resources-HotelProductGuaranteePolicy.html │ ├── Amadeus-Resources-HotelProductGuests.html │ ├── Amadeus-Resources-HotelProductHoldPolicy.html │ ├── Amadeus-Resources-HotelProductHotelPrice.html │ ├── Amadeus-Resources-HotelProductPaymentPolicy.html │ ├── Amadeus-Resources-HotelProductPolicyDetails.html │ ├── Amadeus-Resources-HotelProductPriceVariation.html │ ├── Amadeus-Resources-HotelProductPriceVariations.html │ ├── Amadeus-Resources-HotelProductRateFamily.html │ ├── Amadeus-Resources-HotelProductRoomDetails.html │ ├── Amadeus-Resources-HotelSentiment.html │ ├── Amadeus-Resources-HotelSentimentDetails.html │ ├── Amadeus-Resources-Link.html │ ├── Amadeus-Resources-Links.html │ ├── Amadeus-Resources-Location.html │ ├── Amadeus-Resources-LocationAddress.html │ ├── Amadeus-Resources-LocationAnalytics.html │ ├── Amadeus-Resources-LocationAnalyticsTravelers.html │ ├── Amadeus-Resources-LocationDistance.html │ ├── Amadeus-Resources-Markup.html │ ├── Amadeus-Resources-MaskRestriction.html │ ├── Amadeus-Resources-OnTimePrediction.html │ ├── Amadeus-Resources-OperatingFlight.html │ ├── Amadeus-Resources-PassengerConditions.html │ ├── Amadeus-Resources-QualifiedFreeText.html │ ├── Amadeus-Resources-Resource.html │ ├── Amadeus-Resources-ResourceInterface.html │ ├── Amadeus-Resources-TermAndCondition.html │ ├── Amadeus-Resources-Transportation.html │ ├── Amadeus-Resources-TravelerAddress.html │ ├── Amadeus-Resources-TravelerContact.html │ ├── Amadeus-Resources-TravelerDocuments.html │ ├── Amadeus-Resources-TravelerElement.html │ ├── Amadeus-Resources-TravelerName.html │ ├── Amadeus-Resources-TravelerPhone.html │ ├── Amadeus-Resources-TravelerPricing.html │ ├── Amadeus-Resources-ValidityPeriod.html │ ├── Amadeus-Schedule-Flights.html │ ├── Amadeus-Schedule.html │ ├── Amadeus-Shopping-Activities-BySquare.html │ ├── Amadeus-Shopping-Activities.html │ ├── Amadeus-Shopping-Activity.html │ ├── Amadeus-Shopping-Availability-FlightAvailabilities.html │ ├── Amadeus-Shopping-Availability.html │ ├── Amadeus-Shopping-FlightDates.html │ ├── Amadeus-Shopping-FlightDestinations.html │ ├── Amadeus-Shopping-FlightOffers-Prediction.html │ ├── Amadeus-Shopping-FlightOffers-Pricing.html │ ├── Amadeus-Shopping-FlightOffers.html │ ├── Amadeus-Shopping-HotelOffer.html │ ├── Amadeus-Shopping-HotelOffers.html │ ├── Amadeus-Shopping.html │ ├── Amadeus-Travel-Predictions-FlightDelay.html │ ├── Amadeus-Travel-Predictions.html │ └── Amadeus-Travel.html ├── css │ ├── base.css │ ├── normalize.css │ └── template.css ├── files │ ├── src-airport-directdestinations.html │ ├── src-airport-predictions-ontime.html │ ├── src-airport-predictions.html │ ├── src-airport.html │ ├── src-amadeus.html │ ├── src-amadeusbuilder.html │ ├── src-booking-flightorders.html │ ├── src-booking-hotelbookings.html │ ├── src-booking.html │ ├── src-client-accesstoken.html │ ├── src-client-basichttpclient.html │ ├── src-client-httpclient.html │ ├── src-client-request.html │ ├── src-client-response.html │ ├── src-configuration.html │ ├── src-constants.html │ ├── src-dutyofcare-diseases-covid19areareport.html │ ├── src-dutyofcare-diseases.html │ ├── src-dutyofcare.html │ ├── src-ereputation-hotelsentiments.html │ ├── src-ereputation.html │ ├── src-exceptions-authenticationexception.html │ ├── src-exceptions-clientexception.html │ ├── src-exceptions-networkexception.html │ ├── src-exceptions-notfoundexception.html │ ├── src-exceptions-responseexception.html │ ├── src-exceptions-serverexception.html │ ├── src-referencedata-airlines.html │ ├── src-referencedata-location.html │ ├── src-referencedata-locations-airports.html │ ├── src-referencedata-locations-hotel.html │ ├── src-referencedata-locations-hotels-bycity.html │ ├── src-referencedata-locations-hotels-bygeocode.html │ ├── src-referencedata-locations-hotels-byhotels.html │ ├── src-referencedata-locations-hotels.html │ ├── src-referencedata-locations.html │ ├── src-referencedata-recommendedlocations.html │ ├── src-referencedata.html │ ├── src-resources-activity.html │ ├── src-resources-aircraftequipment.html │ ├── src-resources-airline.html │ ├── src-resources-area.html │ ├── src-resources-areaaccessrestriction.html │ ├── src-resources-areapolicy.html │ ├── src-resources-arearestriction.html │ ├── src-resources-areavaccinated.html │ ├── src-resources-border.html │ ├── src-resources-co2emission.html │ ├── src-resources-datedflight.html │ ├── src-resources-datedflightleg.html │ ├── src-resources-datedflightsegment.html │ ├── src-resources-datedflightsegmentpartnership.html │ ├── src-resources-datedinformation.html │ ├── src-resources-datedquarantinerestriction.html │ ├── src-resources-datedtracingapplicationrestriction.html │ ├── src-resources-declarationdocuments.html │ ├── src-resources-delayprediction.html │ ├── src-resources-description.html │ ├── src-resources-destination.html │ ├── src-resources-diseaseareareport.html │ ├── src-resources-diseasecase.html │ ├── src-resources-diseasedatasources.html │ ├── src-resources-diseaseinfection.html │ ├── src-resources-diseasetestingrestriction.html │ ├── src-resources-diseasevaccination.html │ ├── src-resources-elementaryprice.html │ ├── src-resources-entryrestriction.html │ ├── src-resources-exitrestriction.html │ ├── src-resources-farerules.html │ ├── src-resources-flightadditionalservice.html │ ├── src-resources-flightadditionalservicesrequest.html │ ├── src-resources-flightallotmentdetails.html │ ├── src-resources-flightavailability.html │ ├── src-resources-flightavailabilityclass.html │ ├── src-resources-flightbaggageallowance.html │ ├── src-resources-flightbookingrequirements.html │ ├── src-resources-flightdate.html │ ├── src-resources-flightdatelinks.html │ ├── src-resources-flightdesignator.html │ ├── src-resources-flightdestination.html │ ├── src-resources-flightdestinationlinks.html │ ├── src-resources-flightendpoint.html │ ├── src-resources-flightextendedsegment.html │ ├── src-resources-flightfaredetailsbysegment.html │ ├── src-resources-flightfee.html │ ├── src-resources-flightitineraries.html │ ├── src-resources-flightoffer.html │ ├── src-resources-flightofferpricingoutput.html │ ├── src-resources-flightoffertax.html │ ├── src-resources-flightorder.html │ ├── src-resources-flightorderassociatedrecord.html │ ├── src-resources-flightpayment.html │ ├── src-resources-flightpoint.html │ ├── src-resources-flightpointarrival.html │ ├── src-resources-flightpointdeparture.html │ ├── src-resources-flightpointgate.html │ ├── src-resources-flightpointterminal.html │ ├── src-resources-flightpointtiming.html │ ├── src-resources-flightpointtimingdelay.html │ ├── src-resources-flightprice.html │ ├── src-resources-flightpricingoptions.html │ ├── src-resources-flightstop.html │ ├── src-resources-flighttourallotment.html │ ├── src-resources-geocode.html │ ├── src-resources-hotel.html │ ├── src-resources-hoteladdress.html │ ├── src-resources-hotelbookingassociatedrecord.html │ ├── src-resources-hotelbookinglight.html │ ├── src-resources-hotelcontent.html │ ├── src-resources-hoteldistance.html │ ├── src-resources-hotelnameautocomplete.html │ ├── src-resources-hoteloffer.html │ ├── src-resources-hotelofferaverageprice.html │ ├── src-resources-hoteloffers.html │ ├── src-resources-hoteloffertax.html │ ├── src-resources-hotelproductcancellationpolicy.html │ ├── src-resources-hotelproductcheckinoutpolicy.html │ ├── src-resources-hotelproductcommission.html │ ├── src-resources-hotelproductdepositpolicy.html │ ├── src-resources-hotelproductestimatedroomtype.html │ ├── src-resources-hotelproductguaranteepolicy.html │ ├── src-resources-hotelproductguests.html │ ├── src-resources-hotelproductholdpolicy.html │ ├── src-resources-hotelproducthotelprice.html │ ├── src-resources-hotelproductpaymentpolicy.html │ ├── src-resources-hotelproductpolicydetails.html │ ├── src-resources-hotelproductpricevariation.html │ ├── src-resources-hotelproductpricevariations.html │ ├── src-resources-hotelproductratefamily.html │ ├── src-resources-hotelproductroomdetails.html │ ├── src-resources-hotelsentiment.html │ ├── src-resources-hotelsentimentdetails.html │ ├── src-resources-link.html │ ├── src-resources-links.html │ ├── src-resources-location.html │ ├── src-resources-locationaddress.html │ ├── src-resources-locationanalytics.html │ ├── src-resources-locationanalyticstravelers.html │ ├── src-resources-locationdistance.html │ ├── src-resources-markup.html │ ├── src-resources-maskrestriction.html │ ├── src-resources-ontimeprediction.html │ ├── src-resources-operatingflight.html │ ├── src-resources-passengerconditions.html │ ├── src-resources-qualifiedfreetext.html │ ├── src-resources-resource.html │ ├── src-resources-resourceinterface.html │ ├── src-resources-termandcondition.html │ ├── src-resources-transportation.html │ ├── src-resources-traveleraddress.html │ ├── src-resources-travelercontact.html │ ├── src-resources-travelerdocuments.html │ ├── src-resources-travelerelement.html │ ├── src-resources-travelername.html │ ├── src-resources-travelerphone.html │ ├── src-resources-travelerpricing.html │ ├── src-resources-validityperiod.html │ ├── src-schedule-flights.html │ ├── src-schedule.html │ ├── src-shopping-activities-bysquare.html │ ├── src-shopping-activities.html │ ├── src-shopping-activity.html │ ├── src-shopping-availability-flightavailabilities.html │ ├── src-shopping-availability.html │ ├── src-shopping-flightdates.html │ ├── src-shopping-flightdestinations.html │ ├── src-shopping-flightoffers-prediction.html │ ├── src-shopping-flightoffers-pricing.html │ ├── src-shopping-flightoffers.html │ ├── src-shopping-hoteloffer.html │ ├── src-shopping-hoteloffers.html │ ├── src-shopping.html │ ├── src-travel-predictions-flightdelay.html │ ├── src-travel-predictions.html │ └── src-travel.html ├── graphs │ └── classes.html ├── index.html ├── indices │ └── files.html ├── js │ ├── search.js │ └── searchIndex.js ├── namespaces │ ├── amadeus-airport-predictions.html │ ├── amadeus-airport.html │ ├── amadeus-booking.html │ ├── amadeus-client.html │ ├── amadeus-dutyofcare-diseases.html │ ├── amadeus-dutyofcare.html │ ├── amadeus-ereputation.html │ ├── amadeus-exceptions.html │ ├── amadeus-referencedata-locations-hotels.html │ ├── amadeus-referencedata-locations.html │ ├── amadeus-referencedata.html │ ├── amadeus-resources.html │ ├── amadeus-schedule.html │ ├── amadeus-shopping-activities.html │ ├── amadeus-shopping-availability.html │ ├── amadeus-shopping-flightoffers.html │ ├── amadeus-shopping.html │ ├── amadeus-travel-predictions.html │ ├── amadeus-travel.html │ ├── amadeus.html │ └── default.html ├── packages │ ├── Application.html │ └── default.html └── reports │ ├── deprecated.html │ ├── errors.html │ └── markers.html ├── phpunit.xml ├── src ├── Airport.php ├── Amadeus.php ├── AmadeusBuilder.php ├── Booking.php ├── Configuration.php ├── Constants.php ├── DutyOfCare.php ├── EReputation.php ├── ReferenceData.php ├── Schedule.php ├── Shopping.php ├── Travel.php ├── airport │ ├── DirectDestinations.php │ ├── Predictions.php │ └── predictions │ │ └── OnTime.php ├── booking │ ├── FlightOrders.php │ └── HotelBookings.php ├── client │ ├── AccessToken.php │ ├── BasicHTTPClient.php │ ├── HTTPClient.php │ ├── Request.php │ └── Response.php ├── dutyOfCare │ ├── Diseases.php │ └── diseases │ │ └── Covid19AreaReport.php ├── eReputation │ └── HotelSentiments.php ├── exceptions │ ├── AuthenticationException.php │ ├── ClientException.php │ ├── NetworkException.php │ ├── NotFoundException.php │ ├── ResponseException.php │ └── ServerException.php ├── referenceData │ ├── Airlines.php │ ├── Location.php │ ├── Locations.php │ ├── RecommendedLocations.php │ └── locations │ │ ├── Airports.php │ │ ├── Hotel.php │ │ ├── Hotels.php │ │ └── hotels │ │ ├── ByCity.php │ │ ├── ByGeocode.php │ │ └── ByHotels.php ├── resources │ ├── Activity.php │ ├── AircraftEquipment.php │ ├── Airline.php │ ├── Area.php │ ├── AreaAccessRestriction.php │ ├── AreaPolicy.php │ ├── AreaRestriction.php │ ├── AreaVaccinated.php │ ├── Border.php │ ├── Co2Emission.php │ ├── DatedFlight.php │ ├── DatedFlightLeg.php │ ├── DatedFlightSegment.php │ ├── DatedFlightSegmentPartnership.php │ ├── DatedInformation.php │ ├── DatedQuarantineRestriction.php │ ├── DatedTracingApplicationRestriction.php │ ├── DeclarationDocuments.php │ ├── DelayPrediction.php │ ├── Description.php │ ├── Destination.php │ ├── DiseaseAreaReport.php │ ├── DiseaseCase.php │ ├── DiseaseDataSources.php │ ├── DiseaseInfection.php │ ├── DiseaseTestingRestriction.php │ ├── DiseaseVaccination.php │ ├── ElementaryPrice.php │ ├── EntryRestriction.php │ ├── ExitRestriction.php │ ├── FareRules.php │ ├── FlightAdditionalService.php │ ├── FlightAdditionalServicesRequest.php │ ├── FlightAllotmentDetails.php │ ├── FlightAvailability.php │ ├── FlightAvailabilityClass.php │ ├── FlightBaggageAllowance.php │ ├── FlightBookingRequirements.php │ ├── FlightDate.php │ ├── FlightDateLinks.php │ ├── FlightDesignator.php │ ├── FlightDestination.php │ ├── FlightDestinationLinks.php │ ├── FlightEndpoint.php │ ├── FlightExtendedSegment.php │ ├── FlightFareDetailsBySegment.php │ ├── FlightFee.php │ ├── FlightItineraries.php │ ├── FlightOffer.php │ ├── FlightOfferPricingOutput.php │ ├── FlightOfferTax.php │ ├── FlightOrder.php │ ├── FlightOrderAssociatedRecord.php │ ├── FlightPayment.php │ ├── FlightPoint.php │ ├── FlightPointArrival.php │ ├── FlightPointDeparture.php │ ├── FlightPointGate.php │ ├── FlightPointTerminal.php │ ├── FlightPointTiming.php │ ├── FlightPointTimingDelay.php │ ├── FlightPrice.php │ ├── FlightPricingOptions.php │ ├── FlightStop.php │ ├── FlightTourAllotment.php │ ├── GeoCode.php │ ├── Hotel.php │ ├── HotelAddress.php │ ├── HotelBookingAssociatedRecord.php │ ├── HotelBookingLight.php │ ├── HotelContent.php │ ├── HotelDistance.php │ ├── HotelNameAutocomplete.php │ ├── HotelOffer.php │ ├── HotelOfferAveragePrice.php │ ├── HotelOfferTax.php │ ├── HotelOffers.php │ ├── HotelProductCancellationPolicy.php │ ├── HotelProductCheckInOutPolicy.php │ ├── HotelProductCommission.php │ ├── HotelProductDepositPolicy.php │ ├── HotelProductEstimatedRoomType.php │ ├── HotelProductGuaranteePolicy.php │ ├── HotelProductGuests.php │ ├── HotelProductHoldPolicy.php │ ├── HotelProductHotelPrice.php │ ├── HotelProductPaymentPolicy.php │ ├── HotelProductPolicyDetails.php │ ├── HotelProductPriceVariation.php │ ├── HotelProductPriceVariations.php │ ├── HotelProductRateFamily.php │ ├── HotelProductRoomDetails.php │ ├── HotelSentiment.php │ ├── HotelSentimentDetails.php │ ├── Link.php │ ├── Links.php │ ├── Location.php │ ├── LocationAddress.php │ ├── LocationAnalytics.php │ ├── LocationAnalyticsTravelers.php │ ├── LocationDistance.php │ ├── Markup.php │ ├── MaskRestriction.php │ ├── OnTimePrediction.php │ ├── OperatingFlight.php │ ├── PassengerConditions.php │ ├── QualifiedFreeText.php │ ├── Resource.php │ ├── ResourceInterface.php │ ├── SeatMap.php │ ├── TermAndCondition.php │ ├── Transportation.php │ ├── TravelerAddress.php │ ├── TravelerContact.php │ ├── TravelerDocuments.php │ ├── TravelerElement.php │ ├── TravelerName.php │ ├── TravelerPhone.php │ ├── TravelerPricing.php │ └── ValidityPeriod.php ├── schedule │ └── Flights.php ├── shopping │ ├── Activities.php │ ├── Activity.php │ ├── Availability.php │ ├── FlightDates.php │ ├── FlightDestinations.php │ ├── FlightOffers.php │ ├── HotelOffer.php │ ├── HotelOffers.php │ ├── SeatMaps.php │ ├── activities │ │ └── BySquare.php │ ├── availability │ │ └── FlightAvailabilities.php │ └── flightOffers │ │ ├── Prediction.php │ │ └── Pricing.php └── travel │ ├── Predictions.php │ └── predictions │ └── FlightDelay.php └── tests ├── AmadeusBuilderTest.php ├── AmadeusTest.php ├── ConfigurationTest.php ├── NamespaceTest.php ├── PHPUnitUtil.php ├── airport ├── DirectDestinationsTest.php └── predictions │ └── OnTimeTest.php ├── booking ├── FlightOrdersTest.php └── HotelBookingsTest.php ├── client ├── AccessTokenTest.php ├── HTTPClientTest.php ├── RequestTest.php ├── ResponseTest.php ├── cached_token_null_test.json └── cached_token_test.json ├── dutyOfCare └── diseases │ └── Covid19AreaReportTest.php ├── eReputation └── HotelSentimentsTest.php ├── exceptions └── ExceptionsTest.php ├── referenceData ├── AirlinesTest.php ├── LocationTest.php ├── LocationsTest.php ├── RecommendedLocationsTest.php └── locations │ ├── AirportsTest.php │ ├── HotelTest.php │ └── hotels │ ├── ByCityTest.php │ ├── ByGeocodeTest.php │ └── ByHotelsTest.php ├── resources └── __files │ ├── activities_by_square_get_response_ok.json │ ├── activities_get_response_ok.json │ ├── activity_get_response_ok.json │ ├── airlines_get_response_ok.json │ ├── airports_get_response_ok.json │ ├── auth_ok.json │ ├── covid_19_area_report_get_response_ok.json │ ├── direct_destinations_get_response_ok.json │ ├── flight_availabilities_post_request_ok.json │ ├── flight_availabilities_post_response_ok.json │ ├── flight_choice_prediction_post_request_ok.json │ ├── flight_choice_prediction_post_response_ok.json │ ├── flight_dates_get_response_ok.json │ ├── flight_delay_get_response_ok.json │ ├── flight_destinations_get_response_ok.json │ ├── flight_offers_get_response_ok.json │ ├── flight_offers_post_request_ok.json │ ├── flight_offers_post_response_ok.json │ ├── flight_offers_price_post_request2_ok.json │ ├── flight_offers_price_post_request_ok.json │ ├── flight_offers_price_post_response_ok.json │ ├── flight_orders_post_request_ok.json │ ├── flight_orders_post_response_ok.json │ ├── flights_get_response_ok.json │ ├── hotel_bookings_post_request_ok.json │ ├── hotel_bookings_post_response_ok.json │ ├── hotel_get_response_ok.json │ ├── hotel_offer_get_response_ok.json │ ├── hotel_offers_get_response_ok.json │ ├── hotel_sentiments_get_response_ok.json │ ├── hotels_by_city_get_response_ok.json │ ├── hotels_by_geocode_get_response_ok.json │ ├── hotels_by_hotels_get_response_ok.json │ ├── location_get_response_ok.json │ ├── locations_get_response_ok.json │ ├── on_time_get_response_ok.json │ ├── recommended_locations_get_response_ok.json │ ├── seatmap_get_response_ok.json │ ├── seatmaps_post_request_ok.json │ └── seatmaps_post_response_ok.json ├── schedule └── FlightsTest.php ├── shopping ├── ActivitiesTest.php ├── ActivityTest.php ├── FlightDatesTest.php ├── FlightDestinationsTest.php ├── FlightOffersTest.php ├── HotelOfferTest.php ├── HotelOffersTest.php ├── SeatMapTest.php ├── activities │ └── BySquareTest.php ├── availability │ └── FlightAvailabilitiesTest.php └── flightOffers │ ├── PredictionTest.php │ └── PricingTest.php └── travel └── predictions └── FlightDelayTest.php /.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 PHP 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/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | php: [ 7.4, 8.0, 8.1 ] 16 | 17 | name: PHP ${{ matrix.php }} 18 | steps: 19 | - name: Checkout amadeus-php 20 | uses: actions/checkout@v2 21 | 22 | - name: Setup PHP 23 | uses: shivammathur/setup-php@master 24 | with: 25 | php-version: ${{ matrix.php }} 26 | 27 | - name: Report PHP version 28 | run: php -v 29 | 30 | - name: Validate composer.json and composer.lock 31 | run: composer validate --strict 32 | 33 | - name: Install dependencies 34 | run: composer install --ignore-platform-reqs 35 | 36 | - name: Update dependencies 37 | run: composer update --ignore-platform-reqs 38 | 39 | - name: Run PHPStan for Grammar check 40 | run: vendor/bin/phpstan analyse src tests --level 4 41 | 42 | - name: Run PHPUnit for Unit tests check & Code coverage report generation 43 | run: vendor/bin/phpunit --coverage-text tests 44 | 45 | - name: Run PHP-CS-Fixer on src for Code style check 46 | if: ${{ matrix.php == '8.1' }} 47 | run: vendor/bin/php-cs-fixer fix src --dry-run --stop-on-violation 48 | 49 | - name: Run PHP-CS-Fixer on tests for Code style check 50 | if: ${{ matrix.php == '8.1' }} 51 | run: vendor/bin/php-cs-fixer fix tests --dry-run --stop-on-violation -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: publish 2 | 3 | on: 4 | push: 5 | tags: [ '*' ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | strategy: 12 | matrix: 13 | php: [ 7.4 ] 14 | 15 | name: PHP ${{ matrix.php }} 16 | steps: 17 | - name: Checkout amadeus-php 18 | uses: actions/checkout@v2 19 | 20 | - name: Setup PHP 21 | uses: shivammathur/setup-php@master 22 | with: 23 | php-version: ${{ matrix.php }} 24 | 25 | - name: Report PHP version 26 | run: php -v 27 | 28 | - name: Validate composer.json and composer.lock 29 | run: composer validate --strict 30 | 31 | - name: Install dependencies 32 | run: composer install --ignore-platform-reqs 33 | 34 | - name: Update dependencies 35 | run: composer update --ignore-platform-reqs 36 | 37 | - name: Run PHPStan for Grammar check 38 | run: vendor/bin/phpstan analyse src tests --level 4 39 | 40 | - name: Run PHPUnit for tests 41 | run: vendor/bin/phpunit --coverage-text tests -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | src/client/cached_token.json 2 | composer.lock 3 | .idea/ 4 | vendor/ 5 | .phpunit.cache 6 | .php-cs-fixer.cache 7 | .phpdoc -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amadeus4dev/amadeus-php", 3 | "description": "PHP library for the Amadeus Self-Service APIs", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Amadeus for Developers", 8 | "email": "developers@amadeus.com" 9 | } 10 | ], 11 | "require": { 12 | "php": ">=7.4.0", 13 | "ext-json": "*", 14 | "ext-curl": "*" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Amadeus\\": "src/", 19 | "Amadeus\\Airport\\": "src/airport/", 20 | "Amadeus\\Airport\\Predictions\\": "src/airport/predictions/", 21 | "Amadeus\\Booking\\": "src/booking/", 22 | "Amadeus\\Client\\": "src/client/", 23 | "Amadeus\\DutyOfCare\\": "src/dutyOfCare/", 24 | "Amadeus\\DutyOfCare\\Diseases\\": "src/dutyOfCare/diseases/", 25 | "Amadeus\\EReputation\\": "src/eReputation/", 26 | "Amadeus\\Exceptions\\": "src/exceptions/", 27 | "Amadeus\\ReferenceData\\": "src/referenceData/", 28 | "Amadeus\\ReferenceData\\Locations\\": "src/referenceData/locations/", 29 | "Amadeus\\ReferenceData\\Locations\\Hotels\\": "src/referenceData/locations/hotels/", 30 | "Amadeus\\Resources\\": "src/resources/", 31 | "Amadeus\\Schedule\\": "src/schedule/", 32 | "Amadeus\\Shopping\\": "src/shopping/", 33 | "Amadeus\\Shopping\\Activities\\": "src/shopping/activities/", 34 | "Amadeus\\Shopping\\Availability\\": "src/shopping/availability/", 35 | "Amadeus\\Shopping\\FlightOffers\\": "src/shopping/flightOffers/", 36 | "Amadeus\\Travel\\": "src/travel/", 37 | "Amadeus\\Travel\\Predictions\\": "src/travel/predictions/" 38 | } 39 | }, 40 | "require-dev": { 41 | "phpunit/phpunit": "^9.5.19", 42 | "phpstan/phpstan": "^1.5.2", 43 | "friendsofphp/php-cs-fixer": "^3.8" 44 | }, 45 | "autoload-dev": { 46 | "psr-4": { 47 | "Amadeus\\Tests\\": "tests/" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | tests 18 | 19 | 20 | 21 | 23 | 24 | src 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Airport.php: -------------------------------------------------------------------------------- 1 | build(); 17 | * $amadeus->getAirport(); 18 | * 19 | */ 20 | class Airport 21 | { 22 | /** 23 | * A namespaced client for the 24 | * "/v1/airport/direct-destinations" endpoints. 25 | */ 26 | private DirectDestinations $directDestinations; 27 | 28 | /** 29 | * A namespaced client for the 30 | * "/v1/airport/predictions" endpoints. 31 | */ 32 | private Predictions $predictions; 33 | 34 | /** 35 | * @param Amadeus $amadeus 36 | */ 37 | public function __construct(Amadeus $amadeus) 38 | { 39 | $this->directDestinations = new DirectDestinations($amadeus); 40 | $this->predictions = new Predictions($amadeus); 41 | } 42 | 43 | /** 44 | * Get a namespaced client for the 45 | * "/v1/airport/direct-destinations" endpoints. 46 | * @return DirectDestinations 47 | */ 48 | public function getDirectDestinations(): DirectDestinations 49 | { 50 | return $this->directDestinations; 51 | } 52 | 53 | /** 54 | * Get a namespaced client for the 55 | * "/v1/airport/predictions" endpoints. 56 | * @return Predictions 57 | */ 58 | public function getPredictions(): Predictions 59 | { 60 | return $this->predictions; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Booking.php: -------------------------------------------------------------------------------- 1 | build(); 17 | * $amadeus->getBooking(); 18 | * 19 | */ 20 | class Booking 21 | { 22 | /** 23 | * A namespaced client for the 24 | * "/v1/booking/flightOrders" endpoints. 25 | */ 26 | private FlightOrders $flightOrders; 27 | 28 | /** 29 | * A namespaced client for the 30 | * "/v1/booking/hotelBookings" endpoints. 31 | */ 32 | private HotelBookings $hotelBookings; 33 | 34 | /** 35 | * @param Amadeus $amadeus 36 | */ 37 | public function __construct(Amadeus $amadeus) 38 | { 39 | $this->flightOrders = new FlightOrders($amadeus); 40 | $this->hotelBookings = new HotelBookings($amadeus); 41 | } 42 | 43 | /** 44 | * Get a namespaced client for the 45 | * "/v1/booking/flightOrders" endpoints. 46 | * @return FlightOrders 47 | */ 48 | public function getFlightOrders(): FlightOrders 49 | { 50 | return $this->flightOrders; 51 | } 52 | 53 | /** 54 | * Get a namespaced client for the 55 | * "/v1/booking/hotelBookings" endpoints. 56 | * @return HotelBookings 57 | */ 58 | public function getHotelBookings(): HotelBookings 59 | { 60 | return $this->hotelBookings; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Constants.php: -------------------------------------------------------------------------------- 1 | build(); 16 | * $amadeus->getDutyOfCare(); 17 | * 18 | */ 19 | class DutyOfCare 20 | { 21 | /** 22 | * A namespaced client for the 23 | * "/v1/duty-of-care/diseases" endpoints. 24 | */ 25 | private Diseases $diseases; 26 | 27 | /** 28 | * Constructor 29 | * @param Amadeus $amadeus 30 | */ 31 | public function __construct(Amadeus $amadeus) 32 | { 33 | $this->diseases = new Diseases($amadeus); 34 | } 35 | 36 | /** 37 | * Get a namespaced client for the 38 | * "/v1/duty-of-care/diseases" endpoints. 39 | * @return Diseases 40 | */ 41 | public function getDiseases(): Diseases 42 | { 43 | return $this->diseases; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/EReputation.php: -------------------------------------------------------------------------------- 1 | build(); 16 | * $amadeus->getEReputation(); 17 | * 18 | */ 19 | class EReputation 20 | { 21 | /** 22 | * A namespaced client for the 23 | * "/v2/e-reputation/hotel-sentiments" endpoints. 24 | */ 25 | private HotelSentiments $hotelSentiments; 26 | 27 | /** 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->hotelSentiments = new HotelSentiments($amadeus); 33 | } 34 | 35 | /** 36 | * Get a namespaced client for the 37 | * "/v2/e-reputation/hotel-sentiments" endpoints. 38 | * @return HotelSentiments 39 | */ 40 | public function getHotelSentiments(): HotelSentiments 41 | { 42 | return $this->hotelSentiments; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Schedule.php: -------------------------------------------------------------------------------- 1 | build(); 16 | * $amadeus->getSchedule(); 17 | * 18 | */ 19 | class Schedule 20 | { 21 | /** 22 | * A namespaced client for the 23 | * "/v2/schedule/flights" endpoints. 24 | */ 25 | private Flights $flights; 26 | 27 | /** 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->flights = new Flights($amadeus); 33 | } 34 | 35 | /** 36 | * Get a namespaced client for the 37 | * "/v2/schedule/flights" endpoints. 38 | * @return Flights 39 | */ 40 | public function getFlights(): Flights 41 | { 42 | return $this->flights; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Travel.php: -------------------------------------------------------------------------------- 1 | build(); 16 | * $amadeus->getTravel(); 17 | * 18 | */ 19 | class Travel 20 | { 21 | /** 22 | * A namespaced client for the 23 | * "/v1/travel/predictions" endpoints. 24 | */ 25 | private Predictions $predictions; 26 | 27 | /** 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->predictions = new Predictions($amadeus); 33 | } 34 | 35 | /** 36 | * Get a namespaced client for the 37 | * "/v1/travel/predictions" endpoints. 38 | * @return Predictions 39 | */ 40 | public function getPredictions(): Predictions 41 | { 42 | return $this->predictions; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/airport/DirectDestinations.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getAirport()->getDirectDestinations(); 20 | * 21 | */ 22 | class DirectDestinations 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Airport Routes API: 37 | * 38 | * Find all destinations served by a given airport. 39 | * 40 | * $amadeus->getAirport()->getDirectDestinations()->get( 41 | * ["departureAirportCode" => "MAD", "max" => 2] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/airport-routes/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return Destination[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | '/v1/airport/direct-destinations', 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, Destination::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/airport/Predictions.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getAirport()->getPredictions(); 20 | * 21 | */ 22 | class Predictions 23 | { 24 | /** 25 | * A namespaced client for the 26 | * "/v1/airport/predictions" endpoints. 27 | */ 28 | private OnTime $onTime; 29 | 30 | /** 31 | * Constructor 32 | * @param Amadeus $amadeus 33 | */ 34 | public function __construct(Amadeus $amadeus) 35 | { 36 | $this->onTime = new OnTime($amadeus); 37 | } 38 | 39 | /** 40 | * Get a namespaced client for the 41 | * "/v1/airport/predictions/on-time" endpoints. 42 | * 43 | * @return OnTime 44 | */ 45 | public function getOnTime(): OnTime 46 | { 47 | return $this->onTime; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/airport/predictions/OnTime.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getAirport()->getPredictions()->getOnTime(); 20 | * 21 | */ 22 | class OnTime 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Airport On-Time Performance API: 37 | * 38 | * Returns a percentage of on-time flight departures from a given airport. 39 | * 40 | * $amadeus->getAirport()->getPredictions()->getOnTime()->get( 41 | * ["airportCode" => "NCE", "date" => 2022-11-01] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/airport-on-time-performance/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return OnTimePrediction an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): object 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | '/v1/airport/predictions/on-time', 54 | $params 55 | ); 56 | 57 | return Resource::fromObject($response, OnTimePrediction::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/booking/HotelBookings.php: -------------------------------------------------------------------------------- 1 | build(); 20 | * $amadeus->getBooking()->getHotelBookings(); 21 | * 22 | */ 23 | class HotelBookings 24 | { 25 | private Amadeus $amadeus; 26 | 27 | /** 28 | * Constructor 29 | * @param Amadeus $amadeus 30 | */ 31 | public function __construct(Amadeus $amadeus) 32 | { 33 | $this->amadeus = $amadeus; 34 | } 35 | 36 | /** 37 | * Hotel Booking API: 38 | * 39 | * The Hotel Booking API allows you to perform hotel booking. 40 | * 41 | * $amadeus->getBooking()->getHotelBookings()->post($body); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-booking/api-reference 44 | * 45 | * @param string $body the parameters to send to the API as a String 46 | * @return HotelBookingLight[] an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public function post(string $body): array 50 | { 51 | $response = $this->amadeus->getClient()->postWithStringBody( 52 | '/v1/booking/hotel-bookings', 53 | $body 54 | ); 55 | 56 | return Resource::fromArray($response, HotelBookingLight::class); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/client/HTTPClient.php: -------------------------------------------------------------------------------- 1 | build(); 17 | * $amadeus->getDutyOfCare()->getDiseases(); 18 | * 19 | */ 20 | class Diseases 21 | { 22 | /** 23 | * A namespaced client for the 24 | * "/v1/duty-of-care/diseases/covid19-area-report" endpoints. 25 | */ 26 | private Covid19AreaReport $covid19AreaReport; 27 | 28 | /** 29 | * Constructor 30 | * @param Amadeus $amadeus 31 | */ 32 | public function __construct(Amadeus $amadeus) 33 | { 34 | $this->covid19AreaReport = new Covid19AreaReport($amadeus); 35 | } 36 | 37 | /** 38 | * A namespaced client for the 39 | * "/v1/duty-of-care/diseases/covid19-area-report" endpoints. 40 | * @return Covid19AreaReport 41 | */ 42 | public function getCovid19AreaReport(): Covid19AreaReport 43 | { 44 | return $this->covid19AreaReport; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/dutyOfCare/diseases/Covid19AreaReport.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getDutyOfCare()->getDiseases()->getCovid19AreaReport(); 20 | * 21 | */ 22 | class Covid19AreaReport 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Travel Restrictions API: 37 | * 38 | * Get up-to-date data on COVID-19 caseloads and travel restrictions 39 | * for a given country, city or region. 40 | * 41 | * $amadeus->getDutyOfCare()->getDiseases()->getCovid19AreaReport()->get(["countryCode"=>"US"]); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/covid-19-and-travel-safety/api-doc/travel-restrictions/api-reference 44 | * 45 | * @param array $params the parameters to send to the API 46 | * @return DiseaseAreaReport an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public function get(array $params): object 50 | { 51 | $response = $this->amadeus->getClient()->getWithArrayParams( 52 | '/v1/duty-of-care/diseases/covid19-area-report', 53 | $params 54 | ); 55 | 56 | return Resource::fromObject($response, DiseaseAreaReport::class); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/eReputation/HotelSentiments.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getEReputation()->getHotelSentiments(); 20 | * 21 | */ 22 | class HotelSentiments 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Hotel Ratings API: 37 | * 38 | * Get hotel sentiments by Amadeus Hotel Ids. 39 | * 40 | * $amadeus->getEReputation()->getHotelSentiments()->get(["hotelIds" => "TELONMFS"]); 41 | * 42 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-ratings/api-reference 43 | * 44 | * @param array $params the parameters to send to the API 45 | * @return HotelSentiment[] an API resource 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public function get(array $params): array 49 | { 50 | $response = $this->amadeus->getClient()->getWithArrayParams( 51 | '/v2/e-reputation/hotel-sentiments', 52 | $params 53 | ); 54 | 55 | return Resource::fromArray($response, HotelSentiment::class); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/exceptions/AuthenticationException.php: -------------------------------------------------------------------------------- 1 | getUrl() != null) { 21 | $this->url = $response->getUrl(); 22 | } 23 | 24 | if ($response->getResult() != null) { 25 | if ($response->getStatusCode() != null) { 26 | parent::__construct($response->getResult(), $response->getStatusCode()); 27 | } else { 28 | parent::__construct($response->getResult()); 29 | } 30 | } else { 31 | if ($response->getStatusCode() != null) { 32 | parent::__construct("", $response->getStatusCode()); 33 | } else { 34 | parent::__construct(); 35 | } 36 | } 37 | } 38 | } 39 | 40 | /** 41 | * @return string|null 42 | */ 43 | public function getUrl(): ?string 44 | { 45 | return $this->url; 46 | } 47 | 48 | public function __toString(): string 49 | { 50 | return '['.date("F j, Y, g:i a").']'."\n" 51 | .get_class($this) .": [$this->code]" ."\n" 52 | ."Message: ".$this->message ."\n" 53 | ."Url: ".$this->getUrl() ."\n" 54 | ."Trace: ".$this->getTraceAsString()."\n"; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/exceptions/ServerException.php: -------------------------------------------------------------------------------- 1 | = 500 11 | * @see BasicHTTPClient::detectError() 12 | */ 13 | class ServerException extends ResponseException 14 | { 15 | } 16 | -------------------------------------------------------------------------------- /src/referenceData/Airlines.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getAirlines(); 20 | * 21 | */ 22 | class Airlines 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Airline Code Lookup API: 36 | * 37 | * Returns a list of Airlines information. 38 | * 39 | * $amadeus->getReferenceData()->getAirlines()->get( 40 | * ["airlineCodes" => "BA"] 41 | * ); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/airline-code-lookup/api-reference 44 | * 45 | * @param array $params 46 | * @return Airline[] an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public function get(array $params): array 50 | { 51 | $response = $this->amadeus->getClient()->getWithArrayParams( 52 | '/v1/reference-data/airlines', 53 | $params 54 | ); 55 | 56 | return Resource::fromArray($response, Airline::class); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/referenceData/Location.php: -------------------------------------------------------------------------------- 1 | build(); 18 | * $amadeus->getReferenceData()->getLocation(); 19 | * 20 | */ 21 | class Location 22 | { 23 | private Amadeus $amadeus; 24 | private string $locationId; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | * @param string $locationId 29 | */ 30 | public function __construct(Amadeus $amadeus, string $locationId) 31 | { 32 | $this->amadeus = $amadeus; 33 | $this->locationId = $locationId; 34 | } 35 | 36 | /** 37 | * Airport and City Search API: 38 | * 39 | * Returns a specific airport or city based on its id. 40 | * 41 | * $amadeus->getReferenceData()->getLocation("CMUC")->get(); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/airport-and-city-search/api-reference 44 | * 45 | * @return \Amadeus\Resources\Location an API resource 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public function get(): object 49 | { 50 | $response = $this->amadeus->getClient()->getWithOnlyPath( 51 | "/v1/reference-data/locations"."/".$this->locationId 52 | ); 53 | 54 | return Resource::fromObject($response, \Amadeus\Resources\Location::class); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/referenceData/RecommendedLocations.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getRecommendedLocations(); 20 | * 21 | */ 22 | class RecommendedLocations 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Travel Recommendations API: 36 | * 37 | * Returns a list of destination recommendations. 38 | * 39 | * $amadeus->getReferenceData()->getRecommendedLocations()->get(["cityCodes"=>"PAR", "travelerCountryCode"=>"FR"]); 40 | * 41 | * @link https://developers.amadeus.com/self-service/category/trip/api-doc/travel-recommendations/api-reference 42 | * 43 | * @param array $params the parameters to send to the API 44 | * @return Location[] an API resource 45 | * @throws ResponseException when an exception occurs 46 | */ 47 | public function get(array $params): array 48 | { 49 | $response = $this->amadeus->getClient()->getWithArrayParams( 50 | "/v1/reference-data/recommended-locations", 51 | $params 52 | ); 53 | 54 | return Resource::fromArray($response, Location::class); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/referenceData/locations/Airports.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getLocations()->getAirports(); 20 | * 21 | */ 22 | class Airports 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Airport Nearest Relevant API: 36 | * 37 | * Returns a list of relevant airports near to a given point. 38 | * 39 | * $amadeus->getReferenceData()->getLocations()->getAirports()->get( 40 | * ["latitude"=>51.57285, "longitude"=>-0.44161, "radius"=>500] 41 | * ); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/airport-nearest-relevant/api-reference 44 | * 45 | * @param array $params the parameters to send to the API 46 | * @return Location[] an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public function get(array $params): array 50 | { 51 | $response = $this->amadeus->getClient()->getWithArrayParams( 52 | '/v1/reference-data/locations/airports', 53 | $params 54 | ); 55 | 56 | return Resource::fromArray($response, Location::class); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/referenceData/locations/Hotel.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getLocations()->getHotel(); 20 | * 21 | */ 22 | class Hotel 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Hotel Name Autocomplete API 36 | * 37 | * $amadeus->getReferenceData()->getLocations()->getHotel()->get( 38 | * ["keyword"=>"PARI", "subType"=>"HOTEL_GDS"] 39 | * ); 40 | * 41 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-name-autocomplete/api-reference 42 | * 43 | * @param array $params the parameters to send to the API 44 | * @return HotelNameAutocomplete[] an API resource 45 | * @throws ResponseException when an exception occurs 46 | */ 47 | public function get(array $params): array 48 | { 49 | $response = $this->amadeus->getClient()->getWithArrayParams( 50 | '/v1/reference-data/locations/hotel', 51 | $params 52 | ); 53 | 54 | return Resource::fromArray($response, HotelNameAutocomplete::class); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/referenceData/locations/hotels/ByCity.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByCity(); 20 | * 21 | */ 22 | class ByCity 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Hotel List API: 37 | * 38 | * Returns a list of relevant hotels inside a city. 39 | * 40 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByCity->get( 41 | * ["cityCode" => "PAR"] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return Hotel[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | "/v1/reference-data/locations/hotels/by-city", 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, Hotel::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/referenceData/locations/hotels/ByGeocode.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByGeocode(); 20 | * 21 | */ 22 | class ByGeocode 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Hotel List API: 37 | * 38 | * Returns a list of hotels result of the search using GeoCode. 39 | * 40 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByGeocode->get( 41 | * ["latitude" => "41.397158", "longitude" => "2.31836"] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return Hotel[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | "/v1/reference-data/locations/hotels/by-geocode", 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, Hotel::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/referenceData/locations/hotels/ByHotels.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByHotels(); 20 | * 21 | */ 22 | class ByHotels 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Hotel List API: 37 | * 38 | * Returns a list of hotels result of the search using GeoCode. 39 | * 40 | * $amadeus->getReferenceData()->getLocations()->getHotels()->getByHotels->get( 41 | * ["hotelIds" => "ACR"] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return Hotel[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | "/v1/reference-data/locations/hotels/by-hotels", 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, Hotel::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/AircraftEquipment.php: -------------------------------------------------------------------------------- 1 | code; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getAircraftType(): ?string 29 | { 30 | return $this->aircraftType; 31 | } 32 | 33 | public function __set($name, $value): void 34 | { 35 | $this->$name = $value; 36 | } 37 | 38 | public function __toString(): string 39 | { 40 | return Resource::toString(get_object_vars($this)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/resources/Airline.php: -------------------------------------------------------------------------------- 1 | type; 28 | } 29 | 30 | /** 31 | * @return string|null 32 | */ 33 | public function getIataCode(): ?string 34 | { 35 | return $this->iataCode; 36 | } 37 | 38 | /** 39 | * @return string|null 40 | */ 41 | public function getIcaoCode(): ?string 42 | { 43 | return $this->icaoCode; 44 | } 45 | 46 | /** 47 | * @return string|null 48 | */ 49 | public function getBusinessName(): ?string 50 | { 51 | return $this->businessName; 52 | } 53 | 54 | /** 55 | * @return string|null 56 | */ 57 | public function getCommonName(): ?string 58 | { 59 | return $this->commonName; 60 | } 61 | 62 | public function __set($name, $value): void 63 | { 64 | $this->$name = $value; 65 | } 66 | 67 | public function __toString(): string 68 | { 69 | return Resource::toString(get_object_vars($this)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/resources/Area.php: -------------------------------------------------------------------------------- 1 | name; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getIataCode(): ?string 30 | { 31 | return $this->iataCode; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getGeoCode(): ?string 38 | { 39 | return $this->geoCode; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getAreaType(): ?string 46 | { 47 | return $this->areaType; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/AreaPolicy.php: -------------------------------------------------------------------------------- 1 | date; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getText(): ?string 32 | { 33 | return $this->text; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getStatus(): ?string 40 | { 41 | return $this->status; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getStartDate(): ?string 48 | { 49 | return $this->startDate; 50 | } 51 | 52 | /** 53 | * @return string|null 54 | */ 55 | public function getEndDate(): ?string 56 | { 57 | return $this->endDate; 58 | } 59 | 60 | /** 61 | * @return string|null 62 | */ 63 | public function getReferenceLink(): ?string 64 | { 65 | return $this->referenceLink; 66 | } 67 | 68 | public function __set($name, $value): void 69 | { 70 | $this->$name = $value; 71 | } 72 | 73 | public function __toString(): string 74 | { 75 | return Resource::toString(get_object_vars($this)); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/resources/AreaRestriction.php: -------------------------------------------------------------------------------- 1 | date; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getText(): ?string 30 | { 31 | return $this->text; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getRestrictionType(): ?string 38 | { 39 | return $this->restrictionType; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getType(): ?string 46 | { 47 | return $this->type; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/AreaVaccinated.php: -------------------------------------------------------------------------------- 1 | vaccinationDoseStatus; 24 | } 25 | 26 | /** 27 | * @return float|null 28 | */ 29 | public function getPercentage(): ?float 30 | { 31 | return $this->percentage; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getDate(): ?string 38 | { 39 | return $this->date; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getText(): ?string 46 | { 47 | return $this->text; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/Border.php: -------------------------------------------------------------------------------- 1 | borderType; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getStatus(): ?string 28 | { 29 | return $this->status; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/Co2Emission.php: -------------------------------------------------------------------------------- 1 | weight; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getWeightUnit(): ?string 29 | { 30 | return $this->weightUnit; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getCabin(): ?string 37 | { 38 | return $this->cabin; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/DatedFlightLeg.php: -------------------------------------------------------------------------------- 1 | boardPointIataCode; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getOffPointIataCode(): ?string 30 | { 31 | return $this->offPointIataCode; 32 | } 33 | 34 | /** 35 | * @return AircraftEquipment|null 36 | */ 37 | public function getAircraftEquipment(): ?object 38 | { 39 | return Resource::toResourceObject( 40 | $this->aircraftEquipment, 41 | AircraftEquipment::class 42 | ); 43 | } 44 | 45 | /** 46 | * @return string|null 47 | */ 48 | public function getScheduledLegDuration(): ?string 49 | { 50 | return $this->scheduledLegDuration; 51 | } 52 | 53 | public function __set($name, $value): void 54 | { 55 | $this->$name = $value; 56 | } 57 | 58 | public function __toString(): string 59 | { 60 | return Resource::toString(get_object_vars($this)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/resources/DatedFlightSegment.php: -------------------------------------------------------------------------------- 1 | boardPointIataCode; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getOffPointIataCode(): ?string 30 | { 31 | return $this->offPointIataCode; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getScheduledSegmentDuration(): ?string 38 | { 39 | return $this->scheduledSegmentDuration; 40 | } 41 | 42 | /** 43 | * @return DatedFlightSegmentPartnership|null 44 | */ 45 | public function getPartnership(): ?object 46 | { 47 | return Resource::toResourceObject( 48 | $this->partnership, 49 | DatedFlightSegmentPartnership::class 50 | ); 51 | } 52 | 53 | public function __set($name, $value): void 54 | { 55 | $this->$name = $value; 56 | } 57 | 58 | public function __toString(): string 59 | { 60 | return Resource::toString(get_object_vars($this)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/resources/DatedFlightSegmentPartnership.php: -------------------------------------------------------------------------------- 1 | operatingFlight, 22 | FlightDesignator::class 23 | ); 24 | } 25 | 26 | public function __set($name, $value): void 27 | { 28 | $this->$name = $value; 29 | } 30 | 31 | public function __toString(): string 32 | { 33 | return Resource::toString(get_object_vars($this)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/resources/DatedInformation.php: -------------------------------------------------------------------------------- 1 | date; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getText(): ?string 28 | { 29 | return $this->text; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/DatedTracingApplicationRestriction.php: -------------------------------------------------------------------------------- 1 | date; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getText(): ?string 32 | { 33 | return $this->text; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getIsRequired(): ?string 40 | { 41 | return $this->isRequired; 42 | } 43 | 44 | /** 45 | * @return array|null 46 | */ 47 | public function getIosUrl(): ?array 48 | { 49 | return $this->iosUrl; 50 | } 51 | 52 | /** 53 | * @return array|null 54 | */ 55 | public function getAndroidUrl(): ?array 56 | { 57 | return $this->androidUrl; 58 | } 59 | 60 | /** 61 | * @return string|null 62 | */ 63 | public function getWebsite(): ?string 64 | { 65 | return $this->website; 66 | } 67 | 68 | public function __set($name, $value): void 69 | { 70 | $this->$name = $value; 71 | } 72 | 73 | public function __toString(): string 74 | { 75 | return Resource::toString(get_object_vars($this)); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/resources/DeclarationDocuments.php: -------------------------------------------------------------------------------- 1 | date; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getText(): ?string 31 | { 32 | return $this->text; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getDocumentRequired(): ?string 39 | { 40 | return $this->documentRequired; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getHealthDocumentationLink(): ?string 47 | { 48 | return $this->healthDocumentationLink; 49 | } 50 | 51 | /** 52 | * @return string|null 53 | */ 54 | public function getTravelDocumentationLink(): ?string 55 | { 56 | return $this->travelDocumentationLink; 57 | } 58 | 59 | public function __set($name, $value): void 60 | { 61 | $this->$name = $value; 62 | } 63 | 64 | public function __toString(): string 65 | { 66 | return Resource::toString(get_object_vars($this)); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/resources/DelayPrediction.php: -------------------------------------------------------------------------------- 1 | id; 28 | } 29 | 30 | /** 31 | * @return string|null 32 | */ 33 | public function getProbability(): ?string 34 | { 35 | return $this->probability; 36 | } 37 | 38 | /** 39 | * @return string|null 40 | */ 41 | public function getResult(): ?string 42 | { 43 | return $this->result; 44 | } 45 | 46 | /** 47 | * @return string|null 48 | */ 49 | public function getSubType(): ?string 50 | { 51 | return $this->subType; 52 | } 53 | 54 | /** 55 | * @return string|null 56 | */ 57 | public function getType(): ?string 58 | { 59 | return $this->type; 60 | } 61 | 62 | public function __set($name, $value): void 63 | { 64 | $this->$name = $value; 65 | } 66 | 67 | public function __toString(): string 68 | { 69 | return Resource::toString(get_object_vars($this)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/resources/Description.php: -------------------------------------------------------------------------------- 1 | descriptionType; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getText(): ?string 28 | { 29 | return $this->text; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/Destination.php: -------------------------------------------------------------------------------- 1 | type; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getSubtype(): ?string 31 | { 32 | return $this->subtype; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getName(): ?string 39 | { 40 | return $this->name; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getIataCode(): ?string 47 | { 48 | return $this->iataCode; 49 | } 50 | 51 | public function __set($name, $value): void 52 | { 53 | $this->$name = $value; 54 | } 55 | 56 | public function __toString(): string 57 | { 58 | return Resource::toString(get_object_vars($this)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/resources/DiseaseCase.php: -------------------------------------------------------------------------------- 1 | date; 25 | } 26 | 27 | /** 28 | * @return int|null 29 | */ 30 | public function getActive(): ?int 31 | { 32 | return $this->active; 33 | } 34 | 35 | /** 36 | * @return int|null 37 | */ 38 | public function getRecovered(): ?int 39 | { 40 | return $this->recovered; 41 | } 42 | 43 | /** 44 | * @return int|null 45 | */ 46 | public function getDeaths(): ?int 47 | { 48 | return $this->deaths; 49 | } 50 | 51 | /** 52 | * @return int|null 53 | */ 54 | public function getConfirmed(): ?int 55 | { 56 | return $this->confirmed; 57 | } 58 | 59 | public function __set($name, $value): void 60 | { 61 | $this->$name = $value; 62 | } 63 | 64 | public function __toString(): string 65 | { 66 | return Resource::toString(get_object_vars($this)); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/resources/DiseaseDataSources.php: -------------------------------------------------------------------------------- 1 | covidDashboardLink; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getHealthDepartmentLink(): ?string 29 | { 30 | return $this->healthDepartmentLink; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getGovernmentSiteLink(): ?string 37 | { 38 | return $this->governmentSiteLink; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/DiseaseInfection.php: -------------------------------------------------------------------------------- 1 | date; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getLevel(): ?string 30 | { 31 | return $this->level; 32 | } 33 | 34 | /** 35 | * @return float|null 36 | */ 37 | public function getRate(): ?float 38 | { 39 | return $this->rate; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getInfectionMapLink(): ?string 46 | { 47 | return $this->infectionMapLink; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/ElementaryPrice.php: -------------------------------------------------------------------------------- 1 | amount; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getCurrency(): ?string 28 | { 29 | return $this->currency; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/ExitRestriction.php: -------------------------------------------------------------------------------- 1 | date; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getText(): ?string 31 | { 32 | return $this->text; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getSpecialRequirements(): ?string 39 | { 40 | return $this->specialRequirements; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getRulesLink(): ?string 47 | { 48 | return $this->rulesLink; 49 | } 50 | 51 | /** 52 | * @return string|null 53 | */ 54 | public function getIsBanned(): ?string 55 | { 56 | return $this->isBanned; 57 | } 58 | 59 | public function __set($name, $value): void 60 | { 61 | $this->$name = $value; 62 | } 63 | 64 | public function __toString(): string 65 | { 66 | return Resource::toString(get_object_vars($this)); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/resources/FareRules.php: -------------------------------------------------------------------------------- 1 | currency; 22 | } 23 | 24 | /** 25 | * @return TermAndCondition[]|null 26 | */ 27 | public function getRules(): ?array 28 | { 29 | return Resource::toResourceArray( 30 | $this->rules, 31 | TermAndCondition::class 32 | ); 33 | } 34 | 35 | public function __set($name, $value): void 36 | { 37 | $this->$name = $value; 38 | } 39 | 40 | public function __toString(): string 41 | { 42 | return Resource::toString(get_object_vars($this)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/resources/FlightAdditionalService.php: -------------------------------------------------------------------------------- 1 | amount; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getType(): ?string 28 | { 29 | return $this->type; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightAdditionalServicesRequest.php: -------------------------------------------------------------------------------- 1 | chargeableCheckedBags; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getChargeableSeatNumber(): ?string 29 | { 30 | return $this->chargeableSeatNumber; 31 | } 32 | 33 | /** 34 | * @return array|null 35 | */ 36 | public function getOtherServices(): ?array 37 | { 38 | return $this->otherServices; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/FlightAllotmentDetails.php: -------------------------------------------------------------------------------- 1 | tourName; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getTourReference(): ?string 28 | { 29 | return $this->tourReference; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightAvailabilityClass.php: -------------------------------------------------------------------------------- 1 | numberOfBookableSeats; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getClass(): ?string 30 | { 31 | return $this->class; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getClosedStatus(): ?string 38 | { 39 | return $this->closedStatus; 40 | } 41 | 42 | /** 43 | * @return FlightTourAllotment|null 44 | */ 45 | public function getTourAllotment(): ?object 46 | { 47 | return Resource::toResourceObject( 48 | $this->tourAllotment, 49 | FlightTourAllotment::class 50 | ); 51 | } 52 | 53 | public function __set($name, $value): void 54 | { 55 | $this->$name = $value; 56 | } 57 | 58 | public function __toString(): string 59 | { 60 | return Resource::toString(get_object_vars($this)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/resources/FlightBaggageAllowance.php: -------------------------------------------------------------------------------- 1 | quantity; 23 | } 24 | 25 | /** 26 | * @return int|null 27 | */ 28 | public function getWeight(): ?int 29 | { 30 | return $this->weight; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getWeightUnit(): ?string 37 | { 38 | return $this->weightUnit; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/FlightDateLinks.php: -------------------------------------------------------------------------------- 1 | flightDestinations; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getFlightOffers(): ?string 28 | { 29 | return $this->flightOffers; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightDesignator.php: -------------------------------------------------------------------------------- 1 | carrierCode; 24 | } 25 | 26 | /** 27 | * @return int|null 28 | */ 29 | public function getFlightNumber(): ?int 30 | { 31 | return $this->flightNumber; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getOperationalSuffix(): ?string 38 | { 39 | return $this->operationalSuffix; 40 | } 41 | 42 | public function __set($name, $value): void 43 | { 44 | $this->$name = $value; 45 | } 46 | 47 | public function __toString(): string 48 | { 49 | return Resource::toString(get_object_vars($this)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/resources/FlightDestinationLinks.php: -------------------------------------------------------------------------------- 1 | flightDates; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getFlightOffers(): ?string 28 | { 29 | return $this->flightOffers; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightEndpoint.php: -------------------------------------------------------------------------------- 1 | iataCode; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getTerminal(): ?string 30 | { 31 | return $this->terminal; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getAt(): ?string 38 | { 39 | return $this->at; 40 | } 41 | 42 | public function __set($name, $value): void 43 | { 44 | $this->$name = $value; 45 | } 46 | 47 | public function __toString(): string 48 | { 49 | return Resource::toString(get_object_vars($this)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/resources/FlightFee.php: -------------------------------------------------------------------------------- 1 | amount; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getType(): ?string 28 | { 29 | return $this->type; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightItineraries.php: -------------------------------------------------------------------------------- 1 | duration; 22 | } 23 | 24 | /** 25 | * @return FlightExtendedSegment[]|null 26 | */ 27 | public function getSegments(): ?array 28 | { 29 | return Resource::toResourceArray( 30 | $this->segments, 31 | FlightExtendedSegment::class 32 | ); 33 | } 34 | 35 | public function __set($name, $value): void 36 | { 37 | $this->$name = $value; 38 | } 39 | 40 | public function __toString(): string 41 | { 42 | return Resource::toString(get_object_vars($this)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/resources/FlightOfferPricingOutput.php: -------------------------------------------------------------------------------- 1 | type; 27 | } 28 | 29 | /** 30 | * @return FlightOffer[]|null 31 | */ 32 | public function getFlightOffers(): ?array 33 | { 34 | return Resource::toResourceArray( 35 | $this->flightOffers, 36 | FlightOffer::class 37 | ); 38 | } 39 | 40 | /** 41 | * @return FlightBookingRequirements|null 42 | */ 43 | public function getBookingRequirements(): ?object 44 | { 45 | return Resource::toResourceObject( 46 | $this->bookingRequirements, 47 | FlightBookingRequirements::class 48 | ); 49 | } 50 | 51 | public function __set($name, $value): void 52 | { 53 | $this->$name = $value; 54 | } 55 | 56 | public function __toString(): string 57 | { 58 | return Resource::toString(get_object_vars($this)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/resources/FlightOfferTax.php: -------------------------------------------------------------------------------- 1 | amount; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getCode(): ?string 28 | { 29 | return $this->code; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/FlightOrderAssociatedRecord.php: -------------------------------------------------------------------------------- 1 | reference; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getCreationDateTime(): ?string 30 | { 31 | return $this->creationDateTime; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getOriginSystemCode(): ?string 38 | { 39 | return $this->originSystemCode; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getFlightOfferId(): ?string 46 | { 47 | return $this->flightOfferId; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/FlightPayment.php: -------------------------------------------------------------------------------- 1 | brand; 25 | } 26 | 27 | /** 28 | * @return int|null 29 | */ 30 | public function getBinNumber(): ?int 31 | { 32 | return $this->binNumber; 33 | } 34 | 35 | /** 36 | * @return array|null 37 | */ 38 | public function getFlightOfferIds(): ?array 39 | { 40 | return $this->flightOfferIds; 41 | } 42 | 43 | public function __set($name, $value): void 44 | { 45 | $this->$name = $value; 46 | } 47 | 48 | public function __toString(): string 49 | { 50 | return Resource::toString(get_object_vars($this)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/resources/FlightPoint.php: -------------------------------------------------------------------------------- 1 | iataCode; 23 | } 24 | 25 | /** 26 | * @return FlightPointDeparture|null 27 | */ 28 | public function getDeparture(): ?object 29 | { 30 | return Resource::toResourceObject( 31 | $this->departure, 32 | FlightPointDeparture::class 33 | ); 34 | } 35 | 36 | /** 37 | * @return FlightPointArrival|null 38 | */ 39 | public function getArrival(): ?object 40 | { 41 | return Resource::toResourceObject( 42 | $this->arrival, 43 | FlightPointArrival::class 44 | ); 45 | } 46 | 47 | public function __set($name, $value): void 48 | { 49 | $this->$name = $value; 50 | } 51 | 52 | public function __toString(): string 53 | { 54 | return Resource::toString(get_object_vars($this)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/resources/FlightPointArrival.php: -------------------------------------------------------------------------------- 1 | terminal, 24 | FlightPointTerminal::class 25 | ); 26 | } 27 | 28 | /** 29 | * @return FlightPointGate|null 30 | */ 31 | public function getGate(): ?object 32 | { 33 | return Resource::toResourceObject( 34 | $this->gate, 35 | FlightPointGate::class 36 | ); 37 | } 38 | 39 | /** 40 | * @return FlightPointTiming[]|null 41 | */ 42 | public function getTimings(): ?array 43 | { 44 | return Resource::toResourceArray( 45 | $this->timings, 46 | FlightPointTiming::class 47 | ); 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/FlightPointDeparture.php: -------------------------------------------------------------------------------- 1 | terminal, 24 | FlightPointTerminal::class 25 | ); 26 | } 27 | 28 | /** 29 | * @return FlightPointGate|null 30 | */ 31 | public function getGate(): ?object 32 | { 33 | return Resource::toResourceObject( 34 | $this->gate, 35 | FlightPointGate::class 36 | ); 37 | } 38 | 39 | /** 40 | * @return FlightPointTiming[]|null 41 | */ 42 | public function getTimings(): ?array 43 | { 44 | return Resource::toResourceArray( 45 | $this->timings, 46 | FlightPointTiming::class 47 | ); 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/FlightPointGate.php: -------------------------------------------------------------------------------- 1 | mainGate; 22 | } 23 | 24 | public function __set($name, $value): void 25 | { 26 | $this->$name = $value; 27 | } 28 | 29 | public function __toString(): string 30 | { 31 | return Resource::toString(get_object_vars($this)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/resources/FlightPointTerminal.php: -------------------------------------------------------------------------------- 1 | code; 22 | } 23 | 24 | public function __set($name, $value): void 25 | { 26 | $this->$name = $value; 27 | } 28 | 29 | public function __toString(): string 30 | { 31 | return Resource::toString(get_object_vars($this)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/resources/FlightPointTiming.php: -------------------------------------------------------------------------------- 1 | qualifier; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getValue(): ?string 30 | { 31 | return $this->value; 32 | } 33 | 34 | /** 35 | * @return FlightPointTimingDelay[]|null 36 | */ 37 | public function getDelays(): ?array 38 | { 39 | return Resource::toResourceArray( 40 | $this->delays, 41 | FlightPointTimingDelay::class 42 | ); 43 | } 44 | 45 | public function __set($name, $value): void 46 | { 47 | $this->$name = $value; 48 | } 49 | 50 | public function __toString(): string 51 | { 52 | return Resource::toString(get_object_vars($this)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/resources/FlightPointTimingDelay.php: -------------------------------------------------------------------------------- 1 | duration; 21 | } 22 | 23 | public function __set($name, $value): void 24 | { 25 | $this->$name = $value; 26 | } 27 | 28 | public function __toString(): string 29 | { 30 | return Resource::toString(get_object_vars($this)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/resources/FlightPricingOptions.php: -------------------------------------------------------------------------------- 1 | fareType; 25 | } 26 | 27 | /** 28 | * @return bool|null 29 | */ 30 | public function getIncludedCheckedBagsOnly(): ?bool 31 | { 32 | return $this->includedCheckedBagsOnly; 33 | } 34 | 35 | /** 36 | * @return bool|null 37 | */ 38 | public function getRefundableFare(): ?bool 39 | { 40 | return $this->refundableFare; 41 | } 42 | 43 | /** 44 | * @return bool|null 45 | */ 46 | public function getNoRestrictionFare(): ?bool 47 | { 48 | return $this->noRestrictionFare; 49 | } 50 | 51 | /** 52 | * @return bool|null 53 | */ 54 | public function getNoPenaltyFare(): ?bool 55 | { 56 | return $this->noPenaltyFare; 57 | } 58 | 59 | public function __set($name, $value): void 60 | { 61 | $this->$name = $value; 62 | } 63 | 64 | public function __toString(): string 65 | { 66 | return Resource::toString(get_object_vars($this)); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/resources/FlightStop.php: -------------------------------------------------------------------------------- 1 | iataCode; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getDuration(): ?string 30 | { 31 | return $this->duration; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getArrivalAt(): ?string 38 | { 39 | return $this->arrivalAt; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getDepartureAt(): ?string 46 | { 47 | return $this->departureAt; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/FlightTourAllotment.php: -------------------------------------------------------------------------------- 1 | tourName; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getTourReference(): ?string 30 | { 31 | return $this->tourReference; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getMode(): ?string 38 | { 39 | return $this->mode; 40 | } 41 | 42 | /** 43 | * @return int|null 44 | */ 45 | public function getRemainingSeats(): ?int 46 | { 47 | return $this->remainingSeats; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/GeoCode.php: -------------------------------------------------------------------------------- 1 | latitude; 26 | } 27 | 28 | /** 29 | * @return float|null 30 | */ 31 | public function getLongitude(): ?float 32 | { 33 | return $this->longitude; 34 | } 35 | 36 | public function __set($name, $value): void 37 | { 38 | $this->$name = $value; 39 | } 40 | 41 | public function __toString(): string 42 | { 43 | return Resource::toString(get_object_vars($this)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/resources/HotelBookingAssociatedRecord.php: -------------------------------------------------------------------------------- 1 | reference; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getOriginSystemCode(): ?string 28 | { 29 | return $this->originSystemCode; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/HotelBookingLight.php: -------------------------------------------------------------------------------- 1 | type; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getId(): ?string 31 | { 32 | return $this->id; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getProviderConfirmationId(): ?string 39 | { 40 | return $this->providerConfirmationId; 41 | } 42 | 43 | /** 44 | * @return HotelBookingAssociatedRecord[]|null 45 | */ 46 | public function getAssociatedRecords(): ?array 47 | { 48 | return Resource::toResourceArray( 49 | $this->associatedRecords, 50 | HotelBookingAssociatedRecord::class 51 | ); 52 | } 53 | 54 | public function __set($name, $value): void 55 | { 56 | $this->$name = $value; 57 | } 58 | 59 | public function __toString(): string 60 | { 61 | return Resource::toString(get_object_vars($this)); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/resources/HotelDistance.php: -------------------------------------------------------------------------------- 1 | unit; 24 | } 25 | 26 | /** 27 | * @return float|null 28 | */ 29 | public function getValue(): ?float 30 | { 31 | return $this->value; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getDisplayValue(): ?string 38 | { 39 | return $this->displayValue; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getInUnlimited(): ?string 46 | { 47 | return $this->inUnlimited; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/HotelOfferAveragePrice.php: -------------------------------------------------------------------------------- 1 | currency; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getSellingTotal(): ?string 31 | { 32 | return $this->sellingTotal; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getBase(): ?string 39 | { 40 | return $this->base; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getTotal(): ?string 47 | { 48 | return $this->total; 49 | } 50 | 51 | /** 52 | * @return Markup[]|null 53 | */ 54 | public function getMarkups(): ?array 55 | { 56 | return Resource::toResourceArray( 57 | $this->markups, 58 | Markup::class 59 | ); 60 | } 61 | 62 | public function __set($name, $value): void 63 | { 64 | $this->$name = $value; 65 | } 66 | 67 | public function __toString(): string 68 | { 69 | return Resource::toString(get_object_vars($this)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/resources/HotelOfferTax.php: -------------------------------------------------------------------------------- 1 | currency; 28 | } 29 | 30 | /** 31 | * @return string|null 32 | */ 33 | public function getAmount(): ?string 34 | { 35 | return $this->amount; 36 | } 37 | 38 | /** 39 | * @return string|null 40 | */ 41 | public function getCode(): ?string 42 | { 43 | return $this->code; 44 | } 45 | 46 | /** 47 | * @return string|null 48 | */ 49 | public function getPercentage(): ?string 50 | { 51 | return $this->percentage; 52 | } 53 | 54 | /** 55 | * @return bool|null 56 | */ 57 | public function getIncluded(): ?bool 58 | { 59 | return $this->included; 60 | } 61 | 62 | /** 63 | * @return string|null 64 | */ 65 | public function getDescription(): ?string 66 | { 67 | return $this->description; 68 | } 69 | 70 | /** 71 | * @return string|null 72 | */ 73 | public function getPricingFrequency(): ?string 74 | { 75 | return $this->pricingFrequency; 76 | } 77 | 78 | /** 79 | * @return string|null 80 | */ 81 | public function getPricingMode(): ?string 82 | { 83 | return $this->pricingMode; 84 | } 85 | 86 | public function __set($name, $value): void 87 | { 88 | $this->$name = $value; 89 | } 90 | 91 | public function __toString(): string 92 | { 93 | return Resource::toString(get_object_vars($this)); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/resources/HotelOffers.php: -------------------------------------------------------------------------------- 1 | type; 27 | } 28 | 29 | /** 30 | * @return HotelContent|null 31 | */ 32 | public function getHotel(): ?object 33 | { 34 | return Resource::toResourceObject( 35 | $this->hotel, 36 | HotelContent::class 37 | ); 38 | } 39 | 40 | /** 41 | * @return bool|null 42 | */ 43 | public function getAvailable(): ?bool 44 | { 45 | return $this->available; 46 | } 47 | 48 | /** 49 | * @return HotelOffer[]|null 50 | */ 51 | public function getOffers(): ?array 52 | { 53 | return Resource::toResourceArray( 54 | $this->offers, 55 | HotelOffer::class 56 | ); 57 | } 58 | 59 | /** 60 | * @return string|null 61 | */ 62 | public function getSelf(): ?string 63 | { 64 | return $this->self; 65 | } 66 | 67 | public function __set($name, $value): void 68 | { 69 | $this->$name = $value; 70 | } 71 | 72 | public function __toString(): string 73 | { 74 | return Resource::toString(get_object_vars($this)); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/resources/HotelProductCancellationPolicy.php: -------------------------------------------------------------------------------- 1 | type; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getAmount(): ?string 32 | { 33 | return $this->amount; 34 | } 35 | 36 | /** 37 | * @return int|null 38 | */ 39 | public function getNumberOfNights(): ?int 40 | { 41 | return $this->numberOfNights; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getPercentage(): ?string 48 | { 49 | return $this->percentage; 50 | } 51 | 52 | /** 53 | * @return string|null 54 | */ 55 | public function getDeadline(): ?string 56 | { 57 | return $this->deadline; 58 | } 59 | 60 | /** 61 | * @return QualifiedFreeText|null 62 | */ 63 | public function getDescription(): ?object 64 | { 65 | return Resource::toResourceObject( 66 | $this->description, 67 | QualifiedFreeText::class 68 | ); 69 | } 70 | 71 | public function __set($name, $value): void 72 | { 73 | $this->$name = $value; 74 | } 75 | 76 | public function __toString(): string 77 | { 78 | return Resource::toString(get_object_vars($this)); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/resources/HotelProductCheckInOutPolicy.php: -------------------------------------------------------------------------------- 1 | checkIn; 24 | } 25 | 26 | /** 27 | * @return QualifiedFreeText|null 28 | */ 29 | public function getCheckInDescription(): ?object 30 | { 31 | return Resource::toResourceObject( 32 | $this->checkInDescription, 33 | QualifiedFreeText::class 34 | ); 35 | } 36 | 37 | /** 38 | * @return string|null 39 | */ 40 | public function getCheckOut(): ?string 41 | { 42 | return $this->checkOut; 43 | } 44 | 45 | /** 46 | * @return QualifiedFreeText|null 47 | */ 48 | public function getCheckOutDescription(): ?object 49 | { 50 | return Resource::toResourceObject( 51 | $this->checkOutDescription, 52 | QualifiedFreeText::class 53 | ); 54 | } 55 | 56 | public function __set($name, $value): void 57 | { 58 | $this->$name = $value; 59 | } 60 | 61 | public function __toString(): string 62 | { 63 | return Resource::toString(get_object_vars($this)); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/resources/HotelProductCommission.php: -------------------------------------------------------------------------------- 1 | percentage; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getAmount(): ?string 29 | { 30 | return $this->amount; 31 | } 32 | 33 | /** 34 | * @return QualifiedFreeText|null 35 | */ 36 | public function getDescription(): ?object 37 | { 38 | return Resource::toResourceObject( 39 | $this->description, 40 | QualifiedFreeText::class 41 | ); 42 | } 43 | 44 | public function __set($name, $value): void 45 | { 46 | $this->$name = $value; 47 | } 48 | 49 | public function __toString(): string 50 | { 51 | return Resource::toString(get_object_vars($this)); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/resources/HotelProductDepositPolicy.php: -------------------------------------------------------------------------------- 1 | amount; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getDeadline(): ?string 30 | { 31 | return $this->deadline; 32 | } 33 | 34 | /** 35 | * @return QualifiedFreeText|null 36 | */ 37 | public function getDescription(): ?object 38 | { 39 | return Resource::toResourceObject( 40 | $this->description, 41 | QualifiedFreeText::class 42 | ); 43 | } 44 | 45 | /** 46 | * @return HotelProductPaymentPolicy|null 47 | */ 48 | public function getAcceptedPayments(): ?object 49 | { 50 | return Resource::toResourceObject( 51 | $this->acceptedPayments, 52 | HotelProductPaymentPolicy::class 53 | ); 54 | } 55 | 56 | public function __set($name, $value): void 57 | { 58 | $this->$name = $value; 59 | } 60 | 61 | public function __toString(): string 62 | { 63 | return Resource::toString(get_object_vars($this)); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/resources/HotelProductEstimatedRoomType.php: -------------------------------------------------------------------------------- 1 | category; 23 | } 24 | 25 | /** 26 | * @return int|null 27 | */ 28 | public function getBeds(): ?int 29 | { 30 | return $this->beds; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getBedType(): ?string 37 | { 38 | return $this->bedType; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/HotelProductGuaranteePolicy.php: -------------------------------------------------------------------------------- 1 | description, 23 | QualifiedFreeText::class 24 | ); 25 | } 26 | 27 | /** 28 | * @return HotelProductPaymentPolicy|null 29 | */ 30 | public function getAcceptedPayments(): ?object 31 | { 32 | return Resource::toResourceObject( 33 | $this->acceptedPayments, 34 | HotelProductPaymentPolicy::class 35 | ); 36 | } 37 | 38 | public function __set($name, $value): void 39 | { 40 | $this->$name = $value; 41 | } 42 | 43 | public function __toString(): string 44 | { 45 | return Resource::toString(get_object_vars($this)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/resources/HotelProductGuests.php: -------------------------------------------------------------------------------- 1 | adults; 22 | } 23 | 24 | /** 25 | * @return array|null 26 | */ 27 | public function getChildAges(): ?array 28 | { 29 | return $this->childAges; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/HotelProductHoldPolicy.php: -------------------------------------------------------------------------------- 1 | deadline; 21 | } 22 | 23 | public function __set($name, $value): void 24 | { 25 | $this->$name = $value; 26 | } 27 | 28 | public function __toString(): string 29 | { 30 | return Resource::toString(get_object_vars($this)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/resources/HotelProductHotelPrice.php: -------------------------------------------------------------------------------- 1 | currency; 27 | } 28 | 29 | /** 30 | * @return string|null 31 | */ 32 | public function getSellingTotal(): ?string 33 | { 34 | return $this->sellingTotal; 35 | } 36 | 37 | /** 38 | * @return string|null 39 | */ 40 | public function getTotal(): ?string 41 | { 42 | return $this->total; 43 | } 44 | 45 | /** 46 | * @return string|null 47 | */ 48 | public function getBase(): ?string 49 | { 50 | return $this->base; 51 | } 52 | 53 | /** 54 | * @return HotelOfferTax[]|null 55 | */ 56 | public function getTaxes(): ?array 57 | { 58 | return Resource::toResourceArray( 59 | $this->taxes, 60 | HotelOfferTax::class 61 | ); 62 | } 63 | 64 | /** 65 | * @return Markup[]|null 66 | */ 67 | public function getMarkups(): ?array 68 | { 69 | return Resource::toResourceArray( 70 | $this->markups, 71 | Markup::class 72 | ); 73 | } 74 | 75 | /** 76 | * @return HotelProductPriceVariations|null 77 | */ 78 | public function getVariations(): ?object 79 | { 80 | return Resource::toResourceObject( 81 | $this->variations, 82 | HotelProductPriceVariations::class 83 | ); 84 | } 85 | 86 | public function __set($name, $value): void 87 | { 88 | $this->$name = $value; 89 | } 90 | 91 | public function __toString(): string 92 | { 93 | return Resource::toString(get_object_vars($this)); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/resources/HotelProductPaymentPolicy.php: -------------------------------------------------------------------------------- 1 | creditCards; 23 | } 24 | 25 | /** 26 | * @return array|null 27 | */ 28 | public function getMethods(): ?array 29 | { 30 | return $this->methods; 31 | } 32 | 33 | public function __set($name, $value): void 34 | { 35 | $this->$name = $value; 36 | } 37 | 38 | public function __toString(): string 39 | { 40 | return Resource::toString(get_object_vars($this)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/resources/HotelProductPriceVariation.php: -------------------------------------------------------------------------------- 1 | startDate; 27 | } 28 | 29 | /** 30 | * @return string|null 31 | */ 32 | public function getEndDate(): ?string 33 | { 34 | return $this->endDate; 35 | } 36 | 37 | /** 38 | * @return string|null 39 | */ 40 | public function getCurrency(): ?string 41 | { 42 | return $this->currency; 43 | } 44 | 45 | /** 46 | * @return string|null 47 | */ 48 | public function getSellingTotal(): ?string 49 | { 50 | return $this->sellingTotal; 51 | } 52 | 53 | /** 54 | * @return string|null 55 | */ 56 | public function getBase(): ?string 57 | { 58 | return $this->base; 59 | } 60 | 61 | /** 62 | * @return string|null 63 | */ 64 | public function getTotal(): ?string 65 | { 66 | return $this->total; 67 | } 68 | 69 | /** 70 | * @return Markup[]|null 71 | */ 72 | public function getMarkups(): ?array 73 | { 74 | return Resource::toResourceArray( 75 | $this->markups, 76 | Markup::class 77 | ); 78 | } 79 | 80 | public function __set($name, $value): void 81 | { 82 | $this->$name = $value; 83 | } 84 | 85 | public function __toString(): string 86 | { 87 | return Resource::toString(get_object_vars($this)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/resources/HotelProductPriceVariations.php: -------------------------------------------------------------------------------- 1 | average, 23 | HotelOfferAveragePrice::class 24 | ); 25 | } 26 | 27 | /** 28 | * @return HotelProductPriceVariation[]|null 29 | */ 30 | public function getChanges(): ?array 31 | { 32 | return Resource::toResourceArray( 33 | $this->changes, 34 | HotelProductPriceVariation::class 35 | ); 36 | } 37 | 38 | public function __set($name, $value): void 39 | { 40 | $this->$name = $value; 41 | } 42 | 43 | public function __toString(): string 44 | { 45 | return Resource::toString(get_object_vars($this)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/resources/HotelProductRateFamily.php: -------------------------------------------------------------------------------- 1 | code; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getType(): ?string 28 | { 29 | return $this->type; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/HotelProductRoomDetails.php: -------------------------------------------------------------------------------- 1 | type; 23 | } 24 | 25 | /** 26 | * @return HotelProductEstimatedRoomType|null 27 | */ 28 | public function getTypeEstimated(): ?object 29 | { 30 | return Resource::toResourceObject( 31 | $this->typeEstimated, 32 | HotelProductEstimatedRoomType::class 33 | ); 34 | } 35 | 36 | /** 37 | * @return QualifiedFreeText|null 38 | */ 39 | public function getDescription(): ?object 40 | { 41 | return Resource::toResourceObject( 42 | $this->description, 43 | QualifiedFreeText::class 44 | ); 45 | } 46 | 47 | public function __set($name, $value): void 48 | { 49 | $this->$name = $value; 50 | } 51 | 52 | public function __toString(): string 53 | { 54 | return Resource::toString(get_object_vars($this)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/resources/HotelSentiment.php: -------------------------------------------------------------------------------- 1 | hotelId; 27 | } 28 | 29 | /** 30 | * @return int|null 31 | */ 32 | public function getOverallRating(): ?int 33 | { 34 | return $this->overallRating; 35 | } 36 | 37 | /** 38 | * @return int|null 39 | */ 40 | public function getNumberOfReviews(): ?int 41 | { 42 | return $this->numberOfReviews; 43 | } 44 | 45 | /** 46 | * @return int|null 47 | */ 48 | public function getNumberOfRatings(): ?int 49 | { 50 | return $this->numberOfRatings; 51 | } 52 | 53 | /** 54 | * @return string|null 55 | */ 56 | public function getType(): ?string 57 | { 58 | return $this->type; 59 | } 60 | 61 | /** 62 | * @return HotelSentimentDetails|null 63 | */ 64 | public function getSentiments(): ?object 65 | { 66 | return Resource::toResourceObject( 67 | $this->sentiments, 68 | HotelSentimentDetails::class 69 | ); 70 | } 71 | 72 | public function __set($name, $value): void 73 | { 74 | $this->$name = $value; 75 | } 76 | 77 | public function __toString(): string 78 | { 79 | return Resource::toString(get_object_vars($this)); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/resources/Link.php: -------------------------------------------------------------------------------- 1 | href; 23 | } 24 | 25 | /** 26 | * @return array|null 27 | */ 28 | public function getMethods(): ?array 29 | { 30 | return $this->methods; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getRel(): ?string 37 | { 38 | return $this->rel; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/Links.php: -------------------------------------------------------------------------------- 1 | href; 24 | } 25 | 26 | /** 27 | * @return array|null 28 | */ 29 | public function getMethods(): ?array 30 | { 31 | return $this->methods; 32 | } 33 | 34 | /** 35 | * @return int|null 36 | */ 37 | public function getCount(): ?int 38 | { 39 | return $this->count; 40 | } 41 | 42 | public function __set($name, $value): void 43 | { 44 | $this->$name = $value; 45 | } 46 | 47 | public function __toString(): string 48 | { 49 | return Resource::toString(get_object_vars($this)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/resources/LocationAddress.php: -------------------------------------------------------------------------------- 1 | cityName; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getCityCode(): ?string 32 | { 33 | return $this->cityCode; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getCountryName(): ?string 40 | { 41 | return $this->countryName; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getCountryCode(): ?string 48 | { 49 | return $this->countryCode; 50 | } 51 | 52 | /** 53 | * @return string|null 54 | */ 55 | public function getStatusCode(): ?string 56 | { 57 | return $this->statusCode; 58 | } 59 | 60 | /** 61 | * @return string|null 62 | */ 63 | public function getRegionCode(): ?string 64 | { 65 | return $this->regionCode; 66 | } 67 | 68 | public function __set($name, $value): void 69 | { 70 | $this->$name = $value; 71 | } 72 | 73 | public function __toString(): string 74 | { 75 | return Resource::toString(get_object_vars($this)); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/resources/LocationAnalytics.php: -------------------------------------------------------------------------------- 1 | travelers, 22 | LocationAnalyticsTravelers::class 23 | ); 24 | } 25 | 26 | public function __set($name, $value): void 27 | { 28 | $this->$name = $value; 29 | } 30 | 31 | public function __toString(): string 32 | { 33 | return Resource::toString(get_object_vars($this)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/resources/LocationAnalyticsTravelers.php: -------------------------------------------------------------------------------- 1 | score; 21 | } 22 | 23 | public function __set($name, $value): void 24 | { 25 | $this->$name = $value; 26 | } 27 | 28 | public function __toString(): string 29 | { 30 | return Resource::toString(get_object_vars($this)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/resources/LocationDistance.php: -------------------------------------------------------------------------------- 1 | value; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getUnit(): ?string 28 | { 29 | return $this->unit; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/resources/Markup.php: -------------------------------------------------------------------------------- 1 | amount; 23 | } 24 | 25 | public function __set($name, $value): void 26 | { 27 | $this->$name = $value; 28 | } 29 | 30 | public function __toString(): string 31 | { 32 | return Resource::toString(get_object_vars($this)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/resources/MaskRestriction.php: -------------------------------------------------------------------------------- 1 | date; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getText(): ?string 29 | { 30 | return $this->text; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getIsRequired(): ?string 37 | { 38 | return $this->isRequired; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/OnTimePrediction.php: -------------------------------------------------------------------------------- 1 | id; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getSubType(): ?string 32 | { 33 | return $this->subType; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getProbability(): ?string 40 | { 41 | return $this->probability; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getType(): ?string 48 | { 49 | return $this->type; 50 | } 51 | 52 | /** 53 | * @return string|null 54 | */ 55 | public function getResult(): ?string 56 | { 57 | return $this->result; 58 | } 59 | 60 | public function __set($name, $value): void 61 | { 62 | $this->$name = $value; 63 | } 64 | 65 | public function __toString(): string 66 | { 67 | return Resource::toString(get_object_vars($this)); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/resources/OperatingFlight.php: -------------------------------------------------------------------------------- 1 | carrierCode; 21 | } 22 | 23 | public function __set($name, $value): void 24 | { 25 | $this->$name = $value; 26 | } 27 | 28 | public function __toString(): string 29 | { 30 | return Resource::toString(get_object_vars($this)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/resources/QualifiedFreeText.php: -------------------------------------------------------------------------------- 1 | lang; 30 | } 31 | 32 | /** 33 | * @return string|null 34 | */ 35 | public function getText(): ?string 36 | { 37 | return $this->text; 38 | } 39 | 40 | public function __set($name, $value): void 41 | { 42 | $this->$name = $value; 43 | } 44 | 45 | public function __toString(): string 46 | { 47 | return Resource::toString(get_object_vars($this)); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/resources/ResourceInterface.php: -------------------------------------------------------------------------------- 1 | category; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getCircumstances(): ?string 31 | { 32 | return $this->circumstances; 33 | } 34 | 35 | /** 36 | * @return bool|null 37 | */ 38 | public function getNotApplicable(): ?bool 39 | { 40 | return $this->notApplicable; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getMaxPenaltyAmount(): ?string 47 | { 48 | return $this->maxPenaltyAmount; 49 | } 50 | 51 | /** 52 | * @return Description[]|null 53 | */ 54 | public function getDescriptions(): ?array 55 | { 56 | return Resource::toResourceArray( 57 | $this->descriptions, 58 | Description::class 59 | ); 60 | } 61 | 62 | 63 | public function __set($name, $value): void 64 | { 65 | $this->$name = $value; 66 | } 67 | 68 | public function __toString(): string 69 | { 70 | return Resource::toString(get_object_vars($this)); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/resources/Transportation.php: -------------------------------------------------------------------------------- 1 | date; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getText(): ?string 31 | { 32 | return $this->text; 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getTransportationType(): ?string 39 | { 40 | return $this->transportationType; 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getIsBanned(): ?string 47 | { 48 | return $this->isBanned; 49 | } 50 | 51 | /** 52 | * @return string|null 53 | */ 54 | public function getThroughDate(): ?string 55 | { 56 | return $this->throughDate; 57 | } 58 | 59 | public function __set($name, $value): void 60 | { 61 | $this->$name = $value; 62 | } 63 | 64 | public function __toString(): string 65 | { 66 | return Resource::toString(get_object_vars($this)); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/resources/TravelerAddress.php: -------------------------------------------------------------------------------- 1 | lines; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getPostalCode(): ?string 32 | { 33 | return $this->postalCode; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getCountryCode(): ?string 40 | { 41 | return $this->countryCode; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getCityName(): ?string 48 | { 49 | return $this->cityName; 50 | } 51 | 52 | /** 53 | * @return string|null 54 | */ 55 | public function getStateName(): ?string 56 | { 57 | return $this->stateName; 58 | } 59 | 60 | /** 61 | * @return string|null 62 | */ 63 | public function getPostalBox(): ?string 64 | { 65 | return $this->postalBox; 66 | } 67 | 68 | public function __set($name, $value): void 69 | { 70 | $this->$name = $value; 71 | } 72 | 73 | public function __toString(): string 74 | { 75 | return Resource::toString(get_object_vars($this)); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/resources/TravelerContact.php: -------------------------------------------------------------------------------- 1 | addresseeName, 28 | TravelerName::class 29 | ); 30 | } 31 | 32 | /** 33 | * @return TravelerAddress|null 34 | */ 35 | public function getAddress(): ?object 36 | { 37 | return Resource::toResourceObject( 38 | $this->address, 39 | TravelerAddress::class 40 | ); 41 | } 42 | 43 | /** 44 | * @return string|null 45 | */ 46 | public function getLanguage(): ?string 47 | { 48 | return $this->language; 49 | } 50 | 51 | /** 52 | * @return string|null 53 | */ 54 | public function getPurpose(): ?string 55 | { 56 | return $this->purpose; 57 | } 58 | 59 | /** 60 | * @return TravelerPhone[]|null 61 | */ 62 | public function getPhones(): ?array 63 | { 64 | return Resource::toResourceArray( 65 | $this->phones, 66 | TravelerPhone::class 67 | ); 68 | } 69 | 70 | /** 71 | * @return string|null 72 | */ 73 | public function getCompanyName(): ?string 74 | { 75 | return $this->companyName; 76 | } 77 | 78 | /** 79 | * @return string|null 80 | */ 81 | public function getEmailAddress(): ?string 82 | { 83 | return $this->emailAddress; 84 | } 85 | 86 | public function __set($name, $value): void 87 | { 88 | $this->$name = $value; 89 | } 90 | 91 | public function __toString(): string 92 | { 93 | return Resource::toString(get_object_vars($this)); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/resources/TravelerElement.php: -------------------------------------------------------------------------------- 1 | id; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getDateOfBirth(): ?string 32 | { 33 | return $this->dateOfBirth; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getGender(): ?string 40 | { 41 | return $this->gender; 42 | } 43 | 44 | /** 45 | * @return TravelerName|null 46 | */ 47 | public function getName(): ?object 48 | { 49 | return Resource::toResourceObject( 50 | $this->name, 51 | TravelerName::class 52 | ); 53 | } 54 | 55 | /** 56 | * @return TravelerDocuments[]|null 57 | */ 58 | public function getDocuments(): ?array 59 | { 60 | return Resource::toResourceArray( 61 | $this->documents, 62 | TravelerDocuments::class 63 | ); 64 | } 65 | 66 | /** 67 | * @return TravelerContact|null 68 | */ 69 | public function getContact(): ?object 70 | { 71 | return Resource::toResourceObject( 72 | $this->contact, 73 | TravelerContact::class 74 | ); 75 | } 76 | 77 | public function __set($name, $value): void 78 | { 79 | $this->$name = $value; 80 | } 81 | 82 | public function __toString(): string 83 | { 84 | return Resource::toString(get_object_vars($this)); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/resources/TravelerName.php: -------------------------------------------------------------------------------- 1 | firstName; 24 | } 25 | 26 | /** 27 | * @return string|null 28 | */ 29 | public function getLastName(): ?string 30 | { 31 | return $this->lastName; 32 | } 33 | 34 | /** 35 | * @return string|null 36 | */ 37 | public function getMiddleName(): ?string 38 | { 39 | return $this->middleName; 40 | } 41 | 42 | /** 43 | * @return string|null 44 | */ 45 | public function getSecondLastName(): ?string 46 | { 47 | return $this->secondLastName; 48 | } 49 | 50 | public function __set($name, $value): void 51 | { 52 | $this->$name = $value; 53 | } 54 | 55 | public function __toString(): string 56 | { 57 | return Resource::toString(get_object_vars($this)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/resources/TravelerPhone.php: -------------------------------------------------------------------------------- 1 | deviceType; 23 | } 24 | 25 | /** 26 | * @return string|null 27 | */ 28 | public function getCountryCallingCode(): ?string 29 | { 30 | return $this->countryCallingCode; 31 | } 32 | 33 | /** 34 | * @return string|null 35 | */ 36 | public function getNumber(): ?string 37 | { 38 | return $this->number; 39 | } 40 | 41 | public function __set($name, $value): void 42 | { 43 | $this->$name = $value; 44 | } 45 | 46 | public function __toString(): string 47 | { 48 | return Resource::toString(get_object_vars($this)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/resources/TravelerPricing.php: -------------------------------------------------------------------------------- 1 | travelerId; 26 | } 27 | 28 | /** 29 | * @return string|null 30 | */ 31 | public function getFareOption(): ?string 32 | { 33 | return $this->fareOption; 34 | } 35 | 36 | /** 37 | * @return string|null 38 | */ 39 | public function getTravelerType(): ?string 40 | { 41 | return $this->travelerType; 42 | } 43 | 44 | /** 45 | * @return string|null 46 | */ 47 | public function getAssociateAdultId(): ?string 48 | { 49 | return $this->associateAdultId; 50 | } 51 | 52 | /** 53 | * @return FlightPrice|null 54 | */ 55 | public function getPrice(): ?object 56 | { 57 | return Resource::toResourceObject( 58 | $this->price, 59 | FlightPrice::class 60 | ); 61 | } 62 | 63 | /** 64 | * @return FlightFareDetailsBySegment[]|null 65 | */ 66 | public function getFareDetailsBySegment(): ?array 67 | { 68 | return Resource::toResourceArray( 69 | $this->fareDetailsBySegment, 70 | FlightFareDetailsBySegment::class 71 | ); 72 | } 73 | 74 | public function __set($name, $value): void 75 | { 76 | $this->$name = $value; 77 | } 78 | 79 | public function __toString(): string 80 | { 81 | return Resource::toString(get_object_vars($this)); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/resources/ValidityPeriod.php: -------------------------------------------------------------------------------- 1 | delay; 22 | } 23 | 24 | /** 25 | * @return string|null 26 | */ 27 | public function getReferenceDateType(): ?string 28 | { 29 | return $this->referenceDateType; 30 | } 31 | 32 | public function __set($name, $value): void 33 | { 34 | $this->$name = $value; 35 | } 36 | 37 | public function __toString(): string 38 | { 39 | return Resource::toString(get_object_vars($this)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/schedule/Flights.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getSchedule()->getFlights(); 20 | * 21 | */ 22 | class Flights 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * On-Demand Flight Status API: 37 | * 38 | * Retrieve a unique flight by search criteria.. 39 | * 40 | * $amadeus->getSchedule()->getFlights()->get( 41 | * ["carrierCode"=>"IB", "flightNumber"=>532, "scheduledDepartureDate"=>"2022-09-23"] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/on-demand-flight-status/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return DatedFlight[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | '/v2/schedule/flights', 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, DatedFlight::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/shopping/Activity.php: -------------------------------------------------------------------------------- 1 | build(); 18 | * $amadeus->getShopping()->getActivity(); 19 | * 20 | */ 21 | class Activity 22 | { 23 | private Amadeus $amadeus; 24 | private string $activityId; 25 | 26 | /** 27 | * Constructor. 28 | * @param Amadeus $amadeus 29 | * @param string $activityId 30 | */ 31 | public function __construct(Amadeus $amadeus, string $activityId) 32 | { 33 | $this->amadeus = $amadeus; 34 | $this->activityId = $activityId; 35 | } 36 | 37 | /** 38 | * Tours and Activities API: 39 | * 40 | * Find a single activity from a given id. 41 | * 42 | * $amadeus->getShopping()->getActivity("4615")->get(); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/destination-content/api-doc/tours-and-activities/api-reference 45 | * 46 | * @return \Amadeus\Resources\Activity an API resource 47 | * @throws ResponseException when an exception occurs 48 | */ 49 | public function get(): object 50 | { 51 | $response = $this->amadeus->getClient()->getWithOnlyPath( 52 | "/v1/shopping/activities"."/".$this->activityId 53 | ); 54 | 55 | return Resource::fromObject($response, \Amadeus\Resources\Activity::class); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/shopping/Availability.php: -------------------------------------------------------------------------------- 1 | build(); 17 | * $amadeus->getShopping()->getAvailability(); 18 | * 19 | */ 20 | class Availability 21 | { 22 | /** 23 | * A namespaced client for the 24 | * "/v1/shopping/availability/flight-availabilities" endpoints. 25 | */ 26 | private FlightAvailabilities $flightAvailabilities; 27 | 28 | /** 29 | * Constructor 30 | * @param Amadeus $amadeus 31 | */ 32 | public function __construct(Amadeus $amadeus) 33 | { 34 | $this->flightAvailabilities = new FlightAvailabilities($amadeus); 35 | } 36 | 37 | /** 38 | * Get a namespaced client for the 39 | * "/v1/shopping/availability/flight-availabilities" endpoints. 40 | * @return FlightAvailabilities 41 | */ 42 | public function getFlightAvailabilities(): ?FlightAvailabilities 43 | { 44 | return $this->flightAvailabilities; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/shopping/FlightDates.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getShopping()->getFlightDates(); 20 | * 21 | */ 22 | class FlightDates 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Flight Cheapest Dates Search API: 36 | * 37 | * Find the cheapest flight dates from an origin to a destination. 38 | * 39 | * $amadeus->getShopping()->getFlightDates()->get( 40 | * array( 41 | * "origin" => "MAD", 42 | * "destination" => "LON" 43 | * ) 44 | * ); 45 | * 46 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/flight-cheapest-date-search/api-reference 47 | * 48 | * @param array $params the parameters to send to the API 49 | * @return FlightDate[] an API resource 50 | * @throws ResponseException when an exception occurs 51 | */ 52 | public function get(array $params): array 53 | { 54 | $response = $this->amadeus->getClient()->getWithArrayParams( 55 | "/v1/shopping/flight-dates", 56 | $params 57 | ); 58 | 59 | return Resource::fromArray($response, FlightDate::class); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/shopping/FlightDestinations.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getShopping()->getFlightDestinations(); 20 | * 21 | */ 22 | class FlightDestinations 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | */ 29 | public function __construct(Amadeus $amadeus) 30 | { 31 | $this->amadeus = $amadeus; 32 | } 33 | 34 | /** 35 | * Flight Inspiration Search API: 36 | * 37 | * Find the cheapest destinations where you can fly to. 38 | * 39 | * $amadeus->getShopping()->getFlightDestination()->get(["origin"=>"MUC"]); 40 | * 41 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/flight-inspiration-search/api-reference 42 | * 43 | * @param array $params the parameters to send to the API 44 | * @return FlightDestination[] an API resource 45 | * @throws ResponseException when an exception occurs 46 | */ 47 | public function get(array $params): array 48 | { 49 | $response = $this->amadeus->getClient()->getWithArrayParams( 50 | "/v1/shopping/flight-destinations", 51 | $params 52 | ); 53 | 54 | return Resource::fromArray($response, FlightDestination::class); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/shopping/HotelOffer.php: -------------------------------------------------------------------------------- 1 | build(); 18 | * $amadeus->getShopping()->getHotelOffer(); 19 | * 20 | */ 21 | class HotelOffer 22 | { 23 | private Amadeus $amadeus; 24 | private string $offerId; 25 | 26 | /** 27 | * @param Amadeus $amadeus 28 | * @param string $offerId 29 | */ 30 | public function __construct(Amadeus $amadeus, string $offerId) 31 | { 32 | $this->amadeus = $amadeus; 33 | $this->offerId = $offerId; 34 | } 35 | 36 | /** 37 | * Hotel Search API: 38 | * 39 | * Return details for a specific offer. 40 | * 41 | * $amadeus->getShopping()->getHotelOffer("XXX")->get(); 42 | * 43 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference 44 | * 45 | * @return \Amadeus\Resources\HotelOffers an API resource 46 | * @throws ResponseException when an exception occurs 47 | */ 48 | public function get(): object 49 | { 50 | $response = $this->amadeus->getClient()->getWithOnlyPath( 51 | "/v3/shopping/hotel-offers"."/".$this->offerId 52 | ); 53 | 54 | return Resource::fromObject($response, \Amadeus\Resources\HotelOffers::class); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/shopping/HotelOffers.php: -------------------------------------------------------------------------------- 1 | build(); 18 | * $amadeus->getShopping()->getHotelOffers(); 19 | * 20 | */ 21 | class HotelOffers 22 | { 23 | private Amadeus $amadeus; 24 | 25 | /** 26 | * @param Amadeus $amadeus 27 | */ 28 | public function __construct(Amadeus $amadeus) 29 | { 30 | $this->amadeus = $amadeus; 31 | } 32 | 33 | /** 34 | * Hotel Search API: 35 | * 36 | * Search for hotels and retrieve availability and rates information. 37 | * 38 | * $amadeus->getShopping()->getHotelOffers()->get( 39 | * array( 40 | * "hotelId" => "MCLONGHM", 41 | * "adults" => 1, 42 | * "checkInDate" => "2022-12-29", 43 | * "roomQuantity" => 1, 44 | * "paymentPolicy" => "NONE", 45 | * "bestRateOnly" => true 46 | * ) 47 | * ); 48 | * 49 | * @link https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference 50 | * 51 | * @param array $params the parameters to send to the API 52 | * @return \Amadeus\Resources\HotelOffers[] an API resource 53 | * @throws ResponseException when an exception occurs 54 | */ 55 | public function get(array $params): array 56 | { 57 | $response = $this->amadeus->getClient()->getWithArrayParams( 58 | "/v3/shopping/hotel-offers", 59 | $params 60 | ); 61 | 62 | return Resource::fromArray($response, \Amadeus\Resources\HotelOffers::class); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/shopping/activities/BySquare.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getShopping()->getActivities()->getBySquare(); 20 | * 21 | */ 22 | class BySquare 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor. 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Tours and Activities API: 37 | * 38 | * Find a list of activities within a square defined by cardinal points. 39 | * 40 | * $amadeus->getShopping()->getActivities()->getBySquare()->get( 41 | * ["west" => 2.160873, "north" => 41.397158, "south" => 41.394582, "east" => 2.177181] 42 | * ); 43 | * 44 | * @link https://developers.amadeus.com/self-service/category/destination-content/api-doc/tours-and-activities/api-reference 45 | * 46 | * @param array $params the parameters to send to the API 47 | * @return Activity[] an API resource 48 | * @throws ResponseException when an exception occurs 49 | */ 50 | public function get(array $params): array 51 | { 52 | $response = $this->amadeus->getClient()->getWithArrayParams( 53 | "/v1/shopping/activities/by-square", 54 | $params 55 | ); 56 | 57 | return Resource::fromArray($response, Activity::class); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/shopping/availability/FlightAvailabilities.php: -------------------------------------------------------------------------------- 1 | build(); 19 | * $amadeus->getShopping()->getAvailability()->getFlightAvailabilities(); 20 | * 21 | */ 22 | class FlightAvailabilities 23 | { 24 | private Amadeus $amadeus; 25 | 26 | /** 27 | * Constructor 28 | * @param Amadeus $amadeus 29 | */ 30 | public function __construct(Amadeus $amadeus) 31 | { 32 | $this->amadeus = $amadeus; 33 | } 34 | 35 | /** 36 | * Flight Availabilities Search API: 37 | * 38 | * The Amadeus Flight Availability API provides a list of flights with seats for sale, 39 | * and the quantity of seats available in different fare classes on a given itinerary. 40 | * Additional information such as carrier and aircraft information, 41 | * the departure and arrival terminals, schedule, and route are also provided. 42 | * 43 | * $amadeus->getShopping()->getAvailability()->getFlightAvailabilities()->post(body); 44 | * 45 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/flight-availabilities-search/api-reference 46 | * 47 | * @param string $body the parameters to send to the API as a JsonObject 48 | * @return FlightAvailability[] an API resource 49 | * @throws ResponseException when an exception occurs 50 | */ 51 | public function post(string $body): array 52 | { 53 | $response = $this->amadeus->getClient()->postWithStringBody( 54 | '/v1/shopping/availability/flight-availabilities', 55 | $body 56 | ); 57 | 58 | return Resource::fromArray($response, FlightAvailability::class); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/travel/Predictions.php: -------------------------------------------------------------------------------- 1 | build(); 17 | * $amadeus->getTravel()->getPredictions(); 18 | * 19 | */ 20 | class Predictions 21 | { 22 | /** 23 | * A namespaced client for the 24 | * "/v1/travel/predictions/flight-delay" endpoints. 25 | */ 26 | private FlightDelay $flightDelay; 27 | 28 | /** 29 | * @param Amadeus $amadeus 30 | */ 31 | public function __construct(Amadeus $amadeus) 32 | { 33 | $this->flightDelay = new FlightDelay($amadeus); 34 | } 35 | 36 | /** 37 | * Get a namespaced client for the 38 | * "/v1/travel/predictions/flight-delay" endpoints. 39 | * @return FlightDelay 40 | */ 41 | public function getFlightDelay(): FlightDelay 42 | { 43 | return $this->flightDelay; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/travel/predictions/FlightDelay.php: -------------------------------------------------------------------------------- 1 | build(); 20 | * $amadeus->getTravel()->getPredictions()->getFlightDelay(); 21 | * 22 | */ 23 | class FlightDelay 24 | { 25 | private Amadeus $amadeus; 26 | 27 | /** 28 | * Constructor 29 | * @param Amadeus $amadeus 30 | */ 31 | public function __construct(Amadeus $amadeus) 32 | { 33 | $this->amadeus = $amadeus; 34 | } 35 | 36 | /** 37 | * Flight Delay Prediction API: 38 | * 39 | * Return the delay segment where the flight is likely to lay. 40 | * 41 | * $amadeus->getTravel()->getPredictions()->getFlightDelay()->get([ 42 | * "originLocationCode"=>"NCE", "destinationLocationCode"=>"ATH", 43 | * "departureDate"=>"2022-10-06", "departureTime"=>"18:40:00", 44 | * "arrivalDate"=>"2022-10-06", "arrivalTime"=>"22:05:00", 45 | * "aircraftCode"=>"32N", "carrierCode"=>"A3", 46 | * "flightNumber"=>"691", "duration"=>"PT2H25M" 47 | * ]); 48 | * 49 | * @link https://developers.amadeus.com/self-service/category/air/api-doc/flight-delay-prediction/api-reference 50 | * 51 | * @param array $params the parameters to send to the API 52 | * @return DelayPrediction[] an API resource 53 | * @throws ResponseException when an exception occurs 54 | */ 55 | public function get(array $params): array 56 | { 57 | $response = $this->amadeus->getClient()->getWithArrayParams( 58 | '/v1/travel/predictions/flight-delay', 59 | $params 60 | ); 61 | 62 | return Resource::fromArray($response, DelayPrediction::class); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /tests/AmadeusBuilderTest.php: -------------------------------------------------------------------------------- 1 | httpClient = new BasicHTTPClient($configuration); 30 | $this->amadeusBuilder = new AmadeusBuilder($configuration); 31 | 32 | $this->amadeusBuilder 33 | ->setSsl(true) 34 | ->setPort(8080) 35 | ->setHost('localhost') 36 | ->setHttpClient($this->httpClient) 37 | ->setTimeout(20); 38 | } 39 | 40 | public function testInitialize(): void 41 | { 42 | $configuration = $this->amadeusBuilder->getConfiguration(); 43 | $this->assertTrue($configuration->isSsl()); 44 | $this->assertEquals(8080, $configuration->getPort()); 45 | $this->assertEquals('localhost', $configuration->getHost()); 46 | $this->assertEquals($this->httpClient, $this->amadeusBuilder->getConfiguration()->getHttpClient()); 47 | $this->assertEquals(20, $this->amadeusBuilder->getConfiguration()->getTimeout()); 48 | } 49 | 50 | public function testBuildWithProductionEnvironment(): void 51 | { 52 | $this->amadeusBuilder->setProductionEnvironment(); 53 | $configuration = $this->amadeusBuilder->getConfiguration(); 54 | $this->assertEquals('api.amadeus.com', $configuration->getHost()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/AmadeusTest.php: -------------------------------------------------------------------------------- 1 | assertTrue( 23 | Amadeus::builder("id", "secret") instanceof AmadeusBuilder, 24 | "should return a AmadeusBuilder instance" 25 | ); 26 | } 27 | 28 | public function testBuilderWithNullClientId(): void 29 | { 30 | $this->expectException(TypeError::class); 31 | Amadeus::builder(null, "secret")->build(); 32 | } 33 | 34 | public function testBuilderWithNullClientSecret(): void 35 | { 36 | $this->expectException(TypeError::class); 37 | Amadeus::builder("id", null)->build(); 38 | } 39 | 40 | public function testBuilderWithEnvironment(): void 41 | { 42 | // Set the environment variable 43 | putenv("AMADEUS_CLIENT_ID=MY_CLIENT_ID"); 44 | putenv("AMADEUS_CLIENT_SECRET=MY_CLIENT_SECRET"); 45 | 46 | $this->assertTrue( 47 | Amadeus::builder() instanceof AmadeusBuilder, 48 | "should return a AmadeusBuilder instance" 49 | ); 50 | 51 | // Unset the environment variable 52 | putenv("AMADEUS_CLIENT_ID"); 53 | putenv("AMADEUS_CLIENT_SECRET"); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/ConfigurationTest.php: -------------------------------------------------------------------------------- 1 | assertTrue( 18 | (new Configuration("id", "secret")) instanceof Configuration, 19 | "should return a Configuration instance" 20 | ); 21 | } 22 | 23 | public function testGetClientIdAndSecret(): void 24 | { 25 | $configuration = new Configuration("123", "234"); 26 | $this->assertEquals("123", $configuration->getClientId()); 27 | $this->assertEquals("234", $configuration->getClientSecret()); 28 | } 29 | 30 | public function testBuildDefault(): void 31 | { 32 | $configuration = new Configuration("id", "secret"); 33 | $this->assertEquals("test.api.amadeus.com", $configuration->getHost()); 34 | $this->assertTrue($configuration->isSsl()); 35 | $this->assertEquals(443, $configuration->getPort()); 36 | } 37 | 38 | public function testSetSslAndPort(): void 39 | { 40 | $configuration = (new Configuration("id", "secret"))->setSsl(false); 41 | $this->assertFalse($configuration->isSsl()); 42 | $this->assertEquals(80, $configuration->getPort()); 43 | } 44 | 45 | public function testBuildWithProductionEnvironment(): void 46 | { 47 | $configuration = (new Configuration("id", "secret"))->setProductionEnvironment(); 48 | $this->assertEquals("api.amadeus.com", $configuration->getHost()); 49 | } 50 | 51 | public function testSetTimeout(): void 52 | { 53 | $configuration = (new Configuration("id", "secret"))->setTimeout(20); 54 | $this->assertEquals(20, $configuration->getTimeout()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/PHPUnitUtil.php: -------------------------------------------------------------------------------- 1 | getMethod($methodName); 23 | $method->setAccessible(true); 24 | return $method->invokeArgs($obj, $args); 25 | } 26 | 27 | /** 28 | * @param string $fileName 29 | * @return false|string 30 | */ 31 | public static function readFile(string $fileName) 32 | { 33 | $file = fopen($fileName, "r"); 34 | $fileSize = filesize($fileName); 35 | $fileContent = fread($file, $fileSize); 36 | fclose($file); 37 | return $fileContent; 38 | } 39 | 40 | /** 41 | * @param $object 42 | * @return string 43 | */ 44 | public static function toString($object): string 45 | { 46 | return json_encode( 47 | $object, 48 | JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES 49 | ); 50 | } 51 | 52 | public const RESOURCE_PATH_ROOT = __DIR__ . "/resources/__files/"; 53 | } 54 | -------------------------------------------------------------------------------- /tests/client/cached_token_null_test.json: -------------------------------------------------------------------------------- 1 | {"access_token":null,"expires_at":null} -------------------------------------------------------------------------------- /tests/client/cached_token_test.json: -------------------------------------------------------------------------------- 1 | {"access_token":"my_token","expires_at":999999999999} -------------------------------------------------------------------------------- /tests/resources/__files/activity_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "type": "activity", 4 | "id": "3044851", 5 | "self": { 6 | "href": "https://api.amadeus-discover.com/api/shopping/activities/3044851", 7 | "methods": [ 8 | "GET" 9 | ] 10 | }, 11 | "name": "Casa Milà", 12 | "description": "", 13 | "geoCode": { 14 | "latitude": 41.3952155, 15 | "longitude": 2.1619024 16 | }, 17 | "rating": "4.6", 18 | "price": {}, 19 | "pictures": [], 20 | "bookingLink": "", 21 | "minimumDuration": "" 22 | }, 23 | "meta": { 24 | "self": "https://api.amadeus-discover.com/api/shopping/activities/3044851" 25 | } 26 | } -------------------------------------------------------------------------------- /tests/resources/__files/airlines_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "count": 1, 4 | "links": { 5 | "self": "https://test.api.amadeus.com/v1/reference-data/airlines?airlineCodes=BA" 6 | } 7 | }, 8 | "data": [ 9 | { 10 | "type": "airline", 11 | "iataCode": "BA", 12 | "icaoCode": "BAW", 13 | "businessName": "BRITISH AIRWAYS", 14 | "commonName": "BRITISH A/W" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /tests/resources/__files/auth_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "amadeusOAuth2Token", 3 | "username": "archivojab@gmail.com", 4 | "application_name": "Demo App", 5 | "client_id": "myclientid", 6 | "token_type": "Bearer", 7 | "access_token": "mytoken", 8 | "expires_in": 1799, 9 | "state": "approved", 10 | "scope": "" 11 | } 12 | -------------------------------------------------------------------------------- /tests/resources/__files/direct_destinations_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "type": "location", 5 | "subtype": "city", 6 | "name": "Bangalore", 7 | "iataCode": "BLR" 8 | }, 9 | { 10 | "type": "location", 11 | "subtype": "city", 12 | "name": "Paris", 13 | "iataCode": "PAR" 14 | } 15 | ], 16 | "meta": { 17 | "count": "2", 18 | "sort": "iataCode", 19 | "links": { 20 | "self": "https://test.api.amadeus.com/v1/airport/direct-destination?departureAirportCode=NCE&max=2" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/resources/__files/flight_availabilities_post_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "originDestinations": [ 3 | { 4 | "id": "1", 5 | "originLocationCode": "BOS", 6 | "destinationLocationCode": "MAD", 7 | "departureDateTime": { 8 | "date": "2021-11-14", 9 | "time": "21:15:00" 10 | } 11 | } 12 | ], 13 | "travelers": [ 14 | { 15 | "id": "1", 16 | "travelerType": "ADULT" 17 | } 18 | ], 19 | "sources": [ 20 | "GDS" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/resources/__files/flight_dates_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "type": "flight-date", 5 | "origin": "MAD", 6 | "destination": "MUC", 7 | "departureDate": "2020-07-29", 8 | "returnDate": "2020-07-30", 9 | "price": { 10 | "total": "98.53" 11 | }, 12 | "links": { 13 | "flightDestinations": "https://test.api.amadeus.com/v1/shopping/flight-destinations?origin=MAD&departureDate=2020-07-24,2021-01-19&oneWay=false&duration=1,15&nonStop=false&viewBy=DURATION", 14 | "flightOffers": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=MAD&destinationLocationCode=MUC&departureDate=2020-07-29&returnDate=2020-07-30&adults=1&nonStop=false" 15 | } 16 | }, 17 | { 18 | "type": "flight-date", 19 | "origin": "MAD", 20 | "destination": "MUC", 21 | "departureDate": "2020-07-29", 22 | "returnDate": "2020-07-31", 23 | "price": { 24 | "total": "98.53" 25 | }, 26 | "links": { 27 | "flightDestinations": "https://test.api.amadeus.com/v1/shopping/flight-destinations?origin=MAD&departureDate=2020-07-24,2021-01-19&oneWay=false&duration=1,15&nonStop=false&viewBy=DURATION", 28 | "flightOffers": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=MAD&destinationLocationCode=MUC&departureDate=2020-07-29&returnDate=2020-07-31&adults=1&nonStop=false" 29 | } 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /tests/resources/__files/flight_delay_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "TK1816NCEIST20200801", 5 | "probability": "0.26012117", 6 | "result": "LESS_THAN_30_MINUTES", 7 | "subType": "flight-delay", 8 | "type": "prediction" 9 | }, 10 | { 11 | "id": "TK1816NCEIST20200801", 12 | "probability": "0.40128458", 13 | "result": "BETWEEN_30_AND_60_MINUTES", 14 | "subType": "flight-delay", 15 | "type": "prediction" 16 | }, 17 | { 18 | "id": "TK1816NCEIST20200801", 19 | "probability": "0.2285377", 20 | "result": "BETWEEN_60_AND_120_MINUTES", 21 | "subType": "flight-delay", 22 | "type": "prediction" 23 | }, 24 | { 25 | "id": "TK1816NCEIST20200801", 26 | "probability": "0.11005656", 27 | "result": "OVER_120_MINUTES_OR_CANCELLED", 28 | "subType": "flight-delay", 29 | "type": "prediction" 30 | } 31 | ], 32 | "meta": { 33 | "count": 4, 34 | "links": { 35 | "self": "https://test.api.amadeus.com/v1/travel/predictions/flight-delay?originLocationCode=NCE&destinationLocationCode=IST&departureDate=2020-08-01&departureTime=18:20:00&arrivalDate=2020-08-01&arrivalTime=22:15:00&aircraftCode=321&carrierCode=TK&flightNumber=1816&duration=PT31H10M" 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tests/resources/__files/flight_offers_post_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "currencyCode": "USD", 3 | "originDestinations": [ 4 | { 5 | "id": "1", 6 | "originLocationCode": "RIO", 7 | "destinationLocationCode": "MAD", 8 | "departureDateTimeRange": { 9 | "date": "2022-11-01", 10 | "time": "10:00:00" 11 | } 12 | }, 13 | { 14 | "id": "2", 15 | "originLocationCode": "MAD", 16 | "destinationLocationCode": "RIO", 17 | "departureDateTimeRange": { 18 | "date": "2022-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 | } -------------------------------------------------------------------------------- /tests/resources/__files/flights_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "count": 1, 4 | "links": { 5 | "self": "https://test.api.amadeus.com/v2/schedule/flights?carrierCode=IB&flightNumber=532&scheduledDepartureDate=2022-09-23" 6 | } 7 | }, 8 | "data": [ 9 | { 10 | "type": "DatedFlight", 11 | "scheduledDepartureDate": "2022-09-23", 12 | "flightDesignator": { 13 | "carrierCode": "IB", 14 | "flightNumber": 532 15 | }, 16 | "flightPoints": [ 17 | { 18 | "iataCode": "MAD", 19 | "departure": { 20 | "timings": [ 21 | { 22 | "qualifier": "STD", 23 | "value": "2022-09-23T11:45+02:00" 24 | } 25 | ] 26 | } 27 | }, 28 | { 29 | "iataCode": "VGO", 30 | "arrival": { 31 | "timings": [ 32 | { 33 | "qualifier": "STA", 34 | "value": "2022-09-23T12:55+02:00" 35 | } 36 | ] 37 | } 38 | } 39 | ], 40 | "segments": [ 41 | { 42 | "boardPointIataCode": "MAD", 43 | "offPointIataCode": "VGO", 44 | "scheduledSegmentDuration": "PT1H10M", 45 | "partnership": { 46 | "operatingFlight": { 47 | "carrierCode": "AA", 48 | "flightNumber": 8711 49 | } 50 | } 51 | } 52 | ], 53 | "legs": [ 54 | { 55 | "boardPointIataCode": "MAD", 56 | "offPointIataCode": "VGO", 57 | "aircraftEquipment": { 58 | "aircraftType": "32A" 59 | }, 60 | "scheduledLegDuration": "PT1H10M" 61 | } 62 | ] 63 | } 64 | ] 65 | } -------------------------------------------------------------------------------- /tests/resources/__files/hotel_bookings_post_request_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "offerId": "NRPQNQBOJM", 4 | "guests": [ 5 | { 6 | "name": { 7 | "title": "MR", 8 | "firstName": "BOB", 9 | "lastName": "SMITH" 10 | }, 11 | "contact": { 12 | "phone": "+33679278416", 13 | "email": "bob.smith@email.com" 14 | } 15 | } 16 | ], 17 | "payments": [ 18 | { 19 | "method": "creditCard", 20 | "card": { 21 | "vendorCode": "VI", 22 | "cardNumber": "4111111111111111", 23 | "expiryDate": "2023-01" 24 | } 25 | } 26 | ] 27 | } 28 | } -------------------------------------------------------------------------------- /tests/resources/__files/hotel_bookings_post_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "type": "hotel-booking", 5 | "id": "XD_8138319951754", 6 | "providerConfirmationId": "8138319951754", 7 | "associatedRecords": [ 8 | { 9 | "reference": "QVH2BX", 10 | "originSystemCode": "GDS" 11 | } 12 | ] 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /tests/resources/__files/hotel_sentiments_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "count": 1, 4 | "links": { 5 | "self": "https://test.api.amadeus.com/v2/e-reputation/hotel-sentiments?hotelIds=TELONMFS" 6 | } 7 | }, 8 | "data": [ 9 | { 10 | "hotelId": "TELONMFS", 11 | "overallRating": 81, 12 | "numberOfReviews": 2667, 13 | "numberOfRatings": 2666, 14 | "type": "hotelSentiment", 15 | "sentiments": { 16 | "staff": 89, 17 | "location": 89, 18 | "service": 80, 19 | "roomComforts": 87, 20 | "internet": 72, 21 | "sleepQuality": 78, 22 | "valueForMoney": 75, 23 | "facilities": 75, 24 | "catering": 81, 25 | "pointsOfInterest": 81 26 | } 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /tests/resources/__files/hotels_by_city_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "chainCode": "ZZ", 5 | "iataCode": "NCE", 6 | "dupeId": 504813011, 7 | "name": "HOTEL 3", 8 | "hotelId": "ZZNCENVX", 9 | "geoCode": { 10 | "latitude": 43.66665, 11 | "longitude": 7.21465 12 | }, 13 | "address": { 14 | "countryCode": "FR" 15 | }, 16 | "distance": { 17 | "value": 0.92, 18 | "unit": "KM" 19 | } 20 | }, 21 | { 22 | "chainCode": "NN", 23 | "iataCode": "NCE", 24 | "dupeId": 700091936, 25 | "name": "CAMPANILE NICE - A?ROPORT", 26 | "hotelId": "NNNCE357", 27 | "geoCode": { 28 | "latitude": 43.66686, 29 | "longitude": 7.21397 30 | }, 31 | "address": { 32 | "countryCode": "FR" 33 | }, 34 | "distance": { 35 | "value": 0.96, 36 | "unit": "KM" 37 | } 38 | } 39 | ], 40 | "meta": { 41 | "count": 2, 42 | "links": { 43 | "self": "http://test.api.amadeus.com/reference-data/locations/hotels/by-city?cityCode=NCE&radius=1" 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /tests/resources/__files/hotels_by_hotels_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "chainCode": "AC", 5 | "iataCode": "PAR", 6 | "dupeId": 700140792, 7 | "name": "LE NOTRE DAME", 8 | "hotelId": "ACPAR419", 9 | "geoCode": { 10 | "latitude": 48.85306, 11 | "longitude": 2.34654 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=ACPAR419" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /tests/resources/__files/location_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "links": { 4 | "self": "https://test.api.amadeus.com/v1/reference-data/locations/CMUC" 5 | } 6 | }, 7 | "data": { 8 | "type": "location", 9 | "subType": "CITY", 10 | "name": "MUNICH", 11 | "detailedName": "MUNICH/DE", 12 | "id": "CMUC", 13 | "self": { 14 | "href": "https://test.api.amadeus.com/v1/reference-data/locations/CMUC", 15 | "methods": [ 16 | "GET" 17 | ] 18 | }, 19 | "timeZoneOffset": "+02:00", 20 | "iataCode": "MUC", 21 | "geoCode": { 22 | "latitude": 48.35378, 23 | "longitude": 11.78609 24 | }, 25 | "address": { 26 | "cityName": "MUNICH", 27 | "cityCode": "MUC", 28 | "countryName": "GERMANY", 29 | "countryCode": "DE", 30 | "regionCode": "EUROP" 31 | }, 32 | "analytics": { 33 | "travelers": { 34 | "score": 27 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tests/resources/__files/locations_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "count": 2, 4 | "links": { 5 | "self": "https://test.api.amadeus.com/v1/reference-data/locations?subType=CITY,AIRPORT&keyword=MUC&countryCode=DE" 6 | } 7 | }, 8 | "data": [ 9 | { 10 | "id": "CMUC", 11 | "self": { 12 | "href": "https://test.api.amadeus.com/v1/reference-data/locations/CMUC", 13 | "methods": [ 14 | "GET" 15 | ] 16 | }, 17 | "type": "location", 18 | "subType": "CITY", 19 | "name": "MUNICH INTERNATIONAL", 20 | "detailedName": "MUNICH/DE:MUNICH INTERNATIONAL", 21 | "timeZoneOffset": "+02:00", 22 | "iataCode": "MUC", 23 | "geoCode": { 24 | "latitude": 48.35378, 25 | "longitude": 11.78609 26 | }, 27 | "address": { 28 | "cityName": "MUNICH", 29 | "cityCode": "MUC", 30 | "countryName": "GERMANY", 31 | "countryCode": "DE", 32 | "regionCode": "EUROP" 33 | }, 34 | "analytics": { 35 | "travelers": { 36 | "score": 27 37 | } 38 | } 39 | }, 40 | { 41 | "type": "location", 42 | "subType": "AIRPORT", 43 | "name": "MUNICH INTERNATIONAL", 44 | "detailedName": "MUNICH/DE:MUNICH INTERNATIONAL", 45 | "id": "AMUC", 46 | "self": { 47 | "href": "https://test.api.amadeus.com/v1/reference-data/locations/AMUC", 48 | "methods": [ 49 | "GET" 50 | ] 51 | }, 52 | "timeZoneOffset": "+02:00", 53 | "iataCode": "MUC", 54 | "geoCode": { 55 | "latitude": 48.35378, 56 | "longitude": 11.78609 57 | }, 58 | "address": { 59 | "cityName": "MUNICH", 60 | "cityCode": "MUC", 61 | "countryName": "GERMANY", 62 | "countryCode": "DE", 63 | "regionCode": "EUROP" 64 | }, 65 | "analytics": { 66 | "travelers": { 67 | "score": 27 68 | } 69 | } 70 | } 71 | ] 72 | } -------------------------------------------------------------------------------- /tests/resources/__files/on_time_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "id": "NCE20221101", 4 | "probability": "0.928", 5 | "result": "0.86615133", 6 | "subType": "on-time", 7 | "type": "prediction" 8 | }, 9 | "meta": { 10 | "links": { 11 | "self": "https://test.api.amadeus.com/v1/airport/predictions/on-time?airportCode=NCE&date=2022-11-01" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /tests/resources/__files/recommended_locations_get_response_ok.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "subtype": "CITY", 5 | "name": "Algiers", 6 | "iataCode": "ALG", 7 | "geoCode": { 8 | "latitude": 36.6985, 9 | "longitude": 3.2067200000000002 10 | }, 11 | "type": "recommended-location", 12 | "relevance": 0.97968028 13 | }, 14 | { 15 | "subtype": "CITY", 16 | "name": "Marseille", 17 | "iataCode": "MRS", 18 | "geoCode": { 19 | "latitude": 43.435559999999995, 20 | "longitude": 5.21361 21 | }, 22 | "type": "recommended-location", 23 | "relevance": 0.9627265 24 | }, 25 | { 26 | "subtype": "CITY", 27 | "name": "Tunis", 28 | "iataCode": "TUN", 29 | "geoCode": { 30 | "latitude": 36.85103, 31 | "longitude": 10.227219999999999 32 | }, 33 | "type": "recommended-location", 34 | "relevance": 0.95988677 35 | }, 36 | { 37 | "subtype": "CITY", 38 | "name": "Barcelona", 39 | "iataCode": "BCN", 40 | "geoCode": { 41 | "latitude": 41.297078000000006, 42 | "longitude": 2.078464 43 | }, 44 | "type": "recommended-location", 45 | "relevance": 0.94314606 46 | }, 47 | { 48 | "subtype": "CITY", 49 | "name": "Lisbon", 50 | "iataCode": "LIS", 51 | "geoCode": { 52 | "latitude": 38.78131, 53 | "longitude": -9.13592 54 | }, 55 | "type": "recommended-location", 56 | "relevance": 0.93192222 57 | } 58 | ], 59 | "meta": { 60 | "count": 5, 61 | "links": { 62 | "self": "https://test.api.amadeus.com/v1/reference-data/recommended-locations?cityCodes=PAR&travelerCountryCode=FR" 63 | } 64 | } 65 | } --------------------------------------------------------------------------------