Class: CyberSource::Ptsv2paymentsTravelInformationLodging

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Ptsv2paymentsTravelInformationLodging

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 312

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

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.has_key?(:'hotelName')
    self.hotel_name = attributes[:'hotelName']
  end

  if attributes.has_key?(:'checkInDateTime')
    self.check_in_date_time = attributes[:'checkInDateTime']
  end

  if attributes.has_key?(:'checkOutDateTime')
    self.check_out_date_time = attributes[:'checkOutDateTime']
  end
end

Instance Attribute Details

#additional_discount_amountObject

Amount of an additional coupon or discount.



53
54
55
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 53

def additional_discount_amount
  @additional_discount_amount
end

#adjustment_amountObject

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



74
75
76
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 74

def adjustment_amount
  @adjustment_amount
end

#audio_visual_costObject

Cost of audio visual services.



128
129
130
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 128

def audio_visual_cost
  @audio_visual_cost
end

#banquest_costObject

Cost of banquet services.



131
132
133
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 131

def banquest_cost
  @banquest_cost
end

#business_center_costObject

Cost of business center services.



113
114
115
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 113

def business_center_cost
  @business_center_cost
end

#cash_disbursement_costObject

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



107
108
109
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 107

def cash_disbursement_cost
  @cash_disbursement_cost
end

#check_in_dateObject

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/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 17

def check_in_date
  @check_in_date
end

#check_in_date_timeObject

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



149
150
151
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 149

def check_in_date_time
  @check_in_date_time
end

#check_out_dateObject

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



20
21
22
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 20

def check_out_date
  @check_out_date
end

#check_out_date_timeObject

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



152
153
154
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 152

def check_out_date_time
  @check_out_date_time
end

#conference_room_costObject

Cost of conference room services.



125
126
127
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 125

def conference_room_cost
  @conference_room_cost
end

#corporate_client_codeObject

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



50
51
52
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 50

def corporate_client_code
  @corporate_client_code
end

#customer_service_phone_numberObject

Your toll-free customer service phone number.



47
48
49
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 47

def customer_service_phone_number
  @customer_service_phone_number
end

#early_check_out_costObject

Service fee for early departure.



137
138
139
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 137

def early_check_out_cost
  @early_check_out_cost
end

#food_and_beverage_costObject

Cost for all food and beverages.



68
69
70
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 68

def food_and_beverage_cost
  @food_and_beverage_cost
end

#gift_shop_costObject

Cost of gift shop purchases.



95
96
97
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 95

def gift_shop_cost
  @gift_shop_cost
end

#gratuity_amountObject

Gratuity.



122
123
124
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 122

def gratuity_amount
  @gratuity_amount
end

#guest_nameObject

Name of the guest under which the room is reserved.



44
45
46
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 44

def guest_name
  @guest_name
end

#health_club_costObject

Cost of health club services.



101
102
103
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 101

def health_club_cost
  @health_club_cost
end

#hotel_nameObject

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



146
147
148
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 146

def hotel_name
  @hotel_name
end

#internet_access_costObject

Cost of Internet access.



140
141
142
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 140

def internet_access_cost
  @internet_access_cost
end

#laundry_costObject

Cost of laundry services.



89
90
91
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 89

def laundry_cost
  @laundry_cost
end

#lounge_bar_costObject

Cost of lounge and bar purchases.



116
117
118
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 116

def lounge_bar_cost
  @lounge_bar_cost
end

#mini_bar_costObject

Cost of mini-bar purchases.



86
87
88
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 86

def mini_bar_cost
  @mini_bar_cost
end

#miscellaneous_costObject

Miscellaneous costs.



92
93
94
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 92

def miscellaneous_cost
  @miscellaneous_cost
end

#movie_costObject

Cost of movies.



98
99
100
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 98

def movie_cost
  @movie_cost
end

#nameObject

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



143
144
145
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 143

def name
  @name
end

#non_room_costObject

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



110
111
112
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 110

def non_room_cost
  @non_room_cost
end

#non_room_tax_amountObject

Tax on non-room purchases.



134
135
136
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 134

def non_room_tax_amount
  @non_room_tax_amount
end

#number_of_guestsObject

Number of guests staying in the room.



32
33
34
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 32

def number_of_guests
  @number_of_guests
end

#number_of_roomsObject

Number of rooms booked by the cardholder.



29
30
31
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 29

def number_of_rooms
  @number_of_rooms
end

#phone_costObject

Cost of telephone services.



77
78
79
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 77

def phone_cost
  @phone_cost
end

#prepaid_costObject

Prepaid amount, such as a deposit.



65
66
67
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 65

def prepaid_cost
  @prepaid_cost
end

#restaurant_costObject

Cost of restaurant purchases



80
81
82
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 80

def restaurant_cost
  @restaurant_cost
end

#roomObject

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



23
24
25
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 23

def room
  @room
end

#room_bed_typeObject

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



35
36
37
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 35

def room_bed_type
  @room_bed_type
end

#room_locationObject

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



56
57
58
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 56

def room_location
  @room_location
end

#room_rate_typeObject

Type of rate, such as corporate or senior citizen.



41
42
43
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 41

def room_rate_type
  @room_rate_type
end

#room_service_costObject

Cost of room service.



83
84
85
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 83

def room_service_cost
  @room_service_cost
end

#room_tax_amountObject

Total tax for the room.



71
72
73
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 71

def room_tax_amount
  @room_tax_amount
end

#room_tax_typeObject

Type of tax, such as tourist or hotel.



38
39
40
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 38

def room_tax_type
  @room_tax_type
end

#smoking_preferenceObject

Smoking preference of the guest. Possible values: - ‘Y`: smoking room - `N`: non-smoking room



26
27
28
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 26

def smoking_preference
  @smoking_preference
end

#special_program_codeObject

Code that identifies special circumstances. Possible values: - ‘1`: lodging (default) - `2`: no show reservation - `3`: advanced deposit



59
60
61
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 59

def special_program_code
  @special_program_code
end

#total_tax_amountObject

Total tax amount.



62
63
64
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 62

def total_tax_amount
  @total_tax_amount
end

#transportation_costObject

Cost of transportation services.



119
120
121
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 119

def transportation_cost
  @transportation_cost
end

#valet_parking_costObject

Cost of valet parking services.



104
105
106
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 104

def valet_parking_cost
  @valet_parking_cost
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 155

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',
    :'name' => :'name',
    :'hotel_name' => :'hotelName',
    :'check_in_date_time' => :'checkInDateTime',
    :'check_out_date_time' => :'checkOutDateTime'
  }
end

.json_mapObject

Attribute mapping from JSON key to ruby-style variable name.



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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 207

def self.json_map
  {
    :'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'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 259

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',
    :'name' => :'String',
    :'hotel_name' => :'String',
    :'check_in_date_time' => :'String',
    :'check_out_date_time' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 772

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 &&
      mini_bar_cost == o.mini_bar_cost &&
      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 &&
      lounge_bar_cost == o.lounge_bar_cost &&
      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 &&
      name == o.name &&
      hotel_name == o.hotel_name &&
      check_in_date_time == o.check_in_date_time &&
      check_out_date_time == o.check_out_date_time
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 859

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



925
926
927
928
929
930
931
932
933
934
935
936
937
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 925

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 838

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("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{self.class.json_map[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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


825
826
827
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 825

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



831
832
833
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 831

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, 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].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



507
508
509
510
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 507

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



905
906
907
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 905

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



911
912
913
914
915
916
917
918
919
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 911

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



899
900
901
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 899

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



514
515
516
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb', line 514

def valid?
  true
end