Total Complexity | 85 |
Total Lines | 701 |
Duplicated Lines | 0 % |
Changes | 0 |
Complex classes like EwsParcelDeliveryEntityType often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use EwsParcelDeliveryEntityType, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
16 | class EwsParcelDeliveryEntityType extends AbstractStructBase |
||
17 | { |
||
18 | /** |
||
19 | * The Carrier |
||
20 | * Meta information extracted from the WSDL |
||
21 | * - minOccurs: 0 |
||
22 | * @var string|null |
||
23 | */ |
||
24 | protected ?string $Carrier = null; |
||
25 | /** |
||
26 | * The TrackingNumber |
||
27 | * Meta information extracted from the WSDL |
||
28 | * - minOccurs: 0 |
||
29 | * @var string|null |
||
30 | */ |
||
31 | protected ?string $TrackingNumber = null; |
||
32 | /** |
||
33 | * The TrackingUrl |
||
34 | * Meta information extracted from the WSDL |
||
35 | * - minOccurs: 0 |
||
36 | * @var string|null |
||
37 | */ |
||
38 | protected ?string $TrackingUrl = null; |
||
39 | /** |
||
40 | * The ExpectedArrivalFrom |
||
41 | * Meta information extracted from the WSDL |
||
42 | * - minOccurs: 0 |
||
43 | * @var string|null |
||
44 | */ |
||
45 | protected ?string $ExpectedArrivalFrom = null; |
||
46 | /** |
||
47 | * The ExpectedArrivalUntil |
||
48 | * Meta information extracted from the WSDL |
||
49 | * - minOccurs: 0 |
||
50 | * @var string|null |
||
51 | */ |
||
52 | protected ?string $ExpectedArrivalUntil = null; |
||
53 | /** |
||
54 | * The Product |
||
55 | * Meta information extracted from the WSDL |
||
56 | * - minOccurs: 0 |
||
57 | * @var string|null |
||
58 | */ |
||
59 | protected ?string $Product = null; |
||
60 | /** |
||
61 | * The ProductUrl |
||
62 | * Meta information extracted from the WSDL |
||
63 | * - minOccurs: 0 |
||
64 | * @var string|null |
||
65 | */ |
||
66 | protected ?string $ProductUrl = null; |
||
67 | /** |
||
68 | * The ProductImage |
||
69 | * Meta information extracted from the WSDL |
||
70 | * - minOccurs: 0 |
||
71 | * @var string|null |
||
72 | */ |
||
73 | protected ?string $ProductImage = null; |
||
74 | /** |
||
75 | * The ProductSku |
||
76 | * Meta information extracted from the WSDL |
||
77 | * - minOccurs: 0 |
||
78 | * @var string|null |
||
79 | */ |
||
80 | protected ?string $ProductSku = null; |
||
81 | /** |
||
82 | * The ProductDescription |
||
83 | * Meta information extracted from the WSDL |
||
84 | * - minOccurs: 0 |
||
85 | * @var string|null |
||
86 | */ |
||
87 | protected ?string $ProductDescription = null; |
||
88 | /** |
||
89 | * The ProductBrand |
||
90 | * Meta information extracted from the WSDL |
||
91 | * - minOccurs: 0 |
||
92 | * @var string|null |
||
93 | */ |
||
94 | protected ?string $ProductBrand = null; |
||
95 | /** |
||
96 | * The ProductColor |
||
97 | * Meta information extracted from the WSDL |
||
98 | * - minOccurs: 0 |
||
99 | * @var string|null |
||
100 | */ |
||
101 | protected ?string $ProductColor = null; |
||
102 | /** |
||
103 | * The OrderNumber |
||
104 | * Meta information extracted from the WSDL |
||
105 | * - minOccurs: 0 |
||
106 | * @var string|null |
||
107 | */ |
||
108 | protected ?string $OrderNumber = null; |
||
109 | /** |
||
110 | * The Seller |
||
111 | * Meta information extracted from the WSDL |
||
112 | * - minOccurs: 0 |
||
113 | * @var string|null |
||
114 | */ |
||
115 | protected ?string $Seller = null; |
||
116 | /** |
||
117 | * The OrderStatus |
||
118 | * Meta information extracted from the WSDL |
||
119 | * - minOccurs: 0 |
||
120 | * @var string|null |
||
121 | */ |
||
122 | protected ?string $OrderStatus = null; |
||
123 | /** |
||
124 | * The AddressName |
||
125 | * Meta information extracted from the WSDL |
||
126 | * - minOccurs: 0 |
||
127 | * @var string|null |
||
128 | */ |
||
129 | protected ?string $AddressName = null; |
||
130 | /** |
||
131 | * The StreetAddress |
||
132 | * Meta information extracted from the WSDL |
||
133 | * - minOccurs: 0 |
||
134 | * @var string|null |
||
135 | */ |
||
136 | protected ?string $StreetAddress = null; |
||
137 | /** |
||
138 | * The AddressLocality |
||
139 | * Meta information extracted from the WSDL |
||
140 | * - minOccurs: 0 |
||
141 | * @var string|null |
||
142 | */ |
||
143 | protected ?string $AddressLocality = null; |
||
144 | /** |
||
145 | * The AddressRegion |
||
146 | * Meta information extracted from the WSDL |
||
147 | * - minOccurs: 0 |
||
148 | * @var string|null |
||
149 | */ |
||
150 | protected ?string $AddressRegion = null; |
||
151 | /** |
||
152 | * The AddressCountry |
||
153 | * Meta information extracted from the WSDL |
||
154 | * - minOccurs: 0 |
||
155 | * @var string|null |
||
156 | */ |
||
157 | protected ?string $AddressCountry = null; |
||
158 | /** |
||
159 | * The PostalCode |
||
160 | * Meta information extracted from the WSDL |
||
161 | * - minOccurs: 0 |
||
162 | * @var string|null |
||
163 | */ |
||
164 | protected ?string $PostalCode = null; |
||
165 | /** |
||
166 | * Constructor method for ParcelDeliveryEntityType |
||
167 | * @uses EwsParcelDeliveryEntityType::setCarrier() |
||
168 | * @uses EwsParcelDeliveryEntityType::setTrackingNumber() |
||
169 | * @uses EwsParcelDeliveryEntityType::setTrackingUrl() |
||
170 | * @uses EwsParcelDeliveryEntityType::setExpectedArrivalFrom() |
||
171 | * @uses EwsParcelDeliveryEntityType::setExpectedArrivalUntil() |
||
172 | * @uses EwsParcelDeliveryEntityType::setProduct() |
||
173 | * @uses EwsParcelDeliveryEntityType::setProductUrl() |
||
174 | * @uses EwsParcelDeliveryEntityType::setProductImage() |
||
175 | * @uses EwsParcelDeliveryEntityType::setProductSku() |
||
176 | * @uses EwsParcelDeliveryEntityType::setProductDescription() |
||
177 | * @uses EwsParcelDeliveryEntityType::setProductBrand() |
||
178 | * @uses EwsParcelDeliveryEntityType::setProductColor() |
||
179 | * @uses EwsParcelDeliveryEntityType::setOrderNumber() |
||
180 | * @uses EwsParcelDeliveryEntityType::setSeller() |
||
181 | * @uses EwsParcelDeliveryEntityType::setOrderStatus() |
||
182 | * @uses EwsParcelDeliveryEntityType::setAddressName() |
||
183 | * @uses EwsParcelDeliveryEntityType::setStreetAddress() |
||
184 | * @uses EwsParcelDeliveryEntityType::setAddressLocality() |
||
185 | * @uses EwsParcelDeliveryEntityType::setAddressRegion() |
||
186 | * @uses EwsParcelDeliveryEntityType::setAddressCountry() |
||
187 | * @uses EwsParcelDeliveryEntityType::setPostalCode() |
||
188 | * @param string $carrier |
||
189 | * @param string $trackingNumber |
||
190 | * @param string $trackingUrl |
||
191 | * @param string $expectedArrivalFrom |
||
192 | * @param string $expectedArrivalUntil |
||
193 | * @param string $product |
||
194 | * @param string $productUrl |
||
195 | * @param string $productImage |
||
196 | * @param string $productSku |
||
197 | * @param string $productDescription |
||
198 | * @param string $productBrand |
||
199 | * @param string $productColor |
||
200 | * @param string $orderNumber |
||
201 | * @param string $seller |
||
202 | * @param string $orderStatus |
||
203 | * @param string $addressName |
||
204 | * @param string $streetAddress |
||
205 | * @param string $addressLocality |
||
206 | * @param string $addressRegion |
||
207 | * @param string $addressCountry |
||
208 | * @param string $postalCode |
||
209 | */ |
||
210 | public function __construct(?string $carrier = null, ?string $trackingNumber = null, ?string $trackingUrl = null, ?string $expectedArrivalFrom = null, ?string $expectedArrivalUntil = null, ?string $product = null, ?string $productUrl = null, ?string $productImage = null, ?string $productSku = null, ?string $productDescription = null, ?string $productBrand = null, ?string $productColor = null, ?string $orderNumber = null, ?string $seller = null, ?string $orderStatus = null, ?string $addressName = null, ?string $streetAddress = null, ?string $addressLocality = null, ?string $addressRegion = null, ?string $addressCountry = null, ?string $postalCode = null) |
||
211 | { |
||
212 | $this |
||
213 | ->setCarrier($carrier) |
||
214 | ->setTrackingNumber($trackingNumber) |
||
215 | ->setTrackingUrl($trackingUrl) |
||
216 | ->setExpectedArrivalFrom($expectedArrivalFrom) |
||
217 | ->setExpectedArrivalUntil($expectedArrivalUntil) |
||
218 | ->setProduct($product) |
||
219 | ->setProductUrl($productUrl) |
||
220 | ->setProductImage($productImage) |
||
221 | ->setProductSku($productSku) |
||
222 | ->setProductDescription($productDescription) |
||
223 | ->setProductBrand($productBrand) |
||
224 | ->setProductColor($productColor) |
||
225 | ->setOrderNumber($orderNumber) |
||
226 | ->setSeller($seller) |
||
227 | ->setOrderStatus($orderStatus) |
||
228 | ->setAddressName($addressName) |
||
229 | ->setStreetAddress($streetAddress) |
||
230 | ->setAddressLocality($addressLocality) |
||
231 | ->setAddressRegion($addressRegion) |
||
232 | ->setAddressCountry($addressCountry) |
||
233 | ->setPostalCode($postalCode); |
||
234 | } |
||
235 | /** |
||
236 | * Get Carrier value |
||
237 | * @return string|null |
||
238 | */ |
||
239 | public function getCarrier(): ?string |
||
240 | { |
||
241 | return $this->Carrier; |
||
242 | } |
||
243 | /** |
||
244 | * Set Carrier value |
||
245 | * @param string $carrier |
||
246 | * @return \StructType\EwsParcelDeliveryEntityType |
||
247 | */ |
||
248 | public function setCarrier(?string $carrier = null): self |
||
249 | { |
||
250 | // validation for constraint: string |
||
251 | if (!is_null($carrier) && !is_string($carrier)) { |
||
|
|||
252 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($carrier, true), gettype($carrier)), __LINE__); |
||
253 | } |
||
254 | $this->Carrier = $carrier; |
||
255 | |||
256 | return $this; |
||
257 | } |
||
258 | /** |
||
259 | * Get TrackingNumber value |
||
260 | * @return string|null |
||
261 | */ |
||
262 | public function getTrackingNumber(): ?string |
||
263 | { |
||
264 | return $this->TrackingNumber; |
||
265 | } |
||
266 | /** |
||
267 | * Set TrackingNumber value |
||
268 | * @param string $trackingNumber |
||
269 | * @return \StructType\EwsParcelDeliveryEntityType |
||
270 | */ |
||
271 | public function setTrackingNumber(?string $trackingNumber = null): self |
||
272 | { |
||
273 | // validation for constraint: string |
||
274 | if (!is_null($trackingNumber) && !is_string($trackingNumber)) { |
||
275 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($trackingNumber, true), gettype($trackingNumber)), __LINE__); |
||
276 | } |
||
277 | $this->TrackingNumber = $trackingNumber; |
||
278 | |||
279 | return $this; |
||
280 | } |
||
281 | /** |
||
282 | * Get TrackingUrl value |
||
283 | * @return string|null |
||
284 | */ |
||
285 | public function getTrackingUrl(): ?string |
||
286 | { |
||
287 | return $this->TrackingUrl; |
||
288 | } |
||
289 | /** |
||
290 | * Set TrackingUrl value |
||
291 | * @param string $trackingUrl |
||
292 | * @return \StructType\EwsParcelDeliveryEntityType |
||
293 | */ |
||
294 | public function setTrackingUrl(?string $trackingUrl = null): self |
||
295 | { |
||
296 | // validation for constraint: string |
||
297 | if (!is_null($trackingUrl) && !is_string($trackingUrl)) { |
||
298 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($trackingUrl, true), gettype($trackingUrl)), __LINE__); |
||
299 | } |
||
300 | $this->TrackingUrl = $trackingUrl; |
||
301 | |||
302 | return $this; |
||
303 | } |
||
304 | /** |
||
305 | * Get ExpectedArrivalFrom value |
||
306 | * @return string|null |
||
307 | */ |
||
308 | public function getExpectedArrivalFrom(): ?string |
||
309 | { |
||
310 | return $this->ExpectedArrivalFrom; |
||
311 | } |
||
312 | /** |
||
313 | * Set ExpectedArrivalFrom value |
||
314 | * @param string $expectedArrivalFrom |
||
315 | * @return \StructType\EwsParcelDeliveryEntityType |
||
316 | */ |
||
317 | public function setExpectedArrivalFrom(?string $expectedArrivalFrom = null): self |
||
318 | { |
||
319 | // validation for constraint: string |
||
320 | if (!is_null($expectedArrivalFrom) && !is_string($expectedArrivalFrom)) { |
||
321 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($expectedArrivalFrom, true), gettype($expectedArrivalFrom)), __LINE__); |
||
322 | } |
||
323 | $this->ExpectedArrivalFrom = $expectedArrivalFrom; |
||
324 | |||
325 | return $this; |
||
326 | } |
||
327 | /** |
||
328 | * Get ExpectedArrivalUntil value |
||
329 | * @return string|null |
||
330 | */ |
||
331 | public function getExpectedArrivalUntil(): ?string |
||
332 | { |
||
333 | return $this->ExpectedArrivalUntil; |
||
334 | } |
||
335 | /** |
||
336 | * Set ExpectedArrivalUntil value |
||
337 | * @param string $expectedArrivalUntil |
||
338 | * @return \StructType\EwsParcelDeliveryEntityType |
||
339 | */ |
||
340 | public function setExpectedArrivalUntil(?string $expectedArrivalUntil = null): self |
||
341 | { |
||
342 | // validation for constraint: string |
||
343 | if (!is_null($expectedArrivalUntil) && !is_string($expectedArrivalUntil)) { |
||
344 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($expectedArrivalUntil, true), gettype($expectedArrivalUntil)), __LINE__); |
||
345 | } |
||
346 | $this->ExpectedArrivalUntil = $expectedArrivalUntil; |
||
347 | |||
348 | return $this; |
||
349 | } |
||
350 | /** |
||
351 | * Get Product value |
||
352 | * @return string|null |
||
353 | */ |
||
354 | public function getProduct(): ?string |
||
355 | { |
||
356 | return $this->Product; |
||
357 | } |
||
358 | /** |
||
359 | * Set Product value |
||
360 | * @param string $product |
||
361 | * @return \StructType\EwsParcelDeliveryEntityType |
||
362 | */ |
||
363 | public function setProduct(?string $product = null): self |
||
364 | { |
||
365 | // validation for constraint: string |
||
366 | if (!is_null($product) && !is_string($product)) { |
||
367 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($product, true), gettype($product)), __LINE__); |
||
368 | } |
||
369 | $this->Product = $product; |
||
370 | |||
371 | return $this; |
||
372 | } |
||
373 | /** |
||
374 | * Get ProductUrl value |
||
375 | * @return string|null |
||
376 | */ |
||
377 | public function getProductUrl(): ?string |
||
378 | { |
||
379 | return $this->ProductUrl; |
||
380 | } |
||
381 | /** |
||
382 | * Set ProductUrl value |
||
383 | * @param string $productUrl |
||
384 | * @return \StructType\EwsParcelDeliveryEntityType |
||
385 | */ |
||
386 | public function setProductUrl(?string $productUrl = null): self |
||
395 | } |
||
396 | /** |
||
397 | * Get ProductImage value |
||
398 | * @return string|null |
||
399 | */ |
||
400 | public function getProductImage(): ?string |
||
401 | { |
||
402 | return $this->ProductImage; |
||
403 | } |
||
404 | /** |
||
405 | * Set ProductImage value |
||
406 | * @param string $productImage |
||
407 | * @return \StructType\EwsParcelDeliveryEntityType |
||
408 | */ |
||
409 | public function setProductImage(?string $productImage = null): self |
||
410 | { |
||
411 | // validation for constraint: string |
||
412 | if (!is_null($productImage) && !is_string($productImage)) { |
||
413 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productImage, true), gettype($productImage)), __LINE__); |
||
414 | } |
||
415 | $this->ProductImage = $productImage; |
||
416 | |||
417 | return $this; |
||
418 | } |
||
419 | /** |
||
420 | * Get ProductSku value |
||
421 | * @return string|null |
||
422 | */ |
||
423 | public function getProductSku(): ?string |
||
424 | { |
||
425 | return $this->ProductSku; |
||
426 | } |
||
427 | /** |
||
428 | * Set ProductSku value |
||
429 | * @param string $productSku |
||
430 | * @return \StructType\EwsParcelDeliveryEntityType |
||
431 | */ |
||
432 | public function setProductSku(?string $productSku = null): self |
||
433 | { |
||
434 | // validation for constraint: string |
||
435 | if (!is_null($productSku) && !is_string($productSku)) { |
||
436 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productSku, true), gettype($productSku)), __LINE__); |
||
437 | } |
||
438 | $this->ProductSku = $productSku; |
||
439 | |||
440 | return $this; |
||
441 | } |
||
442 | /** |
||
443 | * Get ProductDescription value |
||
444 | * @return string|null |
||
445 | */ |
||
446 | public function getProductDescription(): ?string |
||
447 | { |
||
448 | return $this->ProductDescription; |
||
449 | } |
||
450 | /** |
||
451 | * Set ProductDescription value |
||
452 | * @param string $productDescription |
||
453 | * @return \StructType\EwsParcelDeliveryEntityType |
||
454 | */ |
||
455 | public function setProductDescription(?string $productDescription = null): self |
||
456 | { |
||
457 | // validation for constraint: string |
||
458 | if (!is_null($productDescription) && !is_string($productDescription)) { |
||
459 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productDescription, true), gettype($productDescription)), __LINE__); |
||
460 | } |
||
461 | $this->ProductDescription = $productDescription; |
||
462 | |||
463 | return $this; |
||
464 | } |
||
465 | /** |
||
466 | * Get ProductBrand value |
||
467 | * @return string|null |
||
468 | */ |
||
469 | public function getProductBrand(): ?string |
||
470 | { |
||
471 | return $this->ProductBrand; |
||
472 | } |
||
473 | /** |
||
474 | * Set ProductBrand value |
||
475 | * @param string $productBrand |
||
476 | * @return \StructType\EwsParcelDeliveryEntityType |
||
477 | */ |
||
478 | public function setProductBrand(?string $productBrand = null): self |
||
479 | { |
||
480 | // validation for constraint: string |
||
481 | if (!is_null($productBrand) && !is_string($productBrand)) { |
||
482 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productBrand, true), gettype($productBrand)), __LINE__); |
||
483 | } |
||
484 | $this->ProductBrand = $productBrand; |
||
485 | |||
486 | return $this; |
||
487 | } |
||
488 | /** |
||
489 | * Get ProductColor value |
||
490 | * @return string|null |
||
491 | */ |
||
492 | public function getProductColor(): ?string |
||
493 | { |
||
494 | return $this->ProductColor; |
||
495 | } |
||
496 | /** |
||
497 | * Set ProductColor value |
||
498 | * @param string $productColor |
||
499 | * @return \StructType\EwsParcelDeliveryEntityType |
||
500 | */ |
||
501 | public function setProductColor(?string $productColor = null): self |
||
502 | { |
||
503 | // validation for constraint: string |
||
504 | if (!is_null($productColor) && !is_string($productColor)) { |
||
505 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($productColor, true), gettype($productColor)), __LINE__); |
||
506 | } |
||
507 | $this->ProductColor = $productColor; |
||
508 | |||
509 | return $this; |
||
510 | } |
||
511 | /** |
||
512 | * Get OrderNumber value |
||
513 | * @return string|null |
||
514 | */ |
||
515 | public function getOrderNumber(): ?string |
||
518 | } |
||
519 | /** |
||
520 | * Set OrderNumber value |
||
521 | * @param string $orderNumber |
||
522 | * @return \StructType\EwsParcelDeliveryEntityType |
||
523 | */ |
||
524 | public function setOrderNumber(?string $orderNumber = null): self |
||
525 | { |
||
526 | // validation for constraint: string |
||
527 | if (!is_null($orderNumber) && !is_string($orderNumber)) { |
||
528 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderNumber, true), gettype($orderNumber)), __LINE__); |
||
529 | } |
||
530 | $this->OrderNumber = $orderNumber; |
||
531 | |||
532 | return $this; |
||
533 | } |
||
534 | /** |
||
535 | * Get Seller value |
||
536 | * @return string|null |
||
537 | */ |
||
538 | public function getSeller(): ?string |
||
539 | { |
||
540 | return $this->Seller; |
||
541 | } |
||
542 | /** |
||
543 | * Set Seller value |
||
544 | * @param string $seller |
||
545 | * @return \StructType\EwsParcelDeliveryEntityType |
||
546 | */ |
||
547 | public function setSeller(?string $seller = null): self |
||
548 | { |
||
549 | // validation for constraint: string |
||
550 | if (!is_null($seller) && !is_string($seller)) { |
||
551 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($seller, true), gettype($seller)), __LINE__); |
||
552 | } |
||
553 | $this->Seller = $seller; |
||
554 | |||
555 | return $this; |
||
556 | } |
||
557 | /** |
||
558 | * Get OrderStatus value |
||
559 | * @return string|null |
||
560 | */ |
||
561 | public function getOrderStatus(): ?string |
||
562 | { |
||
563 | return $this->OrderStatus; |
||
564 | } |
||
565 | /** |
||
566 | * Set OrderStatus value |
||
567 | * @param string $orderStatus |
||
568 | * @return \StructType\EwsParcelDeliveryEntityType |
||
569 | */ |
||
570 | public function setOrderStatus(?string $orderStatus = null): self |
||
571 | { |
||
572 | // validation for constraint: string |
||
573 | if (!is_null($orderStatus) && !is_string($orderStatus)) { |
||
574 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($orderStatus, true), gettype($orderStatus)), __LINE__); |
||
575 | } |
||
576 | $this->OrderStatus = $orderStatus; |
||
577 | |||
578 | return $this; |
||
579 | } |
||
580 | /** |
||
581 | * Get AddressName value |
||
582 | * @return string|null |
||
583 | */ |
||
584 | public function getAddressName(): ?string |
||
585 | { |
||
586 | return $this->AddressName; |
||
587 | } |
||
588 | /** |
||
589 | * Set AddressName value |
||
590 | * @param string $addressName |
||
591 | * @return \StructType\EwsParcelDeliveryEntityType |
||
592 | */ |
||
593 | public function setAddressName(?string $addressName = null): self |
||
594 | { |
||
595 | // validation for constraint: string |
||
596 | if (!is_null($addressName) && !is_string($addressName)) { |
||
597 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressName, true), gettype($addressName)), __LINE__); |
||
598 | } |
||
599 | $this->AddressName = $addressName; |
||
600 | |||
601 | return $this; |
||
602 | } |
||
603 | /** |
||
604 | * Get StreetAddress value |
||
605 | * @return string|null |
||
606 | */ |
||
607 | public function getStreetAddress(): ?string |
||
608 | { |
||
609 | return $this->StreetAddress; |
||
610 | } |
||
611 | /** |
||
612 | * Set StreetAddress value |
||
613 | * @param string $streetAddress |
||
614 | * @return \StructType\EwsParcelDeliveryEntityType |
||
615 | */ |
||
616 | public function setStreetAddress(?string $streetAddress = null): self |
||
617 | { |
||
618 | // validation for constraint: string |
||
619 | if (!is_null($streetAddress) && !is_string($streetAddress)) { |
||
620 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($streetAddress, true), gettype($streetAddress)), __LINE__); |
||
621 | } |
||
622 | $this->StreetAddress = $streetAddress; |
||
623 | |||
624 | return $this; |
||
625 | } |
||
626 | /** |
||
627 | * Get AddressLocality value |
||
628 | * @return string|null |
||
629 | */ |
||
630 | public function getAddressLocality(): ?string |
||
631 | { |
||
632 | return $this->AddressLocality; |
||
633 | } |
||
634 | /** |
||
635 | * Set AddressLocality value |
||
636 | * @param string $addressLocality |
||
637 | * @return \StructType\EwsParcelDeliveryEntityType |
||
638 | */ |
||
639 | public function setAddressLocality(?string $addressLocality = null): self |
||
640 | { |
||
641 | // validation for constraint: string |
||
642 | if (!is_null($addressLocality) && !is_string($addressLocality)) { |
||
643 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressLocality, true), gettype($addressLocality)), __LINE__); |
||
644 | } |
||
645 | $this->AddressLocality = $addressLocality; |
||
646 | |||
647 | return $this; |
||
648 | } |
||
649 | /** |
||
650 | * Get AddressRegion value |
||
651 | * @return string|null |
||
652 | */ |
||
653 | public function getAddressRegion(): ?string |
||
656 | } |
||
657 | /** |
||
658 | * Set AddressRegion value |
||
659 | * @param string $addressRegion |
||
660 | * @return \StructType\EwsParcelDeliveryEntityType |
||
661 | */ |
||
662 | public function setAddressRegion(?string $addressRegion = null): self |
||
663 | { |
||
664 | // validation for constraint: string |
||
665 | if (!is_null($addressRegion) && !is_string($addressRegion)) { |
||
666 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressRegion, true), gettype($addressRegion)), __LINE__); |
||
667 | } |
||
671 | } |
||
672 | /** |
||
673 | * Get AddressCountry value |
||
674 | * @return string|null |
||
675 | */ |
||
676 | public function getAddressCountry(): ?string |
||
677 | { |
||
678 | return $this->AddressCountry; |
||
679 | } |
||
680 | /** |
||
681 | * Set AddressCountry value |
||
682 | * @param string $addressCountry |
||
683 | * @return \StructType\EwsParcelDeliveryEntityType |
||
684 | */ |
||
685 | public function setAddressCountry(?string $addressCountry = null): self |
||
686 | { |
||
687 | // validation for constraint: string |
||
688 | if (!is_null($addressCountry) && !is_string($addressCountry)) { |
||
689 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressCountry, true), gettype($addressCountry)), __LINE__); |
||
690 | } |
||
691 | $this->AddressCountry = $addressCountry; |
||
692 | |||
693 | return $this; |
||
694 | } |
||
695 | /** |
||
696 | * Get PostalCode value |
||
697 | * @return string|null |
||
698 | */ |
||
699 | public function getPostalCode(): ?string |
||
702 | } |
||
703 | /** |
||
704 | * Set PostalCode value |
||
705 | * @param string $postalCode |
||
706 | * @return \StructType\EwsParcelDeliveryEntityType |
||
707 | */ |
||
708 | public function setPostalCode(?string $postalCode = null): self |
||
717 | } |
||
718 | } |
||
719 |