1 <?php
2
3 namespace MaxMind\MinFraud\Model;
4
5 use GeoIp2\Model\Insights as GeoIp2Insights;
6
7 /**
8 * Model containing GeoIP2 data and the risk for the IP address.
9 *
10 * @property-read float $risk This field contains the risk associated with the IP
11 * address. The value ranges from 0.01 to 99. A higher score indicates a
12 * higher risk.
13 */
14 class IpAddress extends GeoIp2Insights
15 {
16 /**
17 * @ignore
18 */
19 protected $risk;
20
21 public function __construct($response, $locales = ['en'])
22 {
23 parent::__construct($response, $locales);
24 $this->country = new GeoIp2Country($this->get('country'), $locales);
25 $this->location = new GeoIp2Location($this->get('location'));
26 $this->risk = $this->get('risk');
27 }
28 }
29