Class: Tomba::Enrichment
- Defined in:
- lib/tomba/services/enrichment.rb
Overview
Enrichment service for data enrichment.
Provides methods to enrich person and company data.
Instance Method Summary collapse
-
#combined(email) ⇒ Hash
Combined Enrichment.
-
#company(domain) ⇒ Hash
Company Enrichment.
-
#person(email, webhook_url: nil) ⇒ Hash
Person Enrichment.
Methods inherited from Service
Constructor Details
This class inherits a constructor from Tomba::Service
Instance Method Details
#combined(email) ⇒ Hash
Combined Enrichment
Returns combined person and company enrichment data for an email.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/tomba/services/enrichment.rb', line 60 def combined(email) raise Tomba::Exception, 'Missing required parameter: "email"' if email.nil? path = '/enrichment/combined' params = { email: email } @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#company(domain) ⇒ Hash
Company Enrichment
Enriches data about a company using its domain name.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/tomba/services/enrichment.rb', line 40 def company(domain) raise Tomba::Exception, 'Missing required parameter: "domain"' if domain.nil? path = '/enrichment/company' params = { domain: domain } @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#person(email, webhook_url: nil) ⇒ Hash
Person Enrichment
Enriches data about a person using their email address.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/tomba/services/enrichment.rb', line 19 def person(email, webhook_url: nil) raise Tomba::Exception, 'Missing required parameter: "email"' if email.nil? path = '/enrichment/person' params = { email: email } params[:webhook_url] = webhook_url unless webhook_url.nil? @client.call('get', path, { 'content-type' => 'application/json' }, params) end |