public void GetXeroInvoicePDFByteArray(string theInvoiceGUID, XeroApi.Repository theRepository)
        {
            try
            {

                //to actually pull the pdf from Xero.       //to assign it to this invoice's PDF container
                this.InvoicePDF = theRepository.FindById<Invoice>(theInvoiceGUID, XeroApi.MimeTypes.ApplicationPdf);

            }
            catch (Exception ex)
            { throw ex; }
        }
        public void GetXeroInvoicePDFByteArray(XeroApi.Model.Invoice theInboundXeroInvoice, XeroApi.Repository theRepository)
        {
            try
            {

                //to get our GUID for the pdf
                System.Guid invoiceId = theInboundXeroInvoice.InvoiceID; //to hold the Guid

                //to actually pull the pdf from Xero.       //to assign it to this invoice's PDF container
                this.InvoicePDF = theRepository.FindById<Invoice>(invoiceId.ToString(), XeroApi.MimeTypes.ApplicationPdf);

            }
            catch (Exception ex)
            { throw ex; }
        }