class Snov::AddNamesToFindEmails

Attributes

client[R]

Public Class Methods

new(client: Snov.client, first_name:, last_name:, domain:) click to toggle source
# File lib/snov/add_names_to_find_emails.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

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