PluginProbe
Packeta / 1.2.2
Packeta v1.2.2
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / src / Packetery / Core / Entity / Carrier.php

Carrier.php in Packeta 1.2.2, at src/Packetery/Core/Entity/Carrier.php

305 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class Carrier
4 *
5 * @package Packetery\Entities
6 */
7
8 declare( strict_types=1 );
9
10 namespace Packetery\Core\Entity;
11
12 /**
13 * Class Carrier
14 *
15 * @package Packetery\Entities
16 */
17 class Carrier {
18
19 public const INTERNAL_PICKUP_POINTS_ID = 'packeta';
20
21 /**
22 * Carrier id.
23 *
24 * @var string
25 */
26 private $id;
27
28 /**
29 * Carrier name.
30 *
31 * @var string
32 */
33 private $name;
34
35 /**
36 * Carrier hasPickupPoints.
37 *
38 * @var bool
39 */
40 private $hasPickupPoints;
41
42 /**
43 * Carrier hasDirectLabel.
44 *
45 * @var bool
46 */
47 private $hasDirectLabel;
48
49 /**
50 * Carrier requiresSeparateHouseNumber.
51 *
52 * @var bool
53 */
54 private $requiresSeparateHouseNumber;
55
56 /**
57 * Carrier requiresCustomsDeclarations.
58 *
59 * @var bool
60 */
61 private $requiresCustomsDeclarations;
62
63 /**
64 * Carrier requiresEmail.
65 *
66 * @var bool
67 */
68 private $requiresEmail;
69
70 /**
71 * Carrier requiresPhone.
72 *
73 * @var bool
74 */
75 private $requiresPhone;
76
77 /**
78 * Carrier requiresSize.
79 *
80 * @var bool
81 */
82 private $requiresSize;
83
84 /**
85 * Carrier supportsCod.
86 *
87 * @var bool
88 */
89 private $supportsCod;
90
91 /**
92 * Carrier country.
93 *
94 * @var string
95 */
96 private $country;
97
98 /**
99 * Carrier currency.
100 *
101 * @var string
102 */
103 private $currency;
104
105 /**
106 * Carrier maxWeight.
107 *
108 * @var float
109 */
110 private $maxWeight;
111
112 /**
113 * Carrier isDeleted.
114 *
115 * @var bool
116 */
117 private $isDeleted;
118
119 /**
120 * Carrier constructor.
121 *
122 * @param string $id Carrier id.
123 * @param string $name Carrier name.
124 * @param bool $hasPickupPoints Carrier hasPickupPoints.
125 * @param bool $hasDirectLabel Carrier hasDirectLabel.
126 * @param bool $requiresSeparateHouseNumber Carrier requiresSeparateHouseNumber.
127 * @param bool $requiresCustomsDeclarations Carrier requiresCustomsDeclarations.
128 * @param bool $requiresEmail Carrier requiresEmail.
129 * @param bool $requiresPhone Carrier requiresPhone.
130 * @param bool $requiresSize Carrier requiresSize.
131 * @param bool $supportsCod Carrier supportsCod.
132 * @param string $country Carrier country.
133 * @param string $currency Carrier currency.
134 * @param float $maxWeight Carrier maxWeight.
135 * @param bool $isDeleted Carrier isDeleted.
136 */
137 public function __construct(
138 string $id,
139 string $name,
140 bool $hasPickupPoints,
141 bool $hasDirectLabel,
142 bool $requiresSeparateHouseNumber,
143 bool $requiresCustomsDeclarations,
144 bool $requiresEmail,
145 bool $requiresPhone,
146 bool $requiresSize,
147 bool $supportsCod,
148 string $country,
149 string $currency,
150 float $maxWeight,
151 bool $isDeleted
152 ) {
153 $this->id = $id;
154 $this->name = $name;
155 $this->hasPickupPoints = $hasPickupPoints;
156 $this->hasDirectLabel = $hasDirectLabel;
157 $this->requiresSeparateHouseNumber = $requiresSeparateHouseNumber;
158 $this->requiresCustomsDeclarations = $requiresCustomsDeclarations;
159 $this->requiresEmail = $requiresEmail;
160 $this->requiresPhone = $requiresPhone;
161 $this->requiresSize = $requiresSize;
162 $this->supportsCod = $supportsCod;
163 $this->country = $country;
164 $this->currency = $currency;
165 $this->maxWeight = $maxWeight;
166 $this->isDeleted = $isDeleted;
167 }
168
169 /**
170 * Returns all properties as array.
171 *
172 * @return array
173 */
174 public function __toArray(): array {
175 return get_object_vars( $this );
176 }
177
178 /**
179 * Gets carrier id.
180 *
181 * @return string
182 */
183 public function getId(): string {
184 return $this->id;
185 }
186
187 /**
188 * Gets carrier name.
189 *
190 * @return string
191 */
192 public function getName(): string {
193 return $this->name;
194 }
195
196 /**
197 * Gets carrier hasPickupPoints.
198 *
199 * @return bool
200 */
201 public function hasPickupPoints(): bool {
202 return $this->hasPickupPoints;
203 }
204
205 /**
206 * Gets carrier hasCarrierDirectLabel.
207 *
208 * @return bool
209 */
210 public function hasDirectLabel(): bool {
211 return $this->hasDirectLabel;
212 }
213
214 /**
215 * Gets carrier separateHouseNumber.
216 *
217 * @return bool
218 */
219 public function requiresSeparateHouseNumber(): bool {
220 return $this->requiresSeparateHouseNumber;
221 }
222
223 /**
224 * Gets carrier customsDeclarations.
225 *
226 * @return bool
227 */
228 public function requiresCustomsDeclarations(): bool {
229 return $this->requiresCustomsDeclarations;
230 }
231
232 /**
233 * Gets carrier requiresEmail.
234 *
235 * @return bool
236 */
237 public function requiresEmail(): bool {
238 return $this->requiresEmail;
239 }
240
241 /**
242 * Gets carrier requiresPhone.
243 *
244 * @return bool
245 */
246 public function requiresPhone(): bool {
247 return $this->requiresPhone;
248 }
249
250 /**
251 * Gets carrier requiresSize.
252 *
253 * @return bool
254 */
255 public function requiresSize(): bool {
256 return $this->requiresSize;
257 }
258
259 /**
260 * Gets carrier supportsCod.
261 *
262 * @return bool
263 */
264 public function supportsCod(): bool {
265 return $this->supportsCod;
266 }
267
268 /**
269 * Gets carrier country.
270 *
271 * @return string
272 */
273 public function getCountry(): string {
274 return $this->country;
275 }
276
277 /**
278 * Gets carrier currency.
279 *
280 * @return string
281 */
282 public function getCurrency(): string {
283 return $this->currency;
284 }
285
286 /**
287 * Gets carrier maxWeight.
288 *
289 * @return float
290 */
291 public function getMaxWeight(): float {
292 return $this->maxWeight;
293 }
294
295 /**
296 * Gets carrier isDeleted.
297 *
298 * @return bool
299 */
300 public function isDeleted(): bool {
301 return $this->isDeleted;
302 }
303
304 }
305