To send the Invoice via Xero by passing the Invoice Id.
Request
Response
// Create a Map to store all the data of a Invoice
Map<String, Object> invoiceFiltersMap = new Map<String, Object>();
Map<String, String> reqJSONMap = new Map<String, String>();
reqJSONMap.put('InvoiceID', 'c1ef0357-9303-41fb-8ce0-d4a42a001b62');
String reqJSON = JSON.serialize(reqJSONMap);
// Initializing the Request Data to be passed.
Map<String, Object> reqObj = new Map<String, Object>();
reqObj.put('version', '1.0');
reqObj.put('action', 'emailInvoice');
reqObj.put('RequestJSON', reqJSON);
//Required, if Xero Multi-Org is enabled in Breadwinner.
reqObj.put('xeroOrgId', '!BWRf3');
// Placing a request to Breadwinner Global API
Map<String, Object> respMap = bread_winner.BreadwinnerXeroAPI.call(reqObj);
System.debug(respMap);