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.
-
#invoices ⇒ Object
Invoices.
-
#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 15 |
# File 'lib/harvest/base.rb', line 6 def initialize(={}) .assert_valid_keys(:email, :password, :sub_domain, :headers, :ssl) .assert_required_keys(:email, :password, :sub_domain) @email = [:email] @password = [:password] @sub_domain = [:sub_domain] @headers = [:headers] @ssl = [:ssl] configure_base_resource end |
Instance Method Details
#clients ⇒ Object
Clients
21 22 23 |
# File 'lib/harvest/base.rb', line 21 def clients Harvest::Resources::Client end |
#expense_categories ⇒ Object
Expense categories.
31 32 33 |
# File 'lib/harvest/base.rb', line 31 def expense_categories Harvest::Resources::ExpenseCategory end |
#expenses ⇒ Object
Expenses.
26 27 28 |
# File 'lib/harvest/base.rb', line 26 def expenses Harvest::Resources::Expense end |
#invoices ⇒ Object
Invoices
54 55 56 |
# File 'lib/harvest/base.rb', line 54 def invoices Harvest::Resources::Invoice end |
#people ⇒ Object
People. Also provides access to time entries.
37 38 39 |
# File 'lib/harvest/base.rb', line 37 def people Harvest::Resources::Person end |