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

From Updox API
Jump to: navigation, search
(Created page with " private Map<String,Object> BuildMessage() throws Exception { List<String> messageData = new ArrayList<>(); messageData.add("1"); messageData.ad...")
 
Line 1: Line 1:
 
     private Map<String,Object> BuildMessage() throws Exception
 
     private Map<String,Object> BuildMessage() throws Exception
 
     {
 
     {
         List<String> messageData = new ArrayList<>();
+
         List<String> eventNotificationIds = new ArrayList<>();
         messageData.add("1");
+
         eventNotificationIds.add("1");
         messageData.add("2");
+
         eventNotificationIds.add("2");
         messageData.add("3");
+
         eventNotificationIds.add("3");
 +
 
 +
        Map<String,Object> messageData = new HashMap();
 +
        messageData.put("eventNotificationIds", eventNotificationIds);
 
    
 
    
 
{{Json_Auth_Block_-_Application_-_Java}}
 
{{Json_Auth_Block_-_Application_-_Java}}

Revision as of 21:40, 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;
   }