Class: Koho::Client::Customers

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



220
221
222
# File 'lib/koho.rb', line 220

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

#destroy(id) ⇒ Object



228
229
230
# File 'lib/koho.rb', line 228

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

#find(id) ⇒ Object



216
217
218
# File 'lib/koho.rb', line 216

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

#listObject



212
213
214
# File 'lib/koho.rb', line 212

def list
  get '/'
end

#list_with_permissionsObject



232
233
234
# File 'lib/koho.rb', line 232

def list_with_permissions
  get '/permitted'
end

#update(id, params) ⇒ Object



224
225
226
# File 'lib/koho.rb', line 224

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