/**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     if (property_exists($object, 'invoiceData')) {
         if (!is_object($object->invoiceData)) {
             throw new UnexpectedValueException('value \'' . print_r($object->invoiceData, true) . '\' is not an object');
         }
         $value = new LineItemInvoiceData();
         $this->invoiceData = $value->fromObject($object->invoiceData);
     }
     if (property_exists($object, 'level3InterchangeInformation')) {
         if (!is_object($object->level3InterchangeInformation)) {
             throw new UnexpectedValueException('value \'' . print_r($object->level3InterchangeInformation, true) . '\' is not an object');
         }
         $value = new LineItemLevel3InterchangeInformation();
         $this->level3InterchangeInformation = $value->fromObject($object->level3InterchangeInformation);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'additionalInput')) {
         if (!is_object($object->additionalInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->additionalInput, true) . '\' is not an object');
         }
         $value = new AdditionalOrderInputAirlineData();
         $this->additionalInput = $value->fromObject($object->additionalInput);
     }
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     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 CustomerRiskAssessment();
         $this->customer = $value->fromObject($object->customer);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     if (property_exists($object, 'bankAccountBban')) {
         if (!is_object($object->bankAccountBban)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankAccountBban, true) . '\' is not an object');
         }
         $value = new BankAccountBban();
         $this->bankAccountBban = $value->fromObject($object->bankAccountBban);
     }
     if (property_exists($object, 'bankAccountIban')) {
         if (!is_object($object->bankAccountIban)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object');
         }
         $value = new BankAccountIban();
         $this->bankAccountIban = $value->fromObject($object->bankAccountIban);
     }
     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 PayoutCustomer();
         $this->customer = $value->fromObject($object->customer);
     }
     if (property_exists($object, 'payoutDate')) {
         $this->payoutDate = $object->payoutDate;
     }
     if (property_exists($object, 'payoutText')) {
         $this->payoutText = $object->payoutText;
     }
     if (property_exists($object, 'references')) {
         if (!is_object($object->references)) {
             throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object');
         }
         $value = new PayoutReferences();
         $this->references = $value->fromObject($object->references);
     }
     if (property_exists($object, 'swiftCode')) {
         $this->swiftCode = $object->swiftCode;
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     if (property_exists($object, 'countryCode')) {
         $this->countryCode = $object->countryCode;
     }
     if (property_exists($object, 'isRecurring')) {
         $this->isRecurring = $object->isRecurring;
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     if (property_exists($object, 'references')) {
         if (!is_object($object->references)) {
             throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object');
         }
         $value = new PaymentReferences();
         $this->references = $value->fromObject($object->references);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'additionalInput')) {
         if (!is_object($object->additionalInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->additionalInput, true) . '\' is not an object');
         }
         $value = new AdditionalOrderInput();
         $this->additionalInput = $value->fromObject($object->additionalInput);
     }
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     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 Customer();
         $this->customer = $value->fromObject($object->customer);
     }
     if (property_exists($object, 'items')) {
         if (!is_array($object->items) && !is_object($object->items)) {
             throw new UnexpectedValueException('value \'' . print_r($object->items, true) . '\' is not an array or object');
         }
         $this->items = [];
         foreach ($object->items as $itemsElementObject) {
             $itemsElement = new LineItem();
             $this->items[] = $itemsElement->fromObject($itemsElementObject);
         }
     }
     if (property_exists($object, 'references')) {
         if (!is_object($object->references)) {
             throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object');
         }
         $value = new OrderReferences();
         $this->references = $value->fromObject($object->references);
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'amountOfMoney')) {
         if (!is_object($object->amountOfMoney)) {
             throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object');
         }
         $value = new AmountOfMoney();
         $this->amountOfMoney = $value->fromObject($object->amountOfMoney);
     }
     if (property_exists($object, 'bankRefundMethodSpecificInput')) {
         if (!is_object($object->bankRefundMethodSpecificInput)) {
             throw new UnexpectedValueException('value \'' . print_r($object->bankRefundMethodSpecificInput, true) . '\' is not an object');
         }
         $value = new BankRefundMethodSpecificInput();
         $this->bankRefundMethodSpecificInput = $value->fromObject($object->bankRefundMethodSpecificInput);
     }
     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 RefundCustomer();
         $this->customer = $value->fromObject($object->customer);
     }
     if (property_exists($object, 'refundDate')) {
         $this->refundDate = $object->refundDate;
     }
     if (property_exists($object, 'refundReferences')) {
         if (!is_object($object->refundReferences)) {
             throw new UnexpectedValueException('value \'' . print_r($object->refundReferences, true) . '\' is not an object');
         }
         $value = new RefundReferences();
         $this->refundReferences = $value->fromObject($object->refundReferences);
     }
     return $this;
 }