Class: FindAI::Resources::CompanyEnrichment::Enrich
- Inherits:
-
Object
- Object
- FindAI::Resources::CompanyEnrichment::Enrich
- Defined in:
- lib/find-ai/resources/company_enrichment/enrich.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ FindAI::Models::EnrichCreateResponse
Returns structured data about a company based on a domain input.
-
#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 company isn't immediately available.
Constructor Details
#initialize(client:) ⇒ Enrich
Returns a new instance of Enrich.
7 8 9 |
# File 'lib/find-ai/resources/company_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 company based on a domain input.
19 20 21 22 23 24 25 26 |
# File 'lib/find-ai/resources/company_enrichment/enrich.rb', line 19 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/companies/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 company isn't immediately available.
35 36 37 38 39 40 41 |
# File 'lib/find-ai/resources/company_enrichment/enrich.rb', line 35 def retrieve(token, opts = {}) req = {} req[:method] = :get req[:path] = "/v1/companies/enrich/#{token}" req[:model] = FindAI::Models::EnrichRetrieveResponse @client.request(req, opts) end |