module Toggl::Api::Client
Public Instance Methods
create_client(name, wid,options={})
click to toggle source
name: The name of the client (string, required, unique in workspace) wid: workspace ID, where the client will be used (integer, required)
notes: Notes for the client (string, not required) hrate: The hourly rate for this client (float, not required, available only for pro workspaces) cur: The name of the client's currency (string, not required, available only for pro workspaces) at: timestamp that is sent in the response, indicates the time client was last updated
# File lib/toggl_api/api/client.rb, line 12 def create_client(name, wid,options={}) post "/clients", {"client" => {"name"=>name,"wid"=>wid}.merge(options)} end
delete_client(cid)
click to toggle source
# File lib/toggl_api/api/client.rb, line 36 def delete_client(cid) delete "/clients/#{cid}" end
get_client(cid)
click to toggle source
# File lib/toggl_api/api/client.rb, line 16 def get_client(cid) get "/clients/#{cid}" end
Also aliased as: client
get_client_projects(cid,active=true)
click to toggle source
# File lib/toggl_api/api/client.rb, line 26 def get_client_projects(cid,active=true) get "clients/#{cid}/projects",{:active => active} end
Also aliased as: client_projects
get_clients()
click to toggle source
# File lib/toggl_api/api/client.rb, line 21 def get_clients get "/clients" end
Also aliased as: clients
update_client(cid,options)
click to toggle source
# File lib/toggl_api/api/client.rb, line 31 def update_client(cid,options) options = Hashie::Mash.new options put "/clients/#{cid}", (options.key?(:client) ? options : {:client => options}) end