Class: ZoomInfo::Person
- Inherits:
-
Base
- Object
- Base
- ZoomInfo::Person
show all
- Defined in:
- lib/zoominfo-ruby/person.rb
Constant Summary
collapse
- SEARCH_NON_KEY_PARAMS =
%w(pc numMatches echoInput outputFieldOptions matchCompany uniqueInputId)
- DETAIL_KEY_PARAMS =
%w(PersonID EmailAddress)
Instance Attribute Summary
Attributes inherited from Base
#api_key, #partner_name
Instance Method Summary
collapse
Methods inherited from Base
#generate_key, #initialize
Constructor Details
This class inherits a constructor from ZoomInfo::Base
Instance Method Details
#detail(query = {}) ⇒ Object
11
12
13
14
|
# File 'lib/zoominfo-ruby/person.rb', line 11
def detail(query = {})
query[:key] = generate_key(query.slice(*DETAIL_KEY_PARAMS).values, @api_key)
self.class.get("/person/detail", query: query).parsed_response
end
|
#detail_by_id(person_id) ⇒ Object
20
21
22
|
# File 'lib/zoominfo-ruby/person.rb', line 20
def detail_by_id(person_id)
detail('PersonID' => person_id)
end
|
#search(query = {}) ⇒ Object
6
7
8
9
|
# File 'lib/zoominfo-ruby/person.rb', line 6
def search(query = {})
query[:key] = generate_key(query.except(*SEARCH_NON_KEY_PARAMS).values, @api_key)
self.class.get("/person/search", query: query).parsed_response
end
|
#search_by_email(email_address) ⇒ Object
16
17
18
|
# File 'lib/zoominfo-ruby/person.rb', line 16
def search_by_email(email_address)
search('EmailAddress' => email_address)
end
|