Class: ConstantContact::Components::EventSpot::Contact

Inherits:
Component
  • Object
show all
Defined in:
lib/constantcontact/components/event_spot/contact.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#email_addressObject

Returns the value of attribute email_address



11
12
13
# File 'lib/constantcontact/components/event_spot/contact.rb', line 11

def email_address
  @email_address
end

#nameObject

Returns the value of attribute name



11
12
13
# File 'lib/constantcontact/components/event_spot/contact.rb', line 11

def name
  @name
end

#organization_nameObject

Returns the value of attribute organization_name



11
12
13
# File 'lib/constantcontact/components/event_spot/contact.rb', line 11

def organization_name
  @organization_name
end

#phone_numberObject

Returns the value of attribute phone_number



11
12
13
# File 'lib/constantcontact/components/event_spot/contact.rb', line 11

def phone_number
  @phone_number
end

Class Method Details

.create(props) ⇒ Campaign

Factory method to create an event host Contact object from a hash

Parameters:

  • props (Hash)
    • hash of properties to create object from

Returns:



16
17
18
19
20
21
22
23
# File 'lib/constantcontact/components/event_spot/contact.rb', line 16

def self.create(props)
  obj = Contact.new
  props.each do |key, value|
    key = key.to_s
    obj.send("#{key}=", value) if obj.respond_to? key
  end if props
  obj
end