|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Shipment; |
|
6
|
|
|
|
|
7
|
|
|
use VasilDakov\Speedy\Speedy; |
|
8
|
|
|
use VasilDakov\Speedy\Model\CountryCode; |
|
9
|
|
|
use VasilDakov\Speedy\ToArray; |
|
10
|
|
|
use JMS\Serializer\Annotation as Serializer; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* Class ShipmentAddress |
|
14
|
|
|
* |
|
15
|
|
|
* @author Valentin Valkanov <[email protected]> |
|
16
|
|
|
* @author Vasil Dakov <[email protected]> |
|
17
|
|
|
* @copyright |
|
18
|
|
|
* @version |
|
19
|
|
|
* @Serializer\AccessType("public_method") |
|
20
|
|
|
*/ |
|
21
|
|
|
class ShipmentAddress |
|
22
|
|
|
{ |
|
23
|
|
|
use ToArray; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @var int|null |
|
27
|
|
|
* @Serializer\Type("integer") |
|
28
|
|
|
*/ |
|
29
|
|
|
private ?int $countryId = null; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* @var string|null |
|
33
|
|
|
* @Serializer\Type("string") |
|
34
|
|
|
*/ |
|
35
|
|
|
private ?string $stateId = null; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @var int |
|
39
|
|
|
* @Serializer\Type("integer") |
|
40
|
|
|
*/ |
|
41
|
|
|
private int $siteId; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @var string|null |
|
45
|
|
|
* @Serializer\Type("string") |
|
46
|
|
|
*/ |
|
47
|
|
|
private ?string $siteType = null; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @var string|null |
|
51
|
|
|
* @Serializer\Type("string") |
|
52
|
|
|
*/ |
|
53
|
|
|
private ?string $siteName = null; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @var string|null |
|
57
|
|
|
* @Serializer\Type("string") |
|
58
|
|
|
*/ |
|
59
|
|
|
private ?string $postCode = null; |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @var int|null |
|
63
|
|
|
* @Serializer\Type("integer") |
|
64
|
|
|
*/ |
|
65
|
|
|
private ?int $streetId = null; |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @var string|null |
|
69
|
|
|
* @Serializer\Type("string") |
|
70
|
|
|
*/ |
|
71
|
|
|
private ?string $streetType = null; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @var string|null |
|
75
|
|
|
* @Serializer\Type("string") |
|
76
|
|
|
*/ |
|
77
|
|
|
private ?string $streetName = null; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @var string|null |
|
81
|
|
|
* @Serializer\Type("string") |
|
82
|
|
|
*/ |
|
83
|
|
|
private ?string $streetNo = null; |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @var int|null |
|
87
|
|
|
* @Serializer\Type("integer") |
|
88
|
|
|
*/ |
|
89
|
|
|
private ?int $complexId = null; |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @var string|null |
|
93
|
|
|
* @Serializer\Type("string") |
|
94
|
|
|
*/ |
|
95
|
|
|
private ?string $complexType = null; |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* @var string|null |
|
99
|
|
|
* @Serializer\Type("string") |
|
100
|
|
|
*/ |
|
101
|
|
|
private ?string $complexName = null; |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @var string|null |
|
105
|
|
|
* @Serializer\Type("string") |
|
106
|
|
|
*/ |
|
107
|
|
|
private ?string $blockNo = null; |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* @var string|null |
|
111
|
|
|
* @Serializer\Type("string") |
|
112
|
|
|
*/ |
|
113
|
|
|
private ?string $entranceNo = null; |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @var string|null |
|
117
|
|
|
* @Serializer\Type("string") |
|
118
|
|
|
*/ |
|
119
|
|
|
private ?string $floorNo = null; |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* @var string|null |
|
123
|
|
|
* @Serializer\Type("string") |
|
124
|
|
|
*/ |
|
125
|
|
|
private ?string $apartmentNo = null; |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* @var int|null |
|
129
|
|
|
* @Serializer\Type("integer") |
|
130
|
|
|
*/ |
|
131
|
|
|
private ?int $poiId = null; |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* @var string|null |
|
135
|
|
|
* @Serializer\Type("string") |
|
136
|
|
|
*/ |
|
137
|
|
|
private ?string $addressNote = null; |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* @var string|null |
|
141
|
|
|
* @Serializer\Type("string") |
|
142
|
|
|
*/ |
|
143
|
|
|
private ?string $addressLine1 = null; |
|
144
|
|
|
|
|
145
|
|
|
/** |
|
146
|
|
|
* @var string|null |
|
147
|
|
|
* @Serializer\Type("string") |
|
148
|
|
|
*/ |
|
149
|
|
|
private ?string $addressLine2 = null; |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* @var float|null |
|
153
|
|
|
* @Serializer\Type("float") |
|
154
|
|
|
*/ |
|
155
|
|
|
private ?float $x = null; |
|
156
|
|
|
|
|
157
|
|
|
/** |
|
158
|
|
|
* @var float|null |
|
159
|
|
|
* @Serializer\Type("float") |
|
160
|
|
|
*/ |
|
161
|
|
|
private ?float $y = null; |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* @param int $siteId |
|
165
|
|
|
*/ |
|
166
|
1 |
|
public function __construct(int $siteId) |
|
167
|
|
|
{ |
|
168
|
1 |
|
$this->siteId = $siteId; |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* @return int |
|
173
|
|
|
*/ |
|
174
|
1 |
|
public function getCountryId(): int |
|
175
|
|
|
{ |
|
176
|
1 |
|
return $this->countryId; |
|
|
|
|
|
|
177
|
|
|
} |
|
178
|
|
|
|
|
179
|
|
|
/** |
|
180
|
|
|
* @param int $countryId |
|
181
|
|
|
*/ |
|
182
|
2 |
|
public function setCountryId(int $countryId): void |
|
183
|
|
|
{ |
|
184
|
2 |
|
$this->countryId = $countryId; |
|
185
|
|
|
} |
|
186
|
|
|
|
|
187
|
|
|
/** |
|
188
|
|
|
* @return string|null |
|
189
|
|
|
*/ |
|
190
|
1 |
|
public function getStateId(): ?string |
|
191
|
|
|
{ |
|
192
|
1 |
|
return $this->stateId; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
/** |
|
196
|
|
|
* @param string $stateId |
|
197
|
|
|
* @return self |
|
198
|
|
|
*/ |
|
199
|
2 |
|
public function setStateId(string $stateId): self |
|
200
|
|
|
{ |
|
201
|
2 |
|
$this->stateId = $stateId; |
|
202
|
|
|
|
|
203
|
2 |
|
return $this; |
|
204
|
|
|
} |
|
205
|
|
|
|
|
206
|
|
|
/** |
|
207
|
|
|
* @return int|null |
|
208
|
|
|
*/ |
|
209
|
1 |
|
public function getSiteId(): ?int |
|
210
|
|
|
{ |
|
211
|
1 |
|
return $this->siteId; |
|
212
|
|
|
} |
|
213
|
|
|
|
|
214
|
|
|
/** |
|
215
|
|
|
* @param int $siteId |
|
216
|
|
|
*/ |
|
217
|
2 |
|
public function setSiteId(int $siteId): void |
|
218
|
|
|
{ |
|
219
|
2 |
|
$this->siteId = $siteId; |
|
220
|
|
|
} |
|
221
|
|
|
|
|
222
|
|
|
/** |
|
223
|
|
|
* @return string|null |
|
224
|
|
|
*/ |
|
225
|
1 |
|
public function getSiteType(): ?string |
|
226
|
|
|
{ |
|
227
|
1 |
|
return $this->siteType; |
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
/** |
|
231
|
|
|
* @param string $siteType |
|
232
|
|
|
*/ |
|
233
|
2 |
|
public function setSiteType(string $siteType): void |
|
234
|
|
|
{ |
|
235
|
2 |
|
$this->siteType = $siteType; |
|
236
|
|
|
} |
|
237
|
|
|
|
|
238
|
|
|
/** |
|
239
|
|
|
* @return string|null |
|
240
|
|
|
*/ |
|
241
|
2 |
|
public function getSiteName(): ?string |
|
242
|
|
|
{ |
|
243
|
2 |
|
return $this->siteName; |
|
244
|
|
|
} |
|
245
|
|
|
|
|
246
|
|
|
/** |
|
247
|
|
|
* @param string $siteName |
|
248
|
|
|
*/ |
|
249
|
4 |
|
public function setSiteName(string $siteName): void |
|
250
|
|
|
{ |
|
251
|
4 |
|
$this->siteName = $siteName; |
|
252
|
|
|
} |
|
253
|
|
|
|
|
254
|
|
|
/** |
|
255
|
|
|
* @return string|null |
|
256
|
|
|
*/ |
|
257
|
1 |
|
public function getPostCode(): ?string |
|
258
|
|
|
{ |
|
259
|
1 |
|
return $this->postCode; |
|
260
|
|
|
} |
|
261
|
|
|
|
|
262
|
|
|
/** |
|
263
|
|
|
* @param string $postCode |
|
264
|
|
|
*/ |
|
265
|
2 |
|
public function setPostCode(string $postCode): void |
|
266
|
|
|
{ |
|
267
|
2 |
|
$this->postCode = $postCode; |
|
268
|
|
|
} |
|
269
|
|
|
|
|
270
|
|
|
/** |
|
271
|
|
|
* @return int|null |
|
272
|
|
|
*/ |
|
273
|
1 |
|
public function getStreetId(): ?int |
|
274
|
|
|
{ |
|
275
|
1 |
|
return $this->streetId; |
|
276
|
|
|
} |
|
277
|
|
|
|
|
278
|
|
|
/** |
|
279
|
|
|
* @param int $streetId |
|
280
|
|
|
*/ |
|
281
|
2 |
|
public function setStreetId(int $streetId): void |
|
282
|
|
|
{ |
|
283
|
2 |
|
$this->streetId = $streetId; |
|
284
|
|
|
} |
|
285
|
|
|
|
|
286
|
|
|
/** |
|
287
|
|
|
* @return string|null |
|
288
|
|
|
*/ |
|
289
|
1 |
|
public function getStreetType(): ?string |
|
290
|
|
|
{ |
|
291
|
1 |
|
return $this->streetType; |
|
292
|
|
|
} |
|
293
|
|
|
|
|
294
|
|
|
/** |
|
295
|
|
|
* @param string $streetType |
|
296
|
|
|
*/ |
|
297
|
4 |
|
public function setStreetType(string $streetType): void |
|
298
|
|
|
{ |
|
299
|
4 |
|
$this->streetType = $streetType; |
|
300
|
|
|
} |
|
301
|
|
|
|
|
302
|
|
|
/** |
|
303
|
|
|
* @return string|null |
|
304
|
|
|
*/ |
|
305
|
2 |
|
public function getStreetName(): ?string |
|
306
|
|
|
{ |
|
307
|
2 |
|
return $this->streetName; |
|
308
|
|
|
} |
|
309
|
|
|
|
|
310
|
|
|
/** |
|
311
|
|
|
* @param string $streetName |
|
312
|
|
|
*/ |
|
313
|
4 |
|
public function setStreetName(string $streetName): void |
|
314
|
|
|
{ |
|
315
|
4 |
|
$this->streetName = $streetName; |
|
316
|
|
|
} |
|
317
|
|
|
|
|
318
|
|
|
/** |
|
319
|
|
|
* @return string|null |
|
320
|
|
|
*/ |
|
321
|
1 |
|
public function getStreetNo(): ?string |
|
322
|
|
|
{ |
|
323
|
1 |
|
return $this->streetNo; |
|
324
|
|
|
} |
|
325
|
|
|
|
|
326
|
|
|
/** |
|
327
|
|
|
* @param string $streetNo |
|
328
|
|
|
*/ |
|
329
|
4 |
|
public function setStreetNo(string $streetNo): void |
|
330
|
|
|
{ |
|
331
|
4 |
|
$this->streetNo = $streetNo; |
|
332
|
|
|
} |
|
333
|
|
|
|
|
334
|
|
|
/** |
|
335
|
|
|
* @return int|null |
|
336
|
|
|
*/ |
|
337
|
1 |
|
public function getComplexId(): ?int |
|
338
|
|
|
{ |
|
339
|
1 |
|
return $this->complexId; |
|
340
|
|
|
} |
|
341
|
|
|
|
|
342
|
|
|
/** |
|
343
|
|
|
* @param ?int $complexId |
|
344
|
|
|
*/ |
|
345
|
2 |
|
public function setComplexId(?int $complexId): void |
|
346
|
|
|
{ |
|
347
|
2 |
|
$this->complexId = $complexId; |
|
348
|
|
|
} |
|
349
|
|
|
|
|
350
|
|
|
/** |
|
351
|
|
|
* @return string|null |
|
352
|
|
|
*/ |
|
353
|
1 |
|
public function getComplexType(): ?string |
|
354
|
|
|
{ |
|
355
|
1 |
|
return $this->complexType; |
|
356
|
|
|
} |
|
357
|
|
|
|
|
358
|
|
|
/** |
|
359
|
|
|
* @param ?string $complexType |
|
360
|
|
|
*/ |
|
361
|
2 |
|
public function setComplexType(?string $complexType): void |
|
362
|
|
|
{ |
|
363
|
2 |
|
$this->complexType = $complexType; |
|
364
|
|
|
} |
|
365
|
|
|
|
|
366
|
|
|
/** |
|
367
|
|
|
* @return string|null |
|
368
|
|
|
*/ |
|
369
|
1 |
|
public function getComplexName(): ?string |
|
370
|
|
|
{ |
|
371
|
1 |
|
return $this->complexName; |
|
372
|
|
|
} |
|
373
|
|
|
|
|
374
|
|
|
/** |
|
375
|
|
|
* @param string $complexName |
|
376
|
|
|
*/ |
|
377
|
2 |
|
public function setComplexName(string $complexName): void |
|
378
|
|
|
{ |
|
379
|
2 |
|
$this->complexName = $complexName; |
|
380
|
|
|
} |
|
381
|
|
|
|
|
382
|
|
|
/** |
|
383
|
|
|
* @return string|null |
|
384
|
|
|
*/ |
|
385
|
1 |
|
public function getBlockNo(): ?string |
|
386
|
|
|
{ |
|
387
|
1 |
|
return $this->blockNo; |
|
388
|
|
|
} |
|
389
|
|
|
|
|
390
|
|
|
/** |
|
391
|
|
|
* @param string $blockNo |
|
392
|
|
|
*/ |
|
393
|
2 |
|
public function setBlockNo(string $blockNo): void |
|
394
|
|
|
{ |
|
395
|
2 |
|
$this->blockNo = $blockNo; |
|
396
|
|
|
} |
|
397
|
|
|
|
|
398
|
|
|
/** |
|
399
|
|
|
* @return string|null |
|
400
|
|
|
*/ |
|
401
|
1 |
|
public function getEntranceNo(): ?string |
|
402
|
|
|
{ |
|
403
|
1 |
|
return $this->entranceNo; |
|
404
|
|
|
} |
|
405
|
|
|
|
|
406
|
|
|
/** |
|
407
|
|
|
* @param string $entranceNo |
|
408
|
|
|
*/ |
|
409
|
2 |
|
public function setEntranceNo(string $entranceNo): void |
|
410
|
|
|
{ |
|
411
|
2 |
|
$this->entranceNo = $entranceNo; |
|
412
|
|
|
} |
|
413
|
|
|
|
|
414
|
|
|
/** |
|
415
|
|
|
* @return string|null |
|
416
|
|
|
*/ |
|
417
|
1 |
|
public function getFloorNo(): ?string |
|
418
|
|
|
{ |
|
419
|
1 |
|
return $this->floorNo; |
|
420
|
|
|
} |
|
421
|
|
|
|
|
422
|
|
|
/** |
|
423
|
|
|
* @param string $floorNo |
|
424
|
|
|
*/ |
|
425
|
2 |
|
public function setFloorNo(string $floorNo): void |
|
426
|
|
|
{ |
|
427
|
2 |
|
$this->floorNo = $floorNo; |
|
428
|
|
|
} |
|
429
|
|
|
|
|
430
|
|
|
/** |
|
431
|
|
|
* @return string|null |
|
432
|
|
|
*/ |
|
433
|
1 |
|
public function getApartmentNo(): ?string |
|
434
|
|
|
{ |
|
435
|
1 |
|
return $this->apartmentNo; |
|
436
|
|
|
} |
|
437
|
|
|
|
|
438
|
|
|
/** |
|
439
|
|
|
* @param string $apartmentNo |
|
440
|
|
|
*/ |
|
441
|
2 |
|
public function setApartmentNo(string $apartmentNo): void |
|
442
|
|
|
{ |
|
443
|
2 |
|
$this->apartmentNo = $apartmentNo; |
|
444
|
|
|
} |
|
445
|
|
|
|
|
446
|
|
|
/** |
|
447
|
|
|
* @return int|null |
|
448
|
|
|
*/ |
|
449
|
1 |
|
public function getPoiId(): ?int |
|
450
|
|
|
{ |
|
451
|
1 |
|
return $this->poiId; |
|
452
|
|
|
} |
|
453
|
|
|
|
|
454
|
|
|
/** |
|
455
|
|
|
* @param ?int $poiId |
|
456
|
|
|
*/ |
|
457
|
2 |
|
public function setPoiId(?int $poiId): void |
|
458
|
|
|
{ |
|
459
|
2 |
|
$this->poiId = $poiId; |
|
460
|
|
|
} |
|
461
|
|
|
|
|
462
|
|
|
/** |
|
463
|
|
|
* @return string|null |
|
464
|
|
|
*/ |
|
465
|
1 |
|
public function getAddressNote(): ?string |
|
466
|
|
|
{ |
|
467
|
1 |
|
return $this->addressNote; |
|
468
|
|
|
} |
|
469
|
|
|
|
|
470
|
|
|
/** |
|
471
|
|
|
* @param string $addressNote |
|
472
|
|
|
*/ |
|
473
|
2 |
|
public function setAddressNote(string $addressNote): void |
|
474
|
|
|
{ |
|
475
|
2 |
|
$this->addressNote = $addressNote; |
|
476
|
|
|
} |
|
477
|
|
|
|
|
478
|
|
|
/** |
|
479
|
|
|
* @return string|null |
|
480
|
|
|
*/ |
|
481
|
1 |
|
public function getAddressLine1(): ?string |
|
482
|
|
|
{ |
|
483
|
1 |
|
return $this->addressLine1; |
|
484
|
|
|
} |
|
485
|
|
|
|
|
486
|
|
|
/** |
|
487
|
|
|
* @param string $addressLine1 |
|
488
|
|
|
*/ |
|
489
|
2 |
|
public function setAddressLine1(string $addressLine1): void |
|
490
|
|
|
{ |
|
491
|
2 |
|
$this->addressLine1 = $addressLine1; |
|
492
|
|
|
} |
|
493
|
|
|
|
|
494
|
|
|
/** |
|
495
|
|
|
* @return string|null |
|
496
|
|
|
*/ |
|
497
|
1 |
|
public function getAddressLine2(): ?string |
|
498
|
|
|
{ |
|
499
|
1 |
|
return $this->addressLine2; |
|
500
|
|
|
} |
|
501
|
|
|
|
|
502
|
|
|
/** |
|
503
|
|
|
* @param string $addressLine2 |
|
504
|
|
|
*/ |
|
505
|
2 |
|
public function setAddressLine2(string $addressLine2): void |
|
506
|
|
|
{ |
|
507
|
2 |
|
$this->addressLine2 = $addressLine2; |
|
508
|
|
|
} |
|
509
|
|
|
|
|
510
|
|
|
/** |
|
511
|
|
|
* @return float|null |
|
512
|
|
|
*/ |
|
513
|
1 |
|
public function getX(): ?float |
|
514
|
|
|
{ |
|
515
|
1 |
|
return $this->x; |
|
516
|
|
|
} |
|
517
|
|
|
|
|
518
|
|
|
/** |
|
519
|
|
|
* @param float $x |
|
520
|
|
|
*/ |
|
521
|
2 |
|
public function setX(float $x): void |
|
522
|
|
|
{ |
|
523
|
2 |
|
$this->x = $x; |
|
524
|
|
|
} |
|
525
|
|
|
|
|
526
|
|
|
/** |
|
527
|
|
|
* @return float|null |
|
528
|
|
|
*/ |
|
529
|
1 |
|
public function getY(): ?float |
|
530
|
|
|
{ |
|
531
|
1 |
|
return $this->y; |
|
532
|
|
|
} |
|
533
|
|
|
|
|
534
|
|
|
/** |
|
535
|
|
|
* @param float $y |
|
536
|
|
|
*/ |
|
537
|
2 |
|
public function setY(float $y): void |
|
538
|
|
|
{ |
|
539
|
2 |
|
$this->y = $y; |
|
540
|
|
|
} |
|
541
|
|
|
} |
|
542
|
|
|
|