Module: Markety::Command::GetLead

Included in:
Markety::Client
Defined in:
lib/markety/command/get_lead.rb

Overview

GetLead commands return Response::GetLeadResponse objects

Instance Method Summary collapse

Instance Method Details



18
19
20
# File 'lib/markety/command/get_lead.rb', line 18

def get_lead_by_cookie(cookie)
  get_lead(LeadKey.new(LeadKeyType::COOKIE, cookie))
end

#get_lead_by_idnum(idnum) ⇒ Object

IDs are unique per lead, so the response can only contain one lead.



8
9
10
# File 'lib/markety/command/get_lead.rb', line 8

def get_lead_by_idnum(idnum)
  get_lead(LeadKey.new(LeadKeyType::IDNUM, idnum))
end

#get_leads_by_email(email) ⇒ Object

Multiple leads can share an email address, so this may result in more than one lead in the response.



14
15
16
# File 'lib/markety/command/get_lead.rb', line 14

def get_leads_by_email(email)
  get_lead(LeadKey.new(LeadKeyType::EMAIL, email))
end