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