1 | <?php |
||
5 | class Address implements \JsonSerializable |
||
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 | 16 | public function __construct( |
|
69 | |||
70 | /** |
||
71 | * @param string $name |
||
72 | * |
||
73 | * @return \Kerox\Messenger\Model\Common\Address |
||
74 | */ |
||
75 | 4 | public function setName(string $name): self |
|
81 | |||
82 | /** |
||
83 | * @return null|string |
||
84 | */ |
||
85 | 1 | public function getName(): ?string |
|
89 | |||
90 | /** |
||
91 | * @return string |
||
92 | */ |
||
93 | 3 | public function getStreet(): string |
|
97 | |||
98 | /** |
||
99 | * @param string $additionalStreet |
||
100 | * |
||
101 | * @return Address |
||
102 | */ |
||
103 | 13 | public function setAdditionalStreet(string $additionalStreet): self |
|
109 | |||
110 | /** |
||
111 | * @return null|string |
||
112 | */ |
||
113 | 3 | public function getAdditionalStreet(): ?string |
|
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | 3 | public function getCity(): string |
|
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | 3 | public function getPostalCode(): string |
|
133 | |||
134 | /** |
||
135 | * @return string |
||
136 | */ |
||
137 | 3 | public function getState(): string |
|
141 | |||
142 | /** |
||
143 | * @return string |
||
144 | */ |
||
145 | 3 | public function getCountry(): string |
|
149 | |||
150 | /** |
||
151 | * @param int $id |
||
152 | * |
||
153 | * @return Address |
||
154 | */ |
||
155 | 3 | public function setId(int $id): self |
|
161 | |||
162 | /** |
||
163 | * @return null|int |
||
164 | */ |
||
165 | 1 | public function getId(): ?int |
|
169 | |||
170 | /** |
||
171 | * @return array |
||
172 | */ |
||
173 | 4 | public function jsonSerialize(): array |
|
188 | |||
189 | /** |
||
190 | * @param array $payload |
||
191 | * |
||
192 | * @return static |
||
193 | */ |
||
194 | 12 | public static function create(array $payload) |
|
218 | } |
||
219 |