Package uk.co.purebuy.commerce.businessobjects.importexport.playtrade.call

Examples of uk.co.purebuy.commerce.businessobjects.importexport.playtrade.call.GenerateReportNowCall


  public static void main(String[] args) throws PlayTradeApiCallException, InterruptedException
  {
    final int NUMBER_OF_DAYS = 2//the number of days we want to generate an order report for
   
    //create a request order report call
    GenerateReportNowCall call = new GenerateReportNowCall(
        ReportName.Order,
        NUMBER_OF_DAYS );
   
    //set the authentication
    call.setUsername("user@email.com");
    call.setPassword("password");
       
    //make the call to generate the order report
    StandardCallResult result = call.callGenerateReportNow();
   
    if ( result.getSuccess() != null )
    {
      System.out.println("Sucess :" + result.getSuccess() );
     
      /* wait a while for the report to be generated,
       * reports can take several minutes to be generated
       */
      Thread.sleep( 30000 )
     
      //we requested a report from the previous run, try and get the report ID for it
      GetReportStatusCall getreportstatus = new GetReportStatusCall(ReportName.Order);
      getreportstatus.setNumberOfReports(3);
     
      //set the authentication
      call.setUsername("user@email.com");
      call.setPassword("password");
     
      //make the call
      GetReportStatusCallResult rsresult = getreportstatus.callGetReportStatus();
     
      //have a look at all the reports
View Full Code Here

TOP

Related Classes of uk.co.purebuy.commerce.businessobjects.importexport.playtrade.call.GenerateReportNowCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.