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: use Worldline\Connect\Sdk\Domain\DataObject;
10:
11: /**
12: * @package Worldline\Connect\Sdk\V1\Domain
13: */
14: class ExternalCardholderAuthenticationData extends DataObject
15: {
16: /**
17: * @var string|null
18: */
19: public ?string $acsTransactionId = null;
20:
21: /**
22: * @var string|null
23: */
24: public ?string $appliedExemption = null;
25:
26: /**
27: * @var string|null
28: */
29: public ?string $cavv = null;
30:
31: /**
32: * @var string|null
33: */
34: public ?string $cavvAlgorithm = null;
35:
36: /**
37: * @var string|null
38: */
39: public ?string $directoryServerTransactionId = null;
40:
41: /**
42: * @var int|null
43: */
44: public ?int $eci = null;
45:
46: /**
47: * @var int|null
48: */
49: public ?int $schemeRiskScore = null;
50:
51: /**
52: * @var string|null
53: */
54: public ?string $threeDSecureVersion = null;
55:
56: /**
57: * @var string|null
58: *
59: * @deprecated No replacement
60: */
61: public ?string $threeDServerTransactionId = null;
62:
63: /**
64: * @var string|null
65: */
66: public ?string $validationResult = null;
67:
68: /**
69: * @var string|null
70: */
71: public ?string $xid = null;
72:
73: /**
74: * @return object
75: */
76: public function toObject(): object
77: {
78: $object = parent::toObject();
79: if (!is_null($this->acsTransactionId)) {
80: $object->acsTransactionId = $this->acsTransactionId;
81: }
82: if (!is_null($this->appliedExemption)) {
83: $object->appliedExemption = $this->appliedExemption;
84: }
85: if (!is_null($this->cavv)) {
86: $object->cavv = $this->cavv;
87: }
88: if (!is_null($this->cavvAlgorithm)) {
89: $object->cavvAlgorithm = $this->cavvAlgorithm;
90: }
91: if (!is_null($this->directoryServerTransactionId)) {
92: $object->directoryServerTransactionId = $this->directoryServerTransactionId;
93: }
94: if (!is_null($this->eci)) {
95: $object->eci = $this->eci;
96: }
97: if (!is_null($this->schemeRiskScore)) {
98: $object->schemeRiskScore = $this->schemeRiskScore;
99: }
100: if (!is_null($this->threeDSecureVersion)) {
101: $object->threeDSecureVersion = $this->threeDSecureVersion;
102: }
103: if (!is_null($this->threeDServerTransactionId)) {
104: $object->threeDServerTransactionId = $this->threeDServerTransactionId;
105: }
106: if (!is_null($this->validationResult)) {
107: $object->validationResult = $this->validationResult;
108: }
109: if (!is_null($this->xid)) {
110: $object->xid = $this->xid;
111: }
112: return $object;
113: }
114:
115: /**
116: * @param object $object
117: *
118: * @return $this
119: * @throws UnexpectedValueException
120: */
121: public function fromObject(object $object): ExternalCardholderAuthenticationData
122: {
123: parent::fromObject($object);
124: if (property_exists($object, 'acsTransactionId')) {
125: $this->acsTransactionId = $object->acsTransactionId;
126: }
127: if (property_exists($object, 'appliedExemption')) {
128: $this->appliedExemption = $object->appliedExemption;
129: }
130: if (property_exists($object, 'cavv')) {
131: $this->cavv = $object->cavv;
132: }
133: if (property_exists($object, 'cavvAlgorithm')) {
134: $this->cavvAlgorithm = $object->cavvAlgorithm;
135: }
136: if (property_exists($object, 'directoryServerTransactionId')) {
137: $this->directoryServerTransactionId = $object->directoryServerTransactionId;
138: }
139: if (property_exists($object, 'eci')) {
140: $this->eci = $object->eci;
141: }
142: if (property_exists($object, 'schemeRiskScore')) {
143: $this->schemeRiskScore = $object->schemeRiskScore;
144: }
145: if (property_exists($object, 'threeDSecureVersion')) {
146: $this->threeDSecureVersion = $object->threeDSecureVersion;
147: }
148: if (property_exists($object, 'threeDServerTransactionId')) {
149: $this->threeDServerTransactionId = $object->threeDServerTransactionId;
150: }
151: if (property_exists($object, 'validationResult')) {
152: $this->validationResult = $object->validationResult;
153: }
154: if (property_exists($object, 'xid')) {
155: $this->xid = $object->xid;
156: }
157: return $this;
158: }
159: }
160: