Class: EmailHunter::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/email_hunter/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Account

Returns a new instance of Account.



13
14
15
# File 'lib/email_hunter/account.rb', line 13

def initialize(key)
  @key = key
end

Instance Attribute Details

#callsObject (readonly)

Returns the value of attribute calls.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def calls
  @calls
end

#emailObject (readonly)

Returns the value of attribute email.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def email
  @email
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def last_name
  @last_name
end

#plan_levelObject (readonly)

Returns the value of attribute plan_level.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def plan_level
  @plan_level
end

#plan_nameObject (readonly)

Returns the value of attribute plan_name.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def plan_name
  @plan_name
end

#requestsObject (readonly)

Returns the value of attribute requests.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def requests
  @requests
end

#reset_dateObject (readonly)

Returns the value of attribute reset_date.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def reset_date
  @reset_date
end

#resultObject (readonly)

Returns the value of attribute result.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def result
  @result
end

#team_idObject (readonly)

Returns the value of attribute team_id.



10
11
12
# File 'lib/email_hunter/account.rb', line 10

def team_id
  @team_id
end

Instance Method Details

#huntObject



17
18
19
20
# File 'lib/email_hunter/account.rb', line 17

def hunt
  response = apiresponse
  Struct.new(*response.keys).new(*response.values) unless response.empty?
end