/**
  * 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())
 {
     $request = new ThreeDSecureRequest();
     $array = new SafeArrayAccess($data);
     $request->addTimestamp($array['@timestamp'])->addType($array['@type'])->addMerchantId($array['merchantid'])->addAccount($array['account'])->addOrderId($array['orderid'])->addCard($this->denormaliseCard($array))->addHash($array['sha1hash'])->addPares($array['pares']);
     $request->setAmount($this->denormaliseAmount($array));
     $request->setComments($this->denormaliseComments($array));
     return $request;
 }
 /**
  * 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())
 {
     $this->format = $format;
     $this->context = $context;
     $request = new ThreeDSecureRequest();
     $array = new SafeArrayAccess($data);
     $request->addTimestamp($array['@timestamp'])->addType($array['@type'])->addMerchantId($array['merchantid'])->addAccount($array['account'])->addOrderId($array['orderid'])->addHash($array['sha1hash'])->addPares($array['pares'])->addPayerReference($array['payerref'])->addPaymentMethod($array['paymentmethod']);
     $request->setCard($this->denormaliseCard($array));
     $request->setPaymentData($this->denormalisePaymentData($array));
     $request->setAutoSettle($this->denormaliseAutoSettle($array));
     $request->setAmount($this->denormaliseAmount($array));
     $request->setComments($this->denormaliseComments($array));
     return $request;
 }