private function setup_customer($customer)
{
if (!is_object($customer)) {
return false;
}
foreach ($customer as $key => $value) {
switch ($key) {
case 'notes':
$this->{$key} = $this->get_notes();
break;
default:
$this->{$key} = $value;
break;
}
}
// Customer ID and email are the only things that are necessary, make sure they exist
if (!empty($this->id) && !empty($this->email)) {
return true;
}
return false;
}