class Harvesting::Models::Project

A project record from your Harvest account.

For more information: help.getharvest.com/api-v2/projects-api/projects/projects/

Public Instance Methods

path() click to toggle source
# File lib/harvesting/models/project.rb, line 33
def path
  @attributes['id'].nil? ? "projects" : "projects/#{@attributes['id']}"
end
task_assignments() click to toggle source

Provides access to the task assignments that are associated with this project.

# File lib/harvesting/models/project.rb, line 53
def task_assignments
  harvest_client.task_assignments(project_id: self.id)
end
time_entries() click to toggle source
# File lib/harvesting/models/project.rb, line 41
def time_entries
  harvest_client.time_entries(project_id: self.id)
end
to_hash() click to toggle source
Calls superclass method Harvesting::Models::Base#to_hash
# File lib/harvesting/models/project.rb, line 37
def to_hash
  { client_id: client.id }.merge(super)
end
user_assignments() click to toggle source

Provides access to the user assignments that are associated with this project.

# File lib/harvesting/models/project.rb, line 47
def user_assignments
  harvest_client.user_assignments(project_id: self.id)
end