line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Billing/Details.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/charges/object |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
use strict; |
14
|
2
|
|
|
2
|
|
24104358
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
60
|
|
15
|
2
|
|
|
2
|
|
47
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
61
|
|
16
|
2
|
|
|
2
|
|
10
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
17
|
2
|
|
|
2
|
|
136
|
our( $VERSION ) = 'v0.100.0'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
109
|
|
18
|
2
|
|
|
2
|
|
39
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
21
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
38
|
|
22
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
33
|
|
|
2
|
|
|
|
|
241
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
0
|
|
|
0
|
1
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
=encoding utf8 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Net::API::Stripe::Billing::Details - An interface to Stripe API |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $billing_details = $stripe->charge->billing_details({ |
39
|
|
|
|
|
|
|
address => $stripe->address({ |
40
|
|
|
|
|
|
|
line1 => '1-2-3 Kudan-Manami, Chiyoda-ku', |
41
|
|
|
|
|
|
|
line2 => 'Big Bldg, 12F', |
42
|
|
|
|
|
|
|
city => 'Tokyo', |
43
|
|
|
|
|
|
|
postal_code => '123-4567', |
44
|
|
|
|
|
|
|
country => 'jp', |
45
|
|
|
|
|
|
|
}), |
46
|
|
|
|
|
|
|
email => 'john.doe@example.com', |
47
|
|
|
|
|
|
|
name => 'John Doe', |
48
|
|
|
|
|
|
|
phone => '+81-90-1234-5678', |
49
|
|
|
|
|
|
|
}); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 VERSION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
v0.100.0 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This is created by method B<billing_details> L<Net::API::Stripe::Charge> or by method B<billing_details> in L<Net::API::Stripe::Payment::Method> and capture the billing details |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 new( %ARG ) |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Billing::Details> object. |
64
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 address hash |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Billing address. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Address> object. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 email string |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Email address. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 name string |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Full name. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 phone string |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Billing phone number (including extension). |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 API SAMPLE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
{ |
89
|
|
|
|
|
|
|
"id": "pm_123456789", |
90
|
|
|
|
|
|
|
"object": "payment_method", |
91
|
|
|
|
|
|
|
"billing_details": { |
92
|
|
|
|
|
|
|
"address": { |
93
|
|
|
|
|
|
|
"city": "Anytown", |
94
|
|
|
|
|
|
|
"country": "US", |
95
|
|
|
|
|
|
|
"line1": "1234 Main street", |
96
|
|
|
|
|
|
|
"line2": null, |
97
|
|
|
|
|
|
|
"postal_code": "123456", |
98
|
|
|
|
|
|
|
"state": null |
99
|
|
|
|
|
|
|
}, |
100
|
|
|
|
|
|
|
"email": "jenny@example.com", |
101
|
|
|
|
|
|
|
"name": null, |
102
|
|
|
|
|
|
|
"phone": "+15555555555" |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
"card": { |
105
|
|
|
|
|
|
|
"brand": "visa", |
106
|
|
|
|
|
|
|
"checks": { |
107
|
|
|
|
|
|
|
"address_line1_check": null, |
108
|
|
|
|
|
|
|
"address_postal_code_check": null, |
109
|
|
|
|
|
|
|
"cvc_check": null |
110
|
|
|
|
|
|
|
}, |
111
|
|
|
|
|
|
|
"country": "US", |
112
|
|
|
|
|
|
|
"exp_month": 8, |
113
|
|
|
|
|
|
|
"exp_year": 2020, |
114
|
|
|
|
|
|
|
"fingerprint": "xksmmnsnmhfjskhjh", |
115
|
|
|
|
|
|
|
"funding": "credit", |
116
|
|
|
|
|
|
|
"generated_from": null, |
117
|
|
|
|
|
|
|
"last4": "4242", |
118
|
|
|
|
|
|
|
"three_d_secure_usage": { |
119
|
|
|
|
|
|
|
"supported": true |
120
|
|
|
|
|
|
|
}, |
121
|
|
|
|
|
|
|
"wallet": null |
122
|
|
|
|
|
|
|
}, |
123
|
|
|
|
|
|
|
"created": 123456789, |
124
|
|
|
|
|
|
|
"customer": null, |
125
|
|
|
|
|
|
|
"livemode": false, |
126
|
|
|
|
|
|
|
"metadata": { |
127
|
|
|
|
|
|
|
"order_id": "123456789" |
128
|
|
|
|
|
|
|
}, |
129
|
|
|
|
|
|
|
"type": "card" |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 HISTORY |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 v0.1 |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Initial version |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 AUTHOR |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 SEE ALSO |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Stripe API documentation: |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
L<https://stripe.com/docs/api> |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
153
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=cut |
156
|
|
|
|
|
|
|
|