Class: Tripletexer::Endpoints::Timesheet::TimeClock

Inherits:
AbstractEndpoint show all
Defined in:
lib/tripletexer/endpoints/timesheet/time_clock.rb

Instance Method Summary collapse

Methods inherited from AbstractEndpoint

#initialize

Constructor Details

This class inherits a constructor from Tripletexer::Endpoints::AbstractEndpoint

Instance Method Details

#find(id, params = {}) ⇒ Object



25
26
27
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 25

def find(id, params = {})
  find_entity("/timesheet/timeClock/#{id}", params)
end

#present(params = {}) ⇒ Object



20
21
22
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 20

def present(params = {})
  find_entity('/timesheet/timeClock/present', params)
end

#search(params = {}) ⇒ Object



7
8
9
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 7

def search(params = {})
  find_entities('/v2/timesheet/timeClock', params)
end

#start(activity_id, params = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 12

def start(activity_id, params = {})
  final_params = params.merge(
    'activityId' => activity_id
  )
  api_client.put('/timesheet/timeClock/:start', final_params)
end

#stop(id, params = {}) ⇒ Object



35
36
37
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 35

def stop(id, params = {})
  api_client.put("/timesheet/timeClock/#{id}/:stop", params)
end

#update(id, body) ⇒ Object



30
31
32
# File 'lib/tripletexer/endpoints/timesheet/time_clock.rb', line 30

def update(id, body)
  update_entity("/timesheet/timeClock/#{id}", body)
end