Method: Invoicexpress::Client::Clients#client_create_cash_invoice
- Defined in:
- lib/invoicexpress/client/clients.rb
#client_create_cash_invoice(client_id, invoice, options = {}) ⇒ Invoicexpress::Models::CashInvoice
This method allows you to create a new cash invoice for a specific client. When creating the invoice:
-
If items do not exist with the given names, new ones will be created.
-
If item name already exists, the item is updated with the new values.
Regarding item taxes, if the tax name is not found, no tax is applied to that item.
158 159 160 161 162 163 164 165 166 167 |
# File 'lib/invoicexpress/client/clients.rb', line 158 def client_create_cash_invoice(client_id, invoice, ={}) raise(ArgumentError, "invoice has the wrong type") unless invoice.is_a?(Invoicexpress::Models::CashInvoice) params = { :klass => Invoicexpress::Models::CashInvoice, :body => invoice } post("clients/#{client_id}/create/cash-invoice.xml", params.merge()) end |