Class: Forecasting::Models::Project

Inherits:
ForecastRecord show all
Defined in:
lib/forecasting/models/project.rb

Overview

A project record from your Harvest account.

Instance Attribute Summary

Attributes inherited from Base

#attributes, #forecast_client

Instance Method Summary collapse

Methods inherited from ForecastRecord

#create, #delete, #fetch, get, #save, #type, #update

Methods inherited from Base

attributed, #initialize, modeled, #to_hash

Constructor Details

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

Instance Method Details

#clientObject



23
24
25
# File 'lib/forecasting/models/project.rb', line 23

def client
  forecast_client.client(id: client_id)
end

#pathObject



19
20
21
# File 'lib/forecasting/models/project.rb', line 19

def path
  @attributes['id'].nil? ? "projects" : "projects/#{@attributes['id']}"
end