Class: CyberSource::Ptsv2paymentsTravelInformationLodging
- Inherits:
-
Object
- Object
- CyberSource::Ptsv2paymentsTravelInformationLodging
- Defined in:
- lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb
Instance Attribute Summary collapse
-
#additional_discount_amount ⇒ Object
Amount of an additional coupon or discount.
-
#adjustment_amount ⇒ Object
Adjusted amount charged in addition to the reservation amount after the stay is complete.
-
#audio_visual_cost ⇒ Object
Cost of audio visual services.
-
#banquest_cost ⇒ Object
Cost of banquet services.
-
#business_center_cost ⇒ Object
Cost of business center services.
-
#cash_disbursement_cost ⇒ Object
Cost of the cash that was disbursed plus any associated service fees.
-
#check_in_date ⇒ Object
Date on which the guest checked in.
-
#check_out_date ⇒ Object
Date on which the guest checked out.
-
#conference_room_cost ⇒ Object
Cost of conference room services.
-
#corporate_client_code ⇒ Object
Code assigned to a business.
-
#customer_service_phone_number ⇒ Object
Your toll-free customer service phone number.
-
#early_check_out_cost ⇒ Object
Service fee for early departure.
-
#food_and_beverage_cost ⇒ Object
Cost for all food and beverages.
-
#gift_shop_cost ⇒ Object
Cost of gift shop purchases.
-
#gratuity_amount ⇒ Object
Gratuity.
-
#guest_name ⇒ Object
Name of the guest under which the room is reserved.
-
#health_club_cost ⇒ Object
Cost of health club services.
-
#internet_access_cost ⇒ Object
Cost of Internet access.
-
#laundry_cost ⇒ Object
Cost of laundry services.
-
#lounge_bar_cost ⇒ Object
Cost of lounge and bar purchases.
-
#mini_bar_cost ⇒ Object
Cost of mini-bar purchases.
-
#miscellaneous_cost ⇒ Object
Miscellaneous costs.
-
#movie_cost ⇒ Object
Cost of movies.
-
#non_room_cost ⇒ Object
Cost of non-room purchases, such as meals and gifts.
-
#non_room_tax_amount ⇒ Object
Tax on non-room purchases.
-
#number_of_guests ⇒ Object
Number of guests staying in the room.
-
#number_of_rooms ⇒ Object
Number of rooms booked by the cardholder.
-
#phone_cost ⇒ Object
Cost of telephone services.
-
#prepaid_cost ⇒ Object
Prepaid amount, such as a deposit.
-
#restaurant_cost ⇒ Object
Cost of restaurant purchases.
-
#room ⇒ Object
The object containing the number of nights and the daily rate that applies for that no of nights.
-
#room_bed_type ⇒ Object
Type of room, such as queen, king, or two doubles.
-
#room_location ⇒ Object
Location of room, such as lake view or ocean view.
-
#room_rate_type ⇒ Object
Type of rate, such as corporate or senior citizen.
-
#room_service_cost ⇒ Object
Cost of room service.
-
#room_tax_amount ⇒ Object
Total tax for the room.
-
#room_tax_type ⇒ Object
Type of tax, such as tourist or hotel.
-
#smoking_preference ⇒ Object
Smoking preference of the guest.
-
#special_program_code ⇒ Object
Code that identifies special circumstances.
-
#total_tax_amount ⇒ Object
Total tax amount.
-
#transportation_cost ⇒ Object
Cost of transportation services.
-
#valet_parking_cost ⇒ Object
Cost of valet parking services.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Ptsv2paymentsTravelInformationLodging
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Ptsv2paymentsTravelInformationLodging
Initializes the object
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 241 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'checkInDate') self.check_in_date = attributes[:'checkInDate'] end if attributes.has_key?(:'checkOutDate') self.check_out_date = attributes[:'checkOutDate'] end if attributes.has_key?(:'room') if (value = attributes[:'room']).is_a?(Array) self.room = value end end if attributes.has_key?(:'smokingPreference') self.smoking_preference = attributes[:'smokingPreference'] end if attributes.has_key?(:'numberOfRooms') self.number_of_rooms = attributes[:'numberOfRooms'] end if attributes.has_key?(:'numberOfGuests') self.number_of_guests = attributes[:'numberOfGuests'] end if attributes.has_key?(:'roomBedType') self.room_bed_type = attributes[:'roomBedType'] end if attributes.has_key?(:'roomTaxType') self.room_tax_type = attributes[:'roomTaxType'] end if attributes.has_key?(:'roomRateType') self.room_rate_type = attributes[:'roomRateType'] end if attributes.has_key?(:'guestName') self.guest_name = attributes[:'guestName'] end if attributes.has_key?(:'customerServicePhoneNumber') self.customer_service_phone_number = attributes[:'customerServicePhoneNumber'] end if attributes.has_key?(:'corporateClientCode') self.corporate_client_code = attributes[:'corporateClientCode'] end if attributes.has_key?(:'additionalDiscountAmount') self.additional_discount_amount = attributes[:'additionalDiscountAmount'] end if attributes.has_key?(:'roomLocation') self.room_location = attributes[:'roomLocation'] end if attributes.has_key?(:'specialProgramCode') self.special_program_code = attributes[:'specialProgramCode'] end if attributes.has_key?(:'totalTaxAmount') self.total_tax_amount = attributes[:'totalTaxAmount'] end if attributes.has_key?(:'prepaidCost') self.prepaid_cost = attributes[:'prepaidCost'] end if attributes.has_key?(:'foodAndBeverageCost') self.food_and_beverage_cost = attributes[:'foodAndBeverageCost'] end if attributes.has_key?(:'roomTaxAmount') self.room_tax_amount = attributes[:'roomTaxAmount'] end if attributes.has_key?(:'adjustmentAmount') self.adjustment_amount = attributes[:'adjustmentAmount'] end if attributes.has_key?(:'phoneCost') self.phone_cost = attributes[:'phoneCost'] end if attributes.has_key?(:'restaurantCost') self.restaurant_cost = attributes[:'restaurantCost'] end if attributes.has_key?(:'roomServiceCost') self.room_service_cost = attributes[:'roomServiceCost'] end if attributes.has_key?(:'miniBarCost') self. = attributes[:'miniBarCost'] end if attributes.has_key?(:'laundryCost') self.laundry_cost = attributes[:'laundryCost'] end if attributes.has_key?(:'miscellaneousCost') self.miscellaneous_cost = attributes[:'miscellaneousCost'] end if attributes.has_key?(:'giftShopCost') self.gift_shop_cost = attributes[:'giftShopCost'] end if attributes.has_key?(:'movieCost') self.movie_cost = attributes[:'movieCost'] end if attributes.has_key?(:'healthClubCost') self.health_club_cost = attributes[:'healthClubCost'] end if attributes.has_key?(:'valetParkingCost') self.valet_parking_cost = attributes[:'valetParkingCost'] end if attributes.has_key?(:'cashDisbursementCost') self.cash_disbursement_cost = attributes[:'cashDisbursementCost'] end if attributes.has_key?(:'nonRoomCost') self.non_room_cost = attributes[:'nonRoomCost'] end if attributes.has_key?(:'businessCenterCost') self.business_center_cost = attributes[:'businessCenterCost'] end if attributes.has_key?(:'loungeBarCost') self. = attributes[:'loungeBarCost'] end if attributes.has_key?(:'transportationCost') self.transportation_cost = attributes[:'transportationCost'] end if attributes.has_key?(:'gratuityAmount') self.gratuity_amount = attributes[:'gratuityAmount'] end if attributes.has_key?(:'conferenceRoomCost') self.conference_room_cost = attributes[:'conferenceRoomCost'] end if attributes.has_key?(:'audioVisualCost') self.audio_visual_cost = attributes[:'audioVisualCost'] end if attributes.has_key?(:'banquestCost') self.banquest_cost = attributes[:'banquestCost'] end if attributes.has_key?(:'nonRoomTaxAmount') self.non_room_tax_amount = attributes[:'nonRoomTaxAmount'] end if attributes.has_key?(:'earlyCheckOutCost') self.early_check_out_cost = attributes[:'earlyCheckOutCost'] end if attributes.has_key?(:'internetAccessCost') self.internet_access_cost = attributes[:'internetAccessCost'] end end |
Instance Attribute Details
#additional_discount_amount ⇒ Object
Amount of an additional coupon or discount.
54 55 56 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 54 def additional_discount_amount @additional_discount_amount end |
#adjustment_amount ⇒ Object
Adjusted amount charged in addition to the reservation amount after the stay is complete.
75 76 77 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 75 def adjustment_amount @adjustment_amount end |
#audio_visual_cost ⇒ Object
Cost of audio visual services.
129 130 131 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 129 def audio_visual_cost @audio_visual_cost end |
#banquest_cost ⇒ Object
Cost of banquet services.
132 133 134 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 132 def banquest_cost @banquest_cost end |
#business_center_cost ⇒ Object
Cost of business center services.
114 115 116 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 114 def business_center_cost @business_center_cost end |
#cash_disbursement_cost ⇒ Object
Cost of the cash that was disbursed plus any associated service fees
108 109 110 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 108 def cash_disbursement_cost @cash_disbursement_cost end |
#check_in_date ⇒ Object
Date on which the guest checked in. In the case of a no-show or a reservation, the scheduled arrival date. Format: ‘MMDDYY`. For best interchange rates, make sure it is a valid date.
18 19 20 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 18 def check_in_date @check_in_date end |
#check_out_date ⇒ Object
Date on which the guest checked out. Format: ‘MMDDYY`. For best interchange rates, make sure it is a valid date.
21 22 23 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 21 def check_out_date @check_out_date end |
#conference_room_cost ⇒ Object
Cost of conference room services.
126 127 128 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 126 def conference_room_cost @conference_room_cost end |
#corporate_client_code ⇒ Object
Code assigned to a business. You can use this code to identify corporate rates and discounts for guests.
51 52 53 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 51 def corporate_client_code @corporate_client_code end |
#customer_service_phone_number ⇒ Object
Your toll-free customer service phone number.
48 49 50 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 48 def customer_service_phone_number @customer_service_phone_number end |
#early_check_out_cost ⇒ Object
Service fee for early departure.
138 139 140 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 138 def early_check_out_cost @early_check_out_cost end |
#food_and_beverage_cost ⇒ Object
Cost for all food and beverages.
69 70 71 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 69 def food_and_beverage_cost @food_and_beverage_cost end |
#gift_shop_cost ⇒ Object
Cost of gift shop purchases.
96 97 98 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 96 def gift_shop_cost @gift_shop_cost end |
#gratuity_amount ⇒ Object
Gratuity.
123 124 125 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 123 def gratuity_amount @gratuity_amount end |
#guest_name ⇒ Object
Name of the guest under which the room is reserved.
45 46 47 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 45 def guest_name @guest_name end |
#health_club_cost ⇒ Object
Cost of health club services.
102 103 104 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 102 def health_club_cost @health_club_cost end |
#internet_access_cost ⇒ Object
Cost of Internet access.
141 142 143 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 141 def internet_access_cost @internet_access_cost end |
#laundry_cost ⇒ Object
Cost of laundry services.
90 91 92 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 90 def laundry_cost @laundry_cost end |
#lounge_bar_cost ⇒ Object
Cost of lounge and bar purchases.
117 118 119 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 117 def @lounge_bar_cost end |
#mini_bar_cost ⇒ Object
Cost of mini-bar purchases.
87 88 89 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 87 def @mini_bar_cost end |
#miscellaneous_cost ⇒ Object
Miscellaneous costs.
93 94 95 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 93 def miscellaneous_cost @miscellaneous_cost end |
#movie_cost ⇒ Object
Cost of movies.
99 100 101 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 99 def movie_cost @movie_cost end |
#non_room_cost ⇒ Object
Cost of non-room purchases, such as meals and gifts.
111 112 113 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 111 def non_room_cost @non_room_cost end |
#non_room_tax_amount ⇒ Object
Tax on non-room purchases.
135 136 137 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 135 def non_room_tax_amount @non_room_tax_amount end |
#number_of_guests ⇒ Object
Number of guests staying in the room.
33 34 35 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 33 def number_of_guests @number_of_guests end |
#number_of_rooms ⇒ Object
Number of rooms booked by the cardholder.
30 31 32 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 30 def number_of_rooms @number_of_rooms end |
#phone_cost ⇒ Object
Cost of telephone services.
78 79 80 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 78 def phone_cost @phone_cost end |
#prepaid_cost ⇒ Object
Prepaid amount, such as a deposit.
66 67 68 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 66 def prepaid_cost @prepaid_cost end |
#restaurant_cost ⇒ Object
Cost of restaurant purchases
81 82 83 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 81 def restaurant_cost @restaurant_cost end |
#room ⇒ Object
The object containing the number of nights and the daily rate that applies for that no of nights.
24 25 26 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 24 def room @room end |
#room_bed_type ⇒ Object
Type of room, such as queen, king, or two doubles.
36 37 38 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 36 def room_bed_type @room_bed_type end |
#room_location ⇒ Object
Location of room, such as lake view or ocean view.
57 58 59 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 57 def room_location @room_location end |
#room_rate_type ⇒ Object
Type of rate, such as corporate or senior citizen.
42 43 44 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 42 def room_rate_type @room_rate_type end |
#room_service_cost ⇒ Object
Cost of room service.
84 85 86 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 84 def room_service_cost @room_service_cost end |
#room_tax_amount ⇒ Object
Total tax for the room.
72 73 74 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 72 def room_tax_amount @room_tax_amount end |
#room_tax_type ⇒ Object
Type of tax, such as tourist or hotel.
39 40 41 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 39 def room_tax_type @room_tax_type end |
#smoking_preference ⇒ Object
Smoking preference of the guest. Possible values: - ‘Y`: smoking room - `N`: non-smoking room
27 28 29 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 27 def smoking_preference @smoking_preference end |
#special_program_code ⇒ Object
Code that identifies special circumstances. Possible values: - ‘1`: lodging (default) - `2`: no show reservation - `3`: advanced deposit
60 61 62 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 60 def special_program_code @special_program_code end |
#total_tax_amount ⇒ Object
Total tax amount.
63 64 65 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 63 def total_tax_amount @total_tax_amount end |
#transportation_cost ⇒ Object
Cost of transportation services.
120 121 122 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 120 def transportation_cost @transportation_cost end |
#valet_parking_cost ⇒ Object
Cost of valet parking services.
105 106 107 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 105 def valet_parking_cost @valet_parking_cost end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 144 def self.attribute_map { :'check_in_date' => :'checkInDate', :'check_out_date' => :'checkOutDate', :'room' => :'room', :'smoking_preference' => :'smokingPreference', :'number_of_rooms' => :'numberOfRooms', :'number_of_guests' => :'numberOfGuests', :'room_bed_type' => :'roomBedType', :'room_tax_type' => :'roomTaxType', :'room_rate_type' => :'roomRateType', :'guest_name' => :'guestName', :'customer_service_phone_number' => :'customerServicePhoneNumber', :'corporate_client_code' => :'corporateClientCode', :'additional_discount_amount' => :'additionalDiscountAmount', :'room_location' => :'roomLocation', :'special_program_code' => :'specialProgramCode', :'total_tax_amount' => :'totalTaxAmount', :'prepaid_cost' => :'prepaidCost', :'food_and_beverage_cost' => :'foodAndBeverageCost', :'room_tax_amount' => :'roomTaxAmount', :'adjustment_amount' => :'adjustmentAmount', :'phone_cost' => :'phoneCost', :'restaurant_cost' => :'restaurantCost', :'room_service_cost' => :'roomServiceCost', :'mini_bar_cost' => :'miniBarCost', :'laundry_cost' => :'laundryCost', :'miscellaneous_cost' => :'miscellaneousCost', :'gift_shop_cost' => :'giftShopCost', :'movie_cost' => :'movieCost', :'health_club_cost' => :'healthClubCost', :'valet_parking_cost' => :'valetParkingCost', :'cash_disbursement_cost' => :'cashDisbursementCost', :'non_room_cost' => :'nonRoomCost', :'business_center_cost' => :'businessCenterCost', :'lounge_bar_cost' => :'loungeBarCost', :'transportation_cost' => :'transportationCost', :'gratuity_amount' => :'gratuityAmount', :'conference_room_cost' => :'conferenceRoomCost', :'audio_visual_cost' => :'audioVisualCost', :'banquest_cost' => :'banquestCost', :'non_room_tax_amount' => :'nonRoomTaxAmount', :'early_check_out_cost' => :'earlyCheckOutCost', :'internet_access_cost' => :'internetAccessCost' } end |
.swagger_types ⇒ Object
Attribute type mapping.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 192 def self.swagger_types { :'check_in_date' => :'String', :'check_out_date' => :'String', :'room' => :'Array<Ptsv2paymentsTravelInformationLodgingRoom>', :'smoking_preference' => :'String', :'number_of_rooms' => :'Integer', :'number_of_guests' => :'Integer', :'room_bed_type' => :'String', :'room_tax_type' => :'String', :'room_rate_type' => :'String', :'guest_name' => :'String', :'customer_service_phone_number' => :'String', :'corporate_client_code' => :'String', :'additional_discount_amount' => :'String', :'room_location' => :'String', :'special_program_code' => :'String', :'total_tax_amount' => :'String', :'prepaid_cost' => :'String', :'food_and_beverage_cost' => :'String', :'room_tax_amount' => :'String', :'adjustment_amount' => :'String', :'phone_cost' => :'String', :'restaurant_cost' => :'String', :'room_service_cost' => :'String', :'mini_bar_cost' => :'String', :'laundry_cost' => :'String', :'miscellaneous_cost' => :'String', :'gift_shop_cost' => :'String', :'movie_cost' => :'String', :'health_club_cost' => :'String', :'valet_parking_cost' => :'String', :'cash_disbursement_cost' => :'String', :'non_room_cost' => :'String', :'business_center_cost' => :'String', :'lounge_bar_cost' => :'String', :'transportation_cost' => :'String', :'gratuity_amount' => :'String', :'conference_room_cost' => :'String', :'audio_visual_cost' => :'String', :'banquest_cost' => :'String', :'non_room_tax_amount' => :'String', :'early_check_out_cost' => :'String', :'internet_access_cost' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 715 def ==(o) return true if self.equal?(o) self.class == o.class && check_in_date == o.check_in_date && check_out_date == o.check_out_date && room == o.room && smoking_preference == o.smoking_preference && number_of_rooms == o.number_of_rooms && number_of_guests == o.number_of_guests && room_bed_type == o.room_bed_type && room_tax_type == o.room_tax_type && room_rate_type == o.room_rate_type && guest_name == o.guest_name && customer_service_phone_number == o.customer_service_phone_number && corporate_client_code == o.corporate_client_code && additional_discount_amount == o.additional_discount_amount && room_location == o.room_location && special_program_code == o.special_program_code && total_tax_amount == o.total_tax_amount && prepaid_cost == o.prepaid_cost && food_and_beverage_cost == o.food_and_beverage_cost && room_tax_amount == o.room_tax_amount && adjustment_amount == o.adjustment_amount && phone_cost == o.phone_cost && restaurant_cost == o.restaurant_cost && room_service_cost == o.room_service_cost && == o. && laundry_cost == o.laundry_cost && miscellaneous_cost == o.miscellaneous_cost && gift_shop_cost == o.gift_shop_cost && movie_cost == o.movie_cost && health_club_cost == o.health_club_cost && valet_parking_cost == o.valet_parking_cost && cash_disbursement_cost == o.cash_disbursement_cost && non_room_cost == o.non_room_cost && business_center_cost == o.business_center_cost && == o. && transportation_cost == o.transportation_cost && gratuity_amount == o.gratuity_amount && conference_room_cost == o.conference_room_cost && audio_visual_cost == o.audio_visual_cost && banquest_cost == o.banquest_cost && non_room_tax_amount == o.non_room_tax_amount && early_check_out_cost == o.early_check_out_cost && internet_access_cost == o.internet_access_cost end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 798 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 864 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 777 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
764 765 766 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 764 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
770 771 772 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 770 def hash [check_in_date, check_out_date, room, smoking_preference, number_of_rooms, number_of_guests, room_bed_type, room_tax_type, room_rate_type, guest_name, customer_service_phone_number, corporate_client_code, additional_discount_amount, room_location, special_program_code, total_tax_amount, prepaid_cost, food_and_beverage_cost, room_tax_amount, adjustment_amount, phone_cost, restaurant_cost, room_service_cost, , laundry_cost, miscellaneous_cost, gift_shop_cost, movie_cost, health_club_cost, valet_parking_cost, cash_disbursement_cost, non_room_cost, business_center_cost, , transportation_cost, gratuity_amount, conference_room_cost, audio_visual_cost, banquest_cost, non_room_tax_amount, early_check_out_cost, internet_access_cost].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 420 def list_invalid_properties invalid_properties = Array.new if !@number_of_rooms.nil? && @number_of_rooms > 99 invalid_properties.push('invalid value for "number_of_rooms", must be smaller than or equal to 99.') end if !@number_of_rooms.nil? && @number_of_rooms < 1 invalid_properties.push('invalid value for "number_of_rooms", must be greater than or equal to 1.') end if !@number_of_guests.nil? && @number_of_guests > 99 invalid_properties.push('invalid value for "number_of_guests", must be smaller than or equal to 99.') end if !@number_of_guests.nil? && @number_of_guests < 1 invalid_properties.push('invalid value for "number_of_guests", must be greater than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
844 845 846 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 844 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
850 851 852 853 854 855 856 857 858 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 850 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
838 839 840 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 838 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
443 444 445 446 447 448 449 |
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 443 def valid? return false if !@number_of_rooms.nil? && @number_of_rooms > 99 return false if !@number_of_rooms.nil? && @number_of_rooms < 1 return false if !@number_of_guests.nil? && @number_of_guests > 99 return false if !@number_of_guests.nil? && @number_of_guests < 1 true end |