Class: Worldline::Connect::SDK::V1::Domain::LodgingData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::LodgingData
- Defined in:
- lib/worldline/connect/sdk/v1/domain/lodging_data.rb
Instance Attribute Summary collapse
-
#charges ⇒ Array<Worldline::Connect::SDK::V1::Domain::LodgingCharge>
The current value of charges.
-
#check_in_date ⇒ String
The current value of check_in_date.
-
#check_out_date ⇒ String
The current value of check_out_date.
-
#folio_number ⇒ String
The current value of folio_number.
-
#is_confirmed_reservation ⇒ true/false
The current value of is_confirmed_reservation.
-
#is_facility_fire_safety_conform ⇒ true/false
The current value of is_facility_fire_safety_conform.
-
#is_no_show ⇒ true/false
The current value of is_no_show.
-
#is_preference_smoking_room ⇒ true/false
The current value of is_preference_smoking_room.
-
#number_of_adults ⇒ Integer
The current value of number_of_adults.
-
#number_of_nights ⇒ Integer
The current value of number_of_nights.
-
#number_of_rooms ⇒ Integer
The current value of number_of_rooms.
-
#program_code ⇒ String
The current value of program_code.
-
#property_customer_service_phone_number ⇒ String
The current value of property_customer_service_phone_number.
-
#property_phone_number ⇒ String
The current value of property_phone_number.
-
#renter_name ⇒ String
The current value of renter_name.
-
#rooms ⇒ Array<Worldline::Connect::SDK::V1::Domain::LodgingRoom>
The current value of rooms.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#charges ⇒ Array<Worldline::Connect::SDK::V1::Domain::LodgingCharge>
Returns the current value of charges.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def charges @charges end |
#check_in_date ⇒ String
Returns the current value of check_in_date.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def check_in_date @check_in_date end |
#check_out_date ⇒ String
Returns the current value of check_out_date.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def check_out_date @check_out_date end |
#folio_number ⇒ String
Returns the current value of folio_number.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def folio_number @folio_number end |
#is_confirmed_reservation ⇒ true/false
Returns the current value of is_confirmed_reservation.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def is_confirmed_reservation @is_confirmed_reservation end |
#is_facility_fire_safety_conform ⇒ true/false
Returns the current value of is_facility_fire_safety_conform.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def is_facility_fire_safety_conform @is_facility_fire_safety_conform end |
#is_no_show ⇒ true/false
Returns the current value of is_no_show.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def is_no_show @is_no_show end |
#is_preference_smoking_room ⇒ true/false
Returns the current value of is_preference_smoking_room.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def is_preference_smoking_room @is_preference_smoking_room end |
#number_of_adults ⇒ Integer
Returns the current value of number_of_adults.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def number_of_adults @number_of_adults end |
#number_of_nights ⇒ Integer
Returns the current value of number_of_nights.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def number_of_nights @number_of_nights end |
#number_of_rooms ⇒ Integer
Returns the current value of number_of_rooms.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def number_of_rooms @number_of_rooms end |
#program_code ⇒ String
Returns the current value of program_code.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def program_code @program_code end |
#property_customer_service_phone_number ⇒ String
Returns the current value of property_customer_service_phone_number.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def property_customer_service_phone_number @property_customer_service_phone_number end |
#property_phone_number ⇒ String
Returns the current value of property_phone_number.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def property_phone_number @property_phone_number end |
#renter_name ⇒ String
Returns the current value of renter_name.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def renter_name @renter_name end |
#rooms ⇒ Array<Worldline::Connect::SDK::V1::Domain::LodgingRoom>
Returns the current value of rooms.
30 31 32 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 30 def rooms @rooms end |
Instance Method Details
#from_hash(hash) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 86 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 << Worldline::Connect::SDK::V1::Domain::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 << Worldline::Connect::SDK::V1::Domain::LodgingRoom.new_from_hash(e) end end end |
#to_h ⇒ Hash
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/worldline/connect/sdk/v1/domain/lodging_data.rb', line 65 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 |