Invoice show
Method invoice_show is used for getting information about a specific outbound invoice.
Return value
This method returns a InvoiceParamsOut struct.
Arguments
api_keys(required)idstring (invoice id)include_filesboolean (download invoice image and attachments)xmlformatstring (nil, “finvoice”, “teapps” or “oio” > defines if also an XML representation of the invoice will be returned in the attachments array)
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 result = server.invoice_show(api_keys, "1c555458-fa83-402b-a1f6-4d22071020a8", true, "teapps")
11 if result.status == "OK"
12 puts "Invoice number: " + result.invoice_nr
13
14 if result.attachments
15 result.attachments.each do |fa|
16 File.open(fa.filename, 'wb') do |f|
17 f << fa.file
18 end
19 end
20 end
21 end