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

From Updox API
Jump to: navigation, search
(Undo revision 3184 by Bwijoyo (talk))
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
 
     private Map<String,Object> BuildMessage() throws Exception
 
     private Map<String,Object> BuildMessage() throws Exception
 
     {
 
     {
         Map<String,Object> appointment1 = new HashMap();
+
         List<String> eventNotificationIds = new ArrayList<>();
         appointment1.put("locationId", "locationId");
+
         eventNotificationIds.add("1");
         appointment1.put("cancelled", false);
+
         eventNotificationIds.add("2");
         appointment1.put("blocked", false);
+
         eventNotificationIds.add("3");
        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();
 
         Map<String,Object> messageData = new HashMap();
         messageData.put("appointments", appointments);
+
         messageData.put("eventNotificationIds", eventNotificationIds);
 
          
 
          
 
{{Json_Auth_Block_-_Application_-_Java}}
 
{{Json_Auth_Block_-_Application_-_Java}}

Latest revision as of 22:47, 11 December 2015

   private Map<String,Object> BuildMessage() throws Exception
   {
       List<String> eventNotificationIds = new ArrayList<>();
       eventNotificationIds.add("1");
       eventNotificationIds.add("2");
       eventNotificationIds.add("3");
       
       Map<String,Object> messageData = new HashMap();
       messageData.put("eventNotificationIds", eventNotificationIds);
       
       Map<String,String> authData = new HashMap();
       authData.put("applicationId", "vendorId");
       authData.put("applicationPassword", "vendorPassword");
       messageData.put("auth", authData);
       
       return messageData;
   }