1<?php
2/**
3 * Copyright since 2007 PrestaShop SA and Contributors
4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
5 *
6 * NOTICE OF LICENSE
7 *
8 * This source file is subject to the Open Software License (OSL 3.0)
9 * that is bundled with this package in the file LICENSE.md.
10 * It is also available through the world-wide-web at this URL:
11 * https://opensource.org/licenses/OSL-3.0
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@prestashop.com so we can send you a copy immediately.
15 *
16 * DISCLAIMER
17 *
18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
19 * versions in the future. If you wish to customize PrestaShop for your
20 * needs please refer to https://devdocs.prestashop.com/ for more information.
21 *
22 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
23 * @copyright Since 2007 PrestaShop SA and Contributors
24 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25 */
26
27namespace PrestaShop\PrestaShop\Core\Domain\Address\QueryResult;
28
29use PrestaShop\PrestaShop\Core\Domain\Address\ValueObject\AddressId;
30use PrestaShop\PrestaShop\Core\Domain\Country\ValueObject\CountryId;
31use PrestaShop\PrestaShop\Core\Domain\Customer\ValueObject\CustomerId;
32use PrestaShop\PrestaShop\Core\Domain\State\ValueObject\StateId;
33
34/**
35 * Transfers customer address data for editing
36 */
37class EditableCustomerAddress
38{
39    /**
40     * @var AddressId
41     */
42    private $addressId;
43
44    /**
45     * @var CustomerId
46     */
47    private $customerId;
48
49    /**
50     * @var string
51     */
52    private $customerEmail;
53
54    /**
55     * @var string
56     */
57    private $addressAlias;
58
59    /**
60     * @var string
61     */
62    private $firstName;
63
64    /**
65     * @var string
66     */
67    private $lastName;
68
69    /**
70     * @var string
71     */
72    private $address;
73
74    /**
75     * @var string
76     */
77    private $city;
78
79    /**
80     * @var CountryId
81     */
82    private $countryId;
83
84    /**
85     * @var string|null
86     */
87    private $postCode;
88
89    /**
90     * @var string|null
91     */
92    private $dni;
93
94    /**
95     * @var string|null
96     */
97    private $company;
98
99    /**
100     * @var string|null
101     */
102    private $vatNumber;
103
104    /**
105     * @var string|null
106     */
107    private $address2;
108
109    /**
110     * @var StateId|null
111     */
112    private $stateId;
113
114    /**
115     * @var string|null
116     */
117    private $homePhone;
118
119    /**
120     * @var string|null
121     */
122    private $mobilePhone;
123
124    /**
125     * @var string|null
126     */
127    private $other;
128
129    /**
130     * @var string[]
131     */
132    private $requiredFields;
133
134    /**
135     * @param AddressId $addressId
136     * @param CustomerId $customerId
137     * @param string $customerEmail
138     * @param string $addressAlias
139     * @param string $firstName
140     * @param string $lastName
141     * @param string $address
142     * @param string $city
143     * @param CountryId $countryId
144     * @param string $postCode
145     * @param string $dni
146     * @param string $company
147     * @param string $vatNumber
148     * @param string $address2
149     * @param StateId $stateId
150     * @param string $homePhone
151     * @param string $mobilePhone
152     * @param string $other
153     * @param string[] $requiredFields
154     */
155    public function __construct(
156        AddressId $addressId,
157        CustomerId $customerId,
158        string $customerEmail,
159        string $addressAlias,
160        string $firstName,
161        string $lastName,
162        string $address,
163        string $city,
164        CountryId $countryId,
165        string $postCode,
166        string $dni,
167        string $company,
168        string $vatNumber,
169        string $address2,
170        StateId $stateId,
171        string $homePhone,
172        string $mobilePhone,
173        string $other,
174        array $requiredFields
175    ) {
176        $this->addressId = $addressId;
177        $this->customerId = $customerId;
178        $this->customerEmail = $customerEmail;
179        $this->addressAlias = $addressAlias;
180        $this->firstName = $firstName;
181        $this->lastName = $lastName;
182        $this->address = $address;
183        $this->city = $city;
184        $this->countryId = $countryId;
185        $this->postCode = $postCode;
186        $this->dni = $dni;
187        $this->company = $company;
188        $this->vatNumber = $vatNumber;
189        $this->address2 = $address2;
190        $this->stateId = $stateId;
191        $this->homePhone = $homePhone;
192        $this->mobilePhone = $mobilePhone;
193        $this->other = $other;
194        $this->requiredFields = $requiredFields;
195    }
196
197    /**
198     * @return AddressId
199     */
200    public function getAddressId(): AddressId
201    {
202        return $this->addressId;
203    }
204
205    /**
206     * @return CustomerId
207     */
208    public function getCustomerId(): CustomerId
209    {
210        return $this->customerId;
211    }
212
213    /**
214     * @return string
215     */
216    public function getCustomerEmail(): string
217    {
218        return $this->customerEmail;
219    }
220
221    /**
222     * @return string
223     */
224    public function getAddressAlias(): string
225    {
226        return $this->addressAlias;
227    }
228
229    /**
230     * @return string
231     */
232    public function getFirstName(): string
233    {
234        return $this->firstName;
235    }
236
237    /**
238     * @return string
239     */
240    public function getLastName(): string
241    {
242        return $this->lastName;
243    }
244
245    /**
246     * @return string
247     */
248    public function getAddress(): string
249    {
250        return $this->address;
251    }
252
253    /**
254     * @return string
255     */
256    public function getCity(): string
257    {
258        return $this->city;
259    }
260
261    /**
262     * @return CountryId
263     */
264    public function getCountryId(): CountryId
265    {
266        return $this->countryId;
267    }
268
269    /**
270     * @return string[]
271     */
272    public function getRequiredFields(): array
273    {
274        return $this->requiredFields;
275    }
276
277    /**
278     * @return string|null
279     */
280    public function getPostCode(): ?string
281    {
282        return $this->postCode;
283    }
284
285    /**
286     * @return string|null
287     */
288    public function getDni(): ?string
289    {
290        return $this->dni;
291    }
292
293    /**
294     * @return string|null
295     */
296    public function getCompany(): ?string
297    {
298        return $this->company;
299    }
300
301    /**
302     * @return string|null
303     */
304    public function getVatNumber(): ?string
305    {
306        return $this->vatNumber;
307    }
308
309    /**
310     * @return string|null
311     */
312    public function getAddress2(): ?string
313    {
314        return $this->address2;
315    }
316
317    /**
318     * @return StateId|null
319     */
320    public function getStateId(): ?StateId
321    {
322        return $this->stateId;
323    }
324
325    /**
326     * @return string|null
327     */
328    public function getHomePhone(): ?string
329    {
330        return $this->homePhone;
331    }
332
333    /**
334     * @return string|null
335     */
336    public function getMobilePhone(): ?string
337    {
338        return $this->mobilePhone;
339    }
340
341    /**
342     * @return string|null
343     */
344    public function getOther(): ?string
345    {
346        return $this->other;
347    }
348}
349