Class: TripIt::Invitee

Inherits:
Base
  • Object
show all
Defined in:
lib/trip_it/classes/invitee.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#Boolean, #camelize, #chkAndPopulate, #chkObjAndPopulate, #convertDT, #to_hash, #to_json, #to_xml

Methods included from ParamUtil

#address_param, #airportcode_param, #array_param, #boolean_param, #boolean_read_param, #camelize, #date_param, #datetime_param, #exceptions, #float_param, #integer_param, #string_param, #time_param, #traveler_array_param, #traveler_param

Constructor Details

#initialize(params, profile) ⇒ Invitee

Returns a new instance of Invitee.

Raises:

  • (ArgumentError)


6
7
8
9
10
11
12
# File 'lib/trip_it/classes/invitee.rb', line 6

def initialize(params, profile)
  raise ArgumentError, "Invitee created with empty parameters" if params.empty? 
  
  @is_read_only = Boolean(params['is_read_only'])
  @is_traveler  = Boolean(params['is_traveler'])
  @profile      = profile
end

Instance Attribute Details

#profileObject (readonly)

Returns the value of attribute profile.



3
4
5
# File 'lib/trip_it/classes/invitee.rb', line 3

def profile
  @profile
end