Class: Harvesting::Models::TimeEntry
- Inherits:
-
HarvestRecord
- Object
- Base
- HarvestRecord
- Harvesting::Models::TimeEntry
- Defined in:
- lib/harvesting/models/time_entry.rb
Overview
A time entry record from your Harvest account.
For more information: help.getharvest.com/api-v2/timesheets-api/timesheets/time-entries/
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from HarvestRecord
Methods inherited from Base
#create, #delete, #fetch, get, #initialize, #save, #update
Constructor Details
This class inherits a constructor from Harvesting::Models::Base
Instance Method Details
#path ⇒ Object
36 37 38 |
# File 'lib/harvesting/models/time_entry.rb', line 36 def path @attributes['id'].nil? ? "time_entries" : "time_entries/#{@attributes['id']}" end |
#to_hash ⇒ Object
40 41 42 |
# File 'lib/harvesting/models/time_entry.rb', line 40 def to_hash { project_id: project.id, task_id: task.id, user_id: user.id }.merge(super) end |