line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Customer/Card.pm |
3
|
|
|
|
|
|
|
## Version v0.2.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2022/09/30 |
7
|
|
|
|
|
|
|
## Modified 2022/10/29 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/customer_bank_accounts |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
use strict; |
14
|
2
|
|
|
2
|
|
24004549
|
use warnings; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
60
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Connect::ExternalAccount::Card ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
16
|
2
|
|
|
2
|
|
12
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
136
|
our( $VERSION ) = 'v0.2.0'; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
97
|
|
18
|
2
|
|
|
2
|
|
40
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
21
|
2
|
|
|
2
|
|
47
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
22
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
122
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding utf8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Net::API::Stripe::Customer::Card - A Stripe Customer Card Object |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $card = $stripe->customer_card({ |
36
|
|
|
|
|
|
|
account => 'acct_fake123456789', |
37
|
|
|
|
|
|
|
# Or you can also simply pass a Net::API::Stripe::Address object |
38
|
|
|
|
|
|
|
# address => $address_object |
39
|
|
|
|
|
|
|
address_line1 => '1-2-3 Kudan-Minami, Chiyoda-ku', |
40
|
|
|
|
|
|
|
address_line2 => 'Big bldg. 12F', |
41
|
|
|
|
|
|
|
address_city => 'Tokyo', |
42
|
|
|
|
|
|
|
address_zip => '123-4567', |
43
|
|
|
|
|
|
|
address_country => 'jp', |
44
|
|
|
|
|
|
|
brand => 'visa', |
45
|
|
|
|
|
|
|
country => 'jp', |
46
|
|
|
|
|
|
|
currency => 'jpy', |
47
|
|
|
|
|
|
|
customer => $customer_object, |
48
|
|
|
|
|
|
|
cvc => 123, |
49
|
|
|
|
|
|
|
# Boolean |
50
|
|
|
|
|
|
|
default_for_currency => 1, |
51
|
|
|
|
|
|
|
exp_month => 12, |
52
|
|
|
|
|
|
|
exp_year => 2030, |
53
|
|
|
|
|
|
|
funding => 'debit', |
54
|
|
|
|
|
|
|
metadata => { transaction_id => 123, customer_id => 456 }, |
55
|
|
|
|
|
|
|
name => 'John Doe', |
56
|
|
|
|
|
|
|
}); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
v0.2.0 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This class represents a customer card. It is almost the same as the L<external account|Net::API::Stripe::Connect::ExternalAccount::Card>, and it actually inherits all of its methods from it. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 API SAMPLE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
{ |
71
|
|
|
|
|
|
|
"id": "card_1LnbQv2eZvKYlo2ClaAC0Zy9", |
72
|
|
|
|
|
|
|
"object": "card", |
73
|
|
|
|
|
|
|
"address_city": null, |
74
|
|
|
|
|
|
|
"address_country": null, |
75
|
|
|
|
|
|
|
"address_line1": null, |
76
|
|
|
|
|
|
|
"address_line1_check": null, |
77
|
|
|
|
|
|
|
"address_line2": null, |
78
|
|
|
|
|
|
|
"address_state": null, |
79
|
|
|
|
|
|
|
"address_zip": null, |
80
|
|
|
|
|
|
|
"address_zip_check": null, |
81
|
|
|
|
|
|
|
"brand": "Visa", |
82
|
|
|
|
|
|
|
"country": "US", |
83
|
|
|
|
|
|
|
"customer": null, |
84
|
|
|
|
|
|
|
"cvc_check": "pass", |
85
|
|
|
|
|
|
|
"dynamic_last4": null, |
86
|
|
|
|
|
|
|
"exp_month": 8, |
87
|
|
|
|
|
|
|
"exp_year": 2023, |
88
|
|
|
|
|
|
|
"fingerprint": "Xt5EWLLDS7FJjR1c", |
89
|
|
|
|
|
|
|
"funding": "credit", |
90
|
|
|
|
|
|
|
"last4": "4242", |
91
|
|
|
|
|
|
|
"metadata": {}, |
92
|
|
|
|
|
|
|
"name": null, |
93
|
|
|
|
|
|
|
"redaction": null, |
94
|
|
|
|
|
|
|
"tokenization_method": null |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 HISTORY |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 v0.1.0 |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Initial version |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHOR |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 SEE ALSO |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Stripe API documentation: |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/cards>, L<https://stripe.com/docs/sources/cards> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Copyright (c) 2022 DEGUEST Pte. Ltd. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
118
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |