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

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



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

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

#destroy(id) ⇒ Object



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

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

#find(id) ⇒ Object



172
173
174
# File 'lib/koho.rb', line 172

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

#find_by_customer(customer_id) ⇒ Object



176
177
178
# File 'lib/koho.rb', line 176

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

#listObject



168
169
170
# File 'lib/koho.rb', line 168

def list
  get '/'
end

#update(id, params) ⇒ Object



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

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