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, #put

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



99
100
101
# File 'lib/koho.rb', line 99

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

#destroy(id) ⇒ Object



107
108
109
# File 'lib/koho.rb', line 107

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

#find(id) ⇒ Object



87
88
89
# File 'lib/koho.rb', line 87

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

#find_by_contract(contract_id) ⇒ Object



91
92
93
# File 'lib/koho.rb', line 91

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

#find_by_customer(customer_id) ⇒ Object



95
96
97
# File 'lib/koho.rb', line 95

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

#listObject



83
84
85
# File 'lib/koho.rb', line 83

def list
  get '/'
end

#update(id, params) ⇒ Object



103
104
105
# File 'lib/koho.rb', line 103

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