1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Neta\Shopware\SDK\Entity. |
4
|
|
|
* |
5
|
|
|
* Copyright 2016 LeadCommerce |
6
|
|
|
* |
7
|
|
|
* @author Alexander Mahrt <[email protected]> |
8
|
|
|
* @copyright 2016 LeadCommerce <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Neta\Shopware\SDK\Entity; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class Address. |
15
|
|
|
*/ |
16
|
|
|
class Address extends Base |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
*/ |
21
|
|
|
protected $id; |
22
|
|
|
/** |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
protected $company; |
26
|
|
|
/** |
27
|
|
|
* @var string |
28
|
|
|
*/ |
29
|
|
|
protected $department; |
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
protected $salutation; |
34
|
|
|
/** |
35
|
|
|
* @var string |
36
|
|
|
*/ |
37
|
|
|
protected $firstname; |
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $lastname; |
42
|
|
|
/** |
43
|
|
|
* @var string |
44
|
|
|
*/ |
45
|
|
|
protected $street; |
46
|
|
|
/** |
47
|
|
|
* @var string |
48
|
|
|
*/ |
49
|
|
|
protected $zipcode; |
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
*/ |
53
|
|
|
protected $city; |
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
protected $phone; |
58
|
|
|
/** |
59
|
|
|
* @var int |
60
|
|
|
*/ |
61
|
|
|
protected $vatId; |
62
|
|
|
/** |
63
|
|
|
* @var string |
64
|
|
|
*/ |
65
|
|
|
protected $additionalAddressLine1; |
66
|
|
|
/** |
67
|
|
|
* @var string |
68
|
|
|
*/ |
69
|
|
|
protected $additionalAddressLine2; |
70
|
|
|
/** |
71
|
|
|
* @var int |
72
|
|
|
*/ |
73
|
|
|
protected $country; |
74
|
|
|
/** |
75
|
|
|
* @var int |
76
|
|
|
*/ |
77
|
|
|
protected $state; |
78
|
|
|
/** |
79
|
|
|
* @var array |
80
|
|
|
*/ |
81
|
|
|
protected $attribute; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return int |
85
|
|
|
*/ |
86
|
|
|
public function getId() |
87
|
|
|
{ |
88
|
|
|
return $this->id; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param int $id |
93
|
|
|
* |
94
|
|
|
* @return Address |
95
|
|
|
*/ |
96
|
|
|
public function setId($id) |
97
|
|
|
{ |
98
|
|
|
$this->id = $id; |
99
|
|
|
|
100
|
|
|
return $this; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return string |
105
|
|
|
*/ |
106
|
|
|
public function getCompany() |
107
|
|
|
{ |
108
|
|
|
return $this->company; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @param string $company |
113
|
|
|
* |
114
|
|
|
* @return Address |
115
|
|
|
*/ |
116
|
|
|
public function setCompany($company) |
117
|
|
|
{ |
118
|
|
|
$this->company = $company; |
119
|
|
|
|
120
|
|
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return string |
125
|
|
|
*/ |
126
|
|
|
public function getDepartment() |
127
|
|
|
{ |
128
|
|
|
return $this->department; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param string $department |
133
|
|
|
* |
134
|
|
|
* @return Address |
135
|
|
|
*/ |
136
|
|
|
public function setDepartment($department) |
137
|
|
|
{ |
138
|
|
|
$this->department = $department; |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return string |
145
|
|
|
*/ |
146
|
|
|
public function getSalutation() |
147
|
|
|
{ |
148
|
|
|
return $this->salutation; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @param string $salutation |
153
|
|
|
* |
154
|
|
|
* @return Address |
155
|
|
|
*/ |
156
|
|
|
public function setSalutation($salutation) |
157
|
|
|
{ |
158
|
|
|
$this->salutation = $salutation; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return string |
165
|
|
|
*/ |
166
|
|
|
public function getFirstname() |
167
|
|
|
{ |
168
|
|
|
return $this->firstname; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param string $firstname |
173
|
|
|
* |
174
|
|
|
* @return Address |
175
|
|
|
*/ |
176
|
|
|
public function setFirstname($firstname) |
177
|
|
|
{ |
178
|
|
|
$this->firstname = $firstname; |
179
|
|
|
|
180
|
|
|
return $this; |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @return string |
185
|
|
|
*/ |
186
|
|
|
public function getLastname() |
187
|
|
|
{ |
188
|
|
|
return $this->lastname; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @param string $lastname |
193
|
|
|
* |
194
|
|
|
* @return Address |
195
|
|
|
*/ |
196
|
|
|
public function setLastname($lastname) |
197
|
|
|
{ |
198
|
|
|
$this->lastname = $lastname; |
199
|
|
|
|
200
|
|
|
return $this; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return string |
205
|
|
|
*/ |
206
|
|
|
public function getStreet() |
207
|
|
|
{ |
208
|
|
|
return $this->street; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @param string $street |
213
|
|
|
* |
214
|
|
|
* @return Address |
215
|
|
|
*/ |
216
|
|
|
public function setStreet($street) |
217
|
|
|
{ |
218
|
|
|
$this->street = $street; |
219
|
|
|
|
220
|
|
|
return $this; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* @return string |
225
|
|
|
*/ |
226
|
|
|
public function getZipcode() |
227
|
|
|
{ |
228
|
|
|
return $this->zipcode; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @param string $zipcode |
233
|
|
|
* |
234
|
|
|
* @return Address |
235
|
|
|
*/ |
236
|
|
|
public function setZipcode($zipcode) |
237
|
|
|
{ |
238
|
|
|
$this->zipcode = $zipcode; |
239
|
|
|
|
240
|
|
|
return $this; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @return string |
245
|
|
|
*/ |
246
|
|
|
public function getCity() |
247
|
|
|
{ |
248
|
|
|
return $this->city; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @param string $city |
253
|
|
|
* |
254
|
|
|
* @return Address |
255
|
|
|
*/ |
256
|
|
|
public function setCity($city) |
257
|
|
|
{ |
258
|
|
|
$this->city = $city; |
259
|
|
|
|
260
|
|
|
return $this; |
261
|
|
|
} |
262
|
|
|
|
263
|
|
|
/** |
264
|
|
|
* @return string |
265
|
|
|
*/ |
266
|
|
|
public function getPhone() |
267
|
|
|
{ |
268
|
|
|
return $this->phone; |
269
|
|
|
} |
270
|
|
|
|
271
|
|
|
/** |
272
|
|
|
* @param string $phone |
273
|
|
|
* |
274
|
|
|
* @return Address |
275
|
|
|
*/ |
276
|
|
|
public function setPhone($phone) |
277
|
|
|
{ |
278
|
|
|
$this->phone = $phone; |
279
|
|
|
|
280
|
|
|
return $this; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* @return int |
285
|
|
|
*/ |
286
|
|
|
public function getVatId() |
287
|
|
|
{ |
288
|
|
|
return $this->vatId; |
289
|
|
|
} |
290
|
|
|
|
291
|
|
|
/** |
292
|
|
|
* @param int $vatId |
293
|
|
|
* |
294
|
|
|
* @return Address |
295
|
|
|
*/ |
296
|
|
|
public function setVatId($vatId) |
297
|
|
|
{ |
298
|
|
|
$this->vatId = $vatId; |
299
|
|
|
|
300
|
|
|
return $this; |
301
|
|
|
} |
302
|
|
|
|
303
|
|
|
/** |
304
|
|
|
* @return string |
305
|
|
|
*/ |
306
|
|
|
public function getAdditionalAddressLine1() |
307
|
|
|
{ |
308
|
|
|
return $this->additionalAddressLine1; |
309
|
|
|
} |
310
|
|
|
|
311
|
|
|
/** |
312
|
|
|
* @param string $additionalAddressLine1 |
313
|
|
|
* |
314
|
|
|
* @return Address |
315
|
|
|
*/ |
316
|
|
|
public function setAdditionalAddressLine1($additionalAddressLine1) |
317
|
|
|
{ |
318
|
|
|
$this->additionalAddressLine1 = $additionalAddressLine1; |
319
|
|
|
|
320
|
|
|
return $this; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* @return string |
325
|
|
|
*/ |
326
|
|
|
public function getAdditionalAddressLine2() |
327
|
|
|
{ |
328
|
|
|
return $this->additionalAddressLine2; |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* @param string $additionalAddressLine2 |
333
|
|
|
* |
334
|
|
|
* @return Address |
335
|
|
|
*/ |
336
|
|
|
public function setAdditionalAddressLine2($additionalAddressLine2) |
337
|
|
|
{ |
338
|
|
|
$this->additionalAddressLine2 = $additionalAddressLine2; |
339
|
|
|
|
340
|
|
|
return $this; |
341
|
|
|
} |
342
|
|
|
|
343
|
|
|
/** |
344
|
|
|
* @return int |
345
|
|
|
*/ |
346
|
|
|
public function getCountry() |
347
|
|
|
{ |
348
|
|
|
return $this->country; |
349
|
|
|
} |
350
|
|
|
|
351
|
|
|
/** |
352
|
|
|
* @param int $country |
353
|
|
|
* |
354
|
|
|
* @return Address |
355
|
|
|
*/ |
356
|
|
|
public function setCountry($country) |
357
|
|
|
{ |
358
|
|
|
$this->country = $country; |
359
|
|
|
|
360
|
|
|
return $this; |
361
|
|
|
} |
362
|
|
|
|
363
|
|
|
/** |
364
|
|
|
* @return int |
365
|
|
|
*/ |
366
|
|
|
public function getState() |
367
|
|
|
{ |
368
|
|
|
return $this->state; |
369
|
|
|
} |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* @param int $state |
373
|
|
|
* |
374
|
|
|
* @return Address |
375
|
|
|
*/ |
376
|
|
|
public function setState($state) |
377
|
|
|
{ |
378
|
|
|
$this->state = $state; |
379
|
|
|
|
380
|
|
|
return $this; |
381
|
|
|
} |
382
|
|
|
|
383
|
|
|
/** |
384
|
|
|
* @return array |
385
|
|
|
*/ |
386
|
|
|
public function getAttribute() |
387
|
|
|
{ |
388
|
|
|
return $this->attribute; |
389
|
|
|
} |
390
|
|
|
|
391
|
|
|
/** |
392
|
|
|
* @param array $attribute |
393
|
|
|
* |
394
|
|
|
* @return Address |
395
|
|
|
*/ |
396
|
|
|
public function setAttribute($attribute) |
397
|
|
|
{ |
398
|
|
|
$this->attribute = $attribute; |
399
|
|
|
|
400
|
|
|
return $this; |
401
|
|
|
} |
402
|
|
|
} |
403
|
|
|
|