Class: ExpediaApi::Entities::PackageHotel
- Inherits:
-
Object
- Object
- ExpediaApi::Entities::PackageHotel
- Defined in:
- lib/expedia_api/entities/package_hotel.rb
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#id ⇒ Object
returns the hotel id.
- #index ⇒ Object
-
#initialize(raw_data) ⇒ PackageHotel
constructor
A new instance of PackageHotel.
-
#name ⇒ Object
returns the name of the hotel.
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_data ⇒ Object (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
#id ⇒ Object
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 |
#index ⇒ Object
10 11 12 |
# File 'lib/expedia_api/entities/package_hotel.rb', line 10 def index raw_data[:HotelIndex].to_i end |
#name ⇒ Object
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 |