Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. private void GetReportAndPrintToConsole(ServiceContext qboServiceContext, String reportName, String startDate, String endDate)
  2. {
  3.  
  4.  
  5. //JSON required for QBO Reports API
  6. qboServiceContext.IppConfiguration.Message.Request.SerializationFormat = Intuit.Ipp.Core.Configuration.SerializationFormat.Json; qboServiceContext.IppConfiguration.Message.Response.SerializationFormat = Intuit.Ipp.Core.Configuration.SerializationFormat.Json;
  7.  
  8. //Instantiate ReportService
  9. ReportService reportsService = new ReportService(qboServiceContext);
  10.  
  11. //Set properties for Report
  12. reportsService.start_date = startDate;
  13. reportsService.end_date = endDate;
  14.  
  15. //Execute Report API call
  16. Intuit.Ipp.Data.Report report = reportsService.ExecuteReport(reportName);
  17.  
  18.  
  19.  
  20. Console.WriteLine(report.GetType());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement