line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Treasury/Transaction.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
|
|
23961629
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
77
|
|
14
|
2
|
|
|
2
|
|
11
|
our( $VERSION ) = 'v0.1.0'; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
16
|
|
15
|
2
|
|
|
2
|
|
1036
|
}; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
1
|
|
|
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
1
|
|
{ |
21
|
|
|
|
|
|
|
cash => { type => "number" }, |
22
|
0
|
|
|
0
|
1
|
|
inbound_pending => { type => "number" }, |
23
|
|
|
|
|
|
|
outbound_pending => { type => "number" }, |
24
|
0
|
|
|
0
|
1
|
|
}, @_ ) ); } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
|
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
0
|
1
|
|
credit_reversal => { |
34
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::CreditReversal", |
35
|
0
|
|
|
0
|
1
|
|
type => "object", |
36
|
|
|
|
|
|
|
}, |
37
|
0
|
|
|
0
|
1
|
|
debit_reversal => { |
38
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::DebitReversal", |
39
|
0
|
|
|
0
|
1
|
|
type => "object", |
40
|
|
|
|
|
|
|
}, |
41
|
0
|
|
|
0
|
1
|
|
inbound_transfer => { |
42
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::InboundTransfer", |
43
|
0
|
|
|
0
|
1
|
|
type => "object", |
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
issuing_authorization => { type => "hash" }, |
46
|
|
|
|
|
|
|
outbound_payment => { |
47
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::OutboundPayment", |
48
|
|
|
|
|
|
|
type => "object", |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
outbound_transfer => { |
51
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::OutboundTransfer", |
52
|
|
|
|
|
|
|
type => "object", |
53
|
|
|
|
|
|
|
}, |
54
|
|
|
|
|
|
|
received_credit => { |
55
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::ReceivedCredit", |
56
|
|
|
|
|
|
|
type => "object", |
57
|
|
|
|
|
|
|
}, |
58
|
|
|
|
|
|
|
received_debit => { |
59
|
|
|
|
|
|
|
package => "Net::API::Stripe::Treasury::ReceivedDebit", |
60
|
|
|
|
|
|
|
type => "object", |
61
|
|
|
|
|
|
|
}, |
62
|
|
|
|
|
|
|
type => { type => "scalar" }, |
63
|
|
|
|
|
|
|
}, @_ ) ); } |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
{ |
69
|
|
|
|
|
|
|
posted_at => { type => "datetime" }, |
70
|
|
|
|
|
|
|
void_at => { type => "datetime" }, |
71
|
|
|
|
|
|
|
}, @_ ) ); } |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |
74
|
|
|
|
|
|
|
# NOTE: POD |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=encoding utf8 |
77
|
0
|
|
|
0
|
1
|
|
|
78
|
|
|
|
|
|
|
=head1 NAME |
79
|
0
|
|
|
0
|
1
|
|
|
80
|
|
|
|
|
|
|
Net::API::Stripe::Treasury::Transaction - The Transaction object |
81
|
0
|
|
|
0
|
1
|
|
|
82
|
|
|
|
|
|
|
=head1 SYNOPSIS |
83
|
0
|
|
|
0
|
1
|
|
|
84
|
|
|
|
|
|
|
=head1 VERSION |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
v0.1.0 |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Transactions represent changes to a L<FinancialAccount's|https://stripe.com/docs/api/treasury/financial_accounts> balance. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 METHODS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 id string |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Unique identifier for the object. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 object string |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
String representing the object's type. Objects of the same type share the same value. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 amount integer |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Amount (in cents) transferred. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 balance_impact hash |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
The change made to each of the FinancialAccount's sub-balances by the Transaction. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
It has the following properties: |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over 4 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item C<cash> integer |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The change made to funds the user can spend right now. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item C<inbound_pending> integer |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
The change made to funds that are not spendable yet, but will become available at a later time. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item C<outbound_pending> integer |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
The change made to funds in the account, but not spendable because they are being held for pending outbound flows. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=back |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 created timestamp |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head2 currency currency |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
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>. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 description string |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
An arbitrary string attached to the object. Often useful for displaying to users. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 entries object |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::List> object. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 financial_account string |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
The FinancialAccount associated with this object. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head2 flow string |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
ID of the flow that created the Transaction. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head2 flow_details hash |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Details of the flow that created the Transaction. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
It has the following properties: |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=over 4 |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=item C<credit_reversal> hash |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
The CreditReversal object associated with the Transaction. Set if C<type=credit_reversal>. |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::CreditReversal> object. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=item C<debit_reversal> hash |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
The DebitReversal object associated with the Transaction. Set if C<type=debit_reversal>. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::DebitReversal> object. |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item C<inbound_transfer> hash |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
The InboundTransfer object associated with the Transaction. Set if C<type=inbound_transfer>. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::InboundTransfer> object. |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=item C<issuing_authorization> hash |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
The Issuing authorization object associated with the Transaction. Set if C<type=issuing_authorization>. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=item C<outbound_payment> hash |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
The OutboundPayment object associated with the Transaction. Set if C<type=outbound_payment>. |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::OutboundPayment> object. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=item C<outbound_transfer> hash |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
The OutboundTransfer object associated with the Transaction. Set if C<type=outbound_transfer>. |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::OutboundTransfer> object. |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=item C<received_credit> hash |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
The ReceivedCredit object associated with the Transaction. Set if C<type=received_credit>. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::ReceivedCredit> object. |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=item C<received_debit> hash |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
The ReceivedDebit object associated with the Transaction. Set if C<type=received_debit>. |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Treasury::ReceivedDebit> object. |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=item C<type> string |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
Type of the flow that created the Transaction. Set to the same value as C<flow_type>. |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=back |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=head2 flow_type string |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
Type of the flow that created the Transaction. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=head2 livemode boolean |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode. |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=head2 status string |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
Status of the Transaction. |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=head2 status_transitions hash |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Hash containing timestamps of when the object transitioned to a particular C<status>. |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
It has the following properties: |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=over 4 |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=item C<posted_at> timestamp |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
Timestamp describing when the Transaction changed status to C<posted>. |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item C<void_at> timestamp |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
Timestamp describing when the Transaction changed status to C<void>. |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=back |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=head1 API SAMPLE |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
[ |
247
|
|
|
|
|
|
|
{ |
248
|
|
|
|
|
|
|
"amount" : "-100", |
249
|
|
|
|
|
|
|
"balance_impact" : { |
250
|
|
|
|
|
|
|
"cash" : "-100", |
251
|
|
|
|
|
|
|
"inbound_pending" : "0", |
252
|
|
|
|
|
|
|
"outbound_pending" : "100" |
253
|
|
|
|
|
|
|
}, |
254
|
|
|
|
|
|
|
"created" : "1662261085", |
255
|
|
|
|
|
|
|
"currency" : "usd", |
256
|
|
|
|
|
|
|
"description" : "Jane Austen (6789) | Outbound transfer | transfer", |
257
|
|
|
|
|
|
|
"financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE", |
258
|
|
|
|
|
|
|
"flow" : "obt_1Le9F32eZvKYlo2CPQD5jo2F", |
259
|
|
|
|
|
|
|
"flow_type" : "outbound_transfer", |
260
|
|
|
|
|
|
|
"id" : "trxn_1Le9F32eZvKYlo2C2dtkse82", |
261
|
|
|
|
|
|
|
"livemode" : 0, |
262
|
|
|
|
|
|
|
"object" : "treasury.transaction", |
263
|
|
|
|
|
|
|
"status" : "open", |
264
|
|
|
|
|
|
|
"status_transitions" : { |
265
|
|
|
|
|
|
|
"posted_at" : null, |
266
|
|
|
|
|
|
|
"void_at" : null |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
] |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
=head1 HISTORY |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=head2 v0.1.0 |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
Initial version |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=head1 AUTHOR |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=head1 SEE ALSO |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
L<Stripe API documentation|https://stripe.com/docs/api/treasury/transactions> |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
Copyright (c) 2019-2022 DEGUEST Pte. Ltd. |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
290
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=cut |