Class: FindAI::Resources::PeopleEnrichment::Enrich
- Inherits:
-
Object
- Object
- FindAI::Resources::PeopleEnrichment::Enrich
- Defined in:
- lib/find-ai/resources/people_enrichment/enrich.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ FindAI::Models::EnrichCreateResponse
Returns structured data about a person based on their business email address.
-
#initialize(client:) ⇒ Enrich
constructor
A new instance of Enrich.
-
#retrieve(token, opts = {}) ⇒ FindAI::Models::EnrichRetrieveResponse
The endpoint to poll to check the latest results when data about a person isn't immediately available.
Constructor Details
#initialize(client:) ⇒ Enrich
Returns a new instance of Enrich.
7 8 9 |
# File 'lib/find-ai/resources/people_enrichment/enrich.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ FindAI::Models::EnrichCreateResponse
Returns structured data about a person based on their business email address.
20 21 22 23 24 25 26 27 |
# File 'lib/find-ai/resources/people_enrichment/enrich.rb', line 20 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/people/enrich" req[:body] = params req[:model] = FindAI::Models::EnrichCreateResponse @client.request(req, opts) end |
#retrieve(token, opts = {}) ⇒ FindAI::Models::EnrichRetrieveResponse
The endpoint to poll to check the latest results when data about a person isn't immediately available.
36 37 38 39 40 41 42 |
# File 'lib/find-ai/resources/people_enrichment/enrich.rb', line 36 def retrieve(token, opts = {}) req = {} req[:method] = :get req[:path] = "/v1/people/enrich/#{token}" req[:model] = FindAI::Models::EnrichRetrieveResponse @client.request(req, opts) end |