Module: Ean3::Hotels

Included in:
Client
Defined in:
lib/ean3/hotels.rb

Instance Method Summary collapse

Instance Method Details

#getAlternatePropertiesObject

Request Alternate Properties



89
90
91
92
93
94
# File 'lib/ean3/hotels.rb', line 89

def getAlternateProperties
  response = conncetion.get do |req|
    req.url "altProps", options
  end
  return_error_or_body(response, response.body)
end

#getAvaliabillityObject

Request Hotel Rooms



49
50
51
52
53
54
# File 'lib/ean3/hotels.rb', line 49

def getAvaliabillity
  response = conncetion.get do |req|
    req.url "avail", options
  end
  return_error_or_body(response, response.body)
end

#getCancelObject

Cancel a Reservation



109
110
111
112
113
114
# File 'lib/ean3/hotels.rb', line 109

def getCancel
  response = conncetion.post do |req|
    req.url "cancel", options
  end
  return_error_or_body(response, response.body)
end

#getGeoLocationObject

Location Geo Functions



29
30
31
32
33
34
# File 'lib/ean3/hotels.rb', line 29

def getGeoLocation
  response = connection.get do |req|
    req.url "geoSearch", options
  end
  return_error_or_body(response, response.body)
end

#getInformationObject

Request Hotel Infomation



39
40
41
42
43
44
# File 'lib/ean3/hotels.rb', line 39

def getInformation
  response = conncetion.get do |req|
    req.url "info", options
  end
  return_error_or_body(response, response.body)
end

#getItineraryObject

Request Itinerary Record



99
100
101
102
103
104
# File 'lib/ean3/hotels.rb', line 99

def getItinerary
  response = conncetion.get do |req|
    req.url "itin", options
  end
  return_error_or_body(response, response.body)
end

#getList(options = {}) ⇒ Object

Request a List of Hotels

HotelListRequest Bese Elements =

Location search parameters alternative #1 (use city/stateProvinceCode/countryCode parameters) =

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • String (Object)

    :arrivalDate - The desired check-in date

    • Format MM/DD/YYYY

    • Example 10/18/2011

  • String (Object)

    :departureDate - The desired check-out date

  • int (Object)

    :numberOfResults

  • String (Object)

    :city

  • String (Object)

    :stateProvinceCode

  • String (Object)

    :countryCode



19
20
21
22
23
24
# File 'lib/ean3/hotels.rb', line 19

def getList(options={})
  response = connection.get do |req|
    req.url "list", options
  end
  return_error_or_body(response, response.body)
end

#getPaymentInfoObject

Request Payment Types



69
70
71
72
73
74
# File 'lib/ean3/hotels.rb', line 69

def getPaymentInfo
  response = conncetion.get do |req|
    req.url "paymentInfo", options
  end
  return_error_or_body(response, response.body)
end

#getPingObject

Ping Request



119
120
121
122
123
124
# File 'lib/ean3/hotels.rb', line 119

def getPing
  response = conncetion.get do |req|
    req.url "ping", options
  end
  return_error_or_body(response, response.body)
end

#getReservationObject

Book a Reservation



79
80
81
82
83
84
# File 'lib/ean3/hotels.rb', line 79

def getReservation
   response = conncetion.post do |req|
     req.url "res", options
   end
   return_error_or_body(response, response.body)
end

#getRulesObject

Request Rate Rules



59
60
61
62
63
64
# File 'lib/ean3/hotels.rb', line 59

def getRules
  response = conncetion.get do |req|
    req.url "rules", options
  end
  return_error_or_body(response, response.body)
end