module Teamlab::ProjectsTime
Module for projects time methods
Public Instance Methods
add_task_time(task_id, date, person_id, project_id, options = {})
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 18 def add_task_time(task_id, date, person_id, project_id, options = {}) @request.post(['task', task_id.to_s, 'time'], { date: date, personId: person_id, projectId: project_id }.merge(options)) end
delete_time_spents(*time_ids)
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 30 def delete_time_spents(*time_ids) @request.delete(%w[time times remove], timeIds: time_ids.flatten) end
get_time_spent(task_id)
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 14 def get_time_spent(task_id) @request.get(['task', task_id.to_s, 'time']) end
get_time_spent_by_filter(options = {})
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 6 def get_time_spent_by_filter(options = {}) @request.get(%w[time filter], options) end
get_total_time_spent_by_filter(options = {})
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 10 def get_total_time_spent_by_filter(options = {}) @request.get(%w[time filter total], options) end
update_task_time(time_id, date, person_id, options = {})
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 22 def update_task_time(time_id, date, person_id, options = {}) @request.put(['time', time_id.to_s], { date: date, personId: person_id }.merge(options)) end
update_time_status_of_payment(time_ids, status)
click to toggle source
# File lib/teamlab/modules/projects/projects_time.rb, line 26 def update_time_status_of_payment(time_ids, status) @request.put(%w[time times status], timeids: time_ids, status: status) end