Class: Koho::Client::WorkSessions

Inherits:
Koho::Client show all
Defined in:
lib/koho.rb

Constant Summary

Constants inherited from Koho::Client

API_BASE_URL

Instance Attribute Summary

Attributes inherited from Koho::Client

#company_id, #token

Instance Method Summary collapse

Methods inherited from Koho::Client

#contracts, #customers, #delete, #get, #inbound_invoices, #info, #initialize, #invoice_terms, #invoices, #post, #project_tasks, #projects, #put, #work_sessions

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



193
194
195
# File 'lib/koho.rb', line 193

def create params
  post '/', work_session: params
end

#destroy(id) ⇒ Object



201
202
203
# File 'lib/koho.rb', line 201

def destroy id
  delete "/#{id}"
end

#find(id) ⇒ Object



189
190
191
# File 'lib/koho.rb', line 189

def find id
  get "/#{id}"
end

#list(opts = {}) ⇒ Object



185
186
187
# File 'lib/koho.rb', line 185

def list opts={}
  get "/?#{opts.to_query}"
end

#update(id, params) ⇒ Object



197
198
199
# File 'lib/koho.rb', line 197

def update id, params
  put "/#{id}", work_session: params
end