/**
  * Constructor to create a ContactUpdateNoOpRequest
  *
  * @param id Unique request name
  * @param noOpIn Simulated response object
  */
 public ContactUpdateNoOpRequest(String id, ContactObjectData noOpIn) {
   super(id, "ContactUpdateNoOpRequest");
   if (noOpIn != null) {
     addInput(
         "Contact", ContactObjectHelper.toMap(noOpIn, new HashMap(), "Contact").get("Contact"));
   }
 }
Ejemplo n.º 2
0
 /**
  * convert Map to ContactObjectDataList.
  *
  * @param record the Map containing the data to convert to thelist
  * @param rootName the root name of the object in the mape (defaults to "ContactObjectList")
  * @return ContactObjectDataList the converted object
  */
 public static ContactObjectDataList fromMapList(Map record, String rootName) {
   if (record == null) return null;
   if (rootName == null) rootName = "ContactObjectList";
   Object[] root = (Object[]) record.get(rootName);
   ContactObjectData[] array = null;
   if (root != null) {
     array = new ContactObjectData[root.length];
     for (int i = 0; i < root.length; i++) {
       array[i] = ContactObjectHelper.getObj((Map) root[i]);
     }
   } else {
     array = new ContactObjectData[0];
   }
   Integer count = (Integer) record.get("Count");
   Integer index = (Integer) record.get("Index");
   Integer total = (Integer) record.get("TotalCount");
   return new ContactObjectDataList(array, index, total);
 }
 /**
  * Retrieves the ContactObjectData passed into the constructor
  *
  * @return Simulated response
  */
 public ContactObjectData getOutput() {
   return ContactObjectHelper.fromMap(outputMap, "Contact");
 }