1 | <?php |
||
4 | class Address implements \JsonSerializable |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * @var null|string |
||
9 | */ |
||
10 | protected $name; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $street; |
||
16 | |||
17 | /** |
||
18 | * @var null|string |
||
19 | */ |
||
20 | protected $additionalStreet; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $city; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $postalCode; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $state; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $country; |
||
41 | |||
42 | /** |
||
43 | * @var null|int |
||
44 | */ |
||
45 | protected $id; |
||
46 | |||
47 | /** |
||
48 | * Address constructor. |
||
49 | * |
||
50 | * @param string $street |
||
51 | * @param string $city |
||
52 | * @param string $postalCode |
||
53 | * @param string $state |
||
54 | * @param string $country |
||
55 | */ |
||
56 | 17 | public function __construct( |
|
69 | |||
70 | /** |
||
71 | * @param string $name |
||
72 | * @return \Kerox\Messenger\Model\Common\Address |
||
73 | */ |
||
74 | 4 | public function setName(string $name): Address |
|
80 | |||
81 | /** |
||
82 | * @return null|string |
||
83 | */ |
||
84 | 1 | public function getName() |
|
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | 3 | public function getStreet(): string |
|
96 | |||
97 | /** |
||
98 | * @param string $additionalStreet |
||
99 | * @return Address |
||
100 | */ |
||
101 | 14 | public function setAdditionalStreet(string $additionalStreet): Address |
|
107 | |||
108 | /** |
||
109 | * @return null|string |
||
110 | */ |
||
111 | 3 | public function getAdditionalStreet() |
|
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | */ |
||
119 | 3 | public function getCity(): string |
|
123 | |||
124 | /** |
||
125 | * @return string |
||
126 | */ |
||
127 | 3 | public function getPostalCode(): string |
|
131 | |||
132 | /** |
||
133 | * @return string |
||
134 | */ |
||
135 | 3 | public function getState(): string |
|
139 | |||
140 | /** |
||
141 | * @return string |
||
142 | */ |
||
143 | 3 | public function getCountry(): string |
|
147 | |||
148 | /** |
||
149 | * @param int $id |
||
150 | * @return Address |
||
151 | */ |
||
152 | 3 | public function setId(int $id) |
|
158 | |||
159 | /** |
||
160 | * @return null|int |
||
161 | */ |
||
162 | 1 | public function getId() |
|
166 | |||
167 | /** |
||
168 | * @return array |
||
169 | */ |
||
170 | 5 | public function jsonSerialize(): array |
|
185 | |||
186 | /** |
||
187 | * @param array $payload |
||
188 | * @return static |
||
189 | */ |
||
190 | 12 | public static function create(array $payload) |
|
208 | } |
||
209 |