1 | <?php |
||
10 | class Customer implements CreatableFromArray |
||
11 | { |
||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | private $customerNo; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $name; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $notes; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $orgNo; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $vatNo; |
||
36 | |||
37 | /** |
||
38 | * @var CustomerContact |
||
39 | */ |
||
40 | private $contact; |
||
41 | |||
42 | /** |
||
43 | * @var CustomerBillingAddress |
||
44 | */ |
||
45 | private $address; |
||
46 | |||
47 | /** |
||
48 | * @var CustomerDeliveryAddress |
||
49 | */ |
||
50 | private $deliveryAddress; |
||
51 | |||
52 | /** |
||
53 | * @var \DateTime |
||
54 | */ |
||
55 | private $createdAt; |
||
56 | |||
57 | /** |
||
58 | * @var \DateTime |
||
59 | */ |
||
60 | private $updatedAt; |
||
61 | |||
62 | /** |
||
63 | * @var string |
||
64 | */ |
||
65 | private $companyType; |
||
66 | |||
67 | 8 | public function __construct() |
|
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | public function getCustomerNo() |
||
78 | |||
79 | /** |
||
80 | * @param int $customerNo |
||
81 | * |
||
82 | * @return Customer |
||
83 | */ |
||
84 | 2 | public function withCustomerNo(int $customerNo) |
|
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getName() |
||
99 | |||
100 | /** |
||
101 | * @param string $name |
||
102 | * |
||
103 | * @return Customer |
||
104 | */ |
||
105 | 2 | public function withName(string $name) |
|
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getNotes() |
||
120 | |||
121 | /** |
||
122 | * @param string $notes |
||
123 | * |
||
124 | * @return Customer |
||
125 | */ |
||
126 | 2 | public function withNotes(string $notes) |
|
133 | |||
134 | /** |
||
135 | * @return string |
||
136 | */ |
||
137 | public function getOrgNo() |
||
141 | |||
142 | /** |
||
143 | * @param string $orgNo |
||
144 | * |
||
145 | * @return Customer |
||
146 | */ |
||
147 | 2 | public function withOrgNo(string $orgNo) |
|
154 | |||
155 | /** |
||
156 | * @return string |
||
157 | */ |
||
158 | public function getVatNo() |
||
162 | |||
163 | /** |
||
164 | * @param string $vatNo |
||
165 | * |
||
166 | * @return Customer |
||
167 | */ |
||
168 | 2 | public function withVatNo(string $vatNo) |
|
175 | |||
176 | /** |
||
177 | * @return CustomerContact |
||
178 | */ |
||
179 | public function getContact() |
||
183 | |||
184 | /** |
||
185 | * @param CustomerContact $contact |
||
186 | * |
||
187 | * @return Customer |
||
188 | */ |
||
189 | 2 | public function withContact(CustomerContact $contact) |
|
196 | |||
197 | /** |
||
198 | * @return CustomerBillingAddress |
||
199 | */ |
||
200 | public function getAddress() |
||
204 | |||
205 | /** |
||
206 | * @param CustomerBillingAddress $address |
||
207 | * |
||
208 | * @return Customer |
||
209 | */ |
||
210 | 2 | public function withAddress(CustomerBillingAddress $address) |
|
217 | |||
218 | /** |
||
219 | * @return CustomerDeliveryAddress |
||
220 | */ |
||
221 | public function getDeliveryAddress() |
||
225 | |||
226 | /** |
||
227 | * @param CustomerDeliveryAddress $deliveryAddress |
||
228 | * |
||
229 | * @return Customer |
||
230 | */ |
||
231 | 2 | public function withDeliveryAddress(CustomerDeliveryAddress $deliveryAddress) |
|
238 | |||
239 | /** |
||
240 | * @return string |
||
241 | */ |
||
242 | public function getCompanyType() |
||
246 | |||
247 | /** |
||
248 | * @param string $companyType |
||
249 | * |
||
250 | * @return Customer |
||
251 | */ |
||
252 | 2 | public function withCompanyType(string $companyType) |
|
259 | |||
260 | /** |
||
261 | * @return \DateTime |
||
262 | */ |
||
263 | public function getCreatedAt(): \DateTime |
||
267 | |||
268 | /** |
||
269 | * @return \DateTime |
||
270 | */ |
||
271 | public function getUpdatedAt(): \DateTime |
||
275 | |||
276 | /** |
||
277 | * @param \DateTime $updatedAt |
||
278 | */ |
||
279 | public function setUpdatedAt(\DateTime $updatedAt) |
||
283 | |||
284 | 8 | public static function createFromArray(array $data): Customer |
|
313 | |||
314 | 4 | public function toArray() |
|
344 | } |
||
345 |