Invoice cancel
Method invoice_cancel is used for canceling an invoice already sent which is in state SENT. The only thing this does it set the invoice state to REJECTED so that any e-mail reminders won’t be sent for the invoice. The method cannot cancel invoices relayed to other networks or sent as paper.
Return value
This method returns a string with the result (“OK: INVOICE CANCELED” or “ERROR: @error”).
Arguments
api_keys(required)- Invoice id string (required)
Example code
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 puts server.invoice_cancel(api_keys, "00521759-4570-467c-98dd-c496b22de0bc")