File Coverage

lib/Net/API/Stripe/Treasury/ReceivedDebit.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/ReceivedDebit.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   24153207 use parent qw( Net::API::Stripe::Generic );
  2         18  
  2         71  
14 2     2   11 our( $VERSION ) = 'v0.1.0';
  2         5  
  2         11  
15 2     2   1001 };
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             balance => { type => "scalar" },
28 0     0 1   billing_details => { package => "Net::API::Stripe::Billing::Details", type => "object" },
29             financial_account => {
30 0     0 1   package => "Net::API::Stripe::Connect::ExternalAccount::Card",
31             type => "object",
32 0     0 1   },
33             issuing_card => { type => "scalar" },
34 0     0 1   type => { type => "scalar" },
35             us_bank_account => {
36 0     0 1   package => "Net::API::Stripe::Connect::ExternalAccount::Bank",
37             type => "object",
38             },
39             }, @_ ) ); }
40              
41             {
42             debit_reversal => { type => "scalar" },
43             inbound_transfer => { type => "scalar" },
44             issuing_authorization => { type => "scalar" },
45             issuing_transaction => { type => "scalar" },
46             }, @_ ) ); }
47              
48              
49              
50             {
51             deadline => { type => "datetime" },
52 0     0 1   restricted_reason => { type => "scalar" },
53             }, @_ ) ); }
54              
55              
56              
57             1;
58             # NOTE: POD
59              
60 0     0 1   =encoding utf8
61              
62 0     0 1   =head1 NAME
63              
64 0     0 1   Net::API::Stripe::Treasury::ReceivedDebit - The ReceivedDebit object
65              
66             =head1 SYNOPSIS
67              
68             =head1 VERSION
69              
70 0     0 1   v0.1.0
71              
72 0     0 1   =head1 DESCRIPTION
73              
74             ReceivedDebits represent funds pulled from a L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts>. These are not initiated from the FinancialAccount.
75              
76             =head1 METHODS
77              
78             =head2 id string
79              
80             Unique identifier for the object.
81              
82             =head2 object string
83              
84             String representing the object's type. Objects of the same type share the same value.
85              
86             =head2 amount integer
87              
88             Amount (in cents) transferred.
89              
90             =head2 created timestamp
91              
92             Time at which the object was created. Measured in seconds since the Unix epoch.
93              
94             =head2 currency currency
95              
96             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>.
97              
98             =head2 description string
99              
100             An arbitrary string attached to the object. Often useful for displaying to users.
101              
102             =head2 failure_code string
103              
104             Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
105              
106             =head2 financial_account string
107              
108             The FinancialAccount that funds were pulled from.
109              
110             =head2 hosted_regulatory_receipt_url string
111              
112             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.
113              
114             =head2 initiating_payment_method_details hash
115              
116             Details about how a ReceivedDebit was created.
117              
118             It has the following properties:
119              
120             =over 4
121              
122             =item C<balance> string
123              
124             Set when C<type> is C<balance>.
125              
126             =item C<billing_details> hash
127              
128             The contact details of the person or business referenced by the received payment method details.
129              
130             When expanded, this is a L<Net::API::Stripe::Billing::Details> object.
131              
132             =item C<financial_account> hash
133              
134             Set when C<type> is C<financial_account>. This is a L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts> ID.
135              
136             When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Card> object.
137              
138             =item C<issuing_card> string
139              
140             Set when C<type> is C<issuing_card>. This is an L<Issuing Card|https://stripe.com/docs/api/issuing/cards> ID.
141              
142             =item C<type> string
143              
144             Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
145              
146             =item C<us_bank_account> hash
147              
148             Set when C<type> is C<us_bank_account>.
149              
150             When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.
151              
152             =back
153              
154             =head2 linked_flows hash
155              
156             Other flows linked to a ReceivedDebit.
157              
158             It has the following properties:
159              
160             =over 4
161              
162             =item C<debit_reversal> string
163              
164             The DebitReversal created as a result of this ReceivedDebit being reversed.
165              
166             =item C<inbound_transfer> string
167              
168             Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
169              
170             =item C<issuing_authorization> string
171              
172             Set if the ReceivedDebit was created due to an L<Issuing Authorization|https://stripe.com/docs/api/issuing/authorizations> object.
173              
174             =item C<issuing_transaction> string
175              
176             Set if the ReceivedDebit is also viewable as an L<Issuing Dispute|https://stripe.com/docs/api/issuing/disputes> object.
177              
178             =back
179              
180             =head2 livemode boolean
181              
182             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
183              
184             =head2 network string
185              
186             The network used for the ReceivedDebit.
187              
188             =head2 reversal_details hash
189              
190             Details describing when a ReceivedDebit might be reversed.
191              
192             It has the following properties:
193              
194             =over 4
195              
196             =item C<deadline> timestamp
197              
198             Time before which a ReceivedDebit can be reversed.
199              
200             =item C<restricted_reason> string
201              
202             Set if a ReceivedDebit can't be reversed.
203              
204             =back
205              
206             =head2 status string
207              
208             Status of the ReceivedDebit. ReceivedDebits are created with a status of either C<succeeded> (approved) or C<failed> (declined). The failure reason can be found under the C<failure_code>.
209              
210             =head2 transaction expandable
211              
212             The Transaction associated with this object.
213              
214             When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object.
215              
216             =head1 API SAMPLE
217              
218             [
219             {
220             "amount" : "54321",
221             "created" : "1662261086",
222             "currency" : "usd",
223             "description" : "Stripe Test",
224             "failure_code" : null,
225             "financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE",
226             "hosted_regulatory_receipt_url" : "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKN6u0JgGMgaJXJ5gPWM6NpNVsxwbJ0H2IYdjE-FeJWvCxhxTRMtAqNeU_wiSFNdGGWnGiwIbGaTowMIXAsm7Eie-ou_Wuw",
227             "id" : "rd_1Le9F42eZvKYlo2CkeS54zSl",
228             "initiating_payment_method_details" : {
229             "billing_details" : {
230             "address" : {
231             "city" : null,
232             "country" : null,
233             "line1" : null,
234             "line2" : null,
235             "postal_code" : null,
236             "state" : null
237             },
238             "email" : null,
239             "name" : "Jane Austen"
240             },
241             "type" : "us_bank_account",
242             "us_bank_account" : {
243             "bank_name" : "STRIPE TEST BANK",
244             "last4" : "6789",
245             "routing_number" : "110000000"
246             }
247             },
248             "linked_flows" : {
249             "debit_reversal" : null,
250             "inbound_transfer" : null,
251             "issuing_authorization" : null,
252             "issuing_transaction" : null
253             },
254             "livemode" : 0,
255             "network" : "ach",
256             "object" : "treasury.received_debit",
257             "reversal_details" : {
258             "deadline" : "1662508800",
259             "restricted_reason" : null
260             },
261             "status" : "succeeded",
262             "transaction" : "trxn_1Le9F32eZvKYlo2C2dtkse82"
263             }
264             ]
265              
266             =head1 HISTORY
267              
268             =head2 v0.1.0
269              
270             Initial version
271              
272             =head1 AUTHOR
273              
274             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
275              
276             =head1 SEE ALSO
277              
278             L<Stripe API documentation|https://stripe.com/docs/api/treasury/received_debits>
279              
280             =head1 COPYRIGHT & LICENSE
281              
282             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
283              
284             You can use, copy, modify and redistribute this package and associated
285             files under the same terms as Perl itself.
286              
287             =cut