public function getBody() { $xml = ''; $xml .= Helper::wrapTag('HotelSearchCode', $this->getHotelSearchCode()); $xml .= Helper::wrapTag('ArrivalDate', $this->getDateFrom()); return $xml; }
public function getBody() { $xml = ''; $xml .= Helper::wrapTag('GoBookingCode', $this->getBookingCode()); $xml .= Helper::wrapTag('GetEmergencyPhone', $this->getEmergencyPhone() ? 'true' : 'false'); return $xml; }
public function getBody() { $xml = ""; foreach ($this->getBookingCodes() as $code) { $xml .= Helper::wrapTag('GoBookingCode', $code); } return $xml; }
public function getBody() { $xml = ""; $xml .= $this->getDateFrom() ? Helper::wrapTag('ArrivalDateRangeFrom', $this->getDateFrom()) : ""; $xml .= $this->getDateUntil() ? Helper::wrapTag('ArrivalDateRangeTo', $this->getDateUntil()) : ""; $xml .= $this->getNights() ? Helper::wrapTag('Nights', $this->getNights()) : ""; $xml .= $this->getPassengerName() ? Helper::wrapTag('PaxName', $this->getPassengerName()) : ""; $xml .= $this->getCity() ? Helper::wrapTag('CityCode', $this->getCity()) : ""; $xml .= $this->getHotelName() ? Helper::wrapTag('HotelName', $this->getHotelName()) : ""; return $xml; }
public function getBody() { if ($this->_city < 1 && $this->_hotelCode < 1) { throw new Exception("CityCode or HotelId must be specified!"); } if ($this->_dateFrom < 1) { throw new Exception("ArrivalDate must be specified!"); } if ($this->_nights < 1) { throw new Exception("Nights must be specified!"); } if (count($this->_rooms) < 1) { throw new Exception("At least one room must be specified!"); } $xml = ""; $xml .= Helper::wrapTag("MaximumWaitTime", $this->getService()->getTimeout()); $xml .= Helper::wrapTag("MaxResponses", $this->getService()->getMaxResult()); if ($this->getCity() > 0) { $xml .= Helper::wrapTag("CityCode", $this->getCity()); } if ($this->getHotelCode() > 0) { $xml .= Helper::wrapTag('Hotels', Helper::wrapTag('HotelId', $this->getHotelCode())); } $xml .= Helper::wrapTag("ArrivalDate", $this->getDateFrom()); $xml .= Helper::wrapTag("Nights", intval($this->getNights())); $xml .= Helper::wrapTag('Apartments', $this->getApartments() ? 'true' : 'false'); if ($this->getSort()) { $xml .= Helper::wrapTag("SortOrder", intval($this->getSort())); } $rooms = ''; foreach ($this->getRooms() as $r) { $children = ''; for ($c = 0; $c < $r['children']; $c++) { $children .= Helper::wrapTag('ChildAge', Room::CHILD_AGE); } $rooms .= Helper::wrapTag('Room', $children, ['RoomCount' => 1, 'Adults' => $r['adults'], 'CotCount' => $r['infant']]); } $xml .= Helper::wrapTag('Rooms', $rooms); return $xml; }
public function getBody() { return Helper::wrapTag('GoBookingCode', $this->getBookingCode()); }
public function getBody() { $xml = ""; $xml .= Helper::wrapTag('AgentReference', $this->getReference()); $xml .= Helper::wrapTag('HotelSearchCode', $this->getHotelSearchCode()); $xml .= Helper::wrapTag('ArrivalDate', $this->getDateFrom()); $xml .= Helper::wrapTag('Nights', $this->getNights()); $xml .= Helper::wrapTag('NoAlternativeHotel', $this->getAlternative() ? 'false' : 'true'); $xml .= Helper::wrapTag('Leader', false, ['LeaderPersonID' => $this->getLeader()]); $rooms = ''; $pid = 1; for ($r = 1; $r <= $this->countRooms(); $r++) { $room = $this->getRoom($r); $rooms .= $room->xmlForBooking($r, $pid); $pid += $room->countPersons(); } $xml .= Helper::wrapTag('Rooms', $rooms); return $xml; }
public function getBody() { return Helper::wrapTag('HotelSearchCode', $this->getHotelSearchCode()); }