NAME

WebService::MinFraud::Model::Factors - Model class for minFraud Factors

VERSION

version 1.004000

SYNOPSIS

use 5.010;

use WebService::MinFraud::Client;

my $client = WebService::MinFraud::Client->new(
    user_id     => 42,
    license_key => 'abcdef123456',
);

my $request = { device => { ip_address => '24.24.24.24' } };
my $factors = $client->factors($request);

my $shipping_address = $factors->shipping_address;
say $shipping_address->is_high_risk;

my $ip_address = $factors->ip_address;
my $postal     = $ip_address->postal;
say $postal->code;

say $factors->device->id;

DESCRIPTION

This class provides a model for the data returned by the minFraud Factors web service.

The Factors model class includes more data than the Score model class. See the API documentation for more details.

METHODS

This model class provides the following methods:

billing_address

Returns a WebService::MinFraud::Record::BillingAddress object representing billing data for the transaction.

credit_card

Returns a WebService::MinFraud::Record::CreditCard object representing credit card data for the transaction.

device

Returns a WebService::MinFraud::Record::Device object representing the device that MaxMind believes is associated with the IP address passed in the request.

disposition

Returns a WebService::MinFraud::Record::Disposition object representing the disposition set for the transaction using custom rules.

funds_remaining

Returns the approximate US dollar value of the funds remaining on your account. The fund calculation is near realtime so it may not be exact.

id

Returns a UUID that identifies the minFraud request. Please use this UUID in bug reports or support requests to MaxMind so that we can easily identify a particular request.

ip_address

Returns a WebService::MinFraud::Record::IPAddress object representing IP address data for the transaction. This object has the following methods:

  • city

  • continent

  • country

  • most_specific_subdivision

  • postal

  • registered_country

  • represented_country

  • risk

  • subdivisions

  • traits

For details, please refer to "METHODS" in WebService::MinFraud::Record::IPAddress.

risk_score

Returns the risk score which is a number between 0.01 and 99. A higher score indicates a higher risk of fraud.

queries_remaining

Returns the approximate number of queries remaining for this service before your account runs out of funds. The query counts are near realtime so they may not be exact.

shipping_address

Returns a WebService::MinFraud::Record::ShippingAddress object representing shipping data for the transaction.

subscores

Returns a WebService::MinFraud::Record::Subscores object containing subscores used in calculating the overall risk score.

warnings

Returns an ArrayRef of WebService::MinFraud::Record::Warning objects. It is highly recommended that you check this array for issues when integrating the web service.

PREDICATE METHODS

The following predicate methods are available, which return true if the related data was present in the response body, false if otherwise:

has_funds_remaining

has_id

has_queries_remaining

has_risk_score

has_warnings

SUPPORT

Bugs may be submitted through https://github.com/maxmind/minfraud-api-perl/issues.

AUTHOR

Mateu Hunter <mhunter@maxmind.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 - 2017 by MaxMind, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.