Class: Outreach::Prospect

Inherits:
Object
  • Object
show all
Defined in:
lib/outreach/prospect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ Prospect



5
6
7
8
9
10
11
# File 'lib/outreach/prospect.rb', line 5

def initialize(attrs)
  @first_name = attrs['attributes']['personal']['name']['first']
  @last_name = attrs['attributes']['personal']['name']['last']
  @company = to_ostruct(attrs['attributes']['company'])
  @contact = to_ostruct(attrs['attributes']['contact'])
  @tags = attrs['attributes']['metadata']['tags']
end

Instance Attribute Details

#companyObject

Returns the value of attribute company.



3
4
5
# File 'lib/outreach/prospect.rb', line 3

def company
  @company
end

#contactObject

Returns the value of attribute contact.



3
4
5
# File 'lib/outreach/prospect.rb', line 3

def contact
  @contact
end

#first_nameObject

Returns the value of attribute first_name.



3
4
5
# File 'lib/outreach/prospect.rb', line 3

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



3
4
5
# File 'lib/outreach/prospect.rb', line 3

def last_name
  @last_name
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/outreach/prospect.rb', line 3

def tags
  @tags
end