Class: Worldline::Connect::SDK::V1::Domain::LodgingRoom

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/lodging_room.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#daily_room_rateString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def daily_room_rate
  @daily_room_rate
end

#daily_room_rate_currency_codeString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def daily_room_rate_currency_code
  @daily_room_rate_currency_code
end

#daily_room_tax_amountString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def daily_room_tax_amount
  @daily_room_tax_amount
end

#daily_room_tax_amount_currency_codeString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def daily_room_tax_amount_currency_code
  @daily_room_tax_amount_currency_code
end

#number_of_nights_at_room_rateInteger



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def number_of_nights_at_room_rate
  @number_of_nights_at_room_rate
end

#room_locationString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def room_location
  @room_location
end

#room_numberString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def room_number
  @room_number
end

#type_of_bedString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def type_of_bed
  @type_of_bed
end

#type_of_roomString



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 21

def type_of_room
  @type_of_room
end

Instance Method Details

#from_hash(hash) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 56

def from_hash(hash)
  super
  if hash.has_key? 'dailyRoomRate'
    @daily_room_rate = hash['dailyRoomRate']
  end
  if hash.has_key? 'dailyRoomRateCurrencyCode'
    @daily_room_rate_currency_code = hash['dailyRoomRateCurrencyCode']
  end
  if hash.has_key? 'dailyRoomTaxAmount'
    @daily_room_tax_amount = hash['dailyRoomTaxAmount']
  end
  if hash.has_key? 'dailyRoomTaxAmountCurrencyCode'
    @daily_room_tax_amount_currency_code = hash['dailyRoomTaxAmountCurrencyCode']
  end
  if hash.has_key? 'numberOfNightsAtRoomRate'
    @number_of_nights_at_room_rate = hash['numberOfNightsAtRoomRate']
  end
  if hash.has_key? 'roomLocation'
    @room_location = hash['roomLocation']
  end
  if hash.has_key? 'roomNumber'
    @room_number = hash['roomNumber']
  end
  if hash.has_key? 'typeOfBed'
    @type_of_bed = hash['typeOfBed']
  end
  if hash.has_key? 'typeOfRoom'
    @type_of_room = hash['typeOfRoom']
  end
end

#to_hHash



42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/worldline/connect/sdk/v1/domain/lodging_room.rb', line 42

def to_h
  hash = super
  hash['dailyRoomRate'] = @daily_room_rate unless @daily_room_rate.nil?
  hash['dailyRoomRateCurrencyCode'] = @daily_room_rate_currency_code unless @daily_room_rate_currency_code.nil?
  hash['dailyRoomTaxAmount'] = @daily_room_tax_amount unless @daily_room_tax_amount.nil?
  hash['dailyRoomTaxAmountCurrencyCode'] = @daily_room_tax_amount_currency_code unless @daily_room_tax_amount_currency_code.nil?
  hash['numberOfNightsAtRoomRate'] = @number_of_nights_at_room_rate unless @number_of_nights_at_room_rate.nil?
  hash['roomLocation'] = @room_location unless @room_location.nil?
  hash['roomNumber'] = @room_number unless @room_number.nil?
  hash['typeOfBed'] = @type_of_bed unless @type_of_bed.nil?
  hash['typeOfRoom'] = @type_of_room unless @type_of_room.nil?
  hash
end