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 PaymentReferences 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 $providerMerchantId = null; |
40: | |
41: | |
42: | |
43: | |
44: | public $providerReference = null; |
45: | |
46: | |
47: | |
48: | |
49: | public $referenceOrigPayment = null; |
50: | |
51: | |
52: | |
53: | |
54: | public function toObject() |
55: | { |
56: | $object = parent::toObject(); |
57: | if (!is_null($this->merchantOrderId)) { |
58: | $object->merchantOrderId = $this->merchantOrderId; |
59: | } |
60: | if (!is_null($this->merchantReference)) { |
61: | $object->merchantReference = $this->merchantReference; |
62: | } |
63: | if (!is_null($this->paymentReference)) { |
64: | $object->paymentReference = $this->paymentReference; |
65: | } |
66: | if (!is_null($this->providerId)) { |
67: | $object->providerId = $this->providerId; |
68: | } |
69: | if (!is_null($this->providerMerchantId)) { |
70: | $object->providerMerchantId = $this->providerMerchantId; |
71: | } |
72: | if (!is_null($this->providerReference)) { |
73: | $object->providerReference = $this->providerReference; |
74: | } |
75: | if (!is_null($this->referenceOrigPayment)) { |
76: | $object->referenceOrigPayment = $this->referenceOrigPayment; |
77: | } |
78: | return $object; |
79: | } |
80: | |
81: | |
82: | |
83: | |
84: | |
85: | |
86: | public function fromObject($object) |
87: | { |
88: | parent::fromObject($object); |
89: | if (property_exists($object, 'merchantOrderId')) { |
90: | $this->merchantOrderId = $object->merchantOrderId; |
91: | } |
92: | if (property_exists($object, 'merchantReference')) { |
93: | $this->merchantReference = $object->merchantReference; |
94: | } |
95: | if (property_exists($object, 'paymentReference')) { |
96: | $this->paymentReference = $object->paymentReference; |
97: | } |
98: | if (property_exists($object, 'providerId')) { |
99: | $this->providerId = $object->providerId; |
100: | } |
101: | if (property_exists($object, 'providerMerchantId')) { |
102: | $this->providerMerchantId = $object->providerMerchantId; |
103: | } |
104: | if (property_exists($object, 'providerReference')) { |
105: | $this->providerReference = $object->providerReference; |
106: | } |
107: | if (property_exists($object, 'referenceOrigPayment')) { |
108: | $this->referenceOrigPayment = $object->referenceOrigPayment; |
109: | } |
110: | return $this; |
111: | } |
112: | } |
113: | |