line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::MinFraud::Record::Warning; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
99572
|
use Moo; |
|
5
|
|
|
|
|
11296
|
|
|
5
|
|
|
|
|
26
|
|
4
|
5
|
|
|
5
|
|
3015
|
use namespace::autoclean; |
|
5
|
|
|
|
|
13307
|
|
|
5
|
|
|
|
|
54
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.010000'; |
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
926
|
use Types::Standard qw( ArrayRef Str ); |
|
5
|
|
|
|
|
75986
|
|
|
5
|
|
|
|
|
42
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has code => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
isa => Str, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has warning => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
isa => Str, |
18
|
|
|
|
|
|
|
predicate => 1, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has input_pointer => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
isa => Str, |
24
|
|
|
|
|
|
|
predicate => 1, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# ABSTRACT: A warning record returned from a web service query |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding UTF-8 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
WebService::MinFraud::Record::Warning - A warning record returned from a web service query |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 VERSION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
version 1.010000 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SYNOPSIS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
use 5.010; |
48
|
|
|
|
|
|
|
use WebService::MinFraud::Client; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $client = WebService::MinFraud::Client->new( |
51
|
|
|
|
|
|
|
account_id => 42, |
52
|
|
|
|
|
|
|
license_key => 'abcdef123456', |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
my $request = { device => { ip_address => '24.24.24.24'} }; |
55
|
|
|
|
|
|
|
my $insights = $client->insights( $request ); |
56
|
|
|
|
|
|
|
foreach my $warning_object (@{$insights->warnings}) { |
57
|
|
|
|
|
|
|
say "WARNING CODE: ", $warning_object->code; |
58
|
|
|
|
|
|
|
say "WARNING MESSAGE: ", $warning_object->warning; |
59
|
|
|
|
|
|
|
say "WARNING INPUT PATH: ", join ' / ', @{$warning_object->input}; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This class represents a MaxMind warning (if any) from a web service query. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This class provides the following methods: |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 code |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Returns a machine-readable code identifying the warning. See the L<API |
73
|
|
|
|
|
|
|
documentation|https://dev.maxmind.com/minfraud/#Warning> |
74
|
|
|
|
|
|
|
for the current list. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 input_pointer |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Returns a JSON pointer to the input field that the warning is associated with. |
79
|
|
|
|
|
|
|
For instance, if the warning was about the billing city, the returned reference would be |
80
|
|
|
|
|
|
|
C<< "/billing/city" >>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 warning |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Returns a human-readable explanation of the warning. This description may |
85
|
|
|
|
|
|
|
change at any time and should not be matched against. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 PREDICATE METHODS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The following predicate methods are available, which return true if the related |
90
|
|
|
|
|
|
|
data was present in the response body, false if otherwise: |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 has_input_pointer |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 has_warning |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 SUPPORT |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 AUTHOR |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2020 by MaxMind, Inc. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
109
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |