File Coverage

blib/lib/WebService/MinFraud/Record/BillingAddress.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package WebService::MinFraud::Record::BillingAddress;
2              
3 4     4   160255 use Moo;
  4         10637  
  4         32  
4 4     4   2857 use namespace::autoclean;
  4         12499  
  4         29  
5              
6             our $VERSION = '1.009001';
7              
8             with 'WebService::MinFraud::Role::Record::Address';
9              
10             1;
11              
12             # ABSTRACT: Contains data for the billing address record associated with a transaction
13              
14             __END__
15              
16             =pod
17              
18             =encoding UTF-8
19              
20             =head1 NAME
21              
22             WebService::MinFraud::Record::BillingAddress - Contains data for the billing address record associated with a transaction
23              
24             =head1 VERSION
25              
26             version 1.009001
27              
28             =head1 SYNOPSIS
29              
30             use 5.010;
31              
32             use WebService::MinFraud::Client;
33              
34             my $client = WebService::MinFraud::Client->new(
35             account_id => 42,
36             license_key => 'abcdef123456',
37             );
38             my $request = { device => { ip_address => '24.24.24.24' } };
39             my $insights = $client->insights($request);
40             my $billing_address = $insights->billing_address;
41             say $billing_address->distance_to_ip_location;
42              
43             =head1 DESCRIPTION
44              
45             This class contains the billing address data associated with a transaction.
46              
47             This record is returned by the L<WebService::MinFraud::Model::Insights#billing_address> method.
48              
49             =head1 METHODS
50              
51             This class provides the following methods:
52              
53             =head2 distance_to_ip_location
54              
55             Returns the distance in kilometers from the billing address to the IP location.
56              
57             =head2 is_in_ip_country
58              
59             Returns a boolean indicating whether the billing address is in the same
60             country as that of the IP address.
61              
62             =head2 is_postal_in_city
63              
64             Returns a boolean indicating whether the billing postal code is in the
65             billing city.
66              
67             =head2 latitude
68              
69             Returns the latitude of the billing address.
70              
71             =head2 longitude
72              
73             Returns the longitude of the billing address.
74              
75             =head1 PREDICATE METHODS
76              
77             The following predicate methods are available, which return true if the related
78             data was present in the response body, false if otherwise:
79              
80             =head2 has_distance_to_ip_location
81              
82             =head2 has_is_in_ip_country
83              
84             =head2 has_is_postal_in_city
85              
86             =head2 has_latitude
87              
88             =head2 has_longitude
89              
90             =head1 SUPPORT
91              
92             Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>.
93              
94             =head1 AUTHOR
95              
96             Mateu Hunter <mhunter@maxmind.com>
97              
98             =head1 COPYRIGHT AND LICENSE
99              
100             This software is copyright (c) 2015 - 2019 by MaxMind, Inc.
101              
102             This is free software; you can redistribute it and/or modify it under
103             the same terms as the Perl 5 programming language system itself.
104              
105             =cut