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



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

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

#destroy(id) ⇒ Object



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

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

#find(id) ⇒ Object



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

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

#listObject



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

def list
  get '/'
end

#list_with_permissionsObject



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

def list_with_permissions
  get '/permitted'
end

#update(id, params) ⇒ Object



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

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