public function MailChimp_ListsTest::updateMember in Mailchimp 7.3
See also
Mailchimp_Lists::updateMember()
File
- tests/
mailchimp_lists_test.inc, line 226 - A virtual MailChimp Lists API implementation for use in testing.
Class
Code
public function updateMember($id, $email, $merge_vars, $email_type = '', $replace_interests = TRUE) {
$email_address = $email['email'];
$lists = $this
->loadLists();
$response = array();
if (isset($lists[$id])) {
if (isset($lists[$id]['data']['members'][$email_address])) {
if (!empty($merge_vars)) {
$lists[$id]['data']['members'][$email_address]['merge_vars'] = $merge_vars;
}
$lists[$id]['data']['members'][$email_address]['email_type'] = $email_type;
$response['email'] = $email_address;
}
}
else {
$response['status'] = 'error';
$response['code'] = 200;
$response['name'] = 'List_DoesNotExist';
}
return $response;
}