1: | <?php |
2: | |
3: | |
4: | |
5: | namespace Worldline\Acquiring\Sdk\V1\Domain; |
6: | |
7: | use UnexpectedValueException; |
8: | use Worldline\Acquiring\Sdk\Domain\DataObject; |
9: | |
10: | |
11: | |
12: | |
13: | class ApiReferencesForResponses extends DataObject |
14: | { |
15: | |
16: | |
17: | |
18: | public $paymentAccountReference = null; |
19: | |
20: | |
21: | |
22: | |
23: | public $retrievalReferenceNumber = null; |
24: | |
25: | |
26: | |
27: | |
28: | public $schemeTransactionId = null; |
29: | |
30: | |
31: | |
32: | |
33: | public function toObject() |
34: | { |
35: | $object = parent::toObject(); |
36: | if (!is_null($this->paymentAccountReference)) { |
37: | $object->paymentAccountReference = $this->paymentAccountReference; |
38: | } |
39: | if (!is_null($this->retrievalReferenceNumber)) { |
40: | $object->retrievalReferenceNumber = $this->retrievalReferenceNumber; |
41: | } |
42: | if (!is_null($this->schemeTransactionId)) { |
43: | $object->schemeTransactionId = $this->schemeTransactionId; |
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, 'paymentAccountReference')) { |
57: | $this->paymentAccountReference = $object->paymentAccountReference; |
58: | } |
59: | if (property_exists($object, 'retrievalReferenceNumber')) { |
60: | $this->retrievalReferenceNumber = $object->retrievalReferenceNumber; |
61: | } |
62: | if (property_exists($object, 'schemeTransactionId')) { |
63: | $this->schemeTransactionId = $object->schemeTransactionId; |
64: | } |
65: | return $this; |
66: | } |
67: | } |
68: | |