public bool Email(EmailRequest email)
 {
     var url = string.Format("SupplierInvoice/Email?apikey={0}&companyid={1}", _apiKey, _companyId);
     var request = new RestRequest(url, Method.POST) { JsonSerializer = new JsonSerializer() };
     request.RequestFormat = DataFormat.Json;
     request.AddBody(email);
     var response = _client.Execute<EmailRequest>(request);
     return response.ResponseStatus == ResponseStatus.Completed;
 }
 public void EmailSupplierInvoice()
 {
     int invoiceId = 112897987;
     var mailRequest = new EmailRequest
     {
         ID = invoiceId, // This must be the id of the supplier invoice
         EmailAddress = "*****@*****.**",
         CCAddress = "",
         BCCAddress = "",
         Subject = "Your Supplier Invoice",
         Message = "Your supplier invoice is attached"
     };
     supplierInvoiceRequest.Email(mailRequest);
 }
 public void EmailTaxInvoice()
 {
     var mailRequest = new EmailRequest
     {
         ID = 0,
         EmailAddress = "*****@*****.**",
         CCAddress = "",
         BCCAddress = "",
         Subject = "Your Invoice",
         Message = "Your invoice is attached"
     };
     var result = taxInvoiceRequest.Email(mailRequest);
 }