1: <?php
2:
3: namespace MaxMind\MinFraud\Model;
4:
5: /**
6: * Model containing information about the email address.
7: *
8: * @property-read string|null $firstSeen A date string (e.g. 2017-04-24) to
9: * identify the date an email address was first seen by MaxMind. This is
10: * expressed using the ISO 8601 date format.
11: * @property-read bool|null $isFree This property is true if MaxMind believes
12: * that this email is hosted by a free email provider such as Gmail or Yahoo!
13: * Mail.
14: * @property-read bool|null $isHighRisk This field is true if MaxMind believes
15: * that this email is likely to be used for fraud. Note that this is also
16: * factored into the overall risk_score in the response as well.
17: */
18: class Email extends AbstractModel
19: {
20: /**
21: * @internal
22: */
23: protected $firstSeen;
24:
25: /**
26: * @internal
27: */
28: protected $isFree;
29:
30: /**
31: * @internal
32: */
33: protected $isHighRisk;
34:
35: public function __construct($response, $locales = ['en'])
36: {
37: parent::__construct($response, $locales);
38: $this->firstSeen = $this->safeArrayLookup($response['first_seen']);
39: $this->isFree = $this->safeArrayLookup($response['is_free']);
40: $this->isHighRisk = $this->safeArrayLookup($response['is_high_risk']);
41: }
42: }
43: