File Coverage

lib/Net/API/Stripe/Treasury/ReceivedCredit.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/ReceivedCredit.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   24050920 use parent qw( Net::API::Stripe::Generic );
  2         15  
  2         72  
14 2     2   13 our( $VERSION ) = 'v0.1.0';
  2         6  
  2         13  
15 2     2   1160 };
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             credit_reversal => { type => "scalar" },
43             issuing_authorization => { type => "scalar" },
44             issuing_transaction => { type => "scalar" },
45             source_flow => { type => "scalar" },
46             source_flow_details => {
47             definition => {
48             credit_reversal => {
49             package => "Net::API::Stripe::Treasury::CreditReversal",
50             type => "object",
51             },
52 0     0 1   outbound_payment => {
53             package => "Net::API::Stripe::Treasury::OutboundPayment",
54             type => "object",
55             },
56             payout => { type => "hash" },
57             type => { type => "scalar" },
58             },
59             type => "class",
60             },
61             source_flow_type => { type => "scalar" },
62             }, @_ ) ); }
63              
64              
65              
66             {
67             deadline => { type => "datetime" },
68             restricted_reason => { type => "scalar" },
69             }, @_ ) ); }
70              
71              
72              
73             1;
74             # NOTE: POD
75              
76 0     0 1   =encoding utf8
77              
78 0     0 1   =head1 NAME
79              
80 0     0 1   Net::API::Stripe::Treasury::ReceivedCredit - The ReceivedCredit object
81              
82             =head1 SYNOPSIS
83              
84             =head1 VERSION
85              
86 0     0 1   v0.1.0
87              
88 0     0 1   =head1 DESCRIPTION
89              
90             ReceivedCredits represent funds sent to a L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts> (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
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 created timestamp
107              
108             Time at which the object was created. Measured in seconds since the Unix epoch.
109              
110             =head2 currency currency
111              
112             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>.
113              
114             =head2 description string
115              
116             An arbitrary string attached to the object. Often useful for displaying to users.
117              
118             =head2 failure_code string
119              
120             Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
121              
122             =head2 financial_account string
123              
124             The FinancialAccount that received the funds.
125              
126             =head2 hosted_regulatory_receipt_url string
127              
128             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.
129              
130             =head2 initiating_payment_method_details hash
131              
132             Details about the PaymentMethod used to send a ReceivedCredit.
133              
134             It has the following properties:
135              
136             =over 4
137              
138             =item C<balance> string
139              
140             Set when C<type> is C<balance>.
141              
142             =item C<billing_details> hash
143              
144             The contact details of the person or business referenced by the received payment method details.
145              
146             When expanded, this is a L<Net::API::Stripe::Billing::Details> object.
147              
148             =item C<financial_account> hash
149              
150             Set when C<type> is C<financial_account>. This is a L<FinancialAccount|https://stripe.com/docs/api/treasury/financial_accounts> ID.
151              
152             When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Card> object.
153              
154             =item C<issuing_card> string
155              
156             Set when C<type> is C<issuing_card>. This is an L<Issuing Card|https://stripe.com/docs/api/issuing/cards> ID.
157              
158             =item C<type> string
159              
160             Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
161              
162             =item C<us_bank_account> hash
163              
164             Set when C<type> is C<us_bank_account>.
165              
166             When expanded, this is a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.
167              
168             =back
169              
170             =head2 linked_flows hash
171              
172             Other flows linked to a ReceivedCredit.
173              
174             It has the following properties:
175              
176             =over 4
177              
178             =item C<credit_reversal> string
179              
180             The CreditReversal created as a result of this ReceivedCredit being reversed.
181              
182             =item C<issuing_authorization> string
183              
184             Set if the ReceivedCredit was created due to an L<Issuing Authorization|https://stripe.com/docs/api/issuing/authorizations> object.
185              
186             =item C<issuing_transaction> string
187              
188             Set if the ReceivedCredit is also viewable as an L<Issuing transaction|https://stripe.com/docs/api/issuing/transactions> object.
189              
190             =item C<source_flow> string
191              
192             ID of the source flow. Set if C<network> is C<stripe> and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.
193              
194             =item C<source_flow_details> hash
195              
196             The expandable object of the source flow.
197              
198             =over 8
199              
200             =item C<credit_reversal> hash
201              
202             Details about a L<CreditReversal|https://stripe.com/docs/api/treasury/credit_reversals>.
203              
204             When expanded, this is a L<Net::API::Stripe::Treasury::CreditReversal> object.
205              
206             =item C<outbound_payment> hash
207              
208             Details about an L<OutboundPayment|https://stripe.com/docs/api/treasury/outbound_payments>.
209              
210             When expanded, this is a L<Net::API::Stripe::Treasury::OutboundPayment> object.
211              
212             =item C<payout> hash
213              
214             Details about a L<Payout|https://stripe.com/docs/api/payouts>.
215              
216             =item C<type> string
217              
218             The type of the source flow that originated the ReceivedCredit.
219              
220              
221             =back
222              
223             =item C<source_flow_type> string
224              
225             The type of flow that originated the ReceivedCredit (for example, C<outbound_payment>).
226              
227             =back
228              
229             =head2 livemode boolean
230              
231             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
232              
233             =head2 network string
234              
235             The rails used to send the funds.
236              
237             =head2 reversal_details hash
238              
239             Details describing when a ReceivedCredit may be reversed.
240              
241             It has the following properties:
242              
243             =over 4
244              
245             =item C<deadline> timestamp
246              
247             Time before which a ReceivedCredit can be reversed.
248              
249             =item C<restricted_reason> string
250              
251             Set if a ReceivedCredit cannot be reversed.
252              
253             =back
254              
255             =head2 status string
256              
257             Status of the ReceivedCredit. ReceivedCredits are created either C<succeeded> (approved) or C<failed> (declined). If a ReceivedCredit is declined, the failure reason can be found in the C<failure_code> field.
258              
259             =head2 transaction expandable
260              
261             The Transaction associated with this object.
262              
263             When expanded this is an L<Net::API::Stripe::Treasury::Transaction> object.
264              
265             =head1 API SAMPLE
266              
267             [
268             {
269             "amount" : "1234",
270             "created" : "1662261086",
271             "currency" : "usd",
272             "description" : "Stripe Test",
273             "failure_code" : null,
274             "financial_account" : "fa_1Le9F32eZvKYlo2CjbQcDQUE",
275             "hosted_regulatory_receipt_url" : "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKN6u0JgGMgYDYytXp4Q6NpNxnyW6ja3A-rXLfX65n1xJ84o7-KJYCHHCamuKkO61-lq-6oeQnW0rKTXcVFx_UTYtQ73i9w",
276             "id" : "rc_1Le9F42eZvKYlo2CM2wIU5bz",
277             "initiating_payment_method_details" : {
278             "billing_details" : {
279             "address" : {
280             "city" : null,
281             "country" : null,
282             "line1" : null,
283             "line2" : null,
284             "postal_code" : null,
285             "state" : null
286             },
287             "email" : null,
288             "name" : "Jane Austen"
289             },
290             "type" : "us_bank_account",
291             "us_bank_account" : {
292             "bank_name" : "STRIPE TEST BANK",
293             "last4" : "6789",
294             "routing_number" : "110000000"
295             }
296             },
297             "linked_flows" : {
298             "credit_reversal" : null,
299             "issuing_authorization" : null,
300             "issuing_transaction" : null,
301             "source_flow" : null,
302             "source_flow_type" : null
303             },
304             "livemode" : 0,
305             "network" : "ach",
306             "object" : "treasury.received_credit",
307             "reversal_details" : {
308             "deadline" : "1662508800",
309             "restricted_reason" : null
310             },
311             "status" : "succeeded",
312             "transaction" : "trxn_1Le9F32eZvKYlo2C2dtkse82"
313             }
314             ]
315              
316             =head1 HISTORY
317              
318             =head2 v0.1.0
319              
320             Initial version
321              
322             =head1 AUTHOR
323              
324             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
325              
326             =head1 SEE ALSO
327              
328             L<Stripe API documentation|https://stripe.com/docs/api/treasury/received_credits>
329              
330             =head1 COPYRIGHT & LICENSE
331              
332             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
333              
334             You can use, copy, modify and redistribute this package and associated
335             files under the same terms as Perl itself.
336              
337             =cut