1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Service\Location\Site; |
6
|
|
|
|
7
|
|
|
use VasilDakov\Speedy\ToArray; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class FindSiteRequest |
11
|
|
|
* |
12
|
|
|
* @author Vasil Dakov <[email protected]> |
13
|
|
|
* @author Valentin Valkanov <[email protected]> |
14
|
|
|
* @copyright 2009-2022 Neutrino.bg |
15
|
|
|
* @version 1.0 |
16
|
|
|
* @see https://services.speedy.bg/api/api_examples.html#FindSiteRequest |
17
|
|
|
*/ |
18
|
|
|
class FindSiteRequest |
19
|
|
|
{ |
20
|
|
|
use ToArray; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var int |
24
|
|
|
*/ |
25
|
|
|
private int $countryId; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var string|null |
29
|
|
|
*/ |
30
|
|
|
private ?string $name = null; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string|null |
34
|
|
|
*/ |
35
|
|
|
private ?string $postCode = null; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var string|null |
39
|
|
|
*/ |
40
|
|
|
private ?string $type = null; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var string|null |
44
|
|
|
*/ |
45
|
|
|
private ?string $municipality = null; |
46
|
|
|
|
47
|
|
|
|
48
|
5 |
|
public function __construct(int $countryId, string $name) |
49
|
|
|
{ |
50
|
5 |
|
$this->setCountryId($countryId); |
51
|
5 |
|
$this->setName($name); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return int |
56
|
|
|
*/ |
57
|
1 |
|
public function getCountryId(): int |
58
|
|
|
{ |
59
|
1 |
|
return $this->countryId; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param int $countryId |
64
|
|
|
*/ |
65
|
5 |
|
public function setCountryId(int $countryId): void |
66
|
|
|
{ |
67
|
5 |
|
$this->countryId = $countryId; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return string|null |
72
|
|
|
*/ |
73
|
1 |
|
public function getName(): ?string |
74
|
|
|
{ |
75
|
1 |
|
return $this->name; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param string|null $name |
80
|
|
|
*/ |
81
|
5 |
|
public function setName(?string $name): void |
82
|
|
|
{ |
83
|
5 |
|
$this->name = $name; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return string|null |
88
|
|
|
*/ |
89
|
1 |
|
public function getPostCode(): ?string |
90
|
|
|
{ |
91
|
1 |
|
return $this->postCode; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param string|null $postCode |
96
|
|
|
*/ |
97
|
1 |
|
public function setPostCode(?string $postCode): void |
98
|
|
|
{ |
99
|
1 |
|
$this->postCode = $postCode; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return string|null |
104
|
|
|
*/ |
105
|
1 |
|
public function getType(): ?string |
106
|
|
|
{ |
107
|
1 |
|
return $this->type; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param string|null $type |
112
|
|
|
*/ |
113
|
1 |
|
public function setType(?string $type): void |
114
|
|
|
{ |
115
|
1 |
|
$this->type = $type; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string|null |
120
|
|
|
*/ |
121
|
1 |
|
public function getMunicipality(): ?string |
122
|
|
|
{ |
123
|
1 |
|
return $this->municipality; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param string|null $municipality |
128
|
|
|
*/ |
129
|
1 |
|
public function setMunicipality(?string $municipality): void |
130
|
|
|
{ |
131
|
1 |
|
$this->municipality = $municipality; |
132
|
|
|
} |
133
|
|
|
} |
134
|
|
|
|