1 | <?php |
||
7 | class Address implements \JsonSerializable |
||
8 | { |
||
9 | /** |
||
10 | * @var null|string |
||
11 | */ |
||
12 | protected $name; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $street; |
||
18 | |||
19 | /** |
||
20 | * @var null|string |
||
21 | */ |
||
22 | protected $additionalStreet; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $city; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $postalCode; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $state; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $country; |
||
43 | |||
44 | /** |
||
45 | * @var null|int |
||
46 | */ |
||
47 | protected $id; |
||
48 | |||
49 | /** |
||
50 | * Address constructor. |
||
51 | * |
||
52 | * @param string $street |
||
53 | * @param string $city |
||
54 | * @param string $postalCode |
||
55 | * @param string $state |
||
56 | * @param string $country |
||
57 | */ |
||
58 | 16 | public function __construct( |
|
71 | |||
72 | /** |
||
73 | * @param string $name |
||
74 | * |
||
75 | * @return \Kerox\Messenger\Model\Common\Address |
||
76 | */ |
||
77 | 4 | public function setName(string $name): self |
|
83 | |||
84 | /** |
||
85 | * @return null|string |
||
86 | */ |
||
87 | 1 | public function getName(): ?string |
|
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | 3 | public function getStreet(): string |
|
99 | |||
100 | /** |
||
101 | * @param string $additionalStreet |
||
102 | * |
||
103 | * @return Address |
||
104 | */ |
||
105 | 13 | public function setAdditionalStreet(string $additionalStreet): self |
|
111 | |||
112 | /** |
||
113 | * @return null|string |
||
114 | */ |
||
115 | 3 | public function getAdditionalStreet(): ?string |
|
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | 3 | public function getCity(): string |
|
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | 3 | public function getPostalCode(): string |
|
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | 3 | public function getState(): string |
|
143 | |||
144 | /** |
||
145 | * @return string |
||
146 | */ |
||
147 | 3 | public function getCountry(): string |
|
151 | |||
152 | /** |
||
153 | * @param int $id |
||
154 | * |
||
155 | * @return Address |
||
156 | */ |
||
157 | 3 | public function setId(int $id): self |
|
163 | |||
164 | /** |
||
165 | * @return null|int |
||
166 | */ |
||
167 | 1 | public function getId(): ?int |
|
171 | |||
172 | /** |
||
173 | * @return array |
||
174 | */ |
||
175 | 4 | public function jsonSerialize(): array |
|
190 | |||
191 | /** |
||
192 | * @param array $payload |
||
193 | * |
||
194 | * @return static |
||
195 | */ |
||
196 | 12 | public static function create(array $payload) |
|
220 | } |
||
221 |