class CyberSource::Ptsv2paymentsTravelInformationLodging

Attributes

additional_discount_amount[RW]

Amount of an additional coupon or discount.

adjustment_amount[RW]

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

audio_visual_cost[RW]

Cost of audio visual services.

banquest_cost[RW]

Cost of banquet services.

business_center_cost[RW]

Cost of business center services.

cash_disbursement_cost[RW]

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

check_in_date[RW]

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.

check_out_date[RW]

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

conference_room_cost[RW]

Cost of conference room services.

corporate_client_code[RW]

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

customer_service_phone_number[RW]

Your toll-free customer service phone number.

early_check_out_cost[RW]

Service fee for early departure.

food_and_beverage_cost[RW]

Cost for all food and beverages.

gift_shop_cost[RW]

Cost of gift shop purchases.

gratuity_amount[RW]

Gratuity.

guest_name[RW]

Name of the guest under which the room is reserved.

health_club_cost[RW]

Cost of health club services.

internet_access_cost[RW]

Cost of Internet access.

laundry_cost[RW]

Cost of laundry services.

lounge_bar_cost[RW]

Cost of lounge and bar purchases.

mini_bar_cost[RW]

Cost of mini-bar purchases.

miscellaneous_cost[RW]

Miscellaneous costs.

movie_cost[RW]

Cost of movies.

non_room_cost[RW]

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

non_room_tax_amount[RW]

Tax on non-room purchases.

number_of_guests[RW]

Number of guests staying in the room.

number_of_rooms[RW]

Number of rooms booked by the cardholder.

phone_cost[RW]

Cost of telephone services.

prepaid_cost[RW]

Prepaid amount, such as a deposit.

restaurant_cost[RW]

Cost of restaurant purchases

room[RW]

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

room_bed_type[RW]

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

room_location[RW]

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

room_rate_type[RW]

Type of rate, such as corporate or senior citizen.

room_service_cost[RW]

Cost of room service.

room_tax_amount[RW]

Total tax for the room.

room_tax_type[RW]

Type of tax, such as tourist or hotel.

smoking_preference[RW]

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

special_program_code[RW]

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

total_tax_amount[RW]

Total tax amount.

transportation_cost[RW]

Cost of transportation services.

valet_parking_cost[RW]

Cost of valet parking services.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 144
def self.attribute_map
  {
    :'check_in_date' => :'checkInDate',
    :'check_out_date' => :'checkOutDate',
    :'room' => :'room',
    :'smoking_preference' => :'smokingPreference',
    :'number_of_rooms' => :'numberOfRooms',
    :'number_of_guests' => :'numberOfGuests',
    :'room_bed_type' => :'roomBedType',
    :'room_tax_type' => :'roomTaxType',
    :'room_rate_type' => :'roomRateType',
    :'guest_name' => :'guestName',
    :'customer_service_phone_number' => :'customerServicePhoneNumber',
    :'corporate_client_code' => :'corporateClientCode',
    :'additional_discount_amount' => :'additionalDiscountAmount',
    :'room_location' => :'roomLocation',
    :'special_program_code' => :'specialProgramCode',
    :'total_tax_amount' => :'totalTaxAmount',
    :'prepaid_cost' => :'prepaidCost',
    :'food_and_beverage_cost' => :'foodAndBeverageCost',
    :'room_tax_amount' => :'roomTaxAmount',
    :'adjustment_amount' => :'adjustmentAmount',
    :'phone_cost' => :'phoneCost',
    :'restaurant_cost' => :'restaurantCost',
    :'room_service_cost' => :'roomServiceCost',
    :'mini_bar_cost' => :'miniBarCost',
    :'laundry_cost' => :'laundryCost',
    :'miscellaneous_cost' => :'miscellaneousCost',
    :'gift_shop_cost' => :'giftShopCost',
    :'movie_cost' => :'movieCost',
    :'health_club_cost' => :'healthClubCost',
    :'valet_parking_cost' => :'valetParkingCost',
    :'cash_disbursement_cost' => :'cashDisbursementCost',
    :'non_room_cost' => :'nonRoomCost',
    :'business_center_cost' => :'businessCenterCost',
    :'lounge_bar_cost' => :'loungeBarCost',
    :'transportation_cost' => :'transportationCost',
    :'gratuity_amount' => :'gratuityAmount',
    :'conference_room_cost' => :'conferenceRoomCost',
    :'audio_visual_cost' => :'audioVisualCost',
    :'banquest_cost' => :'banquestCost',
    :'non_room_tax_amount' => :'nonRoomTaxAmount',
    :'early_check_out_cost' => :'earlyCheckOutCost',
    :'internet_access_cost' => :'internetAccessCost'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 241
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

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

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

  if attributes.has_key?(:'room')
    if (value = attributes[:'room']).is_a?(Array)
      self.room = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'miniBarCost')
    self.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
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 192
def self.swagger_types
  {
    :'check_in_date' => :'String',
    :'check_out_date' => :'String',
    :'room' => :'Array<Ptsv2paymentsTravelInformationLodgingRoom>',
    :'smoking_preference' => :'String',
    :'number_of_rooms' => :'Integer',
    :'number_of_guests' => :'Integer',
    :'room_bed_type' => :'String',
    :'room_tax_type' => :'String',
    :'room_rate_type' => :'String',
    :'guest_name' => :'String',
    :'customer_service_phone_number' => :'String',
    :'corporate_client_code' => :'String',
    :'additional_discount_amount' => :'String',
    :'room_location' => :'String',
    :'special_program_code' => :'String',
    :'total_tax_amount' => :'String',
    :'prepaid_cost' => :'String',
    :'food_and_beverage_cost' => :'String',
    :'room_tax_amount' => :'String',
    :'adjustment_amount' => :'String',
    :'phone_cost' => :'String',
    :'restaurant_cost' => :'String',
    :'room_service_cost' => :'String',
    :'mini_bar_cost' => :'String',
    :'laundry_cost' => :'String',
    :'miscellaneous_cost' => :'String',
    :'gift_shop_cost' => :'String',
    :'movie_cost' => :'String',
    :'health_club_cost' => :'String',
    :'valet_parking_cost' => :'String',
    :'cash_disbursement_cost' => :'String',
    :'non_room_cost' => :'String',
    :'business_center_cost' => :'String',
    :'lounge_bar_cost' => :'String',
    :'transportation_cost' => :'String',
    :'gratuity_amount' => :'String',
    :'conference_room_cost' => :'String',
    :'audio_visual_cost' => :'String',
    :'banquest_cost' => :'String',
    :'non_room_tax_amount' => :'String',
    :'early_check_out_cost' => :'String',
    :'internet_access_cost' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 715
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      check_in_date == o.check_in_date &&
      check_out_date == o.check_out_date &&
      room == o.room &&
      smoking_preference == o.smoking_preference &&
      number_of_rooms == o.number_of_rooms &&
      number_of_guests == o.number_of_guests &&
      room_bed_type == o.room_bed_type &&
      room_tax_type == o.room_tax_type &&
      room_rate_type == o.room_rate_type &&
      guest_name == o.guest_name &&
      customer_service_phone_number == o.customer_service_phone_number &&
      corporate_client_code == o.corporate_client_code &&
      additional_discount_amount == o.additional_discount_amount &&
      room_location == o.room_location &&
      special_program_code == o.special_program_code &&
      total_tax_amount == o.total_tax_amount &&
      prepaid_cost == o.prepaid_cost &&
      food_and_beverage_cost == o.food_and_beverage_cost &&
      room_tax_amount == o.room_tax_amount &&
      adjustment_amount == o.adjustment_amount &&
      phone_cost == o.phone_cost &&
      restaurant_cost == o.restaurant_cost &&
      room_service_cost == o.room_service_cost &&
      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
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 798
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = CyberSource.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 864
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
additional_discount_amount=(additional_discount_amount) click to toggle source

Custom attribute writer method with validation @param [Object] additional_discount_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 535
def additional_discount_amount=(additional_discount_amount)
  @additional_discount_amount = additional_discount_amount
end
adjustment_amount=(adjustment_amount) click to toggle source

Custom attribute writer method with validation @param [Object] adjustment_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 577
def adjustment_amount=(adjustment_amount)
  @adjustment_amount = adjustment_amount
end
audio_visual_cost=(audio_visual_cost) click to toggle source

Custom attribute writer method with validation @param [Object] audio_visual_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 685
def audio_visual_cost=(audio_visual_cost)
  @audio_visual_cost = audio_visual_cost
end
banquest_cost=(banquest_cost) click to toggle source

Custom attribute writer method with validation @param [Object] banquest_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 691
def banquest_cost=(banquest_cost)
  @banquest_cost = banquest_cost
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 777
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
business_center_cost=(business_center_cost) click to toggle source

Custom attribute writer method with validation @param [Object] business_center_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 655
def business_center_cost=(business_center_cost)
  @business_center_cost = business_center_cost
end
cash_disbursement_cost=(cash_disbursement_cost) click to toggle source

Custom attribute writer method with validation @param [Object] cash_disbursement_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 643
def cash_disbursement_cost=(cash_disbursement_cost)
  @cash_disbursement_cost = cash_disbursement_cost
end
check_in_date=(check_in_date) click to toggle source

Custom attribute writer method with validation @param [Object] check_in_date Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 453
def check_in_date=(check_in_date)
  @check_in_date = check_in_date
end
check_out_date=(check_out_date) click to toggle source

Custom attribute writer method with validation @param [Object] check_out_date Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 459
def check_out_date=(check_out_date)
  @check_out_date = check_out_date
end
conference_room_cost=(conference_room_cost) click to toggle source

Custom attribute writer method with validation @param [Object] conference_room_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 679
def conference_room_cost=(conference_room_cost)
  @conference_room_cost = conference_room_cost
end
corporate_client_code=(corporate_client_code) click to toggle source

Custom attribute writer method with validation @param [Object] corporate_client_code Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 529
def corporate_client_code=(corporate_client_code)
  @corporate_client_code = corporate_client_code
end
customer_service_phone_number=(customer_service_phone_number) click to toggle source

Custom attribute writer method with validation @param [Object] customer_service_phone_number Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 523
def customer_service_phone_number=(customer_service_phone_number)
  @customer_service_phone_number = customer_service_phone_number
end
early_check_out_cost=(early_check_out_cost) click to toggle source

Custom attribute writer method with validation @param [Object] early_check_out_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 703
def early_check_out_cost=(early_check_out_cost)
  @early_check_out_cost = early_check_out_cost
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 764
def eql?(o)
  self == o
end
food_and_beverage_cost=(food_and_beverage_cost) click to toggle source

Custom attribute writer method with validation @param [Object] food_and_beverage_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 565
def food_and_beverage_cost=(food_and_beverage_cost)
  @food_and_beverage_cost = food_and_beverage_cost
end
gift_shop_cost=(gift_shop_cost) click to toggle source

Custom attribute writer method with validation @param [Object] gift_shop_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 619
def gift_shop_cost=(gift_shop_cost)
  @gift_shop_cost = gift_shop_cost
end
gratuity_amount=(gratuity_amount) click to toggle source

Custom attribute writer method with validation @param [Object] gratuity_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 673
def gratuity_amount=(gratuity_amount)
  @gratuity_amount = gratuity_amount
end
guest_name=(guest_name) click to toggle source

Custom attribute writer method with validation @param [Object] guest_name Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 517
def guest_name=(guest_name)
  @guest_name = guest_name
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 770
def hash
  [check_in_date, check_out_date, room, smoking_preference, number_of_rooms, number_of_guests, room_bed_type, room_tax_type, room_rate_type, guest_name, customer_service_phone_number, corporate_client_code, additional_discount_amount, room_location, special_program_code, total_tax_amount, prepaid_cost, food_and_beverage_cost, room_tax_amount, adjustment_amount, phone_cost, restaurant_cost, room_service_cost, 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].hash
end
health_club_cost=(health_club_cost) click to toggle source

Custom attribute writer method with validation @param [Object] health_club_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 631
def health_club_cost=(health_club_cost)
  @health_club_cost = health_club_cost
end
internet_access_cost=(internet_access_cost) click to toggle source

Custom attribute writer method with validation @param [Object] internet_access_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 709
def internet_access_cost=(internet_access_cost)
  @internet_access_cost = internet_access_cost
end
laundry_cost=(laundry_cost) click to toggle source

Custom attribute writer method with validation @param [Object] laundry_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 607
def laundry_cost=(laundry_cost)
  @laundry_cost = laundry_cost
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 420
def list_invalid_properties
  invalid_properties = Array.new
  if !@number_of_rooms.nil? && @number_of_rooms > 99
    invalid_properties.push('invalid value for "number_of_rooms", must be smaller than or equal to 99.')
  end

  if !@number_of_rooms.nil? && @number_of_rooms < 1
    invalid_properties.push('invalid value for "number_of_rooms", must be greater than or equal to 1.')
  end

  if !@number_of_guests.nil? && @number_of_guests > 99
    invalid_properties.push('invalid value for "number_of_guests", must be smaller than or equal to 99.')
  end

  if !@number_of_guests.nil? && @number_of_guests < 1
    invalid_properties.push('invalid value for "number_of_guests", must be greater than or equal to 1.')
  end

  invalid_properties
end
lounge_bar_cost=(lounge_bar_cost) click to toggle source

Custom attribute writer method with validation @param [Object] lounge_bar_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 661
def lounge_bar_cost=(lounge_bar_cost)
  @lounge_bar_cost = lounge_bar_cost
end
mini_bar_cost=(mini_bar_cost) click to toggle source

Custom attribute writer method with validation @param [Object] mini_bar_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 601
def mini_bar_cost=(mini_bar_cost)
  @mini_bar_cost = mini_bar_cost
end
miscellaneous_cost=(miscellaneous_cost) click to toggle source

Custom attribute writer method with validation @param [Object] miscellaneous_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 613
def miscellaneous_cost=(miscellaneous_cost)
  @miscellaneous_cost = miscellaneous_cost
end
movie_cost=(movie_cost) click to toggle source

Custom attribute writer method with validation @param [Object] movie_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 625
def movie_cost=(movie_cost)
  @movie_cost = movie_cost
end
non_room_cost=(non_room_cost) click to toggle source

Custom attribute writer method with validation @param [Object] non_room_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 649
def non_room_cost=(non_room_cost)
  @non_room_cost = non_room_cost
end
non_room_tax_amount=(non_room_tax_amount) click to toggle source

Custom attribute writer method with validation @param [Object] non_room_tax_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 697
def non_room_tax_amount=(non_room_tax_amount)
  @non_room_tax_amount = non_room_tax_amount
end
number_of_guests=(number_of_guests) click to toggle source

Custom attribute writer method with validation @param [Object] number_of_guests Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 485
def number_of_guests=(number_of_guests)
  if !number_of_guests.nil? && number_of_guests > 99
    fail ArgumentError, 'invalid value for "number_of_guests", must be smaller than or equal to 99.'
  end

  if !number_of_guests.nil? && number_of_guests < 1
    fail ArgumentError, 'invalid value for "number_of_guests", must be greater than or equal to 1.'
  end

  @number_of_guests = number_of_guests
end
number_of_rooms=(number_of_rooms) click to toggle source

Custom attribute writer method with validation @param [Object] number_of_rooms Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 471
def number_of_rooms=(number_of_rooms)
  if !number_of_rooms.nil? && number_of_rooms > 99
    fail ArgumentError, 'invalid value for "number_of_rooms", must be smaller than or equal to 99.'
  end

  if !number_of_rooms.nil? && number_of_rooms < 1
    fail ArgumentError, 'invalid value for "number_of_rooms", must be greater than or equal to 1.'
  end

  @number_of_rooms = number_of_rooms
end
phone_cost=(phone_cost) click to toggle source

Custom attribute writer method with validation @param [Object] phone_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 583
def phone_cost=(phone_cost)
  @phone_cost = phone_cost
end
prepaid_cost=(prepaid_cost) click to toggle source

Custom attribute writer method with validation @param [Object] prepaid_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 559
def prepaid_cost=(prepaid_cost)
  @prepaid_cost = prepaid_cost
end
restaurant_cost=(restaurant_cost) click to toggle source

Custom attribute writer method with validation @param [Object] restaurant_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 589
def restaurant_cost=(restaurant_cost)
  @restaurant_cost = restaurant_cost
end
room_bed_type=(room_bed_type) click to toggle source

Custom attribute writer method with validation @param [Object] room_bed_type Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 499
def room_bed_type=(room_bed_type)
  @room_bed_type = room_bed_type
end
room_location=(room_location) click to toggle source

Custom attribute writer method with validation @param [Object] room_location Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 541
def room_location=(room_location)
  @room_location = room_location
end
room_rate_type=(room_rate_type) click to toggle source

Custom attribute writer method with validation @param [Object] room_rate_type Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 511
def room_rate_type=(room_rate_type)
  @room_rate_type = room_rate_type
end
room_service_cost=(room_service_cost) click to toggle source

Custom attribute writer method with validation @param [Object] room_service_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 595
def room_service_cost=(room_service_cost)
  @room_service_cost = room_service_cost
end
room_tax_amount=(room_tax_amount) click to toggle source

Custom attribute writer method with validation @param [Object] room_tax_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 571
def room_tax_amount=(room_tax_amount)
  @room_tax_amount = room_tax_amount
end
room_tax_type=(room_tax_type) click to toggle source

Custom attribute writer method with validation @param [Object] room_tax_type Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 505
def room_tax_type=(room_tax_type)
  @room_tax_type = room_tax_type
end
smoking_preference=(smoking_preference) click to toggle source

Custom attribute writer method with validation @param [Object] smoking_preference Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 465
def smoking_preference=(smoking_preference)
  @smoking_preference = smoking_preference
end
special_program_code=(special_program_code) click to toggle source

Custom attribute writer method with validation @param [Object] special_program_code Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 547
def special_program_code=(special_program_code)
  @special_program_code = special_program_code
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 844
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 850
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 838
def to_s
  to_hash.to_s
end
total_tax_amount=(total_tax_amount) click to toggle source

Custom attribute writer method with validation @param [Object] total_tax_amount Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 553
def total_tax_amount=(total_tax_amount)
  @total_tax_amount = total_tax_amount
end
transportation_cost=(transportation_cost) click to toggle source

Custom attribute writer method with validation @param [Object] transportation_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 667
def transportation_cost=(transportation_cost)
  @transportation_cost = transportation_cost
end
valet_parking_cost=(valet_parking_cost) click to toggle source

Custom attribute writer method with validation @param [Object] valet_parking_cost Value to be assigned

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 637
def valet_parking_cost=(valet_parking_cost)
  @valet_parking_cost = valet_parking_cost
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/cybersource_rest_client/models/ptsv2payments_travel_information_lodging.rb, line 443
def valid?
  return false if !@number_of_rooms.nil? && @number_of_rooms > 99
  return false if !@number_of_rooms.nil? && @number_of_rooms < 1
  return false if !@number_of_guests.nil? && @number_of_guests > 99
  return false if !@number_of_guests.nil? && @number_of_guests < 1
  true
end