module Teamlab::CrmHistory
Methods for working with crm history
Public Instance Methods
create_event(contact_id, content, category_id, options = {})
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 14 def create_event(contact_id, content, category_id, options = {}) @request.post(%w[history], { contactId: contact_id, content: content, categoryId: category_id }.merge(options)) end
create_history_category(title, image_name, options = {})
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 18 def create_history_category(title, image_name, options = {}) @request.post(%w[history category], { title: title.to_s, imageName: image_name.to_s }.merge(options)) end
delete_history_category(id)
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 38 def delete_history_category(id) @request.delete(['history', 'category', id.to_s]) end
get_all_history_categories()
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 10 def get_all_history_categories @request.get(%w[history category]) end
get_event_list_by_filter(options = {})
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 6 def get_event_list_by_filter(options = {}) @request.get(%w[history filter], options) end
update_history_categories_order(*titles)
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 26 def update_history_categories_order(*titles) @request.put(%w[history category reorder], titles: titles.flatten) end
update_history_category(id, title, options = {})
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 22 def update_history_category(id, title, options = {}) @request.put(['history', 'category', id.to_s], { title: title }.merge(options)) end
update_history_category_icon(id, icon_name)
click to toggle source
# File lib/teamlab/modules/crm/crm_history.rb, line 30 def update_history_category_icon(id, icon_name) @request.put(['history', 'category', id.to_s, 'icon'], imageName: icon_name.to_s) end