Class: Insightly::Link

Inherits:
BaseData show all
Defined in:
lib/insightly/link.rb

Class Method Summary collapse

Methods inherited from BaseData

#==, api_field, build, #build, #initialize, #remote_data, #to_json

Constructor Details

This class inherits a constructor from Insightly::BaseData

Class Method Details

.add_contact(id, role = nil, detail = nil) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/insightly/link.rb', line 10

def self.add_contact(id,role = nil,detail = nil)
  item = Link.new
  item.contact_id = id
  item.role = role
  item.details = detail
  item
end

.add_opportunity(id, role = nil, detail = nil) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/insightly/link.rb', line 17

def self.add_opportunity(id,role = nil,detail = nil)
  item = Link.new
  item.opportunity_id = id
  item.role = role
  item.details = detail
  item
end

.add_organisation(id, role = nil, detail = nil) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/insightly/link.rb', line 24

def self.add_organisation(id,role = nil,detail = nil)
  item = Link.new
  item.organisation_id = id
  item.role = role
  item.details = detail
  item
end