Class: VisaAcceptanceMergedSpec::Lodging
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Lodging
- Defined in:
- lib/visa_acceptance_merged_spec/models/lodging.rb
Overview
Lodging Model.
Instance Attribute Summary collapse
-
#additional_discount_amount ⇒ String
Amount of an additional coupon or discount.
-
#adjustment_amount ⇒ String
Adjusted amount charged in addition to the reservation amount after the stay is complete.
-
#audio_visual_cost ⇒ String
Cost of audio visual services.
-
#banquest_cost ⇒ String
Cost of banquet services.
-
#business_center_cost ⇒ String
Cost of business center services.
-
#cash_disbursement_cost ⇒ String
Cost of the cash that was disbursed plus any associated service fees.
-
#check_in_date ⇒ String
Date on which the guest checked in.
-
#check_in_date_time ⇒ String
The date of the check-in in GMT+8 offset.
-
#check_out_date ⇒ String
Date on which the guest checked out.
-
#check_out_date_time ⇒ String
The date of the check-out in GMT+8 offset.
-
#conference_room_cost ⇒ String
Cost of conference room services.
-
#corporate_client_code ⇒ String
Code assigned to a business.
-
#customer_service_phone_number ⇒ String
Your toll-free customer service phone number.
-
#early_check_out_cost ⇒ String
Service fee for early departure.
-
#food_and_beverage_cost ⇒ String
Cost for all food and beverages.
-
#gift_shop_cost ⇒ String
Cost of gift shop purchases.
-
#gratuity_amount ⇒ String
Gratuity.
-
#guest_name ⇒ String
Name of the guest under which the room is reserved.
-
#health_club_cost ⇒ String
Cost of health club services.
-
#hotel_name ⇒ String
The name of the hotel for which the reservation was made.
-
#internet_access_cost ⇒ String
Cost of Internet access.
-
#laundry_cost ⇒ String
Cost of laundry services.
-
#lounge_bar_cost ⇒ String
Cost of lounge and bar purchases.
-
#mini_bar_cost ⇒ String
Cost of mini-bar purchases.
-
#miscellaneous_cost ⇒ String
Miscellaneous costs.
-
#movie_cost ⇒ String
Cost of movies.
-
#name ⇒ String
Name of the hotel for which the reservation is for.
-
#non_room_cost ⇒ String
Cost of non-room purchases, such as meals and gifts.
-
#non_room_tax_amount ⇒ String
Tax on non-room purchases.
-
#number_of_guests ⇒ Integer
Number of guests staying in the room.
-
#number_of_rooms ⇒ Integer
Number of rooms booked by the cardholder.
-
#phone_cost ⇒ String
Cost of telephone services.
-
#prepaid_cost ⇒ String
Prepaid amount, such as a deposit.
-
#restaurant_cost ⇒ String
Cost of restaurant purchases.
-
#room ⇒ Array[Room]
The object containing the number of nights and the daily rate that applies for that no of nights.
-
#room_bed_type ⇒ String
Type of room, such as queen, king, or two doubles.
-
#room_location ⇒ String
Location of room, such as lake view or ocean view.
-
#room_rate_type ⇒ String
Type of rate, such as corporate or senior citizen.
-
#room_service_cost ⇒ String
Cost of room service.
-
#room_tax_amount ⇒ String
Total tax for the room.
-
#room_tax_type ⇒ String
Type of tax, such as tourist or hotel.
-
#smoking_preference ⇒ String
Smoking preference of the guest.
-
#special_program_code ⇒ String
Code that identifies special circumstances.
-
#total_tax_amount ⇒ String
Total tax amount.
-
#transportation_cost ⇒ String
Cost of transportation services.
-
#valet_parking_cost ⇒ String
Cost of valet parking services.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(check_in_date: SKIP, check_out_date: SKIP, room: SKIP, smoking_preference: SKIP, number_of_rooms: SKIP, number_of_guests: SKIP, room_bed_type: SKIP, room_tax_type: SKIP, room_rate_type: SKIP, guest_name: SKIP, customer_service_phone_number: SKIP, corporate_client_code: SKIP, additional_discount_amount: SKIP, room_location: SKIP, special_program_code: SKIP, total_tax_amount: SKIP, prepaid_cost: SKIP, food_and_beverage_cost: SKIP, room_tax_amount: SKIP, adjustment_amount: SKIP, phone_cost: SKIP, restaurant_cost: SKIP, room_service_cost: SKIP, mini_bar_cost: SKIP, laundry_cost: SKIP, miscellaneous_cost: SKIP, gift_shop_cost: SKIP, movie_cost: SKIP, health_club_cost: SKIP, valet_parking_cost: SKIP, cash_disbursement_cost: SKIP, non_room_cost: SKIP, business_center_cost: SKIP, lounge_bar_cost: SKIP, transportation_cost: SKIP, gratuity_amount: SKIP, conference_room_cost: SKIP, audio_visual_cost: SKIP, banquest_cost: SKIP, non_room_tax_amount: SKIP, early_check_out_cost: SKIP, internet_access_cost: SKIP, name: SKIP, hotel_name: SKIP, check_in_date_time: SKIP, check_out_date_time: SKIP, additional_properties: nil) ⇒ Lodging
constructor
A new instance of Lodging.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(check_in_date: SKIP, check_out_date: SKIP, room: SKIP, smoking_preference: SKIP, number_of_rooms: SKIP, number_of_guests: SKIP, room_bed_type: SKIP, room_tax_type: SKIP, room_rate_type: SKIP, guest_name: SKIP, customer_service_phone_number: SKIP, corporate_client_code: SKIP, additional_discount_amount: SKIP, room_location: SKIP, special_program_code: SKIP, total_tax_amount: SKIP, prepaid_cost: SKIP, food_and_beverage_cost: SKIP, room_tax_amount: SKIP, adjustment_amount: SKIP, phone_cost: SKIP, restaurant_cost: SKIP, room_service_cost: SKIP, mini_bar_cost: SKIP, laundry_cost: SKIP, miscellaneous_cost: SKIP, gift_shop_cost: SKIP, movie_cost: SKIP, health_club_cost: SKIP, valet_parking_cost: SKIP, cash_disbursement_cost: SKIP, non_room_cost: SKIP, business_center_cost: SKIP, lounge_bar_cost: SKIP, transportation_cost: SKIP, gratuity_amount: SKIP, conference_room_cost: SKIP, audio_visual_cost: SKIP, banquest_cost: SKIP, non_room_tax_amount: SKIP, early_check_out_cost: SKIP, internet_access_cost: SKIP, name: SKIP, hotel_name: SKIP, check_in_date_time: SKIP, check_out_date_time: SKIP, additional_properties: nil) ⇒ Lodging
Returns a new instance of Lodging.
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 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 321 def initialize(check_in_date: SKIP, check_out_date: SKIP, room: SKIP, smoking_preference: SKIP, number_of_rooms: SKIP, number_of_guests: SKIP, room_bed_type: SKIP, room_tax_type: SKIP, room_rate_type: SKIP, guest_name: SKIP, customer_service_phone_number: SKIP, corporate_client_code: SKIP, additional_discount_amount: SKIP, room_location: SKIP, special_program_code: SKIP, total_tax_amount: SKIP, prepaid_cost: SKIP, food_and_beverage_cost: SKIP, room_tax_amount: SKIP, adjustment_amount: SKIP, phone_cost: SKIP, restaurant_cost: SKIP, room_service_cost: SKIP, mini_bar_cost: SKIP, laundry_cost: SKIP, miscellaneous_cost: SKIP, gift_shop_cost: SKIP, movie_cost: SKIP, health_club_cost: SKIP, valet_parking_cost: SKIP, cash_disbursement_cost: SKIP, non_room_cost: SKIP, business_center_cost: SKIP, lounge_bar_cost: SKIP, transportation_cost: SKIP, gratuity_amount: SKIP, conference_room_cost: SKIP, audio_visual_cost: SKIP, banquest_cost: SKIP, non_room_tax_amount: SKIP, early_check_out_cost: SKIP, internet_access_cost: SKIP, name: SKIP, hotel_name: SKIP, check_in_date_time: SKIP, check_out_date_time: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @check_in_date = check_in_date unless check_in_date == SKIP @check_out_date = check_out_date unless check_out_date == SKIP @room = room unless room == SKIP @smoking_preference = smoking_preference unless smoking_preference == SKIP @number_of_rooms = number_of_rooms unless number_of_rooms == SKIP @number_of_guests = number_of_guests unless number_of_guests == SKIP @room_bed_type = room_bed_type unless room_bed_type == SKIP @room_tax_type = room_tax_type unless room_tax_type == SKIP @room_rate_type = room_rate_type unless room_rate_type == SKIP @guest_name = guest_name unless guest_name == SKIP unless customer_service_phone_number == SKIP @customer_service_phone_number = customer_service_phone_number end @corporate_client_code = corporate_client_code unless corporate_client_code == SKIP unless additional_discount_amount == SKIP @additional_discount_amount = additional_discount_amount end @room_location = room_location unless room_location == SKIP @special_program_code = special_program_code unless special_program_code == SKIP @total_tax_amount = total_tax_amount unless total_tax_amount == SKIP @prepaid_cost = prepaid_cost unless prepaid_cost == SKIP @food_and_beverage_cost = food_and_beverage_cost unless food_and_beverage_cost == SKIP @room_tax_amount = room_tax_amount unless room_tax_amount == SKIP @adjustment_amount = adjustment_amount unless adjustment_amount == SKIP @phone_cost = phone_cost unless phone_cost == SKIP @restaurant_cost = restaurant_cost unless restaurant_cost == SKIP @room_service_cost = room_service_cost unless room_service_cost == SKIP @mini_bar_cost = unless == SKIP @laundry_cost = laundry_cost unless laundry_cost == SKIP @miscellaneous_cost = miscellaneous_cost unless miscellaneous_cost == SKIP @gift_shop_cost = gift_shop_cost unless gift_shop_cost == SKIP @movie_cost = movie_cost unless movie_cost == SKIP @health_club_cost = health_club_cost unless health_club_cost == SKIP @valet_parking_cost = valet_parking_cost unless valet_parking_cost == SKIP @cash_disbursement_cost = cash_disbursement_cost unless cash_disbursement_cost == SKIP @non_room_cost = non_room_cost unless non_room_cost == SKIP @business_center_cost = business_center_cost unless business_center_cost == SKIP @lounge_bar_cost = unless == SKIP @transportation_cost = transportation_cost unless transportation_cost == SKIP @gratuity_amount = gratuity_amount unless gratuity_amount == SKIP @conference_room_cost = conference_room_cost unless conference_room_cost == SKIP @audio_visual_cost = audio_visual_cost unless audio_visual_cost == SKIP @banquest_cost = banquest_cost unless banquest_cost == SKIP @non_room_tax_amount = non_room_tax_amount unless non_room_tax_amount == SKIP @early_check_out_cost = early_check_out_cost unless early_check_out_cost == SKIP @internet_access_cost = internet_access_cost unless internet_access_cost == SKIP @name = name unless name == SKIP @hotel_name = hotel_name unless hotel_name == SKIP @check_in_date_time = check_in_date_time unless check_in_date_time == SKIP @check_out_date_time = check_out_date_time unless check_out_date_time == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#additional_discount_amount ⇒ String
Amount of an additional coupon or discount.
72 73 74 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 72 def additional_discount_amount @additional_discount_amount end |
#adjustment_amount ⇒ String
Adjusted amount charged in addition to the reservation amount after the stay is complete.
105 106 107 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 105 def adjustment_amount @adjustment_amount end |
#audio_visual_cost ⇒ String
Cost of audio visual services.
177 178 179 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 177 def audio_visual_cost @audio_visual_cost end |
#banquest_cost ⇒ String
Cost of banquet services.
181 182 183 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 181 def banquest_cost @banquest_cost end |
#business_center_cost ⇒ String
Cost of business center services.
157 158 159 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 157 def business_center_cost @business_center_cost end |
#cash_disbursement_cost ⇒ String
Cost of the cash that was disbursed plus any associated service fees
149 150 151 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 149 def cash_disbursement_cost @cash_disbursement_cost end |
#check_in_date ⇒ String
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.
17 18 19 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 17 def check_in_date @check_in_date end |
#check_in_date_time ⇒ String
The date of the check-in in GMT+8 offset.
206 207 208 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 206 def check_in_date_time @check_in_date_time end |
#check_out_date ⇒ String
Date on which the guest checked out.
Format: MMDDYY. For best interchange rates, make sure it is a valid
date.
23 24 25 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 23 def check_out_date @check_out_date end |
#check_out_date_time ⇒ String
The date of the check-out in GMT+8 offset.
210 211 212 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 210 def check_out_date_time @check_out_date_time end |
#conference_room_cost ⇒ String
Cost of conference room services.
173 174 175 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 173 def conference_room_cost @conference_room_cost end |
#corporate_client_code ⇒ String
Code assigned to a business. You can use this code to identify corporate rates and discounts for guests.
68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 68 def corporate_client_code @corporate_client_code end |
#customer_service_phone_number ⇒ String
Your toll-free customer service phone number.
63 64 65 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 63 def customer_service_phone_number @customer_service_phone_number end |
#early_check_out_cost ⇒ String
Service fee for early departure.
189 190 191 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 189 def early_check_out_cost @early_check_out_cost end |
#food_and_beverage_cost ⇒ String
Cost for all food and beverages.
96 97 98 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 96 def food_and_beverage_cost @food_and_beverage_cost end |
#gift_shop_cost ⇒ String
Cost of gift shop purchases.
133 134 135 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 133 def gift_shop_cost @gift_shop_cost end |
#gratuity_amount ⇒ String
Gratuity.
169 170 171 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 169 def gratuity_amount @gratuity_amount end |
#guest_name ⇒ String
Name of the guest under which the room is reserved.
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 59 def guest_name @guest_name end |
#health_club_cost ⇒ String
Cost of health club services.
141 142 143 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 141 def health_club_cost @health_club_cost end |
#hotel_name ⇒ String
The name of the hotel for which the reservation was made.
202 203 204 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 202 def hotel_name @hotel_name end |
#internet_access_cost ⇒ String
Cost of Internet access.
193 194 195 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 193 def internet_access_cost @internet_access_cost end |
#laundry_cost ⇒ String
Cost of laundry services.
125 126 127 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 125 def laundry_cost @laundry_cost end |
#lounge_bar_cost ⇒ String
Cost of lounge and bar purchases.
161 162 163 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 161 def @lounge_bar_cost end |
#mini_bar_cost ⇒ String
Cost of mini-bar purchases.
121 122 123 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 121 def @mini_bar_cost end |
#miscellaneous_cost ⇒ String
Miscellaneous costs.
129 130 131 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 129 def miscellaneous_cost @miscellaneous_cost end |
#movie_cost ⇒ String
Cost of movies.
137 138 139 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 137 def movie_cost @movie_cost end |
#name ⇒ String
Name of the hotel for which the reservation is for. Mandatory in case the merchant’s business type is Hotel.
198 199 200 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 198 def name @name end |
#non_room_cost ⇒ String
Cost of non-room purchases, such as meals and gifts.
153 154 155 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 153 def non_room_cost @non_room_cost end |
#non_room_tax_amount ⇒ String
Tax on non-room purchases.
185 186 187 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 185 def non_room_tax_amount @non_room_tax_amount end |
#number_of_guests ⇒ Integer
Number of guests staying in the room.
43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 43 def number_of_guests @number_of_guests end |
#number_of_rooms ⇒ Integer
Number of rooms booked by the cardholder.
39 40 41 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 39 def number_of_rooms @number_of_rooms end |
#phone_cost ⇒ String
Cost of telephone services.
109 110 111 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 109 def phone_cost @phone_cost end |
#prepaid_cost ⇒ String
Prepaid amount, such as a deposit.
92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 92 def prepaid_cost @prepaid_cost end |
#restaurant_cost ⇒ String
Cost of restaurant purchases
113 114 115 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 113 def restaurant_cost @restaurant_cost end |
#room ⇒ Array[Room]
The object containing the number of nights and the daily rate that applies for that no of nights.
28 29 30 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 28 def room @room end |
#room_bed_type ⇒ String
Type of room, such as queen, king, or two doubles.
47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 47 def room_bed_type @room_bed_type end |
#room_location ⇒ String
Location of room, such as lake view or ocean view.
76 77 78 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 76 def room_location @room_location end |
#room_rate_type ⇒ String
Type of rate, such as corporate or senior citizen.
55 56 57 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 55 def room_rate_type @room_rate_type end |
#room_service_cost ⇒ String
Cost of room service.
117 118 119 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 117 def room_service_cost @room_service_cost end |
#room_tax_amount ⇒ String
Total tax for the room.
100 101 102 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 100 def room_tax_amount @room_tax_amount end |
#room_tax_type ⇒ String
Type of tax, such as tourist or hotel.
51 52 53 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 51 def room_tax_type @room_tax_type end |
#smoking_preference ⇒ String
Smoking preference of the guest. Possible values:
Y: smoking roomN: non-smoking room
35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 35 def smoking_preference @smoking_preference end |
#special_program_code ⇒ String
Code that identifies special circumstances. Possible values:
1: lodging (default)2: no show reservation3: advanced deposit
84 85 86 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 84 def special_program_code @special_program_code end |
#total_tax_amount ⇒ String
Total tax amount.
88 89 90 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 88 def total_tax_amount @total_tax_amount end |
#transportation_cost ⇒ String
Cost of transportation services.
165 166 167 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 165 def transportation_cost @transportation_cost end |
#valet_parking_cost ⇒ String
Cost of valet parking services.
145 146 147 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 145 def valet_parking_cost @valet_parking_cost end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 403 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. check_in_date = hash.key?('checkInDate') ? hash['checkInDate'] : SKIP check_out_date = hash.key?('checkOutDate') ? hash['checkOutDate'] : SKIP # Parameter is an array, so we need to iterate through it room = nil unless hash['room'].nil? room = [] hash['room'].each do |structure| room << (Room.from_hash(structure) if structure) end end room = SKIP unless hash.key?('room') smoking_preference = hash.key?('smokingPreference') ? hash['smokingPreference'] : SKIP number_of_rooms = hash.key?('numberOfRooms') ? hash['numberOfRooms'] : SKIP number_of_guests = hash.key?('numberOfGuests') ? hash['numberOfGuests'] : SKIP room_bed_type = hash.key?('roomBedType') ? hash['roomBedType'] : SKIP room_tax_type = hash.key?('roomTaxType') ? hash['roomTaxType'] : SKIP room_rate_type = hash.key?('roomRateType') ? hash['roomRateType'] : SKIP guest_name = hash.key?('guestName') ? hash['guestName'] : SKIP customer_service_phone_number = hash.key?('customerServicePhoneNumber') ? hash['customerServicePhoneNumber'] : SKIP corporate_client_code = hash.key?('corporateClientCode') ? hash['corporateClientCode'] : SKIP additional_discount_amount = hash.key?('additionalDiscountAmount') ? hash['additionalDiscountAmount'] : SKIP room_location = hash.key?('roomLocation') ? hash['roomLocation'] : SKIP special_program_code = hash.key?('specialProgramCode') ? hash['specialProgramCode'] : SKIP total_tax_amount = hash.key?('totalTaxAmount') ? hash['totalTaxAmount'] : SKIP prepaid_cost = hash.key?('prepaidCost') ? hash['prepaidCost'] : SKIP food_and_beverage_cost = hash.key?('foodAndBeverageCost') ? hash['foodAndBeverageCost'] : SKIP room_tax_amount = hash.key?('roomTaxAmount') ? hash['roomTaxAmount'] : SKIP adjustment_amount = hash.key?('adjustmentAmount') ? hash['adjustmentAmount'] : SKIP phone_cost = hash.key?('phoneCost') ? hash['phoneCost'] : SKIP restaurant_cost = hash.key?('restaurantCost') ? hash['restaurantCost'] : SKIP room_service_cost = hash.key?('roomServiceCost') ? hash['roomServiceCost'] : SKIP = hash.key?('miniBarCost') ? hash['miniBarCost'] : SKIP laundry_cost = hash.key?('laundryCost') ? hash['laundryCost'] : SKIP miscellaneous_cost = hash.key?('miscellaneousCost') ? hash['miscellaneousCost'] : SKIP gift_shop_cost = hash.key?('giftShopCost') ? hash['giftShopCost'] : SKIP movie_cost = hash.key?('movieCost') ? hash['movieCost'] : SKIP health_club_cost = hash.key?('healthClubCost') ? hash['healthClubCost'] : SKIP valet_parking_cost = hash.key?('valetParkingCost') ? hash['valetParkingCost'] : SKIP cash_disbursement_cost = hash.key?('cashDisbursementCost') ? hash['cashDisbursementCost'] : SKIP non_room_cost = hash.key?('nonRoomCost') ? hash['nonRoomCost'] : SKIP business_center_cost = hash.key?('businessCenterCost') ? hash['businessCenterCost'] : SKIP = hash.key?('loungeBarCost') ? hash['loungeBarCost'] : SKIP transportation_cost = hash.key?('transportationCost') ? hash['transportationCost'] : SKIP gratuity_amount = hash.key?('gratuityAmount') ? hash['gratuityAmount'] : SKIP conference_room_cost = hash.key?('conferenceRoomCost') ? hash['conferenceRoomCost'] : SKIP audio_visual_cost = hash.key?('audioVisualCost') ? hash['audioVisualCost'] : SKIP banquest_cost = hash.key?('banquestCost') ? hash['banquestCost'] : SKIP non_room_tax_amount = hash.key?('nonRoomTaxAmount') ? hash['nonRoomTaxAmount'] : SKIP early_check_out_cost = hash.key?('earlyCheckOutCost') ? hash['earlyCheckOutCost'] : SKIP internet_access_cost = hash.key?('internetAccessCost') ? hash['internetAccessCost'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP hotel_name = hash.key?('hotelName') ? hash['hotelName'] : SKIP check_in_date_time = hash.key?('checkInDateTime') ? hash['checkInDateTime'] : SKIP check_out_date_time = hash.key?('checkOutDateTime') ? hash['checkOutDateTime'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. Lodging.new(check_in_date: check_in_date, check_out_date: check_out_date, room: room, smoking_preference: smoking_preference, number_of_rooms: number_of_rooms, number_of_guests: number_of_guests, room_bed_type: room_bed_type, room_tax_type: room_tax_type, room_rate_type: room_rate_type, guest_name: guest_name, customer_service_phone_number: customer_service_phone_number, corporate_client_code: corporate_client_code, additional_discount_amount: additional_discount_amount, room_location: room_location, special_program_code: special_program_code, total_tax_amount: total_tax_amount, prepaid_cost: prepaid_cost, food_and_beverage_cost: food_and_beverage_cost, room_tax_amount: room_tax_amount, adjustment_amount: adjustment_amount, phone_cost: phone_cost, restaurant_cost: restaurant_cost, room_service_cost: room_service_cost, mini_bar_cost: , laundry_cost: laundry_cost, miscellaneous_cost: miscellaneous_cost, gift_shop_cost: gift_shop_cost, movie_cost: movie_cost, health_club_cost: health_club_cost, valet_parking_cost: valet_parking_cost, cash_disbursement_cost: cash_disbursement_cost, non_room_cost: non_room_cost, business_center_cost: business_center_cost, lounge_bar_cost: , transportation_cost: transportation_cost, gratuity_amount: gratuity_amount, conference_room_cost: conference_room_cost, audio_visual_cost: audio_visual_cost, banquest_cost: banquest_cost, non_room_tax_amount: non_room_tax_amount, early_check_out_cost: early_check_out_cost, internet_access_cost: internet_access_cost, name: name, hotel_name: hotel_name, check_in_date_time: check_in_date_time, check_out_date_time: check_out_date_time, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 213 def self.names @_hash = {} if @_hash.nil? @_hash['check_in_date'] = 'checkInDate' @_hash['check_out_date'] = 'checkOutDate' @_hash['room'] = 'room' @_hash['smoking_preference'] = 'smokingPreference' @_hash['number_of_rooms'] = 'numberOfRooms' @_hash['number_of_guests'] = 'numberOfGuests' @_hash['room_bed_type'] = 'roomBedType' @_hash['room_tax_type'] = 'roomTaxType' @_hash['room_rate_type'] = 'roomRateType' @_hash['guest_name'] = 'guestName' @_hash['customer_service_phone_number'] = 'customerServicePhoneNumber' @_hash['corporate_client_code'] = 'corporateClientCode' @_hash['additional_discount_amount'] = 'additionalDiscountAmount' @_hash['room_location'] = 'roomLocation' @_hash['special_program_code'] = 'specialProgramCode' @_hash['total_tax_amount'] = 'totalTaxAmount' @_hash['prepaid_cost'] = 'prepaidCost' @_hash['food_and_beverage_cost'] = 'foodAndBeverageCost' @_hash['room_tax_amount'] = 'roomTaxAmount' @_hash['adjustment_amount'] = 'adjustmentAmount' @_hash['phone_cost'] = 'phoneCost' @_hash['restaurant_cost'] = 'restaurantCost' @_hash['room_service_cost'] = 'roomServiceCost' @_hash['mini_bar_cost'] = 'miniBarCost' @_hash['laundry_cost'] = 'laundryCost' @_hash['miscellaneous_cost'] = 'miscellaneousCost' @_hash['gift_shop_cost'] = 'giftShopCost' @_hash['movie_cost'] = 'movieCost' @_hash['health_club_cost'] = 'healthClubCost' @_hash['valet_parking_cost'] = 'valetParkingCost' @_hash['cash_disbursement_cost'] = 'cashDisbursementCost' @_hash['non_room_cost'] = 'nonRoomCost' @_hash['business_center_cost'] = 'businessCenterCost' @_hash['lounge_bar_cost'] = 'loungeBarCost' @_hash['transportation_cost'] = 'transportationCost' @_hash['gratuity_amount'] = 'gratuityAmount' @_hash['conference_room_cost'] = 'conferenceRoomCost' @_hash['audio_visual_cost'] = 'audioVisualCost' @_hash['banquest_cost'] = 'banquestCost' @_hash['non_room_tax_amount'] = 'nonRoomTaxAmount' @_hash['early_check_out_cost'] = 'earlyCheckOutCost' @_hash['internet_access_cost'] = 'internetAccessCost' @_hash['name'] = 'name' @_hash['hotel_name'] = 'hotelName' @_hash['check_in_date_time'] = 'checkInDateTime' @_hash['check_out_date_time'] = 'checkOutDateTime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
317 318 319 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 317 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 265 def self.optionals %w[ 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 mini_bar_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 lounge_bar_cost transportation_cost gratuity_amount conference_room_cost audio_visual_cost banquest_cost non_room_tax_amount early_check_out_cost internet_access_cost name hotel_name check_in_date_time check_out_date_time ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 578 def inspect class_name = self.class.name.split('::').last "<#{class_name} check_in_date: #{@check_in_date.inspect}, check_out_date:"\ " #{@check_out_date.inspect}, room: #{@room.inspect}, smoking_preference:"\ " #{@smoking_preference.inspect}, number_of_rooms: #{@number_of_rooms.inspect},"\ " number_of_guests: #{@number_of_guests.inspect}, room_bed_type: #{@room_bed_type.inspect},"\ " room_tax_type: #{@room_tax_type.inspect}, room_rate_type: #{@room_rate_type.inspect},"\ " guest_name: #{@guest_name.inspect}, customer_service_phone_number:"\ " #{@customer_service_phone_number.inspect}, corporate_client_code:"\ " #{@corporate_client_code.inspect}, additional_discount_amount:"\ " #{@additional_discount_amount.inspect}, room_location: #{@room_location.inspect},"\ " special_program_code: #{@special_program_code.inspect}, total_tax_amount:"\ " #{@total_tax_amount.inspect}, prepaid_cost: #{@prepaid_cost.inspect},"\ " food_and_beverage_cost: #{@food_and_beverage_cost.inspect}, room_tax_amount:"\ " #{@room_tax_amount.inspect}, adjustment_amount: #{@adjustment_amount.inspect}, phone_cost:"\ " #{@phone_cost.inspect}, restaurant_cost: #{@restaurant_cost.inspect}, room_service_cost:"\ " #{@room_service_cost.inspect}, mini_bar_cost: #{@mini_bar_cost.inspect}, laundry_cost:"\ " #{@laundry_cost.inspect}, miscellaneous_cost: #{@miscellaneous_cost.inspect},"\ " gift_shop_cost: #{@gift_shop_cost.inspect}, movie_cost: #{@movie_cost.inspect},"\ " health_club_cost: #{@health_club_cost.inspect}, valet_parking_cost:"\ " #{@valet_parking_cost.inspect}, cash_disbursement_cost:"\ " #{@cash_disbursement_cost.inspect}, non_room_cost: #{@non_room_cost.inspect},"\ " business_center_cost: #{@business_center_cost.inspect}, lounge_bar_cost:"\ " #{@lounge_bar_cost.inspect}, transportation_cost: #{@transportation_cost.inspect},"\ " gratuity_amount: #{@gratuity_amount.inspect}, conference_room_cost:"\ " #{@conference_room_cost.inspect}, audio_visual_cost: #{@audio_visual_cost.inspect},"\ " banquest_cost: #{@banquest_cost.inspect}, non_room_tax_amount:"\ " #{@non_room_tax_amount.inspect}, early_check_out_cost: #{@early_check_out_cost.inspect},"\ " internet_access_cost: #{@internet_access_cost.inspect}, name: #{@name.inspect},"\ " hotel_name: #{@hotel_name.inspect}, check_in_date_time: #{@check_in_date_time.inspect},"\ " check_out_date_time: #{@check_out_date_time.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 549 def to_s class_name = self.class.name.split('::').last "<#{class_name} check_in_date: #{@check_in_date}, check_out_date: #{@check_out_date}, room:"\ " #{@room}, smoking_preference: #{@smoking_preference}, number_of_rooms:"\ " #{@number_of_rooms}, number_of_guests: #{@number_of_guests}, room_bed_type:"\ " #{@room_bed_type}, room_tax_type: #{@room_tax_type}, room_rate_type: #{@room_rate_type},"\ " guest_name: #{@guest_name}, customer_service_phone_number:"\ " #{@customer_service_phone_number}, corporate_client_code: #{@corporate_client_code},"\ " additional_discount_amount: #{@additional_discount_amount}, room_location:"\ " #{@room_location}, special_program_code: #{@special_program_code}, total_tax_amount:"\ " #{@total_tax_amount}, prepaid_cost: #{@prepaid_cost}, food_and_beverage_cost:"\ " #{@food_and_beverage_cost}, room_tax_amount: #{@room_tax_amount}, adjustment_amount:"\ " #{@adjustment_amount}, phone_cost: #{@phone_cost}, restaurant_cost: #{@restaurant_cost},"\ " room_service_cost: #{@room_service_cost}, mini_bar_cost: #{@mini_bar_cost}, laundry_cost:"\ " #{@laundry_cost}, miscellaneous_cost: #{@miscellaneous_cost}, gift_shop_cost:"\ " #{@gift_shop_cost}, movie_cost: #{@movie_cost}, health_club_cost: #{@health_club_cost},"\ " valet_parking_cost: #{@valet_parking_cost}, cash_disbursement_cost:"\ " #{@cash_disbursement_cost}, non_room_cost: #{@non_room_cost}, business_center_cost:"\ " #{@business_center_cost}, lounge_bar_cost: #{@lounge_bar_cost}, transportation_cost:"\ " #{@transportation_cost}, gratuity_amount: #{@gratuity_amount}, conference_room_cost:"\ " #{@conference_room_cost}, audio_visual_cost: #{@audio_visual_cost}, banquest_cost:"\ " #{@banquest_cost}, non_room_tax_amount: #{@non_room_tax_amount}, early_check_out_cost:"\ " #{@early_check_out_cost}, internet_access_cost: #{@internet_access_cost}, name: #{@name},"\ " hotel_name: #{@hotel_name}, check_in_date_time: #{@check_in_date_time},"\ " check_out_date_time: #{@check_out_date_time}, additional_properties:"\ " #{@additional_properties}>" end |