File Coverage

lib/Net/API/Stripe/Treasury/FinancialAccount.pm
Criterion Covered Total %
statement 7 23 30.4
branch n/a
condition n/a
subroutine 3 19 15.7
pod 16 16 100.0
total 26 58 44.8


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Treasury/FinancialAccount.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   22898158 use parent qw( Net::API::Stripe::Generic );
  2         14  
  2         65  
14 2     2   11 our( $VERSION ) = 'v0.1.0';
  2         6  
  2         11  
15 2     2   1057 };
16              
17              
18 0     0 1    
19              
20 0     0 1   {
21             cash => { type => "hash" },
22 0     0 1   inbound_pending => { type => "hash" },
23             outbound_pending => { type => "hash" },
24 0     0 1   }, @_ ) ); }
25              
26              
27              
28             {
29             card_issuing => {
30             package => "Net::API::Stripe::Connect::Account::Capability",
31 0     0 1   type => "object",
32             },
33 0     0 1   deposit_insurance => {
34             package => "Net::API::Stripe::Connect::Account::Capability",
35 0     0 1   type => "object",
36             },
37             financial_addresses => {
38             definition => {
39             aba => {
40             package => "Net::API::Stripe::Connect::Account::Capability",
41             type => "object",
42             },
43             },
44             type => "class",
45             },
46             inbound_transfers => {
47             definition => {
48             ach => {
49             package => "Net::API::Stripe::Connect::Account::Capability",
50             type => "object",
51             },
52             },
53             type => "class",
54             },
55             intra_stripe_flows => {
56             package => "Net::API::Stripe::Connect::Account::Capability",
57             type => "object",
58             },
59             object => { type => "scalar" },
60             outbound_payments => {
61             definition => {
62             ach => {
63             package => "Net::API::Stripe::Connect::Account::Capability",
64             type => "object",
65             },
66             us_domestic_wire => {
67             package => "Net::API::Stripe::Connect::Account::Capability",
68             type => "object",
69             },
70             },
71             type => "class",
72             },
73             outbound_transfers => {
74             definition => {
75             ach => {
76             package => "Net::API::Stripe::Connect::Account::Capability",
77             type => "object",
78             },
79             us_domestic_wire => {
80             package => "Net::API::Stripe::Connect::Account::Capability",
81             type => "object",
82             },
83             },
84             type => "class",
85             },
86             }, @_ ) ); }
87              
88             {
89             aba => {
90             package => "Net::API::Stripe::Connect::ExternalAccount::Bank",
91             type => "object",
92             },
93             supported_networks => { type => "array" },
94             type => { type => "scalar" },
95             }, @_ ) ); }
96 0     0 1    
97              
98              
99              
100             {
101             inbound_flows => { type => "scalar" },
102             outbound_flows => { type => "scalar" },
103             }, @_ ) ); }
104              
105              
106 0     0 1    
107              
108 0     0 1    
109             1;
110 0     0 1   # NOTE: POD
111              
112 0     0 1   =encoding utf8
113              
114             =head1 NAME
115              
116             Net::API::Stripe::Treasury::FinancialAccount - The FinancialAccount object
117              
118 0     0 1   =head1 SYNOPSIS
119              
120 0     0 1   =head1 VERSION
121              
122 0     0 1   v0.1.0
123              
124 0     0 1   =head1 DESCRIPTION
125              
126             Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury’s money movement APIs.
127              
128             =head1 METHODS
129              
130             =head2 id string
131              
132             Unique identifier for the object.
133              
134             =head2 object string
135              
136             String representing the object's type. Objects of the same type share the same value.
137              
138             =head2 active_features array
139              
140             The array of paths to active Features in the Features hash.
141              
142             =head2 balance hash
143              
144             The single multi-currency balance of the FinancialAccount. Positive values represent money that belongs to the user while negative values represent funds the user owes. Currently, FinancialAccounts can only carry balances in USD.
145              
146             It has the following properties:
147              
148             =over 4
149              
150             =item C<cash> hash
151              
152             Funds the user can spend right now.
153              
154             =item C<inbound_pending> hash
155              
156             Funds not spendable yet, but will become available at a later time.
157              
158             =item C<outbound_pending> hash
159              
160             Funds in the account, but not spendable because they are being held for pending outbound flows.
161              
162             =back
163              
164             =head2 country string
165              
166             Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>.
167              
168             =head2 created timestamp
169              
170             Time at which the object was created. Measured in seconds since the Unix epoch.
171              
172             =head2 features hash
173              
174             The features and their statuses for this FinancialAccount.
175              
176             It has the following properties:
177              
178             =over 4
179              
180             =item C<card_issuing> hash
181              
182             Contains a Feature encoding the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from.
183              
184             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
185              
186             =item C<deposit_insurance> hash
187              
188             Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
189              
190             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
191              
192             =item C<financial_addresses> hash
193              
194             Contains Features that add FinancialAddresses to the FinancialAccount.
195              
196             =over 8
197              
198             =item C<aba> hash
199              
200             Adds an ABA FinancialAddress to the FinancialAccount.
201              
202             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
203              
204              
205             =back
206              
207             =item C<inbound_transfers> hash
208              
209             Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
210              
211             =over 8
212              
213             =item C<ach> hash
214              
215             Enables ACH Debits via the InboundTransfers API.
216              
217             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
218              
219              
220             =back
221              
222             =item C<intra_stripe_flows> hash
223              
224             Represents the ability for this FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
225              
226             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
227              
228             =item C<object> string
229              
230             String representing the object's type. Objects of the same type share the same value.
231              
232             =item C<outbound_payments> hash
233              
234             Contains Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
235              
236             =over 8
237              
238             =item C<ach> hash
239              
240             Enables ACH transfers via the OutboundPayments API.
241              
242             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
243              
244             =item C<us_domestic_wire> hash
245              
246             Enables US domestic wire tranfers via the OutboundPayments API.
247              
248             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
249              
250              
251             =back
252              
253             =item C<outbound_transfers> hash
254              
255             Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
256              
257             =over 8
258              
259             =item C<ach> hash
260              
261             Enables ACH transfers via the OutboundTransfers API.
262              
263             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
264              
265             =item C<us_domestic_wire> hash
266              
267             Enables US domestic wire tranfers via the OutboundTransfers API.
268              
269             When expanded, this is a L<Net::API::Stripe::Connect::Account::Capability> object.
270              
271              
272             =back
273              
274             =back
275              
276             =head2 financial_addresses array of hash
277              
278             The set of credentials that resolve to a FinancialAccount.
279              
280             It has the following properties:
281              
282             =over 4
283              
284             =item C<aba> hash
285              
286             Identifying information for the ABA address
287              
288             When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.
289              
290             =item C<supported_networks> array
291              
292             The list of networks that the address supports
293              
294             =item C<type> string
295              
296             The type of financial address
297              
298             =back
299              
300             =head2 livemode boolean
301              
302             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
303              
304             =head2 metadata hash
305              
306             Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
307              
308             =head2 pending_features array
309              
310             The array of paths to pending Features in the Features hash.
311              
312             =head2 platform_restrictions hash
313              
314             The set of functionalities that the platform can restrict on the FinancialAccount.
315              
316             It has the following properties:
317              
318             =over 4
319              
320             =item C<inbound_flows> string
321              
322             Restricts all inbound money movement.
323              
324             =item C<outbound_flows> string
325              
326             Restricts all outbound money movement.
327              
328             =back
329              
330             =head2 restricted_features array
331              
332             The array of paths to restricted Features in the Features hash.
333              
334             =head2 status string
335              
336             The enum specifying what state the account is in.
337              
338             =head2 status_details object
339              
340             Details related to the status of this FinancialAccount.
341              
342             This is a L<Net::API::Stripe::Billing::Invoice> object.
343              
344             =head2 supported_currencies array
345              
346             The currencies the FinancialAccount can hold a balance in. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase.
347              
348             =head1 API SAMPLE
349              
350             [
351             {
352             "active_features" : [
353             "financial_addresses.aba",
354             "outbound_payments.ach",
355             "outbound_payments.us_domestic_wire"
356             ],
357             "balance" : {
358             "cash" : {
359             "usd" : "0"
360             },
361             "inbound_pending" : {
362             "usd" : "0"
363             },
364             "outbound_pending" : {
365             "usd" : "0"
366             }
367             },
368             "country" : "US",
369             "created" : "1662261085",
370             "financial_addresses" : [
371             {
372             "aba" : {
373             "account_holder_name" : "Jenny Rosen",
374             "account_number_last4" : "7890",
375             "bank_name" : "STRIPE TEST BANK",
376             "routing_number" : "0000000001"
377             },
378             "supported_networks" : [
379             "ach",
380             "us_domestic_wire"
381             ],
382             "type" : "aba"
383             }
384             ],
385             "id" : "fa_1Le9F32eZvKYlo2CjbQcDQUE",
386             "livemode" : 1,
387             "metadata" : null,
388             "object" : "treasury.financial_account",
389             "pending_features" : [],
390             "restricted_features" : [],
391             "status" : "open",
392             "status_details" : {
393             "closed" : null
394             },
395             "supported_currencies" : [
396             "usd"
397             ]
398             }
399             ]
400              
401             =head1 HISTORY
402              
403             =head2 v0.1.0
404              
405             Initial version
406              
407             =head1 AUTHOR
408              
409             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
410              
411             =head1 SEE ALSO
412              
413             L<Stripe API documentation|https://stripe.com/docs/api/treasury/financial_accounts>
414              
415             =head1 COPYRIGHT & LICENSE
416              
417             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
418              
419             You can use, copy, modify and redistribute this package and associated
420             files under the same terms as Perl itself.
421              
422             =cut