Overview

Namespaces

  • GeoIp2
    • Database
    • Exception
    • Model
    • Record
    • Test
      • Model
      • WebService
    • WebService
  • MaxMind
    • MinFraud
      • Model
  • None
  • PHP

Classes

  • Address
  • BillingAddress
  • CreditCard
  • GeoIp2Country
  • GeoIp2Location
  • Insights
  • IpAddress
  • Issuer
  • Score
  • ShippingAddress
  • Warning
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace MaxMind\MinFraud\Model;
 4: 
 5: /**
 6:  * Class Score
 7:  * @package MaxMind\MinFraud\Model
 8:  *
 9:  * @property integer $creditsRemaining The approximate number of service
10:  * credits remaining on your account.
11:  * @property string $id This is a UUID that identifies the minFraud request.
12:  * Please use this ID in bug reports or support requests to MaxMind so that we
13:  * can easily identify a particular request.
14:  * @property float $riskScore This property contains the risk score, from 0.01
15:  * to 99. A higher score indicates a higher risk of fraud. For example, a
16:  * score of 20 indicates a 20% chance that a transaction is fraudulent. We
17:  * never return a risk score of 0, since all transactions have the possibility
18:  * of being fraudulent. Likewise we never return a risk score of 100.
19:  * @property array $warnings This array contains
20:  * {@link \MaxMind\MinFraud\Model\Warning Warning} objects detailing issues
21:  * with the request that was sent, such as invalid or unknown inputs. It
22:  * is highly recommended that you check this array for issues when integrating
23:  * the web service.
24:  */
25: class Score extends AbstractModel
26: {
27:     /**
28:      * @internal
29:      */
30:     protected $creditsRemaining;
31: 
32:     /**
33:      * @internal
34:      */
35:     protected $id;
36: 
37:     /**
38:      * @internal
39:      */
40:     protected $riskScore;
41: 
42:     /**
43:      * @internal
44:      */
45:     protected $warnings;
46: 
47:     public function __construct($response, $locales = array('en'))
48:     {
49:         $this->creditsRemaining = $this->safeArrayLookup($response['credits_remaining']);
50:         $this->id = $this->safeArrayLookup($response['id']);
51:         $this->riskScore = $this->safeArrayLookup($response['risk_score']);
52: 
53:         $this->warnings = array();
54:         foreach ($this->safeArrayLookup($response['warnings'], array()) as $warning) {
55:             array_push($this->warnings, new Warning($warning));
56:         }
57:     }
58: }
59: 
minFraud Score and Insights PHP API v0.1.0 API documentation generated by ApiGen