/** * Return list of all user submitted date for a given form and optionally * a campaign * * Parmeters example: * ------------------ * $parameters = array ( * "formId" => 12345, //int mandatory * "campaignId" => 12345, /int optional * ); * * @param Array $parameters Associative array with formId and optional * campaignId * * @return formdata */ public function getResults($parameters) { $request = array(); foreach ($parameters as $key => $value) { $request[$key] = $value; } $response = $this->execute("GetFormResults", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * Send images and/or documents to your Flexmail account * * Parmeters example: * ------------------ * $parameters = array ( * "fileTypeItems" => array ( * array ( * "type" => "Document", // string mandatory * "name" => "My-Report.pdf", // string mandatory * "file" => "/users/john/My-Report.pdf" // string mandatory * ), * array ( * "type" => "Image", // string mandatory * "name" => "banner.jpg", // string mandatory * "file" => "/users/john/images/banner.jpg" // string mandatory * ) * ) * ); * * @param Array $parameters ass. array with fileTypeItems objects array * * @return void */ public function put($parameters) { foreach ($parameters["fileTypeItems"] as $key => $file) { if (!file_exists($file["file"])) { throw new Exception("Local file not found"); } $parameters["fileTypeItems"][$key]["data"] = base64_encode(file_get_contents($file["file"])); } $response = $this->execute("PutFiles", $parameters); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * Get all Messages * * @param Array $parameters Associative array with archivedMessages property. * * @return messageTypeItems array */ public function getAll($parameters = NULL) { $request = NULL; if (isset($parameters) && (array_key_exists("archivedMessages", $parameters) && $parameters["archivedMessages"])) { $request = FlexmailAPI::parseArray($parameters); } $response = $this->execute("GetMessages", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * Get all Landing Pages * * @return landingPageTypeItems array */ public function getAll() { $request = NULL; $response = $this->execute("GetLandingPages", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
public function __construct() { trigger_error("Class is deprecated, please use 'Contact' service instead of 'Email' service", E_NOTICE); parent::__construct(); }
/** * Get all Mailinglists within a Category * * @param Array $parameters Associative array with categoryId * * @return mailingListTypeItems array */ public function getAll($parameters) { $request = FlexmailAPI::parseArray($parameters); $response = $this->execute("GetMailingLists", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * Import multiple email adresses to the overall or a specific mailing list blacklist * * * $importBlacklistParameters = array ( * "emailAddressTypeItems" => array( // array mandatory * array ( * "emailAddress" => "*****@*****.**" // string mandatory * ), * array ( * "emailAddress" => "*****@*****.**" // string mandatory * ) * ), * "mailingListTypeItems" => array ( // array optional * array ( * "mailingListId" => 117115 // int mandatory * ), * array ( * "mailingListId" => 117081 // int mandatory * ) * ) * ); * * @param Array $parameters Array with array of emailAddressType objects * and array with mailingListType objects * * @return importBlackListREspTypeItems array */ public function import($parameters) { $request = FlexmailAPI::parseArray($parameters); $response = $this->execute("ImportBlacklist", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * delete a GroupSubscription * * Parmeters example: * ------------------ * $parameters = array ( * "groupSubscriptionType" => array ( // array mandatory * "groupId" => 27091, // int mandatory * "emailAddressFlexmailId" => 31655, // int mandatory (unless referenceId is set) * "emailAddressReferenceId" => "my-ref-001" // string mandatory (unless flexmailId is set) * ) * ); * * @param Array $parameters Associative array with properties of an groupSubscriptionType object * * @return void */ public function deleteSubscription($parameters) { $request = FlexmailAPI::parseArray($parameters); $response = $this->execute("DeleteGroupSubscription", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }
/** * Request complete or partial history of a Contact * * Parmeters example: * ------------------ * $parameters = array ( * "emailAddress" => "*****@*****.**", // string mandatory * "timestampFrom" => "2008-09-02T14:42:30", // string (YYYY-MM-DDTHH:ii:ss) optional * "timestampTill" => "2014-09-02T14:42:30", // string (YYYY-MM-DDTHH:ii:ss) optional * "emailAddressHistoryOptionsType" => array ( // array optional * "created" => true, // boolean optional * "deleted" => true, // boolean optional * "profileUpdateVisited" => true, // boolean optional * "profileUpdateSubmitted" => true, // boolean optional * "subscribed" => true, // boolean optional * "unsubscribed" => true, // boolean optional * "addedToGroup" => true, // boolean optional * "removedFromGroup" => true, // boolean optional * "addedToAccountBlackList" => true, // boolean optional * "removedFromAccountBlackList" => true, // boolean optional * "bounced" => true, // boolean optional * "bouncedOut" => true, // boolean optional * "campaignSend" => true, // boolean optional * "campaignRead" => true, // boolean optional * "campaignReadOnline" => true, // boolean optional * "campaignLinkClicked" => true, // boolean optional * "campaignLinkGroupClicked" => true, // boolean optional * "campaignReadInfopage" => true, // boolean optional * "campaignFormVisited" => true, // boolean optional * "campaignFormSubmitted" => true, // boolean optional * "campaignSurveyVisi ted" => true, // boolean optional * "campaignSurveySubmitted" => true, // boolean optional * "campaignForwardVisited" => true, // boolean optional * "campaignForwardSubmitted" => true, // boolean optional * ) * "sort" => 1 // int optional (0 = asc, 1 = desc) * ); * * @param Array $parameters Associative arrays with emailAddress and optional * timestampTill- and from, sort and * emailAddressHistoryOptionsType parameters * * @return emailAddressHistoryType object */ public function history($parameters) { $request = FlexmailAPI_Email::parseArray($parameters); $response = $this->execute("GetEmailAddressHistory", $request); return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode')); }