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