/**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'card')) {
         if (!is_object($object->card)) {
             throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object');
         }
         $value = new Card();
         $this->card = $value->fromObject($object->card);
     }
     if (property_exists($object, 'externalCardholderAuthenticationData')) {
         if (!is_object($object->externalCardholderAuthenticationData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->externalCardholderAuthenticationData, true) . '\' is not an object');
         }
         $value = new ExternalCardholderAuthenticationData();
         $this->externalCardholderAuthenticationData = $value->fromObject($object->externalCardholderAuthenticationData);
     }
     if (property_exists($object, 'isRecurring')) {
         $this->isRecurring = $object->isRecurring;
     }
     if (property_exists($object, 'returnUrl')) {
         $this->returnUrl = $object->returnUrl;
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'bankTransferPaymentMethodSpecificInput')) {
         if (!is_object($object->bankTransferPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankTransferPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new BankTransferPaymentMethodSpecificInputBase();
         $this->bankTransferPaymentMethodSpecificInput = $value->fromObject($object->bankTransferPaymentMethodSpecificInput);
     }
     if (property_exists($object, 'cardPaymentMethodSpecificInput')) {
         if (!is_object($object->cardPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new CardPaymentMethodSpecificInputBase();
         $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput);
     }
     if (property_exists($object, 'cashPaymentMethodSpecificInput')) {
         if (!is_object($object->cashPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->cashPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new CashPaymentMethodSpecificInputBase();
         $this->cashPaymentMethodSpecificInput = $value->fromObject($object->cashPaymentMethodSpecificInput);
     }
     if (property_exists($object, 'fraudFields')) {
         if (!is_object($object->fraudFields)) {
             throw new UnexpectedValueException('value \'' . print_r($object->fraudFields, true) . '\' is not an object');
         }
         $value = new FraudFields();
         $this->fraudFields = $value->fromObject($object->fraudFields);
     }
     if (property_exists($object, 'hostedCheckoutSpecificInput')) {
         if (!is_object($object->hostedCheckoutSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->hostedCheckoutSpecificInput, true) . '\' is not an object');
         }
         $value = new HostedCheckoutSpecificInput();
         $this->hostedCheckoutSpecificInput = $value->fromObject($object->hostedCheckoutSpecificInput);
     }
     if (property_exists($object, 'order')) {
         if (!is_object($object->order)) {
             throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object');
         }
         $value = new Order();
         $this->order = $value->fromObject($object->order);
     }
     if (property_exists($object, 'redirectPaymentMethodSpecificInput')) {
         if (!is_object($object->redirectPaymentMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new RedirectPaymentMethodSpecificInputBase();
         $this->redirectPaymentMethodSpecificInput = $value->fromObject($object->redirectPaymentMethodSpecificInput);
     }
     return $this;
 }