Stripe/Fraud/Review.pm

filter: Statementstmt 36.3% 8 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 17.6% 3 / 17 Podpod 100% 14 / 14 totaltotal 47.1% 25 / 53 CC 1 SCAR 6.0
CC
1
Cov
36%
id
2.0
object
2.0
billing_zip
2.0
CRAP 1.8
« Stripe/Connect/ApplicationFee.pm ↑ Summary Stripe/Order/SKU.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Fraud/Review.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::Review;
11 BEGIN
12 {
13 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 };
17  
18 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
19  
20 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub billing_zip { return( shift->_set_get_scalar( 'billing_zip', @_ ) ); }
Subroutine billing_zip: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub charge { return( shift->_set_get_scalar_or_object( 'charge', 'Net::API::Stripe::Charge', @_ ) ); }
Subroutine charge: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub closed_reason { return( shift->_set_get_scalar( 'closed_reason', @_ ) ); }
Subroutine closed_reason: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub ip_address { return( shift->_set_get_scalar( 'ip_address', @_ ) ); }
Subroutine ip_address: not called CC=1 SCAR=6.9
Pod documented
31  
32 0 ▶sub ip_address_location { return( shift->_set_get_hash_as_object( 'ip_address_location', 'Net::API::Stripe::GeoLocation', @_ ) ); }
Subroutine ip_address_location: not called CC=1 SCAR=6.9
Pod documented
33  
34 0 ▶sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub open { return( shift->_set_get_boolean( 'open', @_ ) ); }
Subroutine open: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub opened_reason { return( shift->_set_get_scalar( 'opened_reason', @_ ) ); }
Subroutine opened_reason: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub payment_intent { return( shift->_set_get_scalar_or_object( 'payment_intent', 'Net::API::Stripe::Payment::Intent', @_ ) ); }
Subroutine payment_intent: not called CC=1 SCAR=6.9
Pod documented
41  
42 0 ▶sub reason { return( shift->_set_get_scalar( 'reason', @_ ) ); }
Subroutine reason: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub session { return( shift->_set_get_object( 'session', 'Net::API::Stripe::Fraud::Review::Session', @_ ) ); }
Subroutine session: not called CC=1 SCAR=6.9
Pod documented
45  
46 1 1;
47  
48 __END__
49  
50 =encoding utf8
51  
52 =head1 NAME
53  
54 Net::API::Stripe::Fraud::Review - A Stripe Fraud Review Object
55  
56 =head1 SYNOPSIS
57  
58 my $review = $stripe->review({
59 billing_zip => '123-4567',
60 # Could also be a Net::API::Stripe::Charge object when expanded
61 charge => 'ch_fake1234567890',
62 ip_address => '1.2.3.4',
63 ip_address_location =>
64 {
65 city => 'Tokyo',
66 country => 'jp',
67 latitude => '35.6935496',
68 longitude => '139.7461204',
69 region => undef,
70 },
71 open => $stripe->true,
72 payment_intent => $payment_intent_object,
73 reason => 'Some issue',
74 session => $session_object,
75 });
76  
77 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
78  
79 =head1 VERSION
80  
81 v0.100.0
82  
83 =head1 DESCRIPTION
84  
85 Reviews can be used to supplement automated fraud detection with human expertise.
86  
87 =head1 CONSTRUCTOR
88  
89 =over 4
90  
91 =item B<new>( %ARG )
92  
93 Creates a new L<Net::API::Stripe::Fraud::Review> object.
94 It may also take an hash like arguments, that also are method of the same name.
95  
96 =back
97  
98 =head1 METHODS
99  
100 =over 4
101  
102 =item B<id> string
103  
104 Unique identifier for the object.
105  
106 =item B<object> string, value is "review"
107  
108 String representing the object’s type. Objects of the same type share the same value.
109  
110 =item B<billing_zip> string
111  
112 The ZIP or postal code of the card used, if applicable.
113  
114 =item B<charge> string (expandable)
115  
116 The charge associated with this review.
117  
118 When expanded, this is a L<Net::API::Stripe::Charge> object.
119  
120 =item B<closed_reason> string
121  
122 The reason the review was closed, or null if it has not yet been closed. One of approved, refunded, refunded_as_fraud, or disputed.
123  
124 =item B<created> timestamp
125  
126 Time at which the object was created. Measured in seconds since the Unix epoch.
127  
128 =item B<ip_address> string
129  
130 The IP address where the payment originated.
131  
132 =item B<ip_address_location> hash
133  
134 Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
135  
136 This is a L<Net::API::Stripe::GeoLocation> object.
137  
138 =item B<livemode> boolean
139  
140 Has the value true if the object exists in live mode or the value false if the object exists in test mode.
141  
142 =item B<open> boolean
143  
144 If true, the review needs action.
145  
146 =item B<opened_reason> string
147  
148 The reason the review was opened. One of rule or manual.
149  
150 =item B<payment_intent> string (expandable)
151  
152 The PaymentIntent ID associated with this review, if one exists.
153  
154 When expanded, this is a L<Net::API::Stripe::Payment::Intent> object.
155  
156 =item B<reason> string
157  
158 The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, or disputed.
159  
160 =item B<session> hash
161  
162 Information related to the browsing session of the user who initiated the payment.
163  
164 This is a L<Net::API::Stripe::Session> object.
165  
166 =back
167  
168 =head1 API SAMPLE
169  
170 {
171 "id": "prv_fake123456789",
172 "object": "review",
173 "billing_zip": null,
174 "charge": "ch_fake123456789",
175 "closed_reason": null,
176 "created": 1571480456,
177 "ip_address": null,
178 "ip_address_location": null,
179 "livemode": false,
180 "open": true,
181 "opened_reason": "rule",
182 "reason": "rule",
183 "session": null
184 }
185  
186 =head1 HISTORY
187  
188 =head2 v0.1
189  
190 Initial version
191  
192 =head1 AUTHOR
193  
194 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
195  
196 =head1 SEE ALSO
197  
198 Stripe API documentation:
199  
200 L<https://stripe.com/docs/api/radar/reviews>, L<https://stripe.com/radar>
201  
202 =head1 COPYRIGHT & LICENSE
203  
204 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
205  
206 You can use, copy, modify and redistribute this package and associated
207 files under the same terms as Perl itself.
208  
209 =cut
« Stripe/Connect/ApplicationFee.pm ↑ Summary Stripe/Order/SKU.pm »