/**
  * Denormalizes data back into an object of the given class.
  *
  * @param mixed $data data to restore
  * @param string $class the expected class to instantiate
  * @param string $format format the given data was extracted from
  * @param array $context options available to the denormalizer
  *
  * @return object
  */
 public function denormalize($data, $class, $format = null, array $context = array())
 {
     $response = new ThreeDSecureResponse();
     $array = new SafeArrayAccess($data);
     $response->setTimeStamp($array['@timestamp']);
     $response->setMerchantId($array['merchantid']);
     $response->setAccount($array['account']);
     $response->setOrderId($array['orderid']);
     $response->setResult($array['result']);
     $response->setAuthCode($array['authcode']);
     $response->setMessage($array['message']);
     $response->setPaymentsReference($array['pasref']);
     $response->setTimeTaken($array['timetaken']);
     $response->setAuthTimeTaken($array['authtimetaken']);
     $response->setPareq($array['pareq']);
     $response->setUrl($array['url']);
     $response->setEnrolled($array['enrolled']);
     $response->setXid($array['xid']);
     $response->setThreeDSecure($this->denormaliseThreeDSecure($array));
     $response->setHash($array['sha1hash']);
     return $response;
 }