Method: Harvest::Base#clients
- Defined in:
- lib/harvest/base.rb
#clients ⇒ Harvest::API::Clients
All API Actions surrounding Clients
Examples
harvest.clients.all() # Returns all clients in the system
harvest.clients.find(100) # Returns the client with id = 100
client = Harvest::Client.new(:name => 'SuprCorp')
saved_client = harvest.clients.create(client) # returns a saved version of Harvest::Client
client = harvest.clients.find(205)
client.name = 'SuprCorp LTD.'
updated_client = harvest.clients.update(client) # returns an updated version of Harvest::Client
client = harvest.clients.find(205)
harvest.clients.delete(client) # returns 205
client = harvest.clients.find(301)
deactivated_client = harvest.clients.deactivate(client) # returns an updated deactivated client
activated_client = harvest.clients.activate(client) # returns an updated activated client
51 52 53 |
# File 'lib/harvest/base.rb', line 51 def clients @clients ||= Harvest::API::Clients.new(credentials) end |