Class: Snov::AddNamesToFindEmails
- Inherits:
-
Object
- Object
- Snov::AddNamesToFindEmails
- Defined in:
- lib/snov/add_names_to_find_emails.rb
Defined Under Namespace
Classes: ProspectResult
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #add ⇒ Object
-
#initialize(client: Snov.client, first_name:, last_name:, domain:) ⇒ AddNamesToFindEmails
constructor
A new instance of AddNamesToFindEmails.
- #raw_result ⇒ Object
Constructor Details
#initialize(client: Snov.client, first_name:, last_name:, domain:) ⇒ AddNamesToFindEmails
Returns a new instance of AddNamesToFindEmails.
5 6 7 8 9 10 |
# 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 |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/snov/add_names_to_find_emails.rb', line 3 def client @client end |
Instance Method Details
#add ⇒ Object
12 13 14 |
# File 'lib/snov/add_names_to_find_emails.rb', line 12 def add @add ||= ProspectResult.new(raw_result) end |
#raw_result ⇒ Object
16 17 18 19 20 21 22 |
# 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 |