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 PointOfSaleData extends DataObject |
14: | { |
15: | |
16: | |
17: | |
18: | public $terminalId = null; |
19: | |
20: | |
21: | |
22: | |
23: | public function toObject() |
24: | { |
25: | $object = parent::toObject(); |
26: | if (!is_null($this->terminalId)) { |
27: | $object->terminalId = $this->terminalId; |
28: | } |
29: | return $object; |
30: | } |
31: | |
32: | |
33: | |
34: | |
35: | |
36: | |
37: | public function fromObject($object) |
38: | { |
39: | parent::fromObject($object); |
40: | if (property_exists($object, 'terminalId')) { |
41: | $this->terminalId = $object->terminalId; |
42: | } |
43: | return $this; |
44: | } |
45: | } |
46: | |