line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::MinFraud::Record::CreditCard; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
163631
|
use Moo; |
|
4
|
|
|
|
|
10922
|
|
|
4
|
|
|
|
|
28
|
|
4
|
4
|
|
|
4
|
|
2936
|
use namespace::autoclean; |
|
4
|
|
|
|
|
12832
|
|
|
4
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.009001'; |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
2085
|
use WebService::MinFraud::Record::Issuer; |
|
4
|
|
|
|
|
38
|
|
|
4
|
|
|
|
|
160
|
|
9
|
|
|
|
|
|
|
use WebService::MinFraud::Types |
10
|
4
|
|
|
4
|
|
32
|
qw( Bool BoolCoercion IssuerObject IssuerObjectCoercion Str ); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
798
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has brand => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => Str, |
15
|
|
|
|
|
|
|
predicate => 1, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has country => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
isa => Str, |
21
|
|
|
|
|
|
|
predicate => 1, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has is_issued_in_billing_address_country => ( |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
isa => Bool, |
27
|
|
|
|
|
|
|
default => 0, |
28
|
|
|
|
|
|
|
coerce => BoolCoercion, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has is_prepaid => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
isa => Bool, |
34
|
|
|
|
|
|
|
default => 0, |
35
|
|
|
|
|
|
|
coerce => BoolCoercion, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has is_virtual => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
isa => Bool, |
41
|
|
|
|
|
|
|
default => 0, |
42
|
|
|
|
|
|
|
coerce => BoolCoercion, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has issuer => ( |
46
|
|
|
|
|
|
|
is => 'ro', |
47
|
|
|
|
|
|
|
isa => IssuerObject, |
48
|
|
|
|
|
|
|
coerce => IssuerObjectCoercion, |
49
|
|
|
|
|
|
|
predicate => 1, |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
has type => ( |
53
|
|
|
|
|
|
|
is => 'ro', |
54
|
|
|
|
|
|
|
isa => Str, |
55
|
|
|
|
|
|
|
predicate => 1, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# ABSTRACT: Contains data for the credit card record associated with a transaction |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=pod |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=encoding UTF-8 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 NAME |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
WebService::MinFraud::Record::CreditCard - Contains data for the credit card record associated with a transaction |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 VERSION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
version 1.009001 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
use 5.010; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
use WebService::MinFraud::Client; |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
my $client = WebService::MinFraud::Client->new( |
83
|
|
|
|
|
|
|
account_id => 42, |
84
|
|
|
|
|
|
|
license_key => 'abcdef123456', |
85
|
|
|
|
|
|
|
); |
86
|
|
|
|
|
|
|
my $request = { device => { ip_address => '24.24.24.24' } }; |
87
|
|
|
|
|
|
|
my $insights = $client->insights($request); |
88
|
|
|
|
|
|
|
my $credit_card = $insights->credit_card; |
89
|
|
|
|
|
|
|
say $credit_card->is_prepaid; |
90
|
|
|
|
|
|
|
say $credit_card->issuer->name; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 DESCRIPTION |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This class contains the credit card data associated with a transaction. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This record is returned by the Insights web service. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 METHODS |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This class provides the following methods: |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 issuer |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Returns the L<WebService::MinFraud::Record::Issuer> object for the credit card. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 brand |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Returns the brand of the credit card, e.g. Visa, MasterCard, American Express etc. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 country |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Returns the two letter L<ISO 3166-1 alpha 2 country |
113
|
|
|
|
|
|
|
code|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2> associated with the |
114
|
|
|
|
|
|
|
location of the majority of customers using this credit card as determined by |
115
|
|
|
|
|
|
|
their billing address. In cases where the location of customers is highly |
116
|
|
|
|
|
|
|
mixed, this defaults to the country of the bank issuing the card. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 is_issued_in_billing_address_country |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Returns a boolean indicating whether the country of the billing address |
121
|
|
|
|
|
|
|
matches the country of the majority of customers using this credit card. In |
122
|
|
|
|
|
|
|
cases where the location of customers is highly mixed, the match is to the |
123
|
|
|
|
|
|
|
country of the bank issuing the card. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 is_prepaid |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Returns a boolean indicating whether the credit card is prepaid. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 is_virtual |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Returns a boolean indicating whether the credit card is virtual. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 type |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Returns the type of the card if known: charge, credit or debit |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 PREDICATE METHODS |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
The following predicate methods are available, which return true if the related |
140
|
|
|
|
|
|
|
data was present in the response body, false if otherwise: |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 has_issuer |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 has_country |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 SUPPORT |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 AUTHOR |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2019 by MaxMind, Inc. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
159
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |