Class: Harvesting::Models::TimeEntry

Inherits:
Base
  • Object
show all
Defined in:
lib/harvesting/models/time_entry.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #client

Instance Method Summary collapse

Methods inherited from Base

attributed, #create, #initialize, #save, #to_hash, #update

Constructor Details

This class inherits a constructor from Harvesting::Models::Base

Instance Method Details

#pathObject



27
28
29
# File 'lib/harvesting/models/time_entry.rb', line 27

def path
  id.nil? ? "time_entries" : "time_entries/#{id}"
end

#userObject



31
32
33
# File 'lib/harvesting/models/time_entry.rb', line 31

def user
  Models::User.new(@attributes['user'], client: @client)
end