class Amorail::Lead
AmoCRM lead entity
Public Instance Methods
contacts()
click to toggle source
Return list of associated contacts
# File lib/amorail/entities/lead.rb, line 18 def contacts fail NotPersisted if id.nil? @contacts ||= begin links = Amorail::ContactLink.find_by_leads(id) links.empty? ? [] : Amorail::Contact.find_all(links.map(&:contact_id)) end end
reload()
click to toggle source
Calls superclass method
# File lib/amorail/entities/lead.rb, line 12 def reload @contacts = nil super end