1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1\Domain;
7:
8: use UnexpectedValueException;
9: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class CreatePaymentProductSessionResponse extends DataObject
15: {
16: /**
17: * @var MobilePaymentProductSession302SpecificOutput
18: */
19: public $paymentProductSession302SpecificOutput = null;
20:
21: /**
22: * @return object
23: */
24: public function toObject()
25: {
26: $object = parent::toObject();
27: if (!is_null($this->paymentProductSession302SpecificOutput)) {
28: $object->paymentProductSession302SpecificOutput = $this->paymentProductSession302SpecificOutput->toObject();
29: }
30: return $object;
31: }
32:
33: /**
34: * @param object $object
35: * @return $this
36: * @throws UnexpectedValueException
37: */
38: public function fromObject($object)
39: {
40: parent::fromObject($object);
41: if (property_exists($object, 'paymentProductSession302SpecificOutput')) {
42: if (!is_object($object->paymentProductSession302SpecificOutput)) {
43: throw new UnexpectedValueException('value \'' . print_r($object->paymentProductSession302SpecificOutput, true) . '\' is not an object');
44: }
45: $value = new MobilePaymentProductSession302SpecificOutput();
46: $this->paymentProductSession302SpecificOutput = $value->fromObject($object->paymentProductSession302SpecificOutput);
47: }
48: return $this;
49: }
50: }
51: