File Coverage

blib/lib/Net/API/Stripe/Charge/Outcome.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/Charge/Outcome.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::Charge::Outcome;
11             BEGIN
12             {
13 1     1   837 use strict;
  1         2  
  1         28  
14 1     1   4 use parent qw( Net::API::Stripe::Generic );
  1         2  
  1         4  
15 1     1   205 our( $VERSION ) = 'v0.100.0';
16             };
17              
18 0     0 1   sub network_status { shift->_set_get_scalar( 'network_status', @_ ); }
19              
20 0     0 1   sub reason { shift->_set_get_scalar( 'reason', @_ ); }
21              
22 0     0 1   sub risk_level { shift->_set_get_scalar( 'risk_level', @_ ); }
23              
24 0     0 1   sub risk_score { shift->_set_get_scalar( 'risk_score', @_ ); }
25              
26 0     0 1   sub rule { shift->_set_get_scalar( 'rule', @_ ); }
27              
28 0     0 1   sub seller_message { shift->_set_get_scalar( 'seller_message', @_ ); }
29              
30 0     0 1   sub type { shift->_set_get_scalar( 'type', @_ ); }
31              
32             1;
33              
34             __END__
35              
36             =encoding utf8
37              
38             =head1 NAME
39              
40             Net::API::Stripe::Charge::Outcome - A Stripe Charge Outcome Object
41              
42             =head1 SYNOPSIS
43              
44             =head1 VERSION
45              
46             v0.100.0
47              
48             =head1 DESCRIPTION
49              
50             Details about whether the payment was accepted, and why. See understanding declines for details.
51              
52             =head1 CONSTRUCTOR
53              
54             =over 4
55              
56             =item B<new>( %ARG )
57              
58             Creates a new L<Net::API::Stripe::Charge::Outcome> object.
59             It may also take an hash like arguments, that also are method of the same name.
60              
61             =back
62              
63             =head1 METHODS
64              
65             =over 4
66              
67             =item B<network_status> string
68              
69             Possible values are approved_by_network, declined_by_network, not_sent_to_network, and reversed_after_approval. The value reversed_after_approval indicates the payment was blocked by Stripe after bank authorization, and may temporarily appear as “pending” on a cardholder’s statement.
70              
71             =item B<reason> string
72              
73             An enumerated value providing a more detailed explanation of the outcome’s type. Charges blocked by Radar’s default block rule have the value highest_risk_level. Charges placed in review by Radar’s default review rule have the value elevated_risk_level. Charges authorized, blocked, or placed in review by custom rules have the value rule. See understanding declines for more details.
74              
75             =item B<risk_level> string
76              
77             Stripe’s evaluation of the riskiness of the payment. Possible values for evaluated payments are normal, elevated, highest. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value not_assessed. In the event of an error in the evaluation, this field will have the value unknown.
78              
79             =item B<risk_score> integer
80              
81             Stripe’s evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
82              
83             =item B<rule> string (expandable)
84              
85             The ID of the Radar rule that matched the payment, if applicable.
86              
87             =item B<seller_message> string
88              
89             A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
90              
91             =item B<type> string
92              
93             Possible values are authorized, manual_review, issuer_declined, blocked, and invalid. See understanding declines and Radar reviews for details.
94              
95             =back
96              
97             =head1 API SAMPLE
98              
99             {
100             "id": "ch_fake123456789",
101             "object": "charge",
102             "amount": 100,
103             "amount_refunded": 0,
104             "application": null,
105             "application_fee": null,
106             "application_fee_amount": null,
107             "balance_transaction": "txn_fake123456789",
108             "billing_details": {
109             "address": {
110             "city": null,
111             "country": null,
112             "line1": null,
113             "line2": null,
114             "postal_code": null,
115             "state": null
116             },
117             "email": null,
118             "name": null,
119             "phone": null
120             },
121             "captured": false,
122             "created": 1571176460,
123             "currency": "jpy",
124             "customer": null,
125             "description": "My First Test Charge (created for API docs)",
126             "dispute": null,
127             "failure_code": null,
128             "failure_message": null,
129             "fraud_details": {},
130             "invoice": null,
131             "livemode": false,
132             "metadata": {},
133             "on_behalf_of": null,
134             "order": null,
135             "outcome": null,
136             "paid": true,
137             "payment_intent": null,
138             "payment_method": "card_fake123456789",
139             "payment_method_details": {
140             "card": {
141             "brand": "visa",
142             "checks": {
143             "address_line1_check": null,
144             "address_postal_code_check": null,
145             "cvc_check": null
146             },
147             "country": "US",
148             "exp_month": 4,
149             "exp_year": 2024,
150             "fingerprint": "fake123456789",
151             "funding": "credit",
152             "installments": null,
153             "last4": "4242",
154             "network": "visa",
155             "three_d_secure": null,
156             "wallet": null
157             },
158             "type": "card"
159             },
160             "receipt_email": null,
161             "receipt_number": null,
162             "receipt_url": "https://pay.stripe.com/receipts/acct_fake123456789/ch_fake123456789/rcpt_fake123456789",
163             "refunded": false,
164             "refunds": {
165             "object": "list",
166             "data": [],
167             "has_more": false,
168             "url": "/v1/charges/ch_fake123456789/refunds"
169             },
170             "review": null,
171             "shipping": null,
172             "source_transfer": null,
173             "statement_descriptor": null,
174             "statement_descriptor_suffix": null,
175             "status": "succeeded",
176             "transfer_data": null,
177             "transfer_group": null
178             }
179              
180             =head1 HISTORY
181              
182             =head2 v0.1
183              
184             Initial version
185              
186             =head1 AUTHOR
187              
188             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
189              
190             =head1 SEE ALSO
191              
192             Stripe API documentation:
193              
194             L<https://stripe.com/docs/api/charges/object>
195              
196             =head1 COPYRIGHT & LICENSE
197              
198             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
199              
200             You can use, copy, modify and redistribute this package and associated
201             files under the same terms as Perl itself.
202              
203             =cut