1 <?php
2
3 namespace MaxMind\MinFraud\Model;
4
5 /**
6 * Subscores for components that are used in calculating the riskScore.
7 *
8 * @property-read float|null avsResult The risk associated with the AVS result. If
9 * present, this is a value in the range 0.01 to 99.
10 * @property-read float|null billingAddress The risk associated with the billing
11 * address. If present, this is a value in the range 0.01 to 99.
12 * @property-read float|null billingAddressDistanceToIpLocation The risk
13 * associated with the distance between the billing address and the
14 * location for the given IP address. If present, this is a value in the
15 * range 0.01 to 99.
16 * @property-read float|null browser The risk associated with the browser
17 * attributes such as the User-Agent and Accept-Language. If present, this is
18 * a value in the range 0.01 to 99.
19 * @property-read float|null chargeback Individualized risk of chargeback for the
20 * given IP address given for your account and any shop ID passed. This is
21 * only available to users sending chargeback data to MaxMind. If present,
22 * this is a value in the range 0.01 to 99.
23 * @property-read float|null country The risk associated with the country the
24 * transaction originated from. If present, this is a value in the range 0.01
25 * to 99.
26 * @property-read float|null countryMismatch The risk associated with the
27 * combination of IP country, card issuer country, billing country, and
28 * shipping country. If present, this is a value in the range 0.01 to 99.
29 * @property-read float|null cvvResult The risk associated with the CVV result. If
30 * present, this is a value in the range 0.01 to 99.
31 * @property-read float|null emailAddress The risk associated with the particular
32 * email address. If present, this is a value in the range 0.01 to 99.
33 * @property-read float|null emailDomain The general risk associated with the
34 * email domain. If present, this is a value in the range 0.01 to 99.
35 * @property-read float|null emailTenure The risk associated with the issuer ID
36 * number on the email domain. If present, this is a value in the range 0.01
37 * to 99.
38 * @property-read float|null ipTenure The risk associated with the issuer ID
39 * number on the IP address. If present, this is a value in the range 0.01 to
40 * 99.
41 * @property-read float|null issuerIdNumber The risk associated with the
42 * particular issuer ID number (IIN) given the billing location and the
43 * history of usage of the IIN on your account and shop ID. If present, this
44 * is a value in the range 0.01 to 99.
45 * @property-read float|null orderAmount The risk associated with the particular
46 * order amount for your account and shop ID. If present, this is a value in
47 * the range 0.01 to 99.
48 * @property-read float|null phoneNumber The risk associated with the particular
49 * phone number. If present, this is a value in the range 0.01 to 99.
50 * @property-read float|null shippingAddressDistanceToIpLocation The risk
51 * associated with the distance between the shipping address and the IP
52 * location for the given IP address. If present, this is a value in the
53 * range 0.01 to 99.
54 * @property-read float|null timeOfDay The risk associated with the local time of
55 * day of the transaction in the IP address location. If present, this is a
56 * value in the range 0.01 to 99.
57 *
58 */
59 class Subscores extends AbstractModel
60 {
61 /**
62 * @internal
63 */
64 protected $avsResult;
65
66 /**
67 * @internal
68 */
69 protected $billingAddress;
70
71 /**
72 * @internal
73 */
74 protected $billingAddressDistanceToIpLocation;
75
76 /**
77 * @internal
78 */
79 protected $browser;
80
81 /**
82 * @internal
83 */
84 protected $chargeback;
85
86 /**
87 * @internal
88 */
89 protected $country;
90
91 /**
92 * @internal
93 */
94 protected $countryMismatch;
95
96 /**
97 * @internal
98 */
99 protected $cvvResult;
100
101 /**
102 * @internal
103 */
104 protected $emailAddress;
105
106 /**
107 * @internal
108 */
109 protected $emailDomain;
110
111 /**
112 * @internal
113 */
114 protected $emailTenure;
115
116 /**
117 * @internal
118 */
119 protected $ipTenure;
120
121 /**
122 * @internal
123 */
124 protected $issuerIdNumber;
125
126 /**
127 * @internal
128 */
129 protected $orderAmount;
130
131 /**
132 * @internal
133 */
134 protected $phoneNumber;
135
136 /**
137 * @internal
138 */
139 protected $shippingAddressDistanceToIpLocation;
140
141 /**
142 * @internal
143 */
144 protected $timeOfDay;
145
146 public function __construct($response, $locales = ['en'])
147 {
148 parent::__construct($response, $locales);
149
150 $this->avsResult = $this->safeArrayLookup($response['avs_result']);
151 $this->billingAddress = $this->safeArrayLookup($response['billing_address']);
152 $this->billingAddressDistanceToIpLocation
153 = $this->safeArrayLookup($response['billing_address_distance_to_ip_location']);
154 $this->browser = $this->safeArrayLookup($response['browser']);
155 $this->chargeback = $this->safeArrayLookup($response['chargeback']);
156 $this->country = $this->safeArrayLookup($response['country']);
157 $this->countryMismatch = $this->safeArrayLookup($response['country_mismatch']);
158 $this->cvvResult = $this->safeArrayLookup($response['cvv_result']);
159 $this->emailAddress = $this->safeArrayLookup($response['email_address']);
160 $this->emailDomain = $this->safeArrayLookup($response['email_domain']);
161 $this->emailTenure = $this->safeArrayLookup($response['email_tenure']);
162 $this->ipTenure = $this->safeArrayLookup($response['ip_tenure']);
163 $this->issuerIdNumber = $this->safeArrayLookup($response['issuer_id_number']);
164 $this->orderAmount = $this->safeArrayLookup($response['order_amount']);
165 $this->phoneNumber = $this->safeArrayLookup($response['phone_number']);
166 $this->shippingAddressDistanceToIpLocation
167 = $this->safeArrayLookup($response['shipping_address_distance_to_ip_location']);
168 $this->timeOfDay = $this->safeArrayLookup($response['time_of_day']);
169 }
170 }
171