private void Reformat() { //Creating invoice model DateTime now = DateTime.Now; string date = String.Format("{0:MMMMM yyyy}", now); //Create Receiver from Company company = new Company(); company.Name = "Tester"; company.Email = "*****@*****.**"; company.Address1 = "59 Paisley Street"; company.Address2 = "Footscray, Victoria"; company.Postcode = "3011"; company.Country = "Australia"; //Create Transaction Invoice invoice = new Invoice(now, 14); invoice.Company = company; invoice.Sender = new Sender(); invoice.InvoiceNo = "Tester"; //Create Item Item item = new Item("Emprevo monthly subscription" + " - " + date, "55", "4"); invoice.AddItem(item); //Saving invoice data to company company.InvoiceNo = invoice.InvoiceNo; company.RecentDate = invoice.InvoiceDate; company.RecentActiveWorkers = "55"; company.RecentTotal = invoice.Total; company.RecentRate = "4"; InvoiceBL bl = new InvoiceBL(); //Upload the content of file to cloud GCPAdapter adapter = new GCPAdapter(); adapter.UploadObject("apiemprevo.appspot.com", "Test" + ".pdf", "application/pdf", bl.CreateInvoiceMemoryStream(invoice)); }