Stripe/Charge.pm

filter: Statementstmt 28.1% 20 / 71 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 12.0% 7 / 58 Podpod 100% 51 / 51 totaltotal 43.3% 78 / 180 CC 1 SCAR 6.3
CC
1
Cov
28%
id
2.0
object
2.0
amount
2.0
CRAP 1.9
« Stripe/Treasury/OutboundPayment.pm ↑ Summary Stripe/Treasury/InboundTransfer.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Charge.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 package Net::API::Stripe::Charge;
11 ## https://stripe.com/docs/api/charges/object
12 BEGIN
13 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
14 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 our( $VERSION ) = 'v0.101.0';
19 };
20  
21 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub amount { return( shift->_set_get_number( 'amount', @_ ) ); }
Subroutine amount: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub amount_captured { return( shift->_set_get_number( 'amount_captured', @_ ) ); }
Subroutine amount_captured: not called CC=1 SCAR=6.9
Pod documented
31  
32 0 ▶sub amount_refunded { return( shift->_set_get_number( 'amount_refunded', @_ ) ); }
Subroutine amount_refunded: not called CC=1 SCAR=6.9
Pod documented
33  
34 0 ▶sub application { return( shift->_set_get_scalar_or_object( 'application', 'Net::API::Stripe::Connect::Account', @_ ) ); }
Subroutine application: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub application_fee { return( shift->_set_get_number_or_object( 'application_fee', 'Net::API::Stripe::Connect::ApplicationFee', @_ ) ); }
Subroutine application_fee: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub application_fee_amount { return( shift->_set_get_number( 'application_fee_amount', @_ ) ); }
Subroutine application_fee_amount: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub balance_transaction { return( shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ) ); }
Subroutine balance_transaction: not called CC=1 SCAR=6.9
Pod documented
41  
42 0 ▶sub billing_details { return( shift->_set_get_object( 'billing_details', 'Net::API::Stripe::Billing::Details', @_ ) ); }
Subroutine billing_details: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub calculated_statement_descriptor { return( shift->_set_get_scalar( 'calculated_statement_descriptor', @_ ) ); }
Subroutine calculated_statement_descriptor: not called CC=1 SCAR=6.9
Pod documented
45  
46 0 ▶sub captured { return( shift->_set_get_boolean( 'captured', @_ ) ); }
Subroutine captured: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub card { return( shift->_set_get_object( 'card', 'Net::API::Stripe::Payment::Card', @_ ) ); }
Subroutine card: not called CC=1 SCAR=6.9
Pod documented
49  
50 0 ▶sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
51  
52 0 ▶sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); }
Subroutine currency: not called CC=1 SCAR=6.9
Pod documented
53  
54 ## Expandable so either we get an id or we get the underlying object
55  
56 0 ▶sub customer { return( shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ) ); }
Subroutine customer: not called CC=1 SCAR=6.9
Pod documented
57  
58 0 ▶sub description { return( shift->_set_get_scalar( 'description', @_ ) ); }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
59  
60 0 ▶sub destination { return( shift->_set_get_scalar_or_object( 'destination', 'Net::API::Stripe::Connect::Account', @_ ) ); }
Subroutine destination: not called CC=1 SCAR=6.9
Pod documented
61  
62 0 ▶sub dispute { return( shift->_set_get_scalar_or_object( 'dispute', 'Net::API::Stripe::Dispute', @_ ) ); }
Subroutine dispute: not called CC=1 SCAR=6.9
Pod documented
63  
64 0 ▶sub disputed { return( shift->_set_get_boolean( 'disputed', @_ ) ); }
Subroutine disputed: not called CC=1 SCAR=6.9
Pod documented
65  
66 0 ▶sub failure_balance_transaction { return( shift->_set_get_scalar_or_object( 'failure_balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ) ); }
Subroutine failure_balance_transaction: not called CC=1 SCAR=6.9
Pod documented
67  
68 0 ▶sub failure_code { return( shift->_set_get_scalar( 'failure_code', @_ ) ); }
Subroutine failure_code: not called CC=1 SCAR=6.9
Pod documented
69  
70 0 ▶sub failure_message { return( shift->_set_get_scalar( 'failure_message', @_ ) ); }
Subroutine failure_message: not called CC=1 SCAR=6.9
Pod documented
71  
72 ## sub fraud_details { return( shift->_set_get_hash( 'fraud_details', @_ ) ); }
73  
74 0 ▶sub fraud_details { return( shift->_set_get_class( 'fraud_details', {
Subroutine fraud_details: not called CC=1 SCAR=6.9
Pod documented
75 stripe_report => { type => 'scalar' },
76 user_report => { type => 'scalar' },
77 }, @_ ) ); }
78  
79 0 ▶sub invoice { return( shift->_set_get_scalar_or_object( 'invoice', 'Net::API::Stripe::Billing::Invoice', @_ ) ); }
Subroutine invoice: not called CC=1 SCAR=6.9
Pod documented
80  
81 0 ▶sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
82  
83 0 ▶sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); }
Subroutine metadata: not called CC=1 SCAR=6.9
Pod documented
84  
85 0 ▶sub on_behalf_of { return( shift->_set_get_scalar_or_object( 'on_behalf_of', 'Net::API::Stripe::Connect::Account', @_ ) ); }
Subroutine on_behalf_of: not called CC=1 SCAR=6.9
Pod documented
86  
87 0 ▶sub order { return( shift->_set_get_scalar_or_object( 'order', 'Net::API::Stripe::Order', @_ ) ); }
Subroutine order: not called CC=1 SCAR=6.9
Pod documented
88  
89 0 ▶sub outcome { return( shift->_set_get_object( 'outcome', 'Net::API::Stripe::Charge::Outcome', @_ ) ); }
Subroutine outcome: not called CC=1 SCAR=6.9
Pod documented
90  
91 0 ▶sub paid { return( shift->_set_get_boolean( 'paid', @_ ) ); }
Subroutine paid: not called CC=1 SCAR=6.9
Pod documented
92  
93 0 ▶sub payment_intent { return( shift->_set_get_scalar( 'payment_intent', @_ ) ); }
Subroutine payment_intent: not called CC=1 SCAR=6.9
Pod documented
94  
95 0 ▶sub payment_method { return( shift->_set_get_scalar( 'payment_method', @_ ) ); }
Subroutine payment_method: not called CC=1 SCAR=6.9
Pod documented
96  
97 0 ▶sub payment_method_details { return( shift->_set_get_object( 'payment_method_details', 'Net::API::Stripe::Payment::Method::Details', @_ ) ); }
Subroutine payment_method_details: not called CC=1 SCAR=6.9
Pod documented
98  
99 0 ▶sub radar_options { return( shift->_set_get_object( 'radar_options', 'Net::API::Stripe::Fraud::Review', @_ ) ); }
Subroutine radar_options: not called CC=1 SCAR=6.9
Pod documented
100  
101 0 ▶sub receipt_email { return( shift->_set_get_scalar( 'receipt_email', @_ ) ); }
Subroutine receipt_email: not called CC=1 SCAR=6.9
Pod documented
102  
103 0 ▶sub receipt_number { return( shift->_set_get_scalar( 'receipt_number', @_ ) ); }
Subroutine receipt_number: not called CC=1 SCAR=6.9
Pod documented
104  
105 0 ▶sub receipt_url { return( shift->_set_get_scalar( 'receipt_url', @_ ) ); }
Subroutine receipt_url: not called CC=1 SCAR=6.9
Pod documented
106  
107 0 ▶sub refunded { return( shift->_set_get_boolean( 'refunded', @_ ) ); }
Subroutine refunded: not called CC=1 SCAR=6.9
Pod documented
108  
109 ## A list of refunds that have been applied to the charge.
110 ## Net::API::Stripe::Charge::Refunds
111  
112 0 ▶sub refunds { return( shift->_set_get_object( 'refunds', 'Net::API::Stripe::Charge::Refunds', @_ ) ); }
Subroutine refunds: not called CC=1 SCAR=6.9
Pod documented
113  
114 0 ▶sub review { return( shift->_set_get_scalar_or_object( 'review', 'Net::API::Stripe::Fraud::Review', @_ ) ); }
Subroutine review: not called CC=1 SCAR=6.9
Pod documented
115  
116 0 ▶sub shipping { return( shift->_set_get_object( 'shipping', 'Net::API::Stripe::Shipping', @_ ) ); }
Subroutine shipping: not called CC=1 SCAR=6.9
Pod documented
117  
118 0 ▶sub source { return( shift->_set_get_object( 'source', 'Net::API::Stripe::Payment::Card', @_ ) ); }
Subroutine source: not called CC=1 SCAR=6.9
Pod documented
119  
120 0 ▶sub source_transfer { return( shift->_set_get_scalar_or_object( 'source_transfer', 'Net::API::Stripe::Connect::Transfer', @_ ) ); }
Subroutine source_transfer: not called CC=1 SCAR=6.9
Pod documented
121  
122 0 ▶sub statement_description { return( shift->_set_get_scalar( 'statement_description', @_ ) ); }
Subroutine statement_description: not called CC=1 SCAR=6.9
Pod documented
123  
124 0 ▶sub statement_descriptor { return( shift->_set_get_scalar( 'statement_descriptor', @_ ) ); }
Subroutine statement_descriptor: not called CC=1 SCAR=6.9
Pod documented
125  
126 0 ▶sub statement_descriptor_suffix { return( shift->_set_get_scalar( 'statement_descriptor_suffix', @_ ) ); }
Subroutine statement_descriptor_suffix: not called CC=1 SCAR=6.9
Pod documented
127  
128 ## 2019-10-16: gone?
129  
130 0 ▶sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
Subroutine status: not called CC=1 SCAR=6.9
Pod documented
131  
132 0 ▶sub transfer { return( shift->_set_get_scalar_or_object( 'transfer', 'Net::API::Stripe::Connect::Transfer', @_ ) ); }
Subroutine transfer: not called CC=1 SCAR=6.9
Pod documented
133  
134 0 ▶sub transfer_data { return( shift->_set_get_object( 'transfer_data', 'Net::API::Stripe::Connect::Transfer', @_ ) ); }
Subroutine transfer_data: not called CC=1 SCAR=6.9
Pod documented
135  
136 0 ▶sub transfer_group { return( shift->_set_get_scalar( 'transfer_group', @_ ) ); }
Subroutine transfer_group: not called CC=1 SCAR=6.9
Pod documented
137  
138 2 1;
139  
140 __END__
« Stripe/Treasury/OutboundPayment.pm ↑ Summary Stripe/Treasury/InboundTransfer.pm »