Class: Koho::Client::Invoices

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



109
110
111
# File 'lib/koho.rb', line 109

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

#destroy(id) ⇒ Object



117
118
119
# File 'lib/koho.rb', line 117

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

#find(id) ⇒ Object



97
98
99
# File 'lib/koho.rb', line 97

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

#find_by_contract(contract_id) ⇒ Object



101
102
103
# File 'lib/koho.rb', line 101

def find_by_contract contract_id
  get "/find_by_contract/#{contract_id}"
end

#find_by_customer(customer_id) ⇒ Object



105
106
107
# File 'lib/koho.rb', line 105

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

#listObject



93
94
95
# File 'lib/koho.rb', line 93

def list
  get '/'
end

#update(id, params) ⇒ Object



113
114
115
# File 'lib/koho.rb', line 113

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