Method: Invoicexpress::Client::Clients#client_invoices
- Defined in:
- lib/invoicexpress/client/clients.rb
#client_invoices(client_id, filter = Invoicexpress::Models::Filter.new, options = {}) ⇒ Invoicexpress::Models::ClientInvoices
This method allows you to obtain the invoices for a specific client. Allowing filtering aswell.
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/invoicexpress/client/clients.rb', line 82 def client_invoices(client_id, filter=Invoicexpress::Models::Filter.new, ={}) raise(ArgumentError, "filter has the wrong type") unless filter.is_a?(Invoicexpress::Models::Filter) params = { :klass => Invoicexpress::Models::ClientInvoices, :per_page => 10, :page => 1, :body => filter } post("clients/#{client_id.to_s}/invoices.xml", params.merge()) end |