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.



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

def initialize(key)
  @key = key
end

Instance Attribute Details

#callsObject (readonly)

Returns the value of attribute calls.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def calls
  @calls
end

#emailObject (readonly)

Returns the value of attribute email.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def email
  @email
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def last_name
  @last_name
end

#plan_levelObject (readonly)

Returns the value of attribute plan_level.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def plan_level
  @plan_level
end

#plan_nameObject (readonly)

Returns the value of attribute plan_name.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def plan_name
  @plan_name
end

#reset_dateObject (readonly)

Returns the value of attribute reset_date.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def reset_date
  @reset_date
end

#resultObject (readonly)

Returns the value of attribute result.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def result
  @result
end

#team_idObject (readonly)

Returns the value of attribute team_id.



8
9
10
# File 'lib/email_hunter/account.rb', line 8

def team_id
  @team_id
end

Instance Method Details

#huntObject



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

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