1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | |
10: | |
11: | |
12: | |
13: | class PaymentStatusOutput extends OrderStatusOutput |
14: | { |
15: | |
16: | |
17: | |
18: | public $isAuthorized = null; |
19: | |
20: | |
21: | |
22: | |
23: | public $isRefundable = null; |
24: | |
25: | |
26: | |
27: | |
28: | public $threeDSecureStatus = null; |
29: | |
30: | |
31: | |
32: | |
33: | public function toObject() |
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: | |
50: | |
51: | |
52: | |
53: | public function fromObject($object) |
54: | { |
55: | parent::fromObject($object); |
56: | if (property_exists($object, 'isAuthorized')) { |
57: | $this->isAuthorized = $object->isAuthorized; |
58: | } |
59: | if (property_exists($object, 'isRefundable')) { |
60: | $this->isRefundable = $object->isRefundable; |
61: | } |
62: | if (property_exists($object, 'threeDSecureStatus')) { |
63: | $this->threeDSecureStatus = $object->threeDSecureStatus; |
64: | } |
65: | return $this; |
66: | } |
67: | } |
68: | |