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