Stripe/Payment/Source.pm

filter: Statementstmt 9.0% 8 / 88 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 3.6% 3 / 83 Podpod 100% 80 / 80 totaltotal 36.2% 91 / 251 CC 1 SCAR 6.7
CC
1
Cov
9%
id
2.0
object
2.0
ach_credit_transfer
2.0
CRAP 2.0
« Stripe/Billing/Invoice.pm ↑ Summary Stripe/Payment/Intent.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Payment/Source.pm
3 ## Version v0.100.0
4 ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp>
6 ## Created 2019/11/02
7 ## Modified 2020/05/15
8 ##
9 ##----------------------------------------------------------------------------
10 ## https://stripe.com/docs/api/sources/object
11 package Net::API::Stripe::Payment::Source;
12 BEGIN
13 {
14 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
17 };
18  
19 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
20  
21 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub ach_credit_transfer { return( shift->_set_get_object( 'ach_credit_transfer', 'Net::API::Stripe::Payment::Source::ACHCreditTransfer', @_ ) ); }
Subroutine ach_credit_transfer: not called CC=1 SCAR=6.9
Pod documented
24  
25 0 ▶sub ach_debit { return( shift->_set_get_object( 'ach_debit', 'Net::API::Stripe::Payment::Source::ACHDebit', @_ ) ); }
Subroutine ach_debit: not called CC=1 SCAR=6.9
Pod documented
26  
27 0 ▶sub account { return( shift->_set_get_scalar_or_object( 'account', 'Net::API::Stripe::Connect::Account', @_ ) ); }
Subroutine account: not called CC=1 SCAR=6.9
Pod documented
28  
29 0 ▶sub account_holder_name { return( shift->_set_get_scalar( 'account_holder_name', @_ ) ); }
Subroutine account_holder_name: not called CC=1 SCAR=6.9
Pod documented
30  
31 0 ▶sub account_holder_type { return( shift->_set_get_scalar( 'account_holder_type', @_ ) ); }
Subroutine account_holder_type: not called CC=1 SCAR=6.9
Pod documented
32  
33 0 ▶sub active { return( shift->_set_get_scalar( 'active', @_ ) ); }
Subroutine active: not called CC=1 SCAR=6.9
Pod documented
34  
35 0 ▶sub address { return( shift->_address_populate( @_ ) ); }
Subroutine address: not called CC=1 SCAR=6.9
Pod documented
36  
37 0 ▶sub address_city { return( shift->_set_get_scalar( 'address_city', @_ ) ); }
Subroutine address_city: not called CC=1 SCAR=6.9
Pod documented
38  
39 0 ▶sub address_country { return( shift->_set_get_scalar( 'address_country', @_ ) ); }
Subroutine address_country: not called CC=1 SCAR=6.9
Pod documented
40  
41 0 ▶sub address_line1 { return( shift->_set_get_scalar( 'address_line1', @_ ) ); }
Subroutine address_line1: not called CC=1 SCAR=6.9
Pod documented
42  
43 0 ▶sub address_line1_check { return( shift->_set_get_scalar( 'address_line1_check', @_ ) ); }
Subroutine address_line1_check: not called CC=1 SCAR=6.9
Pod documented
44  
45 0 ▶sub address_line2 { return( shift->_set_get_scalar( 'address_line2', @_ ) ); }
Subroutine address_line2: not called CC=1 SCAR=6.9
Pod documented
46  
47 0 ▶sub address_state { return( shift->_set_get_scalar( 'address_state', @_ ) ); }
Subroutine address_state: not called CC=1 SCAR=6.9
Pod documented
48  
49 0 ▶sub address_zip { return( shift->_set_get_scalar( 'address_zip', @_ ) ); }
Subroutine address_zip: not called CC=1 SCAR=6.9
Pod documented
50  
51 0 ▶sub address_zip_check { return( shift->_set_get_scalar( 'address_zip_check', @_ ) ); }
Subroutine address_zip_check: not called CC=1 SCAR=6.9
Pod documented
52  
53 0 ▶sub alipay { return( shift->_set_get_hash_as_object( 'alipay', 'Net::API::Stripe::Payment::Method::Details::Alipay', @_ ) ); }
Subroutine alipay: not called CC=1 SCAR=6.9
Pod documented
54  
55 0 ▶sub amount { return( shift->_set_get_number( 'amount', @_ ) ); }
Subroutine amount: not called CC=1 SCAR=6.9
Pod documented
56  
57 0 ▶sub amount_received { return( shift->_set_get_number( 'amount_received', @_ ) ); }
Subroutine amount_received: not called CC=1 SCAR=6.9
Pod documented
58  
59 0 ▶sub available_payout_methods { return( shift->_set_get_array( 'available_payout_methods', @_ ) ); }
Subroutine available_payout_methods: not called CC=1 SCAR=6.9
Pod documented
60  
61 0 ▶sub bancontact { return( shift->_set_get_hash_as_object( 'bancontact', 'Net::API::Stripe::Payment::Method::Details::BanContact', @_ ) ); }
Subroutine bancontact: not called CC=1 SCAR=6.9
Pod documented
62  
63 0 ▶sub bank_name { return( shift->_set_get_scalar( 'bank_name', @_ ) ); }
Subroutine bank_name: not called CC=1 SCAR=6.9
Pod documented
64  
65 0 ▶sub bitcoin_amount { return( shift->_set_get_number( 'bitcoin_amount', @_ ) ); }
Subroutine bitcoin_amount: not called CC=1 SCAR=6.9
Pod documented
66  
67 0 ▶sub bitcoin_amount_received { return( shift->_set_get_number( 'bitcoin_amount_received', @_ ) ); }
Subroutine bitcoin_amount_received: not called CC=1 SCAR=6.9
Pod documented
68  
69 0 ▶sub bitcoin_uri { return( shift->_set_get_uri( 'bitcoin_uri', @_ ) ); }
Subroutine bitcoin_uri: not called CC=1 SCAR=6.9
Pod documented
70  
71 0 ▶sub brand { return( shift->_set_get_scalar( 'brand', @_ ) ); }
Subroutine brand: not called CC=1 SCAR=6.9
Pod documented
72  
73 ## If type is set to "card"
74 0 ▶sub card { return( shift->_set_get_object( 'card', 'Net::API::Stripe::Connect::ExternalAccount::Card', @_ ) ); }
Subroutine card: not called CC=1 SCAR=6.9
Pod documented
75  
76 0 ▶sub card_present { return( shift->_set_get_hash_as_object( 'card_present', 'Net::API::Stripe::Payment::Method::Details::CardPresent', @_ ) ); }
Subroutine card_present: not called CC=1 SCAR=6.9
Pod documented
77  
78 0 ▶sub client_secret { return( shift->_set_get_scalar( 'client_secret', @_ ) ); }
Subroutine client_secret: not called CC=1 SCAR=6.9
Pod documented
79  
80 0 ▶sub code_verification { return( shift->_set_get_object( 'code_verification', 'Net::API::Stripe::Payment::Source::CodeVerification', @_ ) ); }
Subroutine code_verification: not called CC=1 SCAR=6.9
Pod documented
81  
82 0 ▶sub country { return( shift->_set_get_scalar( 'country', @_ ) ); }
Subroutine country: not called CC=1 SCAR=6.9
Pod documented
83  
84 0 ▶sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
85  
86 0 ▶sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); }
Subroutine currency: not called CC=1 SCAR=6.9
Pod documented
87  
88 0 ▶sub customer { return( shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ) ); }
Subroutine customer: not called CC=1 SCAR=6.9
Pod documented
89  
90 0 ▶sub cvc_check { return( shift->_set_get_scalar( 'cvc_check', @_ ) ); }
Subroutine cvc_check: not called CC=1 SCAR=6.9
Pod documented
91  
92 0 ▶sub description { return( shift->_set_get_scalar( 'description', @_ ) ); }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
93  
94 0 ▶sub dynamic_last4 { return( shift->_set_get_scalar( 'dynamic_last4', @_ ) ); }
Subroutine dynamic_last4: not called CC=1 SCAR=6.9
Pod documented
95  
96 0 ▶sub email { return( shift->_set_get_scalar( 'email', @_ ) ); }
Subroutine email: not called CC=1 SCAR=6.9
Pod documented
97  
98 0 ▶sub eps { return( shift->_set_get_hash_as_object( 'eps', 'Net::API::Stripe::Payment::Method::Details::EPS', @_ ) ); }
Subroutine eps: not called CC=1 SCAR=6.9
Pod documented
99  
100 0 ▶sub exp_month { return( shift->_set_get_number( 'exp_month', @_ ) ); }
Subroutine exp_month: not called CC=1 SCAR=6.9
Pod documented
101  
102 0 ▶sub exp_year { return( shift->_set_get_number( 'exp_year', @_ ) ); }
Subroutine exp_year: not called CC=1 SCAR=6.9
Pod documented
103  
104 0 ▶sub filled { return( shift->_set_get_scalar( 'filled', @_ ) ); }
Subroutine filled: not called CC=1 SCAR=6.9
Pod documented
105  
106 0 ▶sub fingerprint { return( shift->_set_get_scalar( 'fingerprint', @_ ) ); }
Subroutine fingerprint: not called CC=1 SCAR=6.9
Pod documented
107  
108 0 ▶sub flow { return( shift->_set_get_scalar( 'flow', @_ ) ); }
Subroutine flow: not called CC=1 SCAR=6.9
Pod documented
109  
110 0 ▶sub funding { return( shift->_set_get_scalar( 'funding', @_ ) ); }
Subroutine funding: not called CC=1 SCAR=6.9
Pod documented
111  
112 0 ▶sub giropay { return( shift->_set_get_hash_as_object( 'giropay', 'Net::API::Stripe::Payment::Method::Details::Giropay', @_ ) ); }
Subroutine giropay: not called CC=1 SCAR=6.9
Pod documented
113  
114 0 ▶sub ideal { return( shift->_set_get_hash_as_object( 'ideal', 'Net::API::Stripe::Payment::Method::Details::Ideal', @_ ) ); }
Subroutine ideal: not called CC=1 SCAR=6.9
Pod documented
115  
116 0 ▶sub inbound_address { return( shift->_set_get_scalar( 'inbound_address', @_ ) ); }
Subroutine inbound_address: not called CC=1 SCAR=6.9
Pod documented
117  
118 0 ▶sub klarna { return( shift->_set_get_hash_as_object( 'klarna', 'Net::API::Stripe::Payment::Method::Details::Klarna', @_ ) ); }
Subroutine klarna: not called CC=1 SCAR=6.9
Pod documented
119  
120 0 ▶sub last4 { return( shift->_set_get_scalar( 'last4', @_ ) ); }
Subroutine last4: not called CC=1 SCAR=6.9
Pod documented
121  
122 0 ▶sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
123  
124 0 ▶sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); }
Subroutine metadata: not called CC=1 SCAR=6.9
Pod documented
125  
126 0 ▶sub multibanco { return( shift->_set_get_hash_as_object( 'multibanco', 'Net::API::Stripe::Payment::Method::Details::MultiBanco', @_ ) ); }
Subroutine multibanco: not called CC=1 SCAR=6.9
Pod documented
127  
128 0 ▶sub name { return( shift->_set_get_scalar( 'name', @_ ) ); }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
129  
130 0 ▶sub owner { return( shift->_set_get_object( 'owner', 'Net::API::Stripe::Payment::Source::Owner', @_ ) ); }
Subroutine owner: not called CC=1 SCAR=6.9
Pod documented
131  
132 0 ▶sub p24 { return( shift->_set_get_hash_as_object( 'p24', 'Net::API::Stripe::Payment::Method::Details::P24', @_ ) ); }
Subroutine p24: not called CC=1 SCAR=6.9
Pod documented
133  
134 0 ▶sub payment { return( shift->_set_get_scalar( 'payment', @_ ) ); }
Subroutine payment: not called CC=1 SCAR=6.9
Pod documented
135  
136 0 ▶sub payment_amount { return( shift->_set_get_number( 'payment_amount', @_ ) ); }
Subroutine payment_amount: not called CC=1 SCAR=6.9
Pod documented
137  
138 0 ▶sub payment_currency { return( shift->_set_get_scalar( 'payment_currency', @_ ) ); }
Subroutine payment_currency: not called CC=1 SCAR=6.9
Pod documented
139  
140 ## "Information related to the receiver flow. Present if the source is a receiver (flow is receiver)."
141 0 ▶sub receiver { return( shift->_set_get_object( 'receiver', 'Net::API::Stripe::Payment::Source::Receiver', @_ ) ); }
Subroutine receiver: not called CC=1 SCAR=6.9
Pod documented
142  
143 0 ▶sub redirect { return( shift->_set_get_object( 'redirect', 'Net::API::Stripe::Payment::Source::Redirect', @_ ) ); }
Subroutine redirect: not called CC=1 SCAR=6.9
Pod documented
144  
145 0 ▶sub refund_address { return( shift->_set_get_scalar( 'refund_address', @_ ) ); }
Subroutine refund_address: not called CC=1 SCAR=6.9
Pod documented
146  
147 0 ▶sub recipient { return( shift->_set_get_scalar_or_object( 'recipient', 'Net::API::Stripe::Customer', @_ ) ); }
Subroutine recipient: not called CC=1 SCAR=6.9
Pod documented
148  
149 0 ▶sub routing_number { return( shift->_set_get_scalar( 'routing_number', @_ ) ); }
Subroutine routing_number: not called CC=1 SCAR=6.9
Pod documented
150  
151 0 ▶sub reusable { return( shift->_set_get_scalar( 'reusable', @_ ) ); }
Subroutine reusable: not called CC=1 SCAR=6.9
Pod documented
152  
153 0 ▶sub sofort { return( shift->_set_get_hash_as_object( 'sofort', 'Net::API::Stripe::Payment::Method::Details::Sofort', @_ ) ); }
Subroutine sofort: not called CC=1 SCAR=6.9
Pod documented
154  
155 0 ▶sub source_order { return( shift->_set_get_object( 'source_order', 'Net::API::Stripe::Order', @_ ) ); }
Subroutine source_order: not called CC=1 SCAR=6.9
Pod documented
156  
157 0 ▶sub statement_descriptor { return( shift->_set_get_scalar( 'statement_descriptor', @_ ) ); }
Subroutine statement_descriptor: not called CC=1 SCAR=6.9
Pod documented
158  
159 0 ▶sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
Subroutine status: not called CC=1 SCAR=6.9
Pod documented
160  
161 0 ▶sub stripe_account { return( shift->_set_get_hash_as_object( 'stripe_account', 'Net::API::Stripe::Payment::Method::Details::StripeAccount', @_ ) ); }
Subroutine stripe_account: not called CC=1 SCAR=6.9
Pod documented
162  
163 0 ▶sub tokenization_method { return( shift->_set_get_scalar( 'tokenization_method', @_ ) ); }
Subroutine tokenization_method: not called CC=1 SCAR=6.9
Pod documented
164  
165 0 ▶sub transactions { return( shift->_set_get_object( 'transactions', 'Net::API::Stripe::List', @_ ) ); }
Subroutine transactions: not called CC=1 SCAR=6.9
Pod documented
166  
167 0 ▶sub type { return( shift->_set_get_scalar( 'type', @_ ) ); }
Subroutine type: not called CC=1 SCAR=6.9
Pod documented
168  
169 0 ▶sub uncaptured_funds { return( shift->_set_get_scalar( 'uncaptured_funds', @_ ) ); }
Subroutine uncaptured_funds: not called CC=1 SCAR=6.9
Pod documented
170  
171 0 ▶sub usage { return( shift->_set_get_scalar( 'usage', @_ ) ); }
Subroutine usage: not called CC=1 SCAR=6.9
Pod documented
172  
173 0 ▶sub used { return( shift->_set_get_scalar( 'used', @_ ) ); }
Subroutine used: not called CC=1 SCAR=6.9
Pod documented
174  
175 0 ▶sub used_for_payment { return( shift->_set_get_scalar( 'used_for_payment', @_ ) ); }
Subroutine used_for_payment: not called CC=1 SCAR=6.9
Pod documented
176  
177 0 ▶sub username { return( shift->_set_get_scalar( 'username', @_ ) ); }
Subroutine username: not called CC=1 SCAR=6.9
Pod documented
178  
179 0 ▶sub wechat { return( shift->_set_get_hash_as_object( 'wechat', 'Net::API::Stripe::Payment::Method::Details::WeChat', @_ ) ); }
Subroutine wechat: not called CC=1 SCAR=6.9
Pod documented
180  
181 1 1;
182  
183 __END__
184  
185 =encoding utf8
186  
187 =head1 NAME
188  
189 Net::API::Stripe::Payment::Source - A Stripe Payment Source Object
190  
191 =head1 SYNOPSIS
192  
193 my $source = $stripe->source({
194 account => $account_object,
195 account_holder_name => 'John Doe',
196 account_holder_type => 'individual',
197 active => $stripe->true,
198 # Or maybe more simply you pass a Net::API::Stripe::Address object
199 # address => $address_object
200 address_line1 => '1-2-3 Kudan-Minami, Chiyoda-ku',
201 address_line2 => 'Big Bldg 12F',
202 address_city => 'Tokyo',
203 address_state => undef,
204 address_zip => '123-4567',
205 address_country => 'jp',
206 amount => 2000,
207 brand => 'Visa',
208 card => $card_object,
209 country => 'jp',
210 currency => 'jpy',
211 description => 'Primary source for customer',
212 email => 'john.doe@example.com',
213 exp_month => 4,
214 exp_year => 2030,
215 funding => 'debit',
216 metadata => { transaction_id => 123, customer_id => 456 },
217 name => 'John Doe',
218 statement_descriptor => 'Big Corp Services',
219 type => 'card',
220 });
221  
222 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
223  
224 =head1 VERSION
225  
226 v0.100.0
227  
228 =head1 DESCRIPTION
229  
230 Source objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card object: once chargeable, they can be charged, or can be attached to customers.
231  
232 Stripe states this approach for card is deprecated in favour or PaymentIntent: L<https://stripe.com/docs/sources/cards>
233  
234 =head1 CONSTRUCTOR
235  
236 =over 4
237  
238 =item B<new>( %ARG )
239  
240 Creates a new L<Net::API::Stripe::Payment::Source> object.
241  
242 =back
243  
244 =head1 METHODS
245  
246 =over 4
247  
248 =item B<id> string
249  
250 Unique identifier for the object.
251  
252 =item B<object> string, value is "source"
253  
254 String representing the object’s type. Objects of the same type share the same value.
255  
256 =item B<account> custom only string (expandable)
257  
258 The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
259  
260 When expanded, this is a L<Net::API::Stripe::Connect::Account>
261  
262 =item B<account_holder_name> string
263  
264 The name of the person or business that owns the bank account.
265  
266 =item B<account_holder_type> string
267  
268 The type of entity that holds the account. This can be either individual or company.
269  
270 =item B<ach_credit_transfer>
271  
272 If B<type> is set to C<ach_credit_transfer>, this is a L<Net::API::Stripe::Payment::Source::ACHCreditTransfer> object.
273  
274 It is not very clear in the Stripe API, but in the B<type> property, they mention "An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method (L<https://stripe.com/docs/sources>) used." :/
275  
276 =item B<ach_debit>
277  
278 If B<type> is set to C<ach_debit>, this is a L<Net::API::Stripe::Payment::Source::ACHDebit> object.
279  
280 It is not very clear in the Stripe API, but in the B<type> property, they mention "An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method (L<https://stripe.com/docs/sources>) used." :/
281  
282 =item B<active> boolean
283  
284 True when this bitcoin receiver has received a non-zero amount of bitcoin.
285  
286 =item B<address> L<Net::API::Stripe::Address> object or hash
287  
288 This is a helper method. Provided with either a L<Net::API::Stripe::Address> object or a hash with same properties, this will assign all the address_* properties by calling its method.
289  
290 =item B<address> L<Net::API::Stripe::Address> object or hash
291  
292 This is a helper method. Provided with either a L<Net::API::Stripe::Address> object or a hash with same properties, this will assign all the address_* properties by calling its method.
293  
294 =item B<address_city> string
295  
296 City/District/Suburb/Town/Village.
297  
298 =item B<address_country> string
299  
300 Billing address country, if provided when creating card.
301  
302 =item B<address_line1> string
303  
304 Address line 1 (Street address/PO Box/Company name).
305  
306 =item B<address_line1_check> string
307  
308 If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.
309  
310 =item B<address_line2> string
311  
312 Address line 2 (Apartment/Suite/Unit/Building).
313  
314 =item B<address_state> string
315  
316 State/County/Province/Region.
317  
318 =item B<address_zip> string
319  
320 ZIP or postal code.
321  
322 =item B<address_zip_check> string
323  
324 If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.
325  
326 =item B<alipay>
327  
328 If B<type> is set to C<alipay>, this is a L<Net::API::Stripe::Payment::Method::Details::Alipay> object.
329  
330 =item B<amount> integer
331  
332 A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.
333  
334 =item B<amount_received> positive integer or zero
335  
336 The amount of currency to which bitcoin_amount_received has been converted.
337  
338 =item B<available_payout_methods> array
339  
340 A set of available payout methods for this card. Will be either ["standard"] or ["standard", "instant"]. Only values from this set should be passed as the method when creating a transfer.
341  
342 =item B<bancontact>
343  
344 If B<type> is set to C<bancontact>, this is a L<Net::API::Stripe::Payment::Method::Details::BanContact> object.
345  
346 =item B<bank_name> string
347  
348 Name of the bank associated with the routing number (e.g., WELLS FARGO).
349  
350 =item B<bitcoin_amount> positive integer
351  
352 The amount of bitcoin that the customer should send to fill the receiver. The bitcoin_amount is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin.
353  
354 =item B<bitcoin_amount_received> positive integer or zero
355  
356 The amount of bitcoin that has been sent by the customer to this receiver.
357  
358 =item B<bitcoin_uri> string
359  
360 This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets).
361  
362 =item B<brand> string
363  
364 Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown.
365  
366 =item B<card> object
367  
368 If B<type> is set to C<card>, this is a L<Net::API::Stripe::Payment::Card> object. See also L<https://stripe.com/docs/sources/cards>.
369  
370 =item B<card_present>
371  
372 If B<type> is set to C<card_present>, this is a L<Net::API::Stripe::Payment::Method::Details::CardPresent> object.
373  
374 =item B<client_secret> string
375  
376 The client secret of the source. Used for client-side retrieval using a publishable key.
377  
378 =item B<code_verification> hash
379  
380 Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is code_verification).
381  
382 This is a L<Net::API::Stripe::Payment::Source::CodeVerification> object.
383  
384 =item B<country> string
385  
386 Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you’ve collected.
387  
388 =item B<created> timestamp
389  
390 Time at which the object was created. Measured in seconds since the Unix epoch.
391  
392 =item B<currency> currency
393  
394 Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.
395  
396 =item B<customer> string
397  
398 The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. If it is expanded, this would be a L<Net::API::Stripe::Customer> object.
399  
400 =item B<cvc_check> string
401  
402 If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked.
403  
404 =item B<description> string
405  
406 An arbitrary string attached to the object. Often useful for displaying to users.
407  
408 =item B<dynamic_last4> string
409  
410 (For tokenized numbers only.) The last four digits of the device account number.
411  
412 =item B<email> string
413  
414 The customer’s email address, set by the API call that creates the receiver.
415  
416 =item B<eps>
417  
418 If B<type> is set to C<eps>, this is a L<Net::API::Stripe::Payment::Method::Details::EPS> object.
419  
420 =item B<exp_month> integer
421  
422 Two-digit number representing the card’s expiration month.
423  
424 =item B<exp_year> integer
425  
426 Four-digit number representing the card’s expiration year.
427  
428 =item B<filled> boolean
429  
430 This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver.
431  
432 =item B<fingerprint> string
433  
434 Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example.
435  
436 =item B<flow> string
437  
438 The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.
439  
440 =item B<livemode> boolean
441  
442 Has the value true if the object exists in live mode or the value false if the object exists in test mode.
443  
444 =item B<funding> string
445  
446 Card funding type. Can be credit, debit, prepaid, or unknown.
447  
448 =item B<giropay>
449  
450 If B<type> is set to C<giropay>, this is a L<Net::API::Stripe::Payment::Method::Details::Giropay> object.
451  
452 =item B<ideal>
453  
454 If B<type> is set to C<ideal>, this is a L<Net::API::Stripe::Payment::Method::Details::Ideal> object.
455  
456 =item B<inbound_address> string
457  
458 A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver.
459  
460 =item B<klarna>
461  
462 If B<type> is set to C<klarna>, this is a L<Net::API::Stripe::Payment::Method::Details::Klarna> object.
463  
464 =item B<last4> string
465  
466 The last four digits of the card.
467  
468 =item B<livemode> boolean
469  
470 Has the value true if the object exists in live mode or the value false if the object exists in test mode.
471  
472 =item B<metadata> hash
473  
474 Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
475  
476 =item B<multibanco>
477  
478 If B<type> is set to C<multibanco>, this is a L<Net::API::Stripe::Payment::Method::Details::MultiBanco> object.
479  
480 =item B<name> string
481  
482 Cardholder name.
483  
484 =item B<p24>
485  
486 If B<type> is set to C<p24>, this is a L<Net::API::Stripe::Payment::Method::Details::P24> object.
487  
488 =item B<payment> string
489  
490 The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
491  
492 =item B<owner> hash
493  
494 Information about the owner of the payment instrument that may be used or required by particular source types.
495  
496 This is a L<Net::API::Stripe::Payment::Source::Owner> object.
497  
498 =item B<payment_amount> positive integer
499  
500 If the Alipay account object is not reusable, the exact amount that you can create a charge for.
501  
502 =item B<payment_currency> currency
503  
504 If the Alipay account object is not reusable, the exact currency that you can create a charge for.
505  
506 =item B<receiver> hash
507  
508 Information related to the receiver flow. Present if the source is a receiver (flow is receiver).
509  
510 This is a L<Net::API::Stripe::Payment::Source::Receiver> object.
511  
512 =item B<recipient> string (expandable)
513  
514 The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead.
515  
516 When expanded, this is a L<Net::API::Stripe::Customer>.
517  
518 =item B<redirect> hash
519  
520 Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is redirect).
521  
522 This is a L<Net::API::Stripe::Payment::Source::Redirect> object.
523  
524 =item B<reusable> boolean
525  
526 True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment.
527  
528 =item B<refund_address> string
529  
530 =item B<routing_number> string
531  
532 The routing transit number for the bank account.
533  
534 =item B<sofort> hash
535  
536 If B<type> is set to C<sofort>, this is a L<Net::API::Stripe::Payment::Details::Sofort> virtual object, ie it is created dynamically by L<Nodule::Generic/"set_get_hash_as_object">
537  
538 =item B<source_order> hash
539  
540 Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. This is a L<Net::API::Stripe::Order> object.
541  
542 =over 8
543  
544 =item B<amount> integer
545  
546 A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
547  
548 =item B<currency> currency
549  
550 Three-letter ISO currency code, in lowercase. Must be a supported currency.
551  
552 =item B<email> string
553  
554 The email address of the customer placing the order.
555  
556 =item B<items> array of hashes
557  
558 List of items constituting the order. This is an array of L<Net::API::Stripe::Order::Item> objects.
559  
560 =item B<shipping> hash
561  
562 The shipping address for the order. Present if the order is for goods to be shipped. This is a L<Net::API::Stripe::Shipping> object
563  
564 =back
565  
566 =item B<statement_descriptor> string
567  
568 Extra information about a source. This will appear on your customer’s statement every time you charge the source.
569  
570 =item B<status> string
571  
572 The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge.
573  
574 =item B<stripe_account>
575  
576 If B<type> is set to C<stripe_account>, this is a L<Net::API::Stripe::Payment::Method::Details::StripeAccount> object.
577  
578 =item B<tokenization_method> string
579  
580 If the card number is tokenized, this is the method that was used. Can be apple_pay or google_pay.
581  
582 =item B<transactions>
583  
584 A list (L<Net::API::Stripe::List>) of L<Net::API::Stripe::Bitcoin::Transaction> object
585  
586 =item B<type> string
587  
588 The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method (L<https://stripe.com/docs/sources>) used.
589  
590 =item B<uncaptured_funds> boolean
591  
592 This receiver contains uncaptured funds that can be used for a payment or refunded.
593  
594 =item B<usage> string
595  
596 Either reusable or single_use. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
597  
598 =item B<used> boolean
599  
600 Whether this Alipay account object has ever been used for a payment.
601  
602 =item B<used_for_payment> boolean
603  
604 =item B<username> string
605  
606 The username for the Alipay account.
607  
608 =item B<wechat>
609  
610 If B<type> is set to C<wechat>, this is a L<Net::API::Stripe::Payment::Method::Details::WeChat> object.
611  
612 =back
613  
614 =head1 API SAMPLE
615  
616 {
617 "id": "src_fake123456789",
618 "object": "source",
619 "ach_credit_transfer": {
620 "account_number": "test_52796e3294dc",
621 "routing_number": "110000000",
622 "fingerprint": "anvbmbvmnbvmab",
623 "bank_name": "TEST BANK",
624 "swift_code": "TSTEZ122"
625 },
626 "amount": null,
627 "client_secret": "src_client_secret_fake123456789",
628 "created": 1571314413,
629 "currency": "jpy",
630 "flow": "receiver",
631 "livemode": false,
632 "metadata": {},
633 "owner": {
634 "address": null,
635 "email": "jenny.rosen@example.com",
636 "name": null,
637 "phone": null,
638 "verified_address": null,
639 "verified_email": null,
640 "verified_name": null,
641 "verified_phone": null
642 },
643 "receiver": {
644 "address": "121042882-38381234567890123",
645 "amount_charged": 0,
646 "amount_received": 0,
647 "amount_returned": 0,
648 "refund_attributes_method": "email",
649 "refund_attributes_status": "missing"
650 },
651 "statement_descriptor": null,
652 "status": "pending",
653 "type": "ach_credit_transfer",
654 "usage": "reusable"
655 }
656  
657 =head1 HISTORY
658  
659 =head2 v0.1
660  
661 Initial version
662  
663 =head1 STRIPE HISTORY
664  
665 =head2 2018-01-23
666  
667 When being viewed by a platform, cards and bank accounts created on behalf of connected accounts will have a fingerprint that is universal across all connected accounts. For accounts that are not connect platforms, there will be no change.
668  
669 =head1 AUTHOR
670  
671 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
672  
673 =head1 SEE ALSO
674  
675 Stripe API documentation:
676  
677 L<https://stripe.com/docs/api/sources>, L<https://stripe.com/docs/sources>, L<https://stripe.com/docs/sources/customers>
678  
679 =head1 COPYRIGHT & LICENSE
680  
681 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
682  
683 You can use, copy, modify and redistribute this package and associated
684 files under the same terms as Perl itself.
685  
686 =cut
687  
« Stripe/Billing/Invoice.pm ↑ Summary Stripe/Payment/Intent.pm »