src/XQueue/Maileon/API/Contacts/ContactsService.php
function updateContact($contact, $checksum = "", $src = null, $subscriptionPage = null, $triggerDoi = FALSE, $doiMailingKey = null, $ignoreChecksum = false)
    {
        $queryParameters = array(
            'id' => $contact->id,
            'checksum' => $checksum,
            'triggerdoi' => ($triggerDoi == TRUE) ? "true" : "false",
            'ignore_checksum' => $ignoreChecksum ? "true" : "false"
        );

        if (isset($contact->permission)) $queryParameters['permission'] = $contact->permission->getCode();
        if (isset($src)) $queryParameters['src'] = $src;
        if (isset($subscriptionPage)) $queryParameters['page_key'] = $subscriptionPage;
        $doiMailingKey = trim($doiMailingKey);
        if (!empty($doiMailingKey)) $queryParameters['doimailing'] = $doiMailingKey;

        // The API allows only some of the fields to be submitted
        $contactToSend = new Contact(null, $contact->email, null, $contact->external_id, null, $contact->standard_fields, $contact->custom_fields);

        return $this->put("contacts/contact", $contactToSend->toXMLString(), $queryParameters);
    }
function updateContact($contact, $checksum = "", $src = null, $subscriptionPage = null, $triggerDoi = FALSE, $doiMailingKey = null, $ignoreChecksum = false)
    {
        $queryParameters = array(
            'id' => $contact->id,
            'checksum' => $checksum,
            'triggerdoi' => ($triggerDoi == TRUE) ? "true" : "false",
            'ignore_checksum' => $ignoreChecksum ? "true" : "false"
        );

        if (isset($contact->permission)) $queryParameters['permission'] = $contact->permission->getCode();
        if (isset($src)) $queryParameters['src'] = $src;
        if (isset($subscriptionPage)) $queryParameters['page_key'] = $subscriptionPage;
        $doiMailingKey = trim($doiMailingKey);
        if (!empty($doiMailingKey)) $queryParameters['doimailing'] = $doiMailingKey;

        // The API allows only some of the fields to be submitted
        $contactToSend = new Contact(null, $contact->email, null, $contact->external_id, null, $contact->standard_fields, $contact->custom_fields);

        return $this->put("contacts/contact", $contactToSend->toXMLString(), $queryParameters);
    }
This methods updates the data of a Maileon contact identifying a contact by its internal Maileon ID

@param com_maileon_api_contacts_Contact $contact
The contact object to send to Maileon.
@param string $checksum
This is the checksum that must be used when the request comes from a user, see documentation under http://dev.maileon.com for details.
@param string $src
The source that shall be passed to the API.
@param string $subscriptionPage
The subscription page the request comes from.
@param boolean $triggerDoi
If true, a DOI mailing will be triggered.
@param string $doiMailingKey
If this parameter is set, the DOI mailing with the given ID will be triggered. If not set, the default DOI Mailing will be triggered.
@param string $ignoreChecksum
If this is true, the checksum will not be validated. This is only valid if the request is NOT triggered by the contact (e.g. on a profile change landing page) but from a third party system.
@return \em com_maileon_api_MaileonAPIResult
the result object of the API call
@throws com_maileon_api_MaileonAPIException
if there was a connection problem or a server error occurred