Class: VisaAcceptanceMergedSpec::Lodging

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/visa_acceptance_merged_spec/models/lodging.rb

Overview

Lodging Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = mini_bar_cost unless mini_bar_cost == 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 = lounge_bar_cost unless lounge_bar_cost == 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_amountString

Amount of an additional coupon or discount.

Returns:

  • (String)


72
73
74
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 72

def additional_discount_amount
  @additional_discount_amount
end

#adjustment_amountString

Adjusted amount charged in addition to the reservation amount after the stay is complete.

Returns:

  • (String)


105
106
107
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 105

def adjustment_amount
  @adjustment_amount
end

#audio_visual_costString

Cost of audio visual services.

Returns:

  • (String)


177
178
179
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 177

def audio_visual_cost
  @audio_visual_cost
end

#banquest_costString

Cost of banquet services.

Returns:

  • (String)


181
182
183
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 181

def banquest_cost
  @banquest_cost
end

#business_center_costString

Cost of business center services.

Returns:

  • (String)


157
158
159
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 157

def business_center_cost
  @business_center_cost
end

#cash_disbursement_costString

Cost of the cash that was disbursed plus any associated service fees

Returns:

  • (String)


149
150
151
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 149

def cash_disbursement_cost
  @cash_disbursement_cost
end

#check_in_dateString

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.

Returns:

  • (String)


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_timeString

The date of the check-in in GMT+8 offset.

Returns:

  • (String)


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_dateString

Date on which the guest checked out. Format: MMDDYY. For best interchange rates, make sure it is a valid date.

Returns:

  • (String)


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_timeString

The date of the check-out in GMT+8 offset.

Returns:

  • (String)


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_costString

Cost of conference room services.

Returns:

  • (String)


173
174
175
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 173

def conference_room_cost
  @conference_room_cost
end

#corporate_client_codeString

Code assigned to a business. You can use this code to identify corporate rates and discounts for guests.

Returns:

  • (String)


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_numberString

Your toll-free customer service phone number.

Returns:

  • (String)


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_costString

Service fee for early departure.

Returns:

  • (String)


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_costString

Cost for all food and beverages.

Returns:

  • (String)


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_costString

Cost of gift shop purchases.

Returns:

  • (String)


133
134
135
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 133

def gift_shop_cost
  @gift_shop_cost
end

#gratuity_amountString

Gratuity.

Returns:

  • (String)


169
170
171
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 169

def gratuity_amount
  @gratuity_amount
end

#guest_nameString

Name of the guest under which the room is reserved.

Returns:

  • (String)


59
60
61
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 59

def guest_name
  @guest_name
end

#health_club_costString

Cost of health club services.

Returns:

  • (String)


141
142
143
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 141

def health_club_cost
  @health_club_cost
end

#hotel_nameString

The name of the hotel for which the reservation was made.

Returns:

  • (String)


202
203
204
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 202

def hotel_name
  @hotel_name
end

#internet_access_costString

Cost of Internet access.

Returns:

  • (String)


193
194
195
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 193

def internet_access_cost
  @internet_access_cost
end

#laundry_costString

Cost of laundry services.

Returns:

  • (String)


125
126
127
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 125

def laundry_cost
  @laundry_cost
end

#lounge_bar_costString

Cost of lounge and bar purchases.

Returns:

  • (String)


161
162
163
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 161

def lounge_bar_cost
  @lounge_bar_cost
end

#mini_bar_costString

Cost of mini-bar purchases.

Returns:

  • (String)


121
122
123
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 121

def mini_bar_cost
  @mini_bar_cost
end

#miscellaneous_costString

Miscellaneous costs.

Returns:

  • (String)


129
130
131
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 129

def miscellaneous_cost
  @miscellaneous_cost
end

#movie_costString

Cost of movies.

Returns:

  • (String)


137
138
139
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 137

def movie_cost
  @movie_cost
end

#nameString

Name of the hotel for which the reservation is for. Mandatory in case the merchant’s business type is Hotel.

Returns:

  • (String)


198
199
200
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 198

def name
  @name
end

#non_room_costString

Cost of non-room purchases, such as meals and gifts.

Returns:

  • (String)


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_amountString

Tax on non-room purchases.

Returns:

  • (String)


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_guestsInteger

Number of guests staying in the room.

Returns:

  • (Integer)


43
44
45
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 43

def number_of_guests
  @number_of_guests
end

#number_of_roomsInteger

Number of rooms booked by the cardholder.

Returns:

  • (Integer)


39
40
41
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 39

def number_of_rooms
  @number_of_rooms
end

#phone_costString

Cost of telephone services.

Returns:

  • (String)


109
110
111
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 109

def phone_cost
  @phone_cost
end

#prepaid_costString

Prepaid amount, such as a deposit.

Returns:

  • (String)


92
93
94
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 92

def prepaid_cost
  @prepaid_cost
end

#restaurant_costString

Cost of restaurant purchases

Returns:

  • (String)


113
114
115
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 113

def restaurant_cost
  @restaurant_cost
end

#roomArray[Room]

The object containing the number of nights and the daily rate that applies for that no of nights.

Returns:



28
29
30
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 28

def room
  @room
end

#room_bed_typeString

Type of room, such as queen, king, or two doubles.

Returns:

  • (String)


47
48
49
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 47

def room_bed_type
  @room_bed_type
end

#room_locationString

Location of room, such as lake view or ocean view.

Returns:

  • (String)


76
77
78
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 76

def room_location
  @room_location
end

#room_rate_typeString

Type of rate, such as corporate or senior citizen.

Returns:

  • (String)


55
56
57
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 55

def room_rate_type
  @room_rate_type
end

#room_service_costString

Cost of room service.

Returns:

  • (String)


117
118
119
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 117

def room_service_cost
  @room_service_cost
end

#room_tax_amountString

Total tax for the room.

Returns:

  • (String)


100
101
102
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 100

def room_tax_amount
  @room_tax_amount
end

#room_tax_typeString

Type of tax, such as tourist or hotel.

Returns:

  • (String)


51
52
53
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 51

def room_tax_type
  @room_tax_type
end

#smoking_preferenceString

Smoking preference of the guest. Possible values:

  • Y: smoking room
  • N: non-smoking room

Returns:

  • (String)


35
36
37
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 35

def smoking_preference
  @smoking_preference
end

#special_program_codeString

Code that identifies special circumstances. Possible values:

  • 1: lodging (default)
  • 2: no show reservation
  • 3: advanced deposit

Returns:

  • (String)


84
85
86
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 84

def special_program_code
  @special_program_code
end

#total_tax_amountString

Total tax amount.

Returns:

  • (String)


88
89
90
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 88

def total_tax_amount
  @total_tax_amount
end

#transportation_costString

Cost of transportation services.

Returns:

  • (String)


165
166
167
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 165

def transportation_cost
  @transportation_cost
end

#valet_parking_costString

Cost of valet parking services.

Returns:

  • (String)


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
  mini_bar_cost = 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
  lounge_bar_cost =
    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: 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

.namesObject

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

.nullablesObject

An array for nullable fields



317
318
319
# File 'lib/visa_acceptance_merged_spec/models/lodging.rb', line 317

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

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_sObject

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