1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Getnet\API; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class Address |
7
|
|
|
* |
8
|
|
|
* @package Getnet\API |
9
|
|
|
*/ |
10
|
|
|
class Address implements \JsonSerializable |
11
|
|
|
{ |
12
|
|
|
/** @var */ |
13
|
|
|
private $city; |
14
|
|
|
|
15
|
|
|
/** @var */ |
16
|
|
|
private $complement; |
17
|
|
|
|
18
|
|
|
/** @var */ |
19
|
|
|
private $country; |
20
|
|
|
|
21
|
|
|
/** @var */ |
22
|
|
|
private $district; |
23
|
|
|
|
24
|
|
|
/** @var */ |
25
|
|
|
private $number; |
26
|
|
|
|
27
|
|
|
/** @var */ |
28
|
|
|
private $postal_code; |
29
|
|
|
|
30
|
|
|
/** @var */ |
31
|
|
|
private $state; |
32
|
|
|
|
33
|
|
|
/** @var */ |
34
|
|
|
private $street; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @return array|mixed |
38
|
|
|
*/ |
39
|
|
|
public function jsonSerialize() |
40
|
|
|
{ |
41
|
|
|
return get_object_vars($this); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* |
46
|
|
|
* @return mixed |
47
|
|
|
*/ |
48
|
|
|
public function getCity() |
49
|
|
|
{ |
50
|
|
|
return $this->city; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param $city |
55
|
|
|
* @return $this |
56
|
|
|
*/ |
57
|
|
|
public function setCity($city) |
58
|
|
|
{ |
59
|
|
|
$this->city = (string)$city; |
60
|
|
|
|
61
|
|
|
return $this; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* |
66
|
|
|
* @return mixed |
67
|
|
|
*/ |
68
|
|
|
public function getComplement() |
69
|
|
|
{ |
70
|
|
|
return $this->complement; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @param $complement |
75
|
|
|
* @return $this |
76
|
|
|
*/ |
77
|
|
|
public function setComplement($complement) |
78
|
|
|
{ |
79
|
|
|
$this->complement = (string)$complement; |
80
|
|
|
|
81
|
|
|
return $this; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* |
86
|
|
|
* @return mixed |
87
|
|
|
*/ |
88
|
|
|
public function getCountry() |
89
|
|
|
{ |
90
|
|
|
return $this->country; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @param $country |
95
|
|
|
* @return $this |
96
|
|
|
*/ |
97
|
|
|
public function setCountry($country) |
98
|
|
|
{ |
99
|
|
|
$this->country = (string)$country; |
100
|
|
|
|
101
|
|
|
return $this; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* |
106
|
|
|
* @return mixed |
107
|
|
|
*/ |
108
|
|
|
public function getDistrict() |
109
|
|
|
{ |
110
|
|
|
return $this->district; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @param $district |
115
|
|
|
* @return $this |
116
|
|
|
*/ |
117
|
|
|
public function setDistrict($district) |
118
|
|
|
{ |
119
|
|
|
$this->district = (string)$district; |
120
|
|
|
|
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return mixed |
126
|
|
|
*/ |
127
|
|
|
public function getNumber() |
128
|
|
|
{ |
129
|
|
|
return $this->number; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param $number |
134
|
|
|
* @return $this |
135
|
|
|
*/ |
136
|
|
|
public function setNumber($number) |
137
|
|
|
{ |
138
|
|
|
$this->number = (string)$number; |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* |
145
|
|
|
* @return mixed |
146
|
|
|
*/ |
147
|
|
|
public function getPostalCode() |
148
|
|
|
{ |
149
|
|
|
return $this->postal_code; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* @param $postal_code |
154
|
|
|
* @return $this |
155
|
|
|
*/ |
156
|
|
|
public function setPostalCode($postal_code) |
157
|
|
|
{ |
158
|
|
|
$this->postal_code = (string)$postal_code; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return mixed |
165
|
|
|
*/ |
166
|
|
|
public function getState() |
167
|
|
|
{ |
168
|
|
|
return $this->state; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param $state |
173
|
|
|
* @return $this |
174
|
|
|
*/ |
175
|
|
|
public function setState($state) |
176
|
|
|
{ |
177
|
|
|
$this->state = (string)$state; |
178
|
|
|
|
179
|
|
|
return $this; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* @return mixed |
184
|
|
|
*/ |
185
|
|
|
public function getStreet() |
186
|
|
|
{ |
187
|
|
|
return $this->street; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @param $street |
192
|
|
|
* @return $this |
193
|
|
|
*/ |
194
|
|
|
public function setStreet($street) |
195
|
|
|
{ |
196
|
|
|
$this->street = (string)$street; |
197
|
|
|
|
198
|
|
|
return $this; |
199
|
|
|
} |
200
|
|
|
} |
201
|
|
|
|