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 ApiAccountVerificationResponse extends DataObject
14: {
15: /**
16: * @var string
17: */
18: public $authorizationCode = null;
19:
20: /**
21: * @var CardPaymentDataForResponse
22: */
23: public $cardPaymentData = null;
24:
25: /**
26: * @var string
27: */
28: public $operationId = null;
29:
30: /**
31: * @var ApiReferencesForResponses
32: */
33: public $references = null;
34:
35: /**
36: * @var string
37: */
38: public $responder = null;
39:
40: /**
41: * @var string
42: */
43: public $responseCode = null;
44:
45: /**
46: * @var string
47: */
48: public $responseCodeCategory = null;
49:
50: /**
51: * @var string
52: */
53: public $responseCodeDescription = null;
54:
55: /**
56: * @return object
57: */
58: public function toObject()
59: {
60: $object = parent::toObject();
61: if (!is_null($this->authorizationCode)) {
62: $object->authorizationCode = $this->authorizationCode;
63: }
64: if (!is_null($this->cardPaymentData)) {
65: $object->cardPaymentData = $this->cardPaymentData->toObject();
66: }
67: if (!is_null($this->operationId)) {
68: $object->operationId = $this->operationId;
69: }
70: if (!is_null($this->references)) {
71: $object->references = $this->references->toObject();
72: }
73: if (!is_null($this->responder)) {
74: $object->responder = $this->responder;
75: }
76: if (!is_null($this->responseCode)) {
77: $object->responseCode = $this->responseCode;
78: }
79: if (!is_null($this->responseCodeCategory)) {
80: $object->responseCodeCategory = $this->responseCodeCategory;
81: }
82: if (!is_null($this->responseCodeDescription)) {
83: $object->responseCodeDescription = $this->responseCodeDescription;
84: }
85: return $object;
86: }
87:
88: /**
89: * @param object $object
90: * @return $this
91: * @throws UnexpectedValueException
92: */
93: public function fromObject($object)
94: {
95: parent::fromObject($object);
96: if (property_exists($object, 'authorizationCode')) {
97: $this->authorizationCode = $object->authorizationCode;
98: }
99: if (property_exists($object, 'cardPaymentData')) {
100: if (!is_object($object->cardPaymentData)) {
101: throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentData, true) . '\' is not an object');
102: }
103: $value = new CardPaymentDataForResponse();
104: $this->cardPaymentData = $value->fromObject($object->cardPaymentData);
105: }
106: if (property_exists($object, 'operationId')) {
107: $this->operationId = $object->operationId;
108: }
109: if (property_exists($object, 'references')) {
110: if (!is_object($object->references)) {
111: throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object');
112: }
113: $value = new ApiReferencesForResponses();
114: $this->references = $value->fromObject($object->references);
115: }
116: if (property_exists($object, 'responder')) {
117: $this->responder = $object->responder;
118: }
119: if (property_exists($object, 'responseCode')) {
120: $this->responseCode = $object->responseCode;
121: }
122: if (property_exists($object, 'responseCodeCategory')) {
123: $this->responseCodeCategory = $object->responseCodeCategory;
124: }
125: if (property_exists($object, 'responseCodeDescription')) {
126: $this->responseCodeDescription = $object->responseCodeDescription;
127: }
128: return $this;
129: }
130: }
131: