line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::MinFraud::Record::Device; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
162658
|
use Moo; |
|
4
|
|
|
|
|
11021
|
|
|
4
|
|
|
|
|
27
|
|
4
|
4
|
|
|
4
|
|
2792
|
use namespace::autoclean; |
|
4
|
|
|
|
|
12898
|
|
|
4
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.009001'; |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
1988
|
use Types::UUID; |
|
4
|
|
|
|
|
160907
|
|
|
4
|
|
|
|
|
51
|
|
9
|
4
|
|
|
4
|
|
2038
|
use WebService::MinFraud::Types qw( Num Str ); |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
540
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has confidence => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => Num, |
14
|
|
|
|
|
|
|
predicate => 1, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has id => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => Uuid, |
20
|
|
|
|
|
|
|
predicate => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has last_seen => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
isa => Str, |
26
|
|
|
|
|
|
|
predicate => 1, |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has local_time => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
isa => Str, |
32
|
|
|
|
|
|
|
predicate => 1, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# ABSTRACT: Contains data for the device associated with a transaction |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=pod |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=encoding UTF-8 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
WebService::MinFraud::Record::Device - Contains data for the device associated with a transaction |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 VERSION |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
version 1.009001 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SYNOPSIS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
use 5.010; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
use WebService::MinFraud::Client; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $client = WebService::MinFraud::Client->new( |
60
|
|
|
|
|
|
|
account_id => 42, |
61
|
|
|
|
|
|
|
license_key => 'abcdef123456', |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
my $request = { device => { ip_address => '24.24.24.24' } }; |
64
|
|
|
|
|
|
|
my $insights = $client->insights($request); |
65
|
|
|
|
|
|
|
my $device = $insights->device; |
66
|
|
|
|
|
|
|
say 'Device ' . $device->id . ' was last seen ' . $device->last_seen; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This class contains the data for the device associated with a transaction. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 METHODS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This class provides the following methods: |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 confidence |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This number represents our confidence that the device_id refers to a unique |
79
|
|
|
|
|
|
|
device as opposed to a cluster of similar devices. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 id |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
A UUID that MaxMind uses for the device associated |
84
|
|
|
|
|
|
|
with this IP address. Note that many devices cannot be uniquely identified |
85
|
|
|
|
|
|
|
because they are too common (for example, all iPhones of a given model and |
86
|
|
|
|
|
|
|
OS release). In these cases, the minFraud service will simply not return a |
87
|
|
|
|
|
|
|
UUID for that device. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 last_seen |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This is the date and time of the last sighting of the device on the specified |
92
|
|
|
|
|
|
|
IP address for your user account. The string is in the RFC 3339 format. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 local_time |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is the date and time of the transaction at the UTC offset associated with |
97
|
|
|
|
|
|
|
the device. The string is in the RFC 3339 format. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 PREDICATE METHODS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The following predicate methods are available, which return true if the related |
102
|
|
|
|
|
|
|
data was present in the response body, false if otherwise: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 has_confidence |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 has_id |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 has_last_seen |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 has_local_time |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 SUPPORT |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 AUTHOR |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2019 by MaxMind, Inc. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
125
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |