1: <?php
2:
3: namespace ShippoClient\Entity;
4:
5: use TurmericSpice\Container;
6: use TurmericSpice\ReadableAttributes;
7:
8: class Address extends ObjectInformation
9: {
10: use ReadableAttributes {
11: mayHaveAsString as public getName;
12: mayHaveAsString as public getCompany;
13: mayHaveAsString as public getStreet1;
14: mayHaveAsString as public getStreet2;
15: mayHaveAsString as public getStreetNo;
16: mayHaveAsString as public getCity;
17: mayHaveAsString as public getState;
18: mayHaveAsString as public getZip;
19: mayHaveAsString as public getCountry;
20: mayHaveAsString as public getPhone;
21: mayHaveAsString as public getEmail;
22: mayHaveAsString as public getIp;
23: mayHaveAsString as public getMetadata;
24: mayHaveAsArray as public getMessages;
25: }
26:
27: public function getIsResidential()
28: {
29: $is_residential = $this->attributes->mayHave('is_residential')->value();
30: if ($is_residential === null) {
31: return null;
32: }
33:
34: return (bool)$is_residential;
35: }
36: }
37: