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

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



191
192
193
# File 'lib/koho.rb', line 191

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

#destroy(id) ⇒ Object



199
200
201
# File 'lib/koho.rb', line 199

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

#find(id) ⇒ Object



187
188
189
# File 'lib/koho.rb', line 187

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

#listObject



183
184
185
# File 'lib/koho.rb', line 183

def list
  get '/'
end

#list_with_permissionsObject



203
204
205
# File 'lib/koho.rb', line 203

def list_with_permissions
  get '/permitted'
end

#update(id, params) ⇒ Object



195
196
197
# File 'lib/koho.rb', line 195

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