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 GetCustomerDetailsResponse extends DataObject |
15: | { |
16: | |
17: | |
18: | |
19: | public $city = null; |
20: | |
21: | |
22: | |
23: | |
24: | public $country = null; |
25: | |
26: | |
27: | |
28: | |
29: | public $emailAddress = null; |
30: | |
31: | |
32: | |
33: | |
34: | public $firstName = null; |
35: | |
36: | |
37: | |
38: | |
39: | public $fiscalNumber = null; |
40: | |
41: | |
42: | |
43: | |
44: | public $languageCode = null; |
45: | |
46: | |
47: | |
48: | |
49: | public $phoneNumber = null; |
50: | |
51: | |
52: | |
53: | |
54: | public $street = null; |
55: | |
56: | |
57: | |
58: | |
59: | public $surname = null; |
60: | |
61: | |
62: | |
63: | |
64: | public $zip = null; |
65: | |
66: | |
67: | |
68: | |
69: | public function toObject() |
70: | { |
71: | $object = parent::toObject(); |
72: | if (!is_null($this->city)) { |
73: | $object->city = $this->city; |
74: | } |
75: | if (!is_null($this->country)) { |
76: | $object->country = $this->country; |
77: | } |
78: | if (!is_null($this->emailAddress)) { |
79: | $object->emailAddress = $this->emailAddress; |
80: | } |
81: | if (!is_null($this->firstName)) { |
82: | $object->firstName = $this->firstName; |
83: | } |
84: | if (!is_null($this->fiscalNumber)) { |
85: | $object->fiscalNumber = $this->fiscalNumber; |
86: | } |
87: | if (!is_null($this->languageCode)) { |
88: | $object->languageCode = $this->languageCode; |
89: | } |
90: | if (!is_null($this->phoneNumber)) { |
91: | $object->phoneNumber = $this->phoneNumber; |
92: | } |
93: | if (!is_null($this->street)) { |
94: | $object->street = $this->street; |
95: | } |
96: | if (!is_null($this->surname)) { |
97: | $object->surname = $this->surname; |
98: | } |
99: | if (!is_null($this->zip)) { |
100: | $object->zip = $this->zip; |
101: | } |
102: | return $object; |
103: | } |
104: | |
105: | |
106: | |
107: | |
108: | |
109: | |
110: | public function fromObject($object) |
111: | { |
112: | parent::fromObject($object); |
113: | if (property_exists($object, 'city')) { |
114: | $this->city = $object->city; |
115: | } |
116: | if (property_exists($object, 'country')) { |
117: | $this->country = $object->country; |
118: | } |
119: | if (property_exists($object, 'emailAddress')) { |
120: | $this->emailAddress = $object->emailAddress; |
121: | } |
122: | if (property_exists($object, 'firstName')) { |
123: | $this->firstName = $object->firstName; |
124: | } |
125: | if (property_exists($object, 'fiscalNumber')) { |
126: | $this->fiscalNumber = $object->fiscalNumber; |
127: | } |
128: | if (property_exists($object, 'languageCode')) { |
129: | $this->languageCode = $object->languageCode; |
130: | } |
131: | if (property_exists($object, 'phoneNumber')) { |
132: | $this->phoneNumber = $object->phoneNumber; |
133: | } |
134: | if (property_exists($object, 'street')) { |
135: | $this->street = $object->street; |
136: | } |
137: | if (property_exists($object, 'surname')) { |
138: | $this->surname = $object->surname; |
139: | } |
140: | if (property_exists($object, 'zip')) { |
141: | $this->zip = $object->zip; |
142: | } |
143: | return $this; |
144: | } |
145: | } |
146: | |