docs: @SuppressWarnings({"unused", "WeakerAccess"})
      public void pushChargedEvent(HashMap<String, Object> chargeDetails,
                       ArrayList<HashMap<String, Object>> items) {
  
          if (chargeDetails == null || items == null) {
              getConfigLogger().debug(getAccountId(), "Invalid Charged event: details and or items is null");
              return;
          }
  
          if (items.size() > 50) {
              ValidationResult error = new ValidationResult();
              error.setErrorCode(522);
              error.setErrorDesc("Charged event contained more than 50 items.");
              getConfigLogger().debug(getAccountId(),"Charged event contained more than 50 items.");
              pushValidationResult(error);
          }
  
          JSONObject evtData = new JSONObject();
          JSONObject chargedEvent = new JSONObject();
          ValidationResult vr;
          try {
              for (String key : chargeDetails.keySet()) {
                  Object value = chargeDetails.get(key);
                  vr = validator.cleanObjectKey(key);
                  key = vr.getObject().toString();
                  // Check for an error
                  if (vr.getErrorCode() != 0)
                      chargedEvent.put(Constants.ERROR_KEY, getErrorObject(vr));
  
                  try {
                      vr = validator.cleanObjectValue(value, Validator.ValidationContext.Event);
                  } catch (IllegalArgumentException e) {
                      // The object was neither a String, Boolean, or any number primitives
                      ValidationResult error = new ValidationResult();
                      error.setErrorCode(511);
                      final String err = "For event Charged: Property value for property " + key + " wasn't a primitive (" + value + ")";
                      error.setErrorDesc(err);
                      pushValidationResult(error);
                      getConfigLogger().debug(getAccountId(), err);
                      // Skip this property
                      continue;
                  }
                  value = vr.getObject();
                  // Check for an error
                  if (vr.getErrorCode() != 0)
                      chargedEvent.put(Constants.ERROR_KEY, getErrorObject(vr));
  
                  evtData.put(key, value);
              }
  
              JSONArray jsonItemsArray = new JSONArray();
              for (HashMap<String, Object> map : items) {
                  JSONObject itemDetails = new JSONObject();
                  for (String key : map.keySet()) {
                      Object value = map.get(key);
                      vr = validator.cleanObjectKey(key);
                      key = vr.getObject().toString();
                      // Check for an error
                      if (vr.getErrorCode() != 0)
                          chargedEvent.put(Constants.ERROR_KEY, getErrorObject(vr));
  
                      try {
                          vr = validator.cleanObjectValue(value, Validator.ValidationContext.Event);
                      } catch (IllegalArgumentException e) {
                          // The object was neither a String, Boolean, or any number primitives
                          ValidationResult error = new ValidationResult();
                          error.setErrorCode(511);
                          final String err = "An item's object value for key " + key + " wasn't a primitive (" + value + ")";
                          error.setErrorDesc(err);
                          getConfigLogger().debug(getAccountId(), err);
  
                          pushValidationResult(error);
                          // Skip this property
                          continue;
                      }
                      value = vr.getObject();
                      // Check for an error
                      if (vr.getErrorCode() != 0)
                          chargedEvent.put(Constants.ERROR_KEY, getErrorObject(vr));
                      itemDetails.put(key, value);
                  }
                  jsonItemsArray.put(itemDetails);
              }
              evtData.put("Items", jsonItemsArray);
  
              chargedEvent.put("evtName", Constants.CHARGED_EVENT);
              chargedEvent.put("evtData", evtData);
              queueEvent(context, chargedEvent, Constants.RAISED_EVENT);
          } catch (Throwable t) {
              // We won't get here
          }
      }