File Coverage

lib/Net/API/Stripe/Treasury/TransactionEntry.pm
Criterion Covered Total %
statement 7 20 35.0
branch n/a
condition n/a
subroutine 3 16 18.7
pod 13 13 100.0
total 23 49 46.9


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Treasury/TransactionEntry.pm
3             ## Version v0.1.0
4             ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2022/10/29
7             ## Modified 2022/10/29
8             ##
9             ##----------------------------------------------------------------------------
10             BEGIN
11             {
12             use strict;
13 2     2   23997223 use parent qw( Net::API::Stripe::Generic );
  2         16  
  2         71  
14 2     2   11 our( $VERSION ) = 'v0.1.0';
  2         5  
  2         11  
15 2     2   865 };
16              
17              
18 0     0 1    
19             {
20 0     0 1   cash => { type => "number" },
21             inbound_pending => { type => "number" },
22 0     0 1   outbound_pending => { type => "number" },
23             }, @_ ) ); }
24              
25              
26              
27              
28              
29 0     0 1    
30             {
31 0     0 1   credit_reversal => {
32             package => "Net::API::Stripe::Treasury::CreditReversal",
33 0     0 1   type => "object",
34             },
35 0     0 1   debit_reversal => {
36             package => "Net::API::Stripe::Treasury::DebitReversal",
37 0     0 1   type => "object",
38             },
39 0     0 1   inbound_transfer => {
40             package => "Net::API::Stripe::Treasury::InboundTransfer",
41             type => "object",
42             },
43             issuing_authorization => { type => "hash" },
44             outbound_payment => {
45             package => "Net::API::Stripe::Treasury::OutboundPayment",
46             type => "object",
47             },
48             outbound_transfer => {
49             package => "Net::API::Stripe::Treasury::OutboundTransfer",
50             type => "object",
51             },
52             received_credit => {
53             package => "Net::API::Stripe::Treasury::ReceivedCredit",
54             type => "object",
55             },
56             received_debit => {
57             package => "Net::API::Stripe::Treasury::ReceivedDebit",
58             type => "object",
59             },
60             type => { type => "scalar" },
61             }, @_ ) ); }
62              
63              
64              
65              
66              
67             1;
68             # NOTE: POD
69              
70             =encoding utf8
71              
72             =head1 NAME
73 0     0 1    
74             Net::API::Stripe::Treasury::TransactionEntry - The TransactionEntry object
75 0     0 1    
76             =head1 SYNOPSIS
77 0     0 1    
78             =head1 VERSION
79 0     0 1    
80             v0.1.0
81              
82             =head1 DESCRIPTION
83              
84             TransactionEntries represent individual units of money movements within a single L<Transaction|https://stripe.com/docs/api/treasury/transactions>.
85              
86             =head1 METHODS
87              
88             =head2 id string
89              
90             Unique identifier for the object.
91              
92             =head2 object string
93              
94             String representing the object's type. Objects of the same type share the same value.
95              
96             =head2 balance_impact hash
97              
98             The current impact of the TransactionEntry on the FinancialAccount's balance.
99              
100             It has the following properties:
101              
102             =over 4
103              
104             =item C<cash> integer
105              
106             The change made to funds the user can spend right now.
107              
108             =item C<inbound_pending> integer
109              
110             The change made to funds that are not spendable yet, but will become available at a later time.
111              
112             =item C<outbound_pending> integer
113              
114             The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
115              
116             =back
117              
118             =head2 created timestamp
119              
120             Time at which the object was created. Measured in seconds since the Unix epoch.
121              
122             =head2 currency currency
123              
124             Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.
125              
126             =head2 effective_at timestamp
127              
128             When the TransactionEntry will impact the FinancialAccount's balance.
129              
130             =head2 financial_account string
131              
132             The FinancialAccount associated with this object.
133              
134             =head2 flow string
135              
136             Token of the flow associated with the TransactionEntry.
137              
138             =head2 flow_details hash
139              
140             Details of the flow associated with the TransactionEntry.
141              
142             It has the following properties:
143              
144             =over 4
145              
146             =item C<credit_reversal> hash
147              
148             The CreditReversal object associated with the Transaction. Set if C<type=credit_reversal>.
149              
150             When expanded, this is a L<Net::API::Stripe::Treasury::CreditReversal> object.
151              
152             =item C<debit_reversal> hash
153              
154             The DebitReversal object associated with the Transaction. Set if C<type=debit_reversal>.
155              
156             When expanded, this is a L<Net::API::Stripe::Treasury::DebitReversal> object.
157              
158             =item C<inbound_transfer> hash
159              
160             The InboundTransfer object associated with the Transaction. Set if C<type=inbound_transfer>.
161              
162             When expanded, this is a L<Net::API::Stripe::Treasury::InboundTransfer> object.
163              
164             =item C<issuing_authorization> hash
165              
166             The Issuing authorization object associated with the Transaction. Set if C<type=issuing_authorization>.
167              
168             =item C<outbound_payment> hash
169              
170             The OutboundPayment object associated with the Transaction. Set if C<type=outbound_payment>.
171              
172             When expanded, this is a L<Net::API::Stripe::Treasury::OutboundPayment> object.
173              
174             =item C<outbound_transfer> hash
175              
176             The OutboundTransfer object associated with the Transaction. Set if C<type=outbound_transfer>.
177              
178             When expanded, this is a L<Net::API::Stripe::Treasury::OutboundTransfer> object.
179              
180             =item C<received_credit> hash
181              
182             The ReceivedCredit object associated with the Transaction. Set if C<type=received_credit>.
183              
184             When expanded, this is a L<Net::API::Stripe::Treasury::ReceivedCredit> object.
185              
186             =item C<received_debit> hash
187              
188             The ReceivedDebit object associated with the Transaction. Set if C<type=received_debit>.
189              
190             When expanded, this is a L<Net::API::Stripe::Treasury::ReceivedDebit> object.
191              
192             =item C<type> string
193              
194             Type of the flow that created the Transaction. Set to the same value as C<flow_type>.
195              
196             =back
197              
198             =head2 flow_type string
199              
200             Type of the flow associated with the TransactionEntry.
201              
202             =head2 livemode boolean
203              
204             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
205              
206             =head2 transaction expandable
207              
208             The Transaction associated with this object.
209              
210             When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object.
211              
212             =head2 type string
213              
214             The specific money movement that generated the TransactionEntry.
215              
216             =head1 API SAMPLE
217              
218             [
219             {
220             "balance_impact" : {
221             "cash" : "0",
222             "inbound_pending" : "0",
223             "outbound_pending" : "-1000"
224             },
225             "created" : "1662261086",
226             "currency" : "usd",
227             "effective_at" : "1662261086",
228             "financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE",
229             "flow" : "obt_1Le9F32eZvKYlo2CPQD5jo2F",
230             "flow_type" : "outbound_transfer",
231             "id" : "trxne_1Le9F42eZvKYlo2CjTLEfFll",
232             "livemode" : 0,
233             "object" : "treasury.transaction_entry",
234             "transaction" : "trxn_1Le9F32eZvKYlo2C2dtkse82",
235             "type" : "outbound_transfer"
236             }
237             ]
238              
239             =head1 HISTORY
240              
241             =head2 v0.1.0
242              
243             Initial version
244              
245             =head1 AUTHOR
246              
247             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
248              
249             =head1 SEE ALSO
250              
251             L<Stripe API documentation|https://stripe.com/docs/api/treasury/transaction_entries>
252              
253             =head1 COPYRIGHT & LICENSE
254              
255             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
256              
257             You can use, copy, modify and redistribute this package and associated
258             files under the same terms as Perl itself.
259              
260             =cut