Class: Koho::Client::Contracts

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



251
252
253
# File 'lib/koho.rb', line 251

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

#destroy(id) ⇒ Object



259
260
261
# File 'lib/koho.rb', line 259

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

#find(id) ⇒ Object



240
241
242
# File 'lib/koho.rb', line 240

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

#find_by_customer(customer_id) ⇒ Object



244
245
246
# File 'lib/koho.rb', line 244

def find_by_customer customer_id
  get "/find_by_customer/#{customer_id}"
end

#listObject



236
237
238
# File 'lib/koho.rb', line 236

def list
  get '/'
end

#update(id, params) ⇒ Object



255
256
257
# File 'lib/koho.rb', line 255

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