Class: Suitcase::NightlyRate

Inherits:
Object
  • Object
show all
Defined in:
lib/suitcase/hotel/nightly_rate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ NightlyRate

Internal: Create a NightlyRate from the API response.

info - A Hash from the API response containing nightly rate information.



8
9
10
11
12
# File 'lib/suitcase/hotel/nightly_rate.rb', line 8

def initialize(info)
  @promo = info["@promo"]
  @rate = info["@rate"]
  @base_rate = info["@baseRate"]
end

Instance Attribute Details

#base_rateObject

Returns the value of attribute base_rate.



3
4
5
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3

def base_rate
  @base_rate
end

#promoObject

Returns the value of attribute promo.



3
4
5
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3

def promo
  @promo
end

#rateObject

Returns the value of attribute rate.



3
4
5
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3

def rate
  @rate
end