1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | namespace Worldline\Connect\Sdk\V1\Domain; |
7: | |
8: | use UnexpectedValueException; |
9: | use Worldline\Connect\Sdk\Domain\DataObject; |
10: | |
11: | |
12: | |
13: | |
14: | class DisputeReference extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $merchantOrderId = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $merchantReference = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $paymentReference = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $providerId = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $providerReference = null; |
40: | |
41: | |
42: | |
43: | |
44: | public function toObject() |
45: | { |
46: | $object = parent::toObject(); |
47: | if (!is_null($this->merchantOrderId)) { |
48: | $object->merchantOrderId = $this->merchantOrderId; |
49: | } |
50: | if (!is_null($this->merchantReference)) { |
51: | $object->merchantReference = $this->merchantReference; |
52: | } |
53: | if (!is_null($this->paymentReference)) { |
54: | $object->paymentReference = $this->paymentReference; |
55: | } |
56: | if (!is_null($this->providerId)) { |
57: | $object->providerId = $this->providerId; |
58: | } |
59: | if (!is_null($this->providerReference)) { |
60: | $object->providerReference = $this->providerReference; |
61: | } |
62: | return $object; |
63: | } |
64: | |
65: | |
66: | |
67: | |
68: | |
69: | |
70: | public function fromObject($object) |
71: | { |
72: | parent::fromObject($object); |
73: | if (property_exists($object, 'merchantOrderId')) { |
74: | $this->merchantOrderId = $object->merchantOrderId; |
75: | } |
76: | if (property_exists($object, 'merchantReference')) { |
77: | $this->merchantReference = $object->merchantReference; |
78: | } |
79: | if (property_exists($object, 'paymentReference')) { |
80: | $this->paymentReference = $object->paymentReference; |
81: | } |
82: | if (property_exists($object, 'providerId')) { |
83: | $this->providerId = $object->providerId; |
84: | } |
85: | if (property_exists($object, 'providerReference')) { |
86: | $this->providerReference = $object->providerReference; |
87: | } |
88: | return $this; |
89: | } |
90: | } |
91: | |