/**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'isRecurring')) {
         $this->isRecurring = $object->isRecurring;
     }
     if (property_exists($object, 'paymentProduct809SpecificInput')) {
         if (!is_object($object->paymentProduct809SpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct809SpecificInput, true) . '\' is not an object');
         }
         $value = new RedirectPaymentProduct809SpecificInput();
         $this->paymentProduct809SpecificInput = $value->fromObject($object->paymentProduct809SpecificInput);
     }
     if (property_exists($object, 'paymentProduct816SpecificInput')) {
         if (!is_object($object->paymentProduct816SpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct816SpecificInput, true) . '\' is not an object');
         }
         $value = new RedirectPaymentProduct816SpecificInput();
         $this->paymentProduct816SpecificInput = $value->fromObject($object->paymentProduct816SpecificInput);
     }
     if (property_exists($object, 'paymentProduct882SpecificInput')) {
         if (!is_object($object->paymentProduct882SpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct882SpecificInput, true) . '\' is not an object');
         }
         $value = new RedirectPaymentProduct882SpecificInput();
         $this->paymentProduct882SpecificInput = $value->fromObject($object->paymentProduct882SpecificInput);
     }
     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;
 }