minFraud PHP API v1.3.0
  • Namespace
  • Class

Namespaces

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

Classes

  • GeoIp2\Database\Reader
  • GeoIp2\Model\AnonymousIp
  • GeoIp2\Model\City
  • GeoIp2\Model\ConnectionType
  • GeoIp2\Model\Country
  • GeoIp2\Model\Domain
  • GeoIp2\Model\Enterprise
  • GeoIp2\Model\Insights
  • GeoIp2\Model\Isp
  • GeoIp2\Record\AbstractPlaceRecord
  • GeoIp2\Record\AbstractRecord
  • GeoIp2\Record\City
  • GeoIp2\Record\Continent
  • GeoIp2\Record\Country
  • GeoIp2\Record\Location
  • GeoIp2\Record\MaxMind
  • GeoIp2\Record\Postal
  • GeoIp2\Record\RepresentedCountry
  • GeoIp2\Record\Subdivision
  • GeoIp2\Record\Traits
  • GeoIp2\Test\Database\ReaderTest
  • GeoIp2\Test\Model\CountryTest
  • GeoIp2\Test\Model\InsightsTest
  • GeoIp2\Test\Model\NameTest
  • GeoIp2\Test\WebService\ClientTest
  • GeoIp2\WebService\Client
  • MaxMind\MinFraud
  • MaxMind\MinFraud\Model\Address
  • MaxMind\MinFraud\Model\BillingAddress
  • MaxMind\MinFraud\Model\CreditCard
  • MaxMind\MinFraud\Model\Device
  • MaxMind\MinFraud\Model\Disposition
  • MaxMind\MinFraud\Model\Email
  • MaxMind\MinFraud\Model\Factors
  • MaxMind\MinFraud\Model\GeoIp2Country
  • MaxMind\MinFraud\Model\GeoIp2Location
  • MaxMind\MinFraud\Model\Insights
  • MaxMind\MinFraud\Model\IpAddress
  • MaxMind\MinFraud\Model\Issuer
  • MaxMind\MinFraud\Model\Score
  • MaxMind\MinFraud\Model\ScoreIpAddress
  • MaxMind\MinFraud\Model\ShippingAddress
  • MaxMind\MinFraud\Model\Subscores
  • MaxMind\MinFraud\Model\Warning

Interfaces

  • GeoIp2\ProviderInterface
  • JsonSerializable

Exceptions

  • BadFunctionCallException
  • BadMethodCallException
  • Exception
  • GeoIp2\Exception\AddressNotFoundException
  • GeoIp2\Exception\AuthenticationException
  • GeoIp2\Exception\GeoIp2Exception
  • GeoIp2\Exception\HttpException
  • GeoIp2\Exception\InvalidRequestException
  • GeoIp2\Exception\OutOfQueriesException
  • InvalidArgumentException
  • LogicException
  1 <?php
  2 
  3 namespace MaxMind\MinFraud\Model;
  4 
  5 /**
  6  * Model of the Score response.
  7  *
  8  * @property-read integer $fundsRemaining The approximate US dollar value of the
  9  * funds remaining on your MaxMind account.
 10  *
 11  * @property-read integer $queriesRemaining The approximate number of queries
 12  * remaining for this service before your account runs out of funds.
 13  *
 14  * @property-read integer $rawResponse The raw data that comes back from the post
 15  * request to the maxmind server.
 16  *
 17  * @property-read string $id This is a UUID that identifies the minFraud request.
 18  * Please use this ID in bug reports or support requests to MaxMind so that we
 19  * can easily identify a particular request.
 20  *
 21  * @property-read float $riskScore This property contains the risk score, from 0.01
 22  * to 99. A higher score indicates a higher risk of fraud. For example, a
 23  * score of 20 indicates a 20% chance that a transaction is fraudulent. We
 24  * never return a risk score of 0, since all transactions have the possibility
 25  * of being fraudulent. Likewise we never return a risk score of 100.
 26  *
 27  * @property-read \MaxMind\MinFraud\Model\Disposition disposition An object
 28  * containing the disposition set by custom rules.
 29  *
 30  * @property-read \MaxMind\MinFraud\Model\ScoreIpAddress $ipAddress An object
 31  * containing the IP risk for the transaction.
 32  *
 33  * @property-read array $warnings This array contains
 34  * {@link \MaxMind\MinFraud\Model\Warning Warning} objects detailing issues
 35  * with the request that was sent, such as invalid or unknown inputs. It
 36  * is highly recommended that you check this array for issues when integrating
 37  * the web service.
 38  */
 39 class Score extends AbstractModel
 40 {
 41     /**
 42      * @internal
 43      */
 44     protected $disposition;
 45 
 46     /**
 47      * @internal
 48      */
 49     protected $fundsRemaining;
 50 
 51     /**
 52      * @internal
 53      */
 54     protected $id;
 55 
 56     /**
 57      * @internal
 58      */
 59     protected $ipAddress;
 60 
 61     /**
 62      * @internal
 63      */
 64     protected $queriesRemaining;
 65 
 66     /**
 67      * @internal
 68      */
 69     protected $rawResponse;
 70 
 71     /**
 72      * @internal
 73      */
 74     protected $riskScore;
 75 
 76     /**
 77      * @internal
 78      */
 79     protected $warnings;
 80 
 81     public function __construct($response, $locales = ['en'])
 82     {
 83         parent::__construct($response, $locales);
 84 
 85         $this->disposition
 86             = new Disposition($this->safeArrayLookup($response['disposition']));
 87         $this->fundsRemaining = $this->safeArrayLookup($response['funds_remaining']);
 88         $this->queriesRemaining = $this->safeArrayLookup($response['queries_remaining']);
 89         $this->id = $this->safeArrayLookup($response['id']);
 90         $this->ipAddress
 91             = new ScoreIpAddress($this->safeArrayLookup($response['ip_address']));
 92         $this->riskScore = $this->safeArrayLookup($response['risk_score']);
 93 
 94         $this->warnings = [];
 95         foreach ($this->safeArrayLookup($response['warnings'], []) as $warning) {
 96             array_push($this->warnings, new Warning($warning));
 97         }
 98     }
 99 }
100 
minFraud PHP API v1.3.0 API documentation generated by ApiGen