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 MandateApproval extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $mandateSignatureDate = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $mandateSignaturePlace = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $mandateSigned = null; |
30: | |
31: | |
32: | |
33: | |
34: | public function toObject() |
35: | { |
36: | $object = parent::toObject(); |
37: | if (!is_null($this->mandateSignatureDate)) { |
38: | $object->mandateSignatureDate = $this->mandateSignatureDate; |
39: | } |
40: | if (!is_null($this->mandateSignaturePlace)) { |
41: | $object->mandateSignaturePlace = $this->mandateSignaturePlace; |
42: | } |
43: | if (!is_null($this->mandateSigned)) { |
44: | $object->mandateSigned = $this->mandateSigned; |
45: | } |
46: | return $object; |
47: | } |
48: | |
49: | |
50: | |
51: | |
52: | |
53: | |
54: | public function fromObject($object) |
55: | { |
56: | parent::fromObject($object); |
57: | if (property_exists($object, 'mandateSignatureDate')) { |
58: | $this->mandateSignatureDate = $object->mandateSignatureDate; |
59: | } |
60: | if (property_exists($object, 'mandateSignaturePlace')) { |
61: | $this->mandateSignaturePlace = $object->mandateSignaturePlace; |
62: | } |
63: | if (property_exists($object, 'mandateSigned')) { |
64: | $this->mandateSigned = $object->mandateSigned; |
65: | } |
66: | return $this; |
67: | } |
68: | } |
69: | |