Пример #1
0
 private function createClientBeneficiary(array $data, ClientAccount $account)
 {
     $beneficiary = new Beneficiary();
     $beneficiary->setAccount($account);
     $beneficiary->setType($data['type']);
     $beneficiary->setState($this->getReference('state-' . $data['state']));
     $beneficiary->setFirstName($data['first_name']);
     $beneficiary->setLastName($data['last_name']);
     $beneficiary->setMiddleName($data['middle_name']);
     $beneficiary->setSsn($data['ssn']);
     $beneficiary->setBirthDate(new \DateTime($data['birth_date']));
     $beneficiary->setStreet($data['street']);
     $beneficiary->setCity($data['city']);
     $beneficiary->setZip($data['zip']);
     $beneficiary->setRelationship($data['relationship']);
     $beneficiary->setShare($data['share']);
     return $beneficiary;
 }
Пример #2
0
 private function buildBeneficiaryByClient(User $client)
 {
     $spouse = $client->getSpouse();
     $profile = $client->getProfile();
     $beneficiary = new Beneficiary();
     $beneficiary->setFirstName($spouse->getFirstName());
     $beneficiary->setMiddleName($spouse->getMiddleName());
     $beneficiary->setLastName($spouse->getLastName());
     $beneficiary->setBirthDate($spouse->getBirthDate());
     $beneficiary->setStreet($profile->getStreet());
     $beneficiary->setState($profile->getState());
     $beneficiary->setCity($profile->getCity());
     $beneficiary->setZip($profile->getZip());
     $beneficiary->setRelationship('Spouse');
     $beneficiary->setShare(100);
     return $beneficiary;
 }