public function setMaxExternalLastEdited(array $apidata)
    {
        $external_last_edited_key = $this->ExternalLastEditedKey;

        // Validation
        if (!$external_last_edited_key) {
            user_error(
                _t('Consumer.ExternalLastEditedKeyNeeded', 'Property ExternalLastEditedKey needs to be set before calling setMaxExternalLastEdited method'),
                E_USER_WARNING
            );
        }

        $dates = array_map(function ($item) use ($external_last_edited_key) {
            return $item[$external_last_edited_key];
        }, $apidata);
        $max_date = max($dates);

        if (self::isTimestamp($max_date)) {
            $max_date = self::convertUnix2UTC($max_date);
        }

        $this->ExternalLastEdited = $max_date;
        return $this;
    }