Class: Ingenico::Connect::SDK::Domain::Definitions::LodgingRoom

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#daily_room_rateString

Returns the current value of daily_room_rate.

Returns:

  • (String)

    the current value of daily_room_rate



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def daily_room_rate
  @daily_room_rate
end

#daily_room_rate_currency_codeString

Returns the current value of daily_room_rate_currency_code.

Returns:

  • (String)

    the current value of daily_room_rate_currency_code



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def daily_room_rate_currency_code
  @daily_room_rate_currency_code
end

#daily_room_tax_amountString

Returns the current value of daily_room_tax_amount.

Returns:

  • (String)

    the current value of daily_room_tax_amount



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def daily_room_tax_amount
  @daily_room_tax_amount
end

#daily_room_tax_amount_currency_codeString

Returns the current value of daily_room_tax_amount_currency_code.

Returns:

  • (String)

    the current value of daily_room_tax_amount_currency_code



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def daily_room_tax_amount_currency_code
  @daily_room_tax_amount_currency_code
end

#number_of_nights_at_room_rateInteger

Returns the current value of number_of_nights_at_room_rate.

Returns:

  • (Integer)

    the current value of number_of_nights_at_room_rate



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def number_of_nights_at_room_rate
  @number_of_nights_at_room_rate
end

#room_locationString

Returns the current value of room_location.

Returns:

  • (String)

    the current value of room_location



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def room_location
  @room_location
end

#room_numberString

Returns the current value of room_number.

Returns:

  • (String)

    the current value of room_number



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def room_number
  @room_number
end

#type_of_bedString

Returns the current value of type_of_bed.

Returns:

  • (String)

    the current value of type_of_bed



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def type_of_bed
  @type_of_bed
end

#type_of_roomString

Returns the current value of type_of_room.

Returns:

  • (String)

    the current value of type_of_room



20
21
22
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 20

def type_of_room
  @type_of_room
end

Instance Method Details

#from_hash(hash) ⇒ Object



55
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
# File 'lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb', line 55

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

Returns:

  • (Hash)


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

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