Template:Json EventNotificationIds Block - Java

From Updox API
Revision as of 21:47, 11 December 2015 by Bwijoyo (Talk | contribs)

Jump to: navigation, search
   private Map<String,Object> BuildMessage() throws Exception
   {
       Map<String,Object> appointment1 = new HashMap();
       appointment1.put("locationId", "locationId");
       appointment1.put("cancelled", false);
       appointment1.put("blocked", false);
       appointment1.put("details", "details");
       appointment1.put("summary", "summary");
       appointment1.put("typeId", "typeId");
       appointment1.put("patientId", "patientId");
       appointment1.put("duration", 500);
       appointment1.put("date", "2015-12-30");
       appointment1.put("calendarId", "calendarId");
       appointment1.put("updoxId", 123);
       appointment1.put("id", 234);
      List<String> appointments = new ArrayList<>();
      appointments.add(appointment1);
       
       Map<String,Object> messageData = new HashMap();
       messageData.put("appointments", appointments);
       
       Map<String,String> authData = new HashMap();
       authData.put("applicationId", "vendorId");
       authData.put("applicationPassword", "vendorPassword");
       messageData.put("auth", authData);
       
       return messageData;
   }