예제 #1
0
        public GovNotifySendResponse SendPdfDocumentForPostage(byte[] pdfBytes, string uniqueRef)
        {
            LetterNotificationResponse response;

            try
            {
                response = _govNotifyClient.SendPrecompiledLetter(
                    uniqueRef,
                    pdfBytes
                    );
            }
            catch (NotifyClientException e)
            {
                return(new GovNotifySendResponse
                {
                    Error = e.Message,
                    Success = false
                });
            }

            return(new GovNotifySendResponse
            {
                NotificationId = response.id,
                Success = true,
            });
        }