Class: Harvest::API::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/harvest/api/base.rb

Direct Known Subclasses

Account, Clients, Contacts, ExpenseCategories, Expenses, InvoiceCategories, InvoiceMessages, InvoicePayments, Invoices, Projects, Reports, TaskAssignments, Tasks, Time, UserAssignments, Users

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Base) initialize(credentials)



6
7
8
# File 'lib/harvest/api/base.rb', line 6

def initialize(credentials)
  @credentials = credentials
end

Instance Attribute Details

- (Object) credentials (readonly)

Returns the value of attribute credentials



4
5
6
# File 'lib/harvest/api/base.rb', line 4

def credentials
  @credentials
end

Class Method Details

+ (Object) api_model(klass)



11
12
13
14
15
16
17
# File 'lib/harvest/api/base.rb', line 11

def api_model(klass)
  class_eval <<-END
    def api_model
      #{klass}
    end
  END
end