1: <?php
2: /*
3: * This file was automatically generated.
4: */
5: namespace Worldline\Acquiring\Sdk\V1\Domain;
6:
7: use UnexpectedValueException;
8: use Worldline\Acquiring\Sdk\Domain\DataObject;
9:
10: /**
11: * @package Worldline\Acquiring\Sdk\V1\Domain
12: */
13: class CardPaymentDataForResource extends DataObject
14: {
15: /**
16: * @var string|null
17: */
18: public ?string $brand = null;
19:
20: /**
21: * @return object
22: */
23: public function toObject(): object
24: {
25: $object = parent::toObject();
26: if (!is_null($this->brand)) {
27: $object->brand = $this->brand;
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): CardPaymentDataForResource
39: {
40: parent::fromObject($object);
41: if (property_exists($object, 'brand')) {
42: $this->brand = $object->brand;
43: }
44: return $this;
45: }
46: }
47: