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 ThreeDSecure extends DataObject
14: {
15: /**
16: * @var string|null
17: */
18: public ?string $authenticationValue = null;
19:
20: /**
21: * @var string|null
22: */
23: public ?string $directoryServerTransactionId = null;
24:
25: /**
26: * @var string|null
27: */
28: public ?string $eci = null;
29:
30: /**
31: * @var string|null
32: */
33: public ?string $threeDSecureType = null;
34:
35: /**
36: * @var string|null
37: */
38: public ?string $version = null;
39:
40: /**
41: * @return object
42: */
43: public function toObject(): object
44: {
45: $object = parent::toObject();
46: if (!is_null($this->authenticationValue)) {
47: $object->authenticationValue = $this->authenticationValue;
48: }
49: if (!is_null($this->directoryServerTransactionId)) {
50: $object->directoryServerTransactionId = $this->directoryServerTransactionId;
51: }
52: if (!is_null($this->eci)) {
53: $object->eci = $this->eci;
54: }
55: if (!is_null($this->threeDSecureType)) {
56: $object->threeDSecureType = $this->threeDSecureType;
57: }
58: if (!is_null($this->version)) {
59: $object->version = $this->version;
60: }
61: return $object;
62: }
63:
64: /**
65: * @param object $object
66: *
67: * @return $this
68: * @throws UnexpectedValueException
69: */
70: public function fromObject(object $object): ThreeDSecure
71: {
72: parent::fromObject($object);
73: if (property_exists($object, 'authenticationValue')) {
74: $this->authenticationValue = $object->authenticationValue;
75: }
76: if (property_exists($object, 'directoryServerTransactionId')) {
77: $this->directoryServerTransactionId = $object->directoryServerTransactionId;
78: }
79: if (property_exists($object, 'eci')) {
80: $this->eci = $object->eci;
81: }
82: if (property_exists($object, 'threeDSecureType')) {
83: $this->threeDSecureType = $object->threeDSecureType;
84: }
85: if (property_exists($object, 'version')) {
86: $this->version = $object->version;
87: }
88: return $this;
89: }
90: }
91: