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 AbstractEInvoicePaymentMethodSpecificInput extends AbstractPaymentMethodSpecificInput
14: {
15: /**
16: * @var bool|null
17: */
18: public ?bool $requiresApproval = null;
19:
20: /**
21: * @return object
22: */
23: public function toObject(): object
24: {
25: $object = parent::toObject();
26: if (!is_null($this->requiresApproval)) {
27: $object->requiresApproval = $this->requiresApproval;
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): AbstractEInvoicePaymentMethodSpecificInput
39: {
40: parent::fromObject($object);
41: if (property_exists($object, 'requiresApproval')) {
42: $this->requiresApproval = $object->requiresApproval;
43: }
44: return $this;
45: }
46: }
47: