Class: Insightly::Task
Instance Method Summary
collapse
#add_contact, #add_contact_id, #add_opportunity, #add_opportunity_id, #add_organisation, #add_organisation_id, #add_task_link, #contact_ids, #contacts, #opportunities, #opportunity_ids, #organisation_ids, #organisations, #task_links, #task_links=
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, date_to_insightly, #get_collection, #initialize, #load, #process, #reload, #remote_data, #remote_id, #remote_id=, #remote_id?, #remote_id_field, #to_json, #url_base
Instance Method Details
35
36
37
38
39
|
# File 'lib/insightly/task.rb', line 35
def (body)
= Insightly::.new.build({"BODY" => body})
result = post_collection("#{url_base}/#{task_id}/comments", .remote_data.to_json)
.build(result)
end
|
27
28
29
30
31
32
33
|
# File 'lib/insightly/task.rb', line 27
def
list = []
get_collection("#{url_base}/#{task_id}/comments").each do |d|
list << Insightly::.build(d)
end
list
end
|
#completed? ⇒ Boolean
53
54
55
|
# File 'lib/insightly/task.rb', line 53
def completed?
status == "COMPLETED"
end
|
#deferred? ⇒ Boolean
57
58
59
|
# File 'lib/insightly/task.rb', line 57
def deferred?
status == "DEFERRED"
end
|
#fix_for_link(link) ⇒ Object
62
63
64
65
|
# File 'lib/insightly/task.rb', line 62
def fix_for_link(link)
link.task_id = self.remote_id
link
end
|
#in_progress? ⇒ Boolean
45
46
47
|
# File 'lib/insightly/task.rb', line 45
def in_progress?
status == "IN PROGRESS"
end
|
#not_started? ⇒ Boolean
41
42
43
|
# File 'lib/insightly/task.rb', line 41
def not_started?
status == "NOT STARTED"
end
|
#waiting? ⇒ Boolean
49
50
51
|
# File 'lib/insightly/task.rb', line 49
def waiting?
status == "WAITING"
end
|