line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::Card; |
2
|
|
|
|
|
|
|
$Net::Stripe::Card::VERSION = '0.40_005'; # TRIAL |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
15
|
$Net::Stripe::Card::VERSION = '0.40005';use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
5
|
2
|
|
|
2
|
|
8314
|
use Kavorka; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
15
|
|
6
|
2
|
|
|
2
|
|
1420
|
use Net::Stripe::Token; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
289
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: represent a Card object from Stripe |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# Input fields |
11
|
|
|
|
|
|
|
has 'number' => (is => 'ro', isa => 'Maybe[Str]'); |
12
|
|
|
|
|
|
|
has 'cvc' => (is => 'ro', isa => 'Maybe[Int]'); |
13
|
|
|
|
|
|
|
has 'name' => (is => 'ro', isa => 'Maybe[Str]'); |
14
|
|
|
|
|
|
|
has 'address_line1' => (is => 'ro', isa => 'Maybe[Str]'); |
15
|
|
|
|
|
|
|
has 'address_line2' => (is => 'ro', isa => 'Maybe[Str]'); |
16
|
|
|
|
|
|
|
has 'address_zip' => (is => 'ro', isa => 'Maybe[Str]'); |
17
|
|
|
|
|
|
|
has 'address_city' => (is => 'ro', isa => 'Maybe[Str]'); |
18
|
|
|
|
|
|
|
has 'address_state' => (is => 'ro', isa => 'Maybe[Str]'); |
19
|
|
|
|
|
|
|
has 'address_country' => (is => 'ro', isa => 'Maybe[Str]'); |
20
|
|
|
|
|
|
|
has 'metadata' => (is => 'ro', isa => 'Maybe[HashRef]'); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Both input and output |
23
|
|
|
|
|
|
|
has 'exp_month' => (is => 'ro', isa => 'Maybe[Int]', required => 1); |
24
|
|
|
|
|
|
|
has 'exp_year' => (is => 'ro', isa => 'Maybe[Int]', required => 1); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Output fields |
27
|
|
|
|
|
|
|
has 'id' => (is => 'ro', isa => 'Maybe[Str]'); |
28
|
|
|
|
|
|
|
has 'address_line1_check' => (is => 'ro', isa => 'Maybe[Str]'); |
29
|
|
|
|
|
|
|
has 'address_zip_check' => (is => 'ro', isa => 'Maybe[Str]'); |
30
|
|
|
|
|
|
|
has 'country' => (is => 'ro', isa => 'Maybe[Str]'); |
31
|
|
|
|
|
|
|
has 'cvc_check' => (is => 'ro', isa => 'Maybe[Str]'); |
32
|
|
|
|
|
|
|
has 'fingerprint' => (is => 'ro', isa => 'Maybe[Str]'); |
33
|
|
|
|
|
|
|
has 'last4' => (is => 'ro', isa => 'Maybe[Str]'); |
34
|
|
|
|
|
|
|
has 'brand' => (is => 'ro', isa => 'Maybe[Str]'); # formerly 'type' |
35
|
|
|
|
|
|
|
|
36
|
2
|
50
|
|
2
|
|
2649
|
method form_fields_for_card_metadata { |
|
2
|
|
|
2
|
|
3
|
|
|
2
|
|
|
|
|
334
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
4
|
|
37
|
2
|
|
|
|
|
50
|
my $metadata = $self->metadata(); |
38
|
2
|
|
|
|
|
4
|
my @metadata = (); |
39
|
2
|
|
|
|
|
10
|
while( my($k,$v) = each(%$metadata) ) { |
40
|
0
|
|
|
|
|
0
|
push @metadata, 'card[metadata]['.$k.']'; |
41
|
0
|
|
|
|
|
0
|
push @metadata, $v; |
42
|
|
|
|
|
|
|
} |
43
|
2
|
|
|
|
|
7
|
return @metadata; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
2
|
50
|
|
2
|
|
1871
|
method form_fields { |
|
2
|
|
|
2
|
|
4
|
|
|
2
|
|
|
|
|
349
|
|
|
2
|
|
|
|
|
21
|
|
|
2
|
|
|
|
|
4
|
|
47
|
|
|
|
|
|
|
return ( |
48
|
|
|
|
|
|
|
$self->form_fields_for_card_metadata(), |
49
|
8
|
|
|
|
|
150
|
map { ("card[$_]" => $self->$_) } |
50
|
2
|
|
|
|
|
7
|
grep { defined $self->$_ } |
|
22
|
|
|
|
|
461
|
|
51
|
|
|
|
|
|
|
qw/number cvc name address_line1 address_line2 address_zip |
52
|
|
|
|
|
|
|
address_city address_state address_country exp_month exp_year/ |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Net::Stripe::Card - represent a Card object from Stripe |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 VERSION |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
version 0.40_005 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 address_city |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Reader: address_city |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Type: Maybe[Str] |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 address_country |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Reader: address_country |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Type: Maybe[Str] |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 address_line1 |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Reader: address_line1 |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Type: Maybe[Str] |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 address_line1_check |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Reader: address_line1_check |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Type: Maybe[Str] |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 address_line2 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Reader: address_line2 |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Type: Maybe[Str] |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 address_state |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Reader: address_state |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Type: Maybe[Str] |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 address_zip |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Reader: address_zip |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Type: Maybe[Str] |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 address_zip_check |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Reader: address_zip_check |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Type: Maybe[Str] |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 brand |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Reader: brand |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Type: Maybe[Str] |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 country |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Reader: country |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Type: Maybe[Str] |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 cvc |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Reader: cvc |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Type: Maybe[Int] |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 cvc_check |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Reader: cvc_check |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Type: Maybe[Str] |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 exp_month |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Reader: exp_month |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Type: Maybe[Int] |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
This attribute is required. |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 exp_year |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Reader: exp_year |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Type: Maybe[Int] |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
This attribute is required. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 fingerprint |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Reader: fingerprint |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Type: Maybe[Str] |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head2 id |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Reader: id |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Type: Maybe[Str] |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 last4 |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
Reader: last4 |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Type: Maybe[Str] |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 metadata |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Reader: metadata |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
Type: Maybe[HashRef] |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head2 name |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
Reader: name |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Type: Maybe[Str] |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 number |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Reader: number |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Type: Maybe[Str] |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head1 AUTHORS |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=over 4 |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=item * |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
Luke Closs |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=item * |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
Rusty Conover |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=back |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
216
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=cut |