Difference between revisions of "Template:Json DateRange Block - Java"

From Updox API
Jump to: navigation, search
(Created page with " private Map<String,Object> BuildMessage() throws Exception { String dateFrom = "2015-12-11"; // required String dateTo = "2015-12-13"; // required f...")

Revision as of 20:50, 11 December 2015

  private Map<String,Object> BuildMessage() throws Exception
  {   
      String dateFrom = "2015-12-11"; // required
      String dateTo = "2015-12-13";     // required for date range
      Map<String,Object> messageData = new HashMap();
      messageData.put("dateFrom", dateFrom);
      messageData.put("dateTo", dateTo);  // required for date range
      
      Map<String,String> authData = new HashMap();
      authData.put("applicationId", "vendorId");
      authData.put("applicationPassword", "vendorPassword");
      messageData.put("auth", authData);
      
      return messageData;
  }