File Coverage

lib/Net/API/Stripe/Treasury/OutboundTransfer.pm
Criterion Covered Total %
statement 7 26 26.9
branch n/a
condition n/a
subroutine 3 22 13.6
pod 19 19 100.0
total 29 67 43.2


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Treasury/OutboundTransfer.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   23978248 use parent qw( Net::API::Stripe::Generic );
  2         15  
  2         75  
14 2     2   16 our( $VERSION ) = 'v0.1.0';
  2         10  
  2         10  
15 2     2   1132 };
16              
17              
18 0     0 1    
19              
20 0     0 1    
21              
22 0     0 1    
23              
24 0     0 1    
25              
26 0     0 1    
27              
28 0     0 1    
29              
30 0     0 1    
31             {
32 0     0 1   code => { type => "scalar" },
33             transaction => {
34 0     0 1   package => "Net::API::Stripe::Treasury::Transaction",
35             type => "scalar_or_object",
36 0     0 1   },
37             }, @_ ) ); }
38 0     0 1    
39              
40 0     0 1    
41             {
42 0     0 1   canceled_at => { type => "datetime" },
43             failed_at => { type => "datetime" },
44 0     0 1   posted_at => { type => "datetime" },
45             returned_at => { type => "datetime" },
46 0     0 1   }, @_ ) ); }
47              
48              
49             1;
50             # NOTE: POD
51              
52             =encoding utf8
53              
54             =head1 NAME
55 0     0 1    
56             Net::API::Stripe::Treasury::OutboundTransfer - The OutboundTransfer object
57 0     0 1    
58             =head1 SYNOPSIS
59 0     0 1    
60             =head1 VERSION
61              
62             v0.1.0
63              
64             =head1 DESCRIPTION
65              
66             Use OutboundTransfers to transfer funds from a L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts> to a PaymentMethod belonging to the same entity. To send funds to a different party, use L<OutboundPayments|https://stripe.com/docs/api/treasury/outbound_payments> instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
67 0     0 1    
68             Simulate OutboundTransfer state changes with the C</v1/test_helpers/treasury/outbound_transfers> endpoints. These methods can only be called on test mode objects.
69              
70             =head1 METHODS
71              
72             =head2 id string
73              
74             Unique identifier for the object.
75              
76             =head2 object string
77              
78             String representing the object's type. Objects of the same type share the same value.
79              
80             =head2 amount integer
81              
82             Amount (in cents) transferred.
83              
84             =head2 cancelable boolean
85              
86             Returns C<true> if the object can be canceled, and C<false> otherwise.
87              
88             =head2 created timestamp
89              
90             Time at which the object was created. Measured in seconds since the Unix epoch.
91              
92             =head2 currency currency
93              
94             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>.
95              
96             =head2 description string
97              
98             An arbitrary string attached to the object. Often useful for displaying to users.
99              
100             =head2 destination_payment_method string
101              
102             The PaymentMethod used as the payment instrument for an OutboundTransfer.
103              
104             =head2 destination_payment_method_details object
105              
106             Details about the PaymentMethod for an OutboundTransfer
107              
108             This is a L<Net::API::Stripe::Payment::Method> object.
109              
110             =head2 expected_arrival_date timestamp
111              
112             The date when funds are expected to arrive in the destination account.
113              
114             =head2 financial_account string
115              
116             The FinancialAccount that funds were pulled from.
117              
118             =head2 hosted_regulatory_receipt_url string
119              
120             A L<hosted transaction receipt|https://stripe.com/docs/treasury/moving-money/regulatory-receipts> URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
121              
122             =head2 livemode boolean
123              
124             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
125              
126             =head2 metadata hash
127              
128             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.
129              
130             =head2 returned_details hash
131              
132             Details about a returned OutboundTransfer. Only set when the status is C<returned>.
133              
134             It has the following properties:
135              
136             =over 4
137              
138             =item C<code> string
139              
140             Reason for the return.
141              
142             =item C<transaction> string expandable
143              
144             The Transaction associated with this object.
145              
146             When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object.
147              
148             =back
149              
150             =head2 statement_descriptor string
151              
152             Information about the OutboundTransfer to be sent to the recipient account.
153              
154             =head2 status string
155              
156             Current status of the OutboundTransfer: C<processing>, C<failed>, C<canceled>, C<posted>, C<returned>. An OutboundTransfer is C<processing> if it has been created and is pending. The status changes to C<posted> once the OutboundTransfer has been "confirmed" and funds have left the account, or to C<failed> or C<canceled>. If an OutboundTransfer fails to arrive at its destination, its status will change to C<returned>.
157              
158             =head2 status_transitions hash
159              
160             Hash containing timestamps of when the object transitioned to a particular C<status>.
161              
162             It has the following properties:
163              
164             =over 4
165              
166             =item C<canceled_at> timestamp
167              
168             Timestamp describing when an OutboundTransfer changed status to C<canceled>
169              
170             =item C<failed_at> timestamp
171              
172             Timestamp describing when an OutboundTransfer changed status to C<failed>
173              
174             =item C<posted_at> timestamp
175              
176             Timestamp describing when an OutboundTransfer changed status to C<posted>
177              
178             =item C<returned_at> timestamp
179              
180             Timestamp describing when an OutboundTransfer changed status to C<returned>
181              
182             =back
183              
184             =head2 transaction expandable
185              
186             The Transaction associated with this object.
187              
188             When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object.
189              
190             =head1 API SAMPLE
191              
192             [
193             {
194             "amount" : "10000",
195             "cancelable" : 1,
196             "created" : "1662261085",
197             "currency" : "usd",
198             "description" : "OutboundTransfer to my external bank account",
199             "destination_payment_method" : "pm_1Le9F32eZvKYlo2CpHGQxg2C",
200             "destination_payment_method_details" : {
201             "billing_details" : {
202             "address" : {
203             "city" : "San Francisco",
204             "country" : "US",
205             "line1" : "1234 Fake Street",
206             "line2" : null,
207             "postal_code" : "94102",
208             "state" : "CA"
209             },
210             "email" : null,
211             "name" : "Jane Austen"
212             },
213             "type" : "us_bank_account",
214             "us_bank_account" : {
215             "account_holder_type" : "company",
216             "account_type" : "checking",
217             "bank_name" : "STRIPE TEST BANK",
218             "fingerprint" : "1JWtPxqbdX5Gamtc",
219             "last4" : "6789",
220             "network" : "ach",
221             "routing_number" : "110000000"
222             }
223             },
224             "expected_arrival_date" : "1662422400",
225             "financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE",
226             "hosted_regulatory_receipt_url" : "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKN6u0JgGMgYg10dl2l46NpNi7-U4RHGRK4gmazw1MJMHmoXQhqSVwlK_KfXIpam3FgzagG7PLAcDtvccPlM_sJNFGTBUBQ",
227             "id" : "obt_1Le9F32eZvKYlo2CPQD5jo2F",
228             "livemode" : 0,
229             "metadata" : {},
230             "object" : "treasury.outbound_transfer",
231             "returned_details" : null,
232             "statement_descriptor" : "transfer",
233             "status" : "processing",
234             "status_transitions" : {
235             "canceled_at" : null,
236             "failed_at" : null,
237             "posted_at" : null,
238             "returned_at" : null
239             },
240             "transaction" : "trxn_1Le9F32eZvKYlo2C2dtkse82"
241             }
242             ]
243              
244             =head1 HISTORY
245              
246             =head2 v0.1.0
247              
248             Initial version
249              
250             =head1 AUTHOR
251              
252             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
253              
254             =head1 SEE ALSO
255              
256             L<Stripe API documentation|https://stripe.com/docs/api/treasury/outbound_transfers>
257              
258             =head1 COPYRIGHT & LICENSE
259              
260             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
261              
262             You can use, copy, modify and redistribute this package and associated
263             files under the same terms as Perl itself.
264              
265             =cut