1: <?php
2:
3: namespace MaxMind\MinFraud\Model;
4:
5: /**
6: * Class Address
7: * @package MaxMind\MinFraud\Model
8: *
9: * @property integer $distanceToIpLocation The distance in kilometers from the
10: * address to the IP location.
11: * @property boolean $isInIpCountry This property is true if the address is in
12: * the IP country. The property is false when the address is not in the IP
13: * country. If the address could not be parsed or was not provided or if the
14: * IP address could not be geolocated, the property will be null.
15: * @property boolean $isPostalInCity This property is true if the postal code
16: * provided with the address is in the city for the address. The property is
17: * false when the postal code is not in the city. If the address could not be
18: * parsed or was not provided, the property will be null.
19: * @property float $latitude The latitude associated with the address.
20: * @property float $longitude The longitude associated with the address.
21: *
22: */
23: abstract class Address extends AbstractModel
24: {
25: /**
26: * @internal
27: */
28: protected $isPostalInCity;
29:
30: /**
31: * @internal
32: */
33: protected $latitude;
34:
35: /**
36: * @internal
37: */
38: protected $longitude;
39:
40: /**
41: * @internal
42: */
43: protected $distanceToIpLocation;
44:
45: /**
46: * @internal
47: */
48: protected $isInIpCountry;
49:
50: public function __construct($response, $locales = array('en'))
51: {
52: $this->isPostalInCity = $this->safeArrayLookup($response['is_postal_in_city']);
53: $this->latitude = $this->safeArrayLookup($response['latitude']);
54: $this->longitude = $this->safeArrayLookup($response['longitude']);
55: $this->distanceToIpLocation = $this->safeArrayLookup($response['distance_to_ip_location']);
56: $this->isInIpCountry = $this->safeArrayLookup($response['is_in_ip_country']);
57: }
58: }
59: