public function getById($id, $locale)
    {
        $account = $this->accountRepository->findAccountById($id);
        if (!$account) {
            throw new EntityNotFoundException($this->accountRepository->getClassName(), $id);
        }

        return $this->getApiObject($account, $locale);
    }
public function getById($id, $locale)
    {
        $account = $this->accountRepository->findAccountById($id);
        if (!$account) {
            throw new EntityNotFoundException($this->accountRepository->getClassName(), $id);
        }

        return $this->getApiObject($account, $locale);
    }
public function getById ( $ id , $ locale ) { $ account = $ this -> accountRepository -> findAccountById ( $ id ) ; if ( ! $ account ) { throw new EntityNotFoundException ( $ this -> accountRepository -> getClassName ( ) , $ id ) ; } return $ this -> getApiObject ( $ account , $ locale ) ; }
Gets account by id.

@param int $id
@param string $locale

@throws EntityNotFoundException

@return mixed
Gets account by id .