/**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'customer')) {
         if (!is_object($object->customer)) {
             throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object');
         }
         $value = new CustomerToken();
         $this->customer = $value->fromObject($object->customer);
     }
     if (property_exists($object, 'mandate')) {
         if (!is_object($object->mandate)) {
             throw new UnexpectedValueException('value \'' . print_r($object->mandate, true) . '\' is not an object');
         }
         $value = new MandateNonSepaDirectDebit();
         $this->mandate = $value->fromObject($object->mandate);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'customer')) {
         if (!is_object($object->customer)) {
             throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object');
         }
         $value = new CustomerToken();
         $this->customer = $value->fromObject($object->customer);
     }
     if (property_exists($object, 'data')) {
         if (!is_object($object->data)) {
             throw new UnexpectedValueException('value \'' . print_r($object->data, true) . '\' is not an object');
         }
         $value = new TokenCardData();
         $this->data = $value->fromObject($object->data);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'contactDetails')) {
         if (!is_object($object->contactDetails)) {
             throw new UnexpectedValueException('value \'' . print_r($object->contactDetails, true) . '\' is not an object');
         }
         $value = new ContactDetailsToken();
         $this->contactDetails = $value->fromObject($object->contactDetails);
     }
     return $this;
 }