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