public DownloadedFile GetSignatureImageForSender(string senderId, SignatureImageFormat format) { string path = template.UrlFor(UrlTemplate.SIGNATURE_IMAGE_FOR_SENDER_PATH) .Replace("{senderId}", senderId) .Build(); try { return(client.GetBytes(path, AcceptType(format))); } catch (EslServerException e) { throw new EslServerException("Could not download signature image for sender." + " Exception: " + e.Message, e.ServerError, e); } catch (Exception e) { throw new EslException("Could not download signature image for sender." + " Exception: " + e.Message, e); } }
public DownloadedFile DownloadAttachmentFile(string packageId, string attachmentId) { string path = template.UrlFor(UrlTemplate.ATTACHMENT_REQUIREMENT_PATH) .Replace("{packageId}", packageId) .Replace("{attachmentId}", attachmentId) .Build(); try { return(restClient.GetBytes(path)); } catch (EslServerException e) { throw new EslServerException("Could not download the pdf attachment." + " Exception: " + e.Message, e.ServerError, e); } catch (Exception e) { throw new EslException("Could not download the pdf attachment." + " Exception: " + e.Message, e); } }