File Coverage

blib/lib/Net/API/Stripe/Fraud.pm
Criterion Covered Total %
statement 7 14 50.0
branch n/a
condition n/a
subroutine 3 10 30.0
pod 7 7 100.0
total 17 31 54.8


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