Invoice list

Method invoice_list is used for getting list of outbound invoices.

Return value

This method returns an array of InvoiceParamsOut struct without the ‘items’, ‘accounts’, ‘actions’ and ‘attachments’ members.

Arguments

  1. api_keys (required)
  2. all integer (nil => open invoices, 1 => archived invoices, 2 => all invoices, 3 => invoices in error state)

Example code in Ruby

 1 require 'soap/wsdlDriver'
 2 
 3 server = SOAP::WSDLDriverFactory.new("https://testing.maventa.com/apis/bravo/wsdl").create_rpc_driver
 4 
 5 api_keys = Hash.new
 6 api_keys[:vendor_api_key] = "" # Partner software API key
 7 api_keys[:user_api_key] = "" # User API key
 8 api_keys[:company_uuid] = "" # UUID of current company
 9 
10 invoices = server.invoice_list(api_keys)
11 
12 if invoices[0].status == "OK" 
13 
14   invoices.each do |invoice|
15     puts invoice.id, invoice.sum, invoice.sum_tax, invoice.invoice_nr, invoice.customer_nr, invoice.customer_name, invoice.customer_email, invoice.customer_bid, invoice.customer_address1, invoice.customer_address2, invoice.customer_post_code, invoice.customer_post_office, invoice.customer_state, invoice.customer_country, invoice.customer_contact_p, invoice.customer_ovt, invoice.lang
16   end
17 
18 end

Also available in: HTML TXT