Skip to content

Availability Search

Salma Abdelhady edited this page Nov 30, 2017 · 6 revisions

Authority

The authority information, required by all Web Service operations, combines authentication and configuration:

   `$auth = new RoomsXMLAuthentication();

    $auth->setOrg(**); //Agency ID
    $auth->setUserName(***); //Username 
    $auth->setPassword(***); //Password
    $auth->setVersion('1.26');
    $auth->setCurrency('USD'); 
    $auth->setLanguage('en');//optional
    $auth->setDebugMode(true);//optional
    $auth->setTestMode(true);//optional
    $availability = new AvailabilitySearch($auth);`

HotelStayDetails

The HotelStayDetails XML structure is used in availability search and booking operations to describe the time period and room requirements for a booking

    $hotelStayDetails = new HotelStayDetails();
    $hotelStayDetails->setArrivalDate(new \DateTime("+2 weeks"));
    $hotelStayDetails->setNationality('EG');
    $hotelStayDetails->setNights(4);
    $hotelStayDetails->setRoomsDetails(array(['adult' => 2, 'child' => 0])); 
Clone this wiki locally