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:
10: /**
11: * @package Worldline\Connect\Sdk\V1\Domain
12: */
13: class PaymentStatusOutput extends OrderStatusOutput
14: {
15: /**
16: * @var bool|null
17: */
18: public ?bool $isAuthorized = null;
19:
20: /**
21: * @var bool|null
22: */
23: public ?bool $isRefundable = null;
24:
25: /**
26: * @var string|null
27: */
28: public ?string $threeDSecureStatus = null;
29:
30: /**
31: * @return object
32: */
33: public function toObject(): object
34: {
35: $object = parent::toObject();
36: if (!is_null($this->isAuthorized)) {
37: $object->isAuthorized = $this->isAuthorized;
38: }
39: if (!is_null($this->isRefundable)) {
40: $object->isRefundable = $this->isRefundable;
41: }
42: if (!is_null($this->threeDSecureStatus)) {
43: $object->threeDSecureStatus = $this->threeDSecureStatus;
44: }
45: return $object;
46: }
47:
48: /**
49: * @param object $object
50: *
51: * @return $this
52: * @throws UnexpectedValueException
53: */
54: public function fromObject(object $object): PaymentStatusOutput
55: {
56: parent::fromObject($object);
57: if (property_exists($object, 'isAuthorized')) {
58: $this->isAuthorized = $object->isAuthorized;
59: }
60: if (property_exists($object, 'isRefundable')) {
61: $this->isRefundable = $object->isRefundable;
62: }
63: if (property_exists($object, 'threeDSecureStatus')) {
64: $this->threeDSecureStatus = $object->threeDSecureStatus;
65: }
66: return $this;
67: }
68: }
69: