/// <summary> /// Deletes the receipt attached to the expense. /// </summary> /// <param name="expense_id">The expense_id is the identifier of the expense.</param> /// <returns>System.String.<br></br>The success message is "The attached expense receipt has been deleted."</returns> public string DeleteReceipt(string expense_id) { string url = baseAddress + "/" + expense_id + "/receipt"; var responce = ZohoHttpClient.delete(url, getQueryParameters()); return(ExpenseParser.getMessage(responce)); }
/// <summary> /// Attach a receipt to an expense. /// </summary> /// <param name="expense_id">The expense_id is the identifier of the expense.</param> /// <param name="receipt_path">The receipt_path is the path of the file which is going to be attaches as a receipt to the expense.</param> /// <returns>System.String.<br></br>The success message is "The expense receipt has been attached."</returns> public string AddReceipt(string expense_id, string receipt_path) { string url = baseAddress + "/" + expense_id + "/receipt"; var attachments = new string[] { receipt_path }; var file = new KeyValuePair <string, string[]>("receipt", attachments); var responce = ZohoHttpClient.post(url, getQueryParameters(), null, file); return(ExpenseParser.getMessage(responce)); }