File Coverage

lib/Net/API/Stripe/Fraud.pm
Criterion Covered Total %
statement 19 27 70.3
branch n/a
condition n/a
subroutine 7 15 46.6
pod 8 8 100.0
total 34 50 68.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Fraud.pm
3             ## Version v0.101.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2022/10/29
8             ##
9             ##----------------------------------------------------------------------------
10             BEGIN
11             {
12             use strict;
13 2     2   24333830 use warnings;
  2         16  
  2         60  
14 2     2   11 use parent qw( Net::API::Stripe::Generic );
  2         4  
  2         56  
15 2     2   12 use vars qw( $VERSION );
  2         4  
  2         9  
16 2     2   134 our( $VERSION ) = 'v0.101.0';
  2         4  
  2         112  
17 2     2   43 };
18              
19             use strict;
20 2     2   11 use warnings;
  2         4  
  2         41  
21 2     2   10  
  2         2  
  2         373  
22              
23 0     0 1    
24              
25 0     0 1    
26              
27 0     0 1    
28              
29 0     0 1    
30             1;
31 0     0 1    
32              
33 0     0 1   =encoding utf8
34              
35 0     0 1   =head1 NAME
36              
37 0     0 1   Net::API::Stripe::Fraud - A Stripe Early Fraud Warning Object
38              
39             =head1 SYNOPSIS
40              
41             my $fraud = $stripe->fraud({
42             actionable => $stripe->true,
43             # Could also be a Net::API::Stripe::Charge object if expanded
44             charge => 'ch_fake124567890',
45             fraud_type => 'unauthorized_use_of_card',
46             livemode => $stripe->false,
47             });
48              
49             See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
50              
51             =head1 VERSION
52              
53             v0.101.0
54              
55             =head1 DESCRIPTION
56              
57             An early fraud warning indicates that the card issuer has notified us that a charge may be fraudulent.
58              
59             =head1 CONSTRUCTOR
60              
61             =head2 new( %ARG )
62              
63             Creates a new L<Net::API::Stripe::Fraud> object.
64             It may also take an hash like arguments, that also are method of the same name.
65              
66             =head1 METHODS
67              
68             =head2 id string
69              
70             Unique identifier for the object.
71              
72             =head2 object string, value is "radar.early_fraud_warning"
73              
74             String representing the object’s type. Objects of the same type share the same value.
75              
76             =head2 actionable boolean
77              
78             An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
79              
80             =head2 charge string (expandable)
81              
82             ID of the charge this early fraud warning is for, optionally expanded.
83              
84             When expanded, this is a L<Net::API::Stripe::Charge> object.
85              
86             =head2 created timestamp
87              
88             Time at which the object was created. Measured in seconds since the Unix epoch.
89              
90             =head2 fraud_type string
91              
92             The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card.
93              
94             =head2 livemode boolean
95              
96             Has the value true if the object exists in live mode or the value false if the object exists in test mode.
97              
98             =head2 payment_intent expandable
99              
100             ID of the Payment Intent this early fraud warning is for, optionally expanded.
101              
102             When expanded this is an L<Net::API::Stripe::Payment::Intent> object.
103              
104             =head1 API SAMPLE
105              
106             {
107             "id": "issfr_123456789",
108             "object": "radar.early_fraud_warning",
109             "actionable": true,
110             "charge": "ch_1234",
111             "created": 123456789,
112             "fraud_type": "misc",
113             "livemode": false
114             }
115              
116             =head1 HISTORY
117              
118             =head2 v0.1
119              
120             Initial version
121              
122             =head1 AUTHOR
123              
124             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
125              
126             =head1 SEE ALSO
127              
128             Stripe API documentation:
129              
130             L<https://stripe.com/docs/api/radar/early_fraud_warnings/object>, L<https://stripe.com/docs/disputes#early-fraud-warnings-formerly-issuer-fraud-records>
131              
132             =head1 COPYRIGHT & LICENSE
133              
134             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
135              
136             You can use, copy, modify and redistribute this package and associated
137             files under the same terms as Perl itself.
138              
139             =cut