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