class Snov::GetEmailsFromName

Attributes

client[R]

Public Class Methods

new(client: Snov.client, first_name:, last_name:, domain:) click to toggle source
# File lib/snov/get_emails_from_name.rb, line 5
def initialize(client: Snov.client, first_name:, last_name:, domain:)
  @client = client
  @first_name = first_name
  @last_name = last_name
  @domain = domain
end

Public Instance Methods

prospect() click to toggle source
# File lib/snov/get_emails_from_name.rb, line 12
def prospect
  @prospect ||= ProspectResult.new(raw_result)
end
raw_result() click to toggle source
# File lib/snov/get_emails_from_name.rb, line 16
def raw_result
  @raw_result ||= client.post("/v1/get-emails-from-names",
                              "firstName" => @first_name,
                              "lastName" => @last_name,
                              "domain" => @domain)
                        .deep_transform_keys! { |key| key.underscore }
end