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!, where

Instance Method Details

#companyObject



25
26
27
28
29
# File 'lib/amorail/entities/contact.rb', line 25

def company
  return if linked_company_id.nil?

  @company ||= Amorail::Company.find(linked_company_id)
end

#reloadObject

Clear company cache



20
21
22
23
# File 'lib/amorail/entities/contact.rb', line 20

def reload
  @company = nil
  super
end