1: <?php
2:
3: namespace MaxMind\MinFraud\Model;
4:
5: /**
6: * Class ShippingAddress
7: * @package MaxMind\MinFraud\Model
8: *
9: * This model contains properties of the shipping address.
10: *
11: * @property integer $distanceToBillingAddress The distance in kilometers from
12: * the shipping address to billing address.
13: * @property boolean $isHighRisk This property is true if the shipping address
14: * is in the IP country. The property is false when the address is not in the
15: * IP country. If the shipping address could not be parsed or was not provided
16: * or the IP address could not be geolocated, then the property is null.
17: */
18: class ShippingAddress extends Address
19: {
20: /**
21: * @internal
22: */
23: protected $isHighRisk;
24:
25: /**
26: * @internal
27: */
28: protected $distanceToBillingAddress;
29:
30: public function __construct($response, $locales = array('en'))
31: {
32: parent::__construct($response, $locales);
33: $this->isHighRisk = $this->safeArrayLookup($response['is_high_risk']);
34: $this->distanceToBillingAddress
35: = $this->safeArrayLookup($response['distance_to_billing_address']);
36: }
37: }
38: