Invoice state list
Method invoice_state_list is used for getting list of states for given set of invoices and can be used to update state of multiple invoices at once.
Return value(s)
This method returns an array of InvoiceState.
Arguments
api_keys(required)invoicesarray of strings (invoice ids)
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 = Array.new
11 invoices.push("00521759-4570-467c-98dd-c496b22de0ba")
12 invoices.push("049b161d-4d15-45a9-95f6-f669d26acf51")
13 invoices.push("128dc817-90ae-4fa5-a0af-8e24e7650a72")
14 invoices.push("1c555458-fa83-402b-a1f6-4d22071020a8")
15 invoices.push("505459bf-8507-42ee-b0da-470f2407c96f")
16 invoices.push("5ad8cec7-ef53-4161-b9e1-da1921b29f43")
17
18 result = server.invoice_state_list(api_keys, invoices)
19 if result[0].status == "OK"
20 result.each do |i|
21 puts "#{i.invoice_id}: #{i.state}"
22 end
23 end