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:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class RefundEWalletMethodSpecificOutput extends RefundMethodSpecificOutput
14: {
15: /**
16: * @var RefundPaymentProduct840SpecificOutput|null
17: */
18: public ?RefundPaymentProduct840SpecificOutput $paymentProduct840SpecificOutput = null;
19:
20: /**
21: * @return object
22: */
23: public function toObject(): object
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: * @param object $object
34: *
35: * @return $this
36: * @throws UnexpectedValueException
37: */
38: public function fromObject(object $object): RefundEWalletMethodSpecificOutput
39: {
40: parent::fromObject($object);
41: if (property_exists($object, 'paymentProduct840SpecificOutput')) {
42: if (!is_object($object->paymentProduct840SpecificOutput)) {
43: throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificOutput, true) . '\' is not an object');
44: }
45: $value = new RefundPaymentProduct840SpecificOutput();
46: $this->paymentProduct840SpecificOutput = $value->fromObject($object->paymentProduct840SpecificOutput);
47: }
48: return $this;
49: }
50: }
51: