コード例 #1
0
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     if (property_exists($object, 'paymentProductGroups')) {
         if (!is_array($object->paymentProductGroups) && !is_object($object->paymentProductGroups)) {
             throw new UnexpectedValueException('value \'' . print_r($object->paymentProductGroups, true) . '\' is not an array or object');
         }
         $this->paymentProductGroups = [];
         foreach ($object->paymentProductGroups as $paymentProductGroupsElementObject) {
             $paymentProductGroupsElement = new PaymentProductGroup();
             $this->paymentProductGroups[] = $paymentProductGroupsElement->fromObject($paymentProductGroupsElementObject);
         }
     }
     return $this;
 }
 /**
  * @param object $object
  * @return $this
  * @throws UnexpectedValueException
  */
 public function fromObject($object)
 {
     parent::fromObject($object);
     return $this;
 }