class Ingenico::Connect::SDK::Domain::Definitions::LodgingData
@attr [Array<Ingenico::Connect::SDK::Domain::Definitions::LodgingCharge>] charges @attr [String] check_in_date
@attr [String] check_out_date
@attr [String] folio_number
@attr [true/false] is_confirmed_reservation
@attr [true/false] is_facility_fire_safety_conform
@attr [true/false] is_no_show
@attr [true/false] is_preference_smoking_room
@attr [Integer] number_of_adults
@attr [Integer] number_of_nights
@attr [Integer] number_of_rooms
@attr [String] program_code
@attr [String] property_customer_service_phone_number
@attr [String] property_phone_number
@attr [String] renter_name
@attr [Array<Ingenico::Connect::SDK::Domain::Definitions::LodgingRoom>] rooms
Attributes
charges[RW]
check_in_date[RW]
check_out_date[RW]
folio_number[RW]
is_confirmed_reservation[RW]
is_facility_fire_safety_conform[RW]
is_no_show[RW]
is_preference_smoking_room[RW]
number_of_adults[RW]
number_of_nights[RW]
number_of_rooms[RW]
program_code[RW]
property_customer_service_phone_number[RW]
property_phone_number[RW]
renter_name[RW]
rooms[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb, line 85 def from_hash(hash) super if hash.has_key? 'charges' raise TypeError, "value '%s' is not an Array" % [hash['charges']] unless hash['charges'].is_a? Array @charges = [] hash['charges'].each do |e| @charges << Ingenico::Connect::SDK::Domain::Definitions::LodgingCharge.new_from_hash(e) end end if hash.has_key? 'checkInDate' @check_in_date = hash['checkInDate'] end if hash.has_key? 'checkOutDate' @check_out_date = hash['checkOutDate'] end if hash.has_key? 'folioNumber' @folio_number = hash['folioNumber'] end if hash.has_key? 'isConfirmedReservation' @is_confirmed_reservation = hash['isConfirmedReservation'] end if hash.has_key? 'isFacilityFireSafetyConform' @is_facility_fire_safety_conform = hash['isFacilityFireSafetyConform'] end if hash.has_key? 'isNoShow' @is_no_show = hash['isNoShow'] end if hash.has_key? 'isPreferenceSmokingRoom' @is_preference_smoking_room = hash['isPreferenceSmokingRoom'] end if hash.has_key? 'numberOfAdults' @number_of_adults = hash['numberOfAdults'] end if hash.has_key? 'numberOfNights' @number_of_nights = hash['numberOfNights'] end if hash.has_key? 'numberOfRooms' @number_of_rooms = hash['numberOfRooms'] end if hash.has_key? 'programCode' @program_code = hash['programCode'] end if hash.has_key? 'propertyCustomerServicePhoneNumber' @property_customer_service_phone_number = hash['propertyCustomerServicePhoneNumber'] end if hash.has_key? 'propertyPhoneNumber' @property_phone_number = hash['propertyPhoneNumber'] end if hash.has_key? 'renterName' @renter_name = hash['renterName'] end if hash.has_key? 'rooms' raise TypeError, "value '%s' is not an Array" % [hash['rooms']] unless hash['rooms'].is_a? Array @rooms = [] hash['rooms'].each do |e| @rooms << Ingenico::Connect::SDK::Domain::Definitions::LodgingRoom.new_from_hash(e) end end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb, line 64 def to_h hash = super hash['charges'] = @charges.collect{|val| val.to_h} unless @charges.nil? hash['checkInDate'] = @check_in_date unless @check_in_date.nil? hash['checkOutDate'] = @check_out_date unless @check_out_date.nil? hash['folioNumber'] = @folio_number unless @folio_number.nil? hash['isConfirmedReservation'] = @is_confirmed_reservation unless @is_confirmed_reservation.nil? hash['isFacilityFireSafetyConform'] = @is_facility_fire_safety_conform unless @is_facility_fire_safety_conform.nil? hash['isNoShow'] = @is_no_show unless @is_no_show.nil? hash['isPreferenceSmokingRoom'] = @is_preference_smoking_room unless @is_preference_smoking_room.nil? hash['numberOfAdults'] = @number_of_adults unless @number_of_adults.nil? hash['numberOfNights'] = @number_of_nights unless @number_of_nights.nil? hash['numberOfRooms'] = @number_of_rooms unless @number_of_rooms.nil? hash['programCode'] = @program_code unless @program_code.nil? hash['propertyCustomerServicePhoneNumber'] = @property_customer_service_phone_number unless @property_customer_service_phone_number.nil? hash['propertyPhoneNumber'] = @property_phone_number unless @property_phone_number.nil? hash['renterName'] = @renter_name unless @renter_name.nil? hash['rooms'] = @rooms.collect{|val| val.to_h} unless @rooms.nil? hash end