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 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getCustomerNo() |
||
74 | |||
75 | /** |
||
76 | * @param int $customerNo |
||
77 | * |
||
78 | * @return Customer |
||
79 | */ |
||
80 | 2 | public function withCustomerNo(int $customerNo) |
|
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getName() |
||
95 | |||
96 | /** |
||
97 | * @param string $name |
||
98 | * |
||
99 | * @return Customer |
||
100 | */ |
||
101 | 2 | public function withName(string $name) |
|
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | public function getNotes() |
||
116 | |||
117 | /** |
||
118 | * @param string $notes |
||
119 | * |
||
120 | * @return Customer |
||
121 | */ |
||
122 | 2 | public function withNotes(string $notes) |
|
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | public function getOrgNo() |
||
137 | |||
138 | /** |
||
139 | * @param string $orgNo |
||
140 | * |
||
141 | * @return Customer |
||
142 | */ |
||
143 | 2 | public function withOrgNo(string $orgNo) |
|
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | public function getVatNo() |
||
158 | |||
159 | /** |
||
160 | * @param string $vatNo |
||
161 | * |
||
162 | * @return Customer |
||
163 | */ |
||
164 | 2 | public function withVatNo(string $vatNo) |
|
171 | |||
172 | /** |
||
173 | * @return CustomerContact |
||
174 | */ |
||
175 | public function getContact() |
||
179 | |||
180 | /** |
||
181 | * @param CustomerContact $contact |
||
182 | * |
||
183 | * @return Customer |
||
184 | */ |
||
185 | 2 | public function withContact(CustomerContact $contact) |
|
192 | |||
193 | /** |
||
194 | * @return CustomerBillingAddress |
||
195 | */ |
||
196 | public function getAddress() |
||
200 | |||
201 | /** |
||
202 | * @param CustomerBillingAddress $address |
||
203 | * |
||
204 | * @return Customer |
||
205 | */ |
||
206 | 2 | public function withAddress(CustomerBillingAddress $address) |
|
213 | |||
214 | /** |
||
215 | * @return CustomerDeliveryAddress |
||
216 | */ |
||
217 | public function getDeliveryAddress() |
||
221 | |||
222 | /** |
||
223 | * @param CustomerDeliveryAddress $deliveryAddress |
||
224 | * |
||
225 | * @return Customer |
||
226 | */ |
||
227 | 2 | public function withDeliveryAddress(CustomerDeliveryAddress $deliveryAddress) |
|
234 | |||
235 | /** |
||
236 | * @return string |
||
237 | */ |
||
238 | public function getCompanyType() |
||
242 | |||
243 | /** |
||
244 | * @param string $companyType |
||
245 | * |
||
246 | * @return Customer |
||
247 | */ |
||
248 | 2 | public function withCompanyType(string $companyType) |
|
255 | |||
256 | /** |
||
257 | * @return \DateTime |
||
258 | */ |
||
259 | public function getCreatedAt(): \DateTime |
||
263 | |||
264 | /** |
||
265 | * @return \DateTime |
||
266 | */ |
||
267 | public function getUpdatedAt(): \DateTime |
||
271 | |||
272 | /** |
||
273 | * @param \DateTime $updatedAt |
||
274 | */ |
||
275 | public function setUpdatedAt(\DateTime $updatedAt) |
||
279 | |||
280 | 8 | public static function createFromArray(array $data): self |
|
309 | |||
310 | 4 | public function toArray() |
|
343 | } |
||
344 |