private static bool DownloadTicket(GoogleCloudPrintClient client, Models.Job.Job printJob) { try { var ticket = client.GetTicketAsync(printJob.TicketUrl, proxy).Result; //var request = new TicketRequest { JobId = printJob.Id }; //var ticket = client.GetCloudJobTicketAsync(request).Result; Directory.CreateDirectory(TicketFolderPath); string path = $"{Path.Combine(TicketFolderPath, Path.GetFileNameWithoutExtension(printJob.Title))}.xml"; using (var s = File.Create(path)) ticket.Save(s); Console.WriteLine($"Ticket {printJob.Title} is saved."); } catch (System.Exception ex) { Console.WriteLine(ex.ToString()); return(false); } return(true); }