1 | <?php |
||
4 | class Address implements \JsonSerializable |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | protected $street; |
||
11 | |||
12 | /** |
||
13 | * @var null|string |
||
14 | */ |
||
15 | protected $additionalStreet; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $city; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $postalCode; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $state; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $country; |
||
36 | |||
37 | /** |
||
38 | * @var null|int |
||
39 | */ |
||
40 | protected $id; |
||
41 | |||
42 | /** |
||
43 | * Address constructor. |
||
44 | * |
||
45 | * @param string $street |
||
46 | * @param string $city |
||
47 | * @param string $postalCode |
||
48 | * @param string $state |
||
49 | * @param string $country |
||
50 | */ |
||
51 | 11 | public function __construct( |
|
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public function getStreet(): string |
|
72 | |||
73 | /** |
||
74 | * @param string $additionalStreet |
||
75 | * @return Address |
||
76 | */ |
||
77 | 8 | public function setAdditionalStreet(string $additionalStreet): Address |
|
83 | |||
84 | /** |
||
85 | * @return null|string |
||
86 | */ |
||
87 | 1 | public function getAdditionalStreet() |
|
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | 1 | public function getCity(): string |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 1 | public function getPostalCode(): string |
|
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 1 | public function getState(): string |
|
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | */ |
||
119 | 1 | public function getCountry(): string |
|
123 | |||
124 | /** |
||
125 | * @param int $id |
||
126 | * @return Address |
||
127 | */ |
||
128 | 1 | public function setId(int $id) |
|
134 | |||
135 | /** |
||
136 | * @return null|int |
||
137 | */ |
||
138 | public function getId() |
||
142 | |||
143 | /** |
||
144 | * @return array |
||
145 | */ |
||
146 | 5 | public function jsonSerialize(): array |
|
160 | |||
161 | /** |
||
162 | * @param array $payload |
||
163 | * @return static |
||
164 | */ |
||
165 | 6 | public static function create(array $payload) |
|
179 | } |
||
180 |