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