Class: Insightly::Contact
- Includes:
- AddressHelper, ContactInfoHelper, LinkHelper, TagHelper
- Defined in:
- lib/insightly/contact.rb
Constant Summary collapse
- CUSTOM_FIELD_PREFIX =
"CONTACT_FIELD"
Instance Method Summary collapse
- #fix_for_link(link) ⇒ Object
-
#initialize(id = nil) ⇒ Contact
constructor
A new instance of Contact.
- #remote_id ⇒ Object
Methods included from TagHelper
Methods included from LinkHelper
Methods included from ContactInfoHelper
#add_contact_info, #contact_infos, #contact_infos=
Methods included from AddressHelper
#add_address, #addresses, #addresses=
Methods inherited from ReadWrite
#post_collection, #put_collection, #save, #to_json, #update_data
Methods inherited from Base
#==, all, api_field, build, #build, #config, custom_fields, #get_collection, #load, #process, #reload, #remote_data, #to_json, #url_base
Constructor Details
#initialize(id = nil) ⇒ Contact
Returns a new instance of Contact.
30 31 32 33 34 |
# File 'lib/insightly/contact.rb', line 30 def initialize(id = nil) @data = {} @data["ADDRESSES"] = [] load(id) if id end |
Instance Method Details
#fix_for_link(link) ⇒ Object
38 39 40 41 42 |
# File 'lib/insightly/contact.rb', line 38 def fix_for_link(link) #This needs to auto set the org id on the item link.contact_id = self.remote_id link end |
#remote_id ⇒ Object
35 36 37 |
# File 'lib/insightly/contact.rb', line 35 def remote_id contact_id end |