code: function createContactFilter($newFilterObject, $createTargetGroup, $version = 1.0)
      {
          if ($version == 1.0) {
              $queryParameters = array(
                  'createTargetGroup' => ($createTargetGroup) ? "true" : "false"
              );
              return $this->put("contactfilters/contactfilter", $newFilterObject->toXMLString(), $queryParameters);
          } else if ($version == 2.0) {
              $queryParameters = array(
                  'createTargetGroup' => ($createTargetGroup) ? "true" : "false"
              );
              return $this->post("contactfilters/v2", $newFilterObject, $queryParameters, "application/json");
          }
      }
docs: Creates a simple contact filter.
  
  @param com_maileon_api_contactfilters_ContactFilter $newFilterObject
  the data for the filter
  @param bool $createTargetGroup
  if true, also a target group will be created and the ID will be returned
  @param number $version
  version identifyer to use different versions of the create targetgroup resource
  @return \em com_maileon_api_MaileonAPIResult
  the result object of the API call