/** * Decodes wallet identifier object from array * * @param array $data * * @return Paysera_WalletApi_Entity_WalletIdentifier */ public function decodeWalletIdentifier($data) { $walletIdentifier = new Paysera_WalletApi_Entity_WalletIdentifier(); if (is_int($data)) { $walletIdentifier->setId($data); } elseif (is_array($data)) { if (isset($data['id'])) { $walletIdentifier->setId($data['id']); } if (isset($data['email'])) { $walletIdentifier->setEmail($data['email']); } if (isset($data['phone'])) { $walletIdentifier->setPhone($data['phone']); } } return $walletIdentifier; }