Class: Amorail::Contact

Inherits:
Entity
  • Object
show all
Includes:
Leadable
Defined in:
lib/amorail/entities/contact.rb

Overview

AmoCRM contact entity

Instance Method Summary collapse

Methods included from Leadable

#initialize, #leads

Methods inherited from Entity

amo_field, amo_names, amo_property, attributes, find, find!, find_all, find_by_query, inherited, #initialize, #load_record, #new_record?, #params, #persisted?, properties, #reload_model, remote_url, #save, #save!, #update, #update!

Instance Method Details

#companyObject



23
24
25
26
# File 'lib/amorail/entities/contact.rb', line 23

def company
  return if linked_company_id.nil?
  @company ||= Amorail::Company.find(linked_company_id)
end

#reloadObject

Clear company cache



18
19
20
21
# File 'lib/amorail/entities/contact.rb', line 18

def reload
  @company = nil
  super
end