Class: Harvest::Base
- Inherits:
-
Object
- Object
- Harvest::Base
- Defined in:
- lib/harvest/base.rb
Instance Method Summary collapse
-
#clients ⇒ Object
Clients.
-
#expense_categories ⇒ Object
Expense categories.
-
#expenses ⇒ Object
Expenses.
-
#initialize(options = {}) ⇒ Base
constructor
Requires a sub_domain, email, and password.
-
#people ⇒ Object
People.
-
#projects ⇒ Object
Projects.
-
#tasks ⇒ Object
Tasks.
Constructor Details
#initialize(options = {}) ⇒ Base
Requires a sub_domain, email, and password. Specifying headers is optional, but useful for setting a user agent.
6 7 8 9 10 11 12 13 14 |
# File 'lib/harvest/base.rb', line 6 def initialize(={}) .assert_valid_keys(:email, :password, :sub_domain, :headers) .assert_required_keys(:email, :password, :sub_domain) @email = [:email] @password = [:password] @sub_domain = [:sub_domain] @headers = [:headers] configure_base_resource end |
Instance Method Details
#clients ⇒ Object
Clients
20 21 22 |
# File 'lib/harvest/base.rb', line 20 def clients Harvest::Resources::Client end |
#expense_categories ⇒ Object
Expense categories.
30 31 32 |
# File 'lib/harvest/base.rb', line 30 def expense_categories Harvest::Resources::ExpenseCategory end |
#expenses ⇒ Object
Expenses.
25 26 27 |
# File 'lib/harvest/base.rb', line 25 def expenses Harvest::Resources::Expense end |
#people ⇒ Object
People. Also provides access to time entries.
36 37 38 |
# File 'lib/harvest/base.rb', line 36 def people Harvest::Resources::Person end |
#projects ⇒ Object
Projects. Provides access to the assigned users and tasks along with reports for entries on the project.
43 44 45 |
# File 'lib/harvest/base.rb', line 43 def projects Harvest::Resources::Project end |
#tasks ⇒ Object
Tasks.
48 49 50 |
# File 'lib/harvest/base.rb', line 48 def tasks Harvest::Resources::Task end |