Class: Suitcase::Hotel::Reservation
- Inherits:
-
Object
- Object
- Suitcase::Hotel::Reservation
- Defined in:
- lib/suitcase/hotel/reservation.rb
Instance Attribute Summary collapse
-
#confirmation_numbers ⇒ Object
Returns the value of attribute confirmation_numbers.
-
#itinerary_id ⇒ Object
Returns the value of attribute itinerary_id.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#surcharges ⇒ Object
Returns the value of attribute surcharges.
Instance Method Summary collapse
-
#initialize(info) ⇒ Reservation
constructor
Internal: Create a new Reservation from the API response.
Constructor Details
#initialize(info) ⇒ Reservation
Internal: Create a new Reservation from the API response.
info - The Hash of information returned from the API.
9 10 11 12 |
# File 'lib/suitcase/hotel/reservation.rb', line 9 def initialize(info) @itinerary_id, @confirmation_numbers = info[:itinerary_id], [info[:confirmation_numbers]].flatten @surcharges = info[:surcharges] end |
Instance Attribute Details
#confirmation_numbers ⇒ Object
Returns the value of attribute confirmation_numbers.
4 5 6 |
# File 'lib/suitcase/hotel/reservation.rb', line 4 def confirmation_numbers @confirmation_numbers end |
#itinerary_id ⇒ Object
Returns the value of attribute itinerary_id.
4 5 6 |
# File 'lib/suitcase/hotel/reservation.rb', line 4 def itinerary_id @itinerary_id end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/suitcase/hotel/reservation.rb', line 4 def raw @raw end |
#surcharges ⇒ Object
Returns the value of attribute surcharges.
4 5 6 |
# File 'lib/suitcase/hotel/reservation.rb', line 4 def surcharges @surcharges end |