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