line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::MinFraud::Record::Country; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
49
|
use Moo; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
23
|
|
4
|
3
|
|
|
3
|
|
972
|
use namespace::autoclean; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
54
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.009001'; |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
1683
|
use GeoIP2::Record::Country 2.005001; |
|
3
|
|
|
|
|
39309
|
|
|
3
|
|
|
|
|
120
|
|
9
|
3
|
|
|
3
|
|
24
|
use WebService::MinFraud::Types qw( Bool BoolCoercion ); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
267
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
extends 'GeoIP2::Record::Country'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has is_high_risk => ( |
14
|
|
|
|
|
|
|
is => 'ro', |
15
|
|
|
|
|
|
|
isa => Bool, |
16
|
|
|
|
|
|
|
coerce => BoolCoercion, |
17
|
|
|
|
|
|
|
predicate => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# ABSTRACT: Contains data for the country record associated with an IP address |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=pod |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=encoding UTF-8 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
WebService::MinFraud::Record::Country - Contains data for the country record associated with an IP address |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 VERSION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
version 1.009001 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use 5.010; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
use WebService::MinFraud::Client; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $client = WebService::MinFraud::Client->new( |
45
|
|
|
|
|
|
|
account_id => 42, |
46
|
|
|
|
|
|
|
license_key => 'abcdef123456', |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
my $request = { device => { ip_address => '24.24.24.24' } }; |
49
|
|
|
|
|
|
|
my $insights = $client->insights($request); |
50
|
|
|
|
|
|
|
my $country = $insights->ip_address->country; |
51
|
|
|
|
|
|
|
say $country->is_high_risk; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This class contains the country data associated with a transaction. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This record is returned by the Insights web service. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 METHODS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This class provides the same methods as L<GeoIP2::Record::Country> in addition |
62
|
|
|
|
|
|
|
to: |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 is_high_risk |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Returns a boolean indicating whether the country of the ip_address is |
67
|
|
|
|
|
|
|
considered high risk. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 PREDICATE METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The following predicate methods are available, which return true if the related |
72
|
|
|
|
|
|
|
data was present in the response body, false if otherwise: |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 has_is_high_risk |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SUPPORT |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2019 by MaxMind, Inc. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
89
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |