/** * EntryAccount constructor. * * @param Account $account */ public function __construct(Account $account) { $this->accountId = $account->id; $this->name = $account->name; $this->iban = $account->iban; $this->type = $account->accountType->type; $this->number = $account->getMeta('accountNumber'); }