1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class RefundEWalletMethodSpecificOutput extends RefundMethodSpecificOutput |
14: | { |
15: | |
16: | |
17: | |
18: | public $paymentProduct840SpecificOutput = null; |
19: | |
20: | |
21: | |
22: | |
23: | public function toObject() |
24: | { |
25: | $object = parent::toObject(); |
26: | if (!is_null($this->paymentProduct840SpecificOutput)) { |
27: | $object->paymentProduct840SpecificOutput = $this->paymentProduct840SpecificOutput->toObject(); |
28: | } |
29: | return $object; |
30: | } |
31: | |
32: | |
33: | |
34: | |
35: | |
36: | |
37: | public function fromObject($object) |
38: | { |
39: | parent::fromObject($object); |
40: | if (property_exists($object, 'paymentProduct840SpecificOutput')) { |
41: | if (!is_object($object->paymentProduct840SpecificOutput)) { |
42: | throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificOutput, true) . '\' is not an object'); |
43: | } |
44: | $value = new RefundPaymentProduct840SpecificOutput(); |
45: | $this->paymentProduct840SpecificOutput = $value->fromObject($object->paymentProduct840SpecificOutput); |
46: | } |
47: | return $this; |
48: | } |
49: | } |
50: | |