line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Issuing/Card/Holder.pm |
3
|
|
|
|
|
|
|
## Version v0.200.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/issuing/cardholders/object |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
use strict; |
14
|
2
|
|
|
2
|
|
23949010
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
61
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
60
|
|
16
|
2
|
|
|
2
|
|
10
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
213
|
our( $VERSION ) = 'v0.200.0'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
120
|
|
18
|
2
|
|
|
2
|
|
54
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
use strict; |
21
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
39
|
|
22
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
878
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
|
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
|
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
|
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
|
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
0
|
1
|
|
return( shift->_set_get_class( 'spending_controls', |
39
|
|
|
|
|
|
|
{ |
40
|
0
|
|
|
0
|
1
|
|
allowed_categories => { type => 'array' }, |
41
|
|
|
|
|
|
|
blocked_categories => { type => 'array' }, |
42
|
0
|
|
|
0
|
1
|
|
spending_limits => |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
0
|
1
|
|
type => 'class', definition => |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
0
|
1
|
|
amount => { type => 'number' }, |
47
|
|
|
|
|
|
|
categories => { type => 'array' }, |
48
|
0
|
|
|
0
|
1
|
|
interval => { type => 'scalar' }, |
49
|
|
|
|
|
|
|
} |
50
|
0
|
|
|
0
|
1
|
|
}, |
51
|
|
|
|
|
|
|
spending_limits_currency => { type => 'scalar' }, |
52
|
|
|
|
|
|
|
}, @_ ) ); |
53
|
|
|
|
|
|
|
} |
54
|
0
|
|
|
0
|
1
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=encoding utf8 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Net::API::Stripe::Issuing::Card::Holder - A Stripe Card Holder Object |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SYNOPSIS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $holder = $stripe->card_holder({ |
69
|
|
|
|
|
|
|
authorization_controls => |
70
|
|
|
|
|
|
|
{ |
71
|
0
|
|
|
0
|
1
|
|
allowed_categories => [], |
72
|
|
|
|
|
|
|
blocked_categories => [], |
73
|
0
|
|
|
0
|
1
|
|
spending_limits => |
74
|
|
|
|
|
|
|
[ |
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
amount => 2000000, |
77
|
|
|
|
|
|
|
categories => '', |
78
|
|
|
|
|
|
|
interval => 'monthly', |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
{ |
81
|
|
|
|
|
|
|
amount => 200000, |
82
|
|
|
|
|
|
|
categories => '', |
83
|
|
|
|
|
|
|
interval => 'weekly', |
84
|
|
|
|
|
|
|
}, |
85
|
|
|
|
|
|
|
], |
86
|
|
|
|
|
|
|
spending_limits_currency => 'jpy', |
87
|
|
|
|
|
|
|
}, |
88
|
|
|
|
|
|
|
billing => $billing_details_object, |
89
|
|
|
|
|
|
|
company => $account_company_object, |
90
|
|
|
|
|
|
|
created => '2020-04-12T07:30:10', |
91
|
|
|
|
|
|
|
email => 'john.doe@example.com', |
92
|
|
|
|
|
|
|
individual => $account_individual_object, |
93
|
|
|
|
|
|
|
is_default => $stripe->true, |
94
|
|
|
|
|
|
|
livemode => $stripe->false, |
95
|
|
|
|
|
|
|
name => 'John Doe', |
96
|
|
|
|
|
|
|
phone_number => '+81-(0)90-1234-5678', |
97
|
|
|
|
|
|
|
requirements => $account_requirements_object, |
98
|
|
|
|
|
|
|
status => 'active', |
99
|
|
|
|
|
|
|
type => 'individual', |
100
|
|
|
|
|
|
|
}); |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 VERSION |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
v0.200.0 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 DESCRIPTION |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
An Issuing Cardholder object represents an individual or business entity who is issued (L<https://stripe.com/docs/issuing>) cards. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 new( %ARG ) |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Card::Holder> object. |
117
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 METHODS |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 id string |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Unique identifier for the object. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 object string, value is "issuing.cardholder" |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 authorization_controls hash |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Issuing::Card::AuthorizationsControl> object. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 billing hash |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
The cardholder’s billing address. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Billing::Details> object. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 company hash preview feature |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Additional information about a business_entity cardholder. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Connect::Account::Company> object. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 created timestamp |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
This is a C<DateTime> object. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 email string |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
The cardholder’s email address. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 individual hash preview feature |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Additional information about an individual cardholder. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Connect::Person> object. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 is_default boolean |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Whether or not this cardholder is the default cardholder. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 livemode boolean |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 metadata hash |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
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. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 name string |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
The cardholder’s name. This will be printed on cards issued to them. |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head2 phone_number string |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
The cardholder’s phone number. |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 requirements hash |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
Information about verification requirements for the cardholder, including what information needs to be collected. |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Connect::Account::Requirements> object. |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head2 spending_controls hash |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
This is a hash whose properties are accessible as a dynamic class methods |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=over 4 |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=item I<amount> positive integer |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Maximum amount allowed to spend per time interval. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=item I<categories> array |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
Array of strings containing categories on which to apply the spending limit. Leave this blank to limit all charges. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=item I<interval> enum |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
The time interval or event with which to apply this spending limit towards. |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=over 8 |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
=item I<per_authorization> |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
A maximum amount for each authorization. |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=item I<daily> |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
A maximum within a day. A day start at midnight UTC. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=item I<weekly> |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
A maximum within a week. The first day of a week is Monday. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=item I<monthly> |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
A maximum within a month. Starts on the first of that month. |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=item I<yearly> |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
A maximum amount within a year. Starts January 1st. |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
=item I<all_time> |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
A maximum amount for all transactions. |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=back |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=item I<spending_limits_currency> currency |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
Currency for the amounts within spending_limits. Locked to the currency of the card. |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=back |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=head2 status string |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
One of active, inactive, or blocked. |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=head2 type string |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
One of individual or business_entity. |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=head1 API SAMPLE |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
{ |
250
|
|
|
|
|
|
|
"id": "ich_fake123456789", |
251
|
|
|
|
|
|
|
"object": "issuing.cardholder", |
252
|
|
|
|
|
|
|
"authorization_controls": { |
253
|
|
|
|
|
|
|
"allowed_categories": [], |
254
|
|
|
|
|
|
|
"blocked_categories": [], |
255
|
|
|
|
|
|
|
"spending_limits": [], |
256
|
|
|
|
|
|
|
"spending_limits_currency": null |
257
|
|
|
|
|
|
|
}, |
258
|
|
|
|
|
|
|
"billing": { |
259
|
|
|
|
|
|
|
"address": { |
260
|
|
|
|
|
|
|
"city": "Beverly Hills", |
261
|
|
|
|
|
|
|
"country": "US", |
262
|
|
|
|
|
|
|
"line1": "123 Fake St", |
263
|
|
|
|
|
|
|
"line2": "Apt 3", |
264
|
|
|
|
|
|
|
"postal_code": "90210", |
265
|
|
|
|
|
|
|
"state": "CA" |
266
|
|
|
|
|
|
|
}, |
267
|
|
|
|
|
|
|
"name": "Jenny Rosen" |
268
|
|
|
|
|
|
|
}, |
269
|
|
|
|
|
|
|
"company": null, |
270
|
|
|
|
|
|
|
"created": 1540111055, |
271
|
|
|
|
|
|
|
"email": "jenny@example.com", |
272
|
|
|
|
|
|
|
"individual": null, |
273
|
|
|
|
|
|
|
"is_default": false, |
274
|
|
|
|
|
|
|
"livemode": false, |
275
|
|
|
|
|
|
|
"metadata": {}, |
276
|
|
|
|
|
|
|
"name": "Jenny Rosen", |
277
|
|
|
|
|
|
|
"phone_number": "+18008675309", |
278
|
|
|
|
|
|
|
"requirements": { |
279
|
|
|
|
|
|
|
"disabled_reason": null, |
280
|
|
|
|
|
|
|
"past_due": [] |
281
|
|
|
|
|
|
|
}, |
282
|
|
|
|
|
|
|
"status": "active", |
283
|
|
|
|
|
|
|
"type": "individual" |
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=head1 HISTORY |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=head2 v0.1 |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
Initial version |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=head2 v0.2 |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
Added method L</"spending_controls"> that was added on Stripe api. |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
=head1 AUTHOR |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=head1 SEE ALSO |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
Stripe API documentation: |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/issuing/cardholders>, L<https://stripe.com/docs/issuing/cards#create-cardholder> |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
311
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=cut |