Class: ExpediaApi::Entities::PackageHotel

Inherits:
Object
  • Object
show all
Defined in:
lib/expedia_api/entities/package_hotel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_data) ⇒ PackageHotel

Returns a new instance of PackageHotel.



6
7
8
# File 'lib/expedia_api/entities/package_hotel.rb', line 6

def initialize(raw_data)
  @raw_data = raw_data || {}
end

Instance Attribute Details

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



4
5
6
# File 'lib/expedia_api/entities/package_hotel.rb', line 4

def raw_data
  @raw_data
end

Instance Method Details

#idObject

returns the hotel id



15
16
17
# File 'lib/expedia_api/entities/package_hotel.rb', line 15

def id
  raw_data[:HotelID].to_i
end

#indexObject



10
11
12
# File 'lib/expedia_api/entities/package_hotel.rb', line 10

def index
  raw_data[:HotelIndex].to_i
end

#nameObject

returns the name of the hotel



20
21
22
# File 'lib/expedia_api/entities/package_hotel.rb', line 20

def name
  raw_data[:Name]
end