1 | <?php |
||
7 | class Address implements \JsonSerializable |
||
8 | { |
||
9 | /** |
||
10 | * @var string|null |
||
11 | */ |
||
12 | protected $name; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $street; |
||
18 | |||
19 | /** |
||
20 | * @var string|null |
||
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 int|null |
||
46 | */ |
||
47 | protected $id; |
||
48 | |||
49 | /** |
||
50 | * Address constructor. |
||
51 | */ |
||
52 | 10 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * @return \Kerox\Messenger\Model\Common\Address |
||
68 | */ |
||
69 | 6 | public static function create( |
|
78 | |||
79 | /** |
||
80 | * @return \Kerox\Messenger\Model\Common\Address |
||
81 | */ |
||
82 | 2 | public function setName(string $name): self |
|
88 | |||
89 | 1 | public function getName(): ?string |
|
93 | |||
94 | 3 | public function getStreet(): string |
|
98 | |||
99 | /** |
||
100 | * @return Address |
||
101 | */ |
||
102 | 5 | public function setAdditionalStreet(string $additionalStreet): self |
|
108 | |||
109 | 3 | public function getAdditionalStreet(): ?string |
|
113 | |||
114 | 3 | public function getCity(): string |
|
118 | |||
119 | 3 | public function getPostalCode(): string |
|
123 | |||
124 | 3 | public function getState(): string |
|
128 | |||
129 | 3 | public function getCountry(): string |
|
133 | |||
134 | /** |
||
135 | * @return Address |
||
136 | */ |
||
137 | 2 | public function setId(int $id): self |
|
143 | |||
144 | 1 | public function getId(): ?int |
|
148 | |||
149 | 6 | public function toArray(): array |
|
164 | |||
165 | 6 | public function jsonSerialize(): array |
|
169 | |||
170 | /** |
||
171 | * @return \Kerox\Messenger\Model\Common\Address |
||
172 | */ |
||
173 | 3 | public static function fromPayload(array $payload): self |
|
197 | } |
||
198 |