line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Issuing/Card/AuthorizationsControl.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
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
1
|
|
|
1
|
|
1058
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
33
|
|
14
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
72
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
17
|
1
|
|
|
1
|
|
23
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
21
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
211
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
0
|
|
|
32
|
|
|
|
|
|
|
=encoding utf8 |
33
|
0
|
|
|
0
|
1
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
0
|
|
|
0
|
1
|
|
|
36
|
|
|
|
|
|
|
Net::API::Stripe::Issuing::Card::AuthorizationsControl - An interface to Stripe API |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $auth = $stripe->card_holder->authorization_controls({ |
41
|
|
|
|
|
|
|
allowed_categories => [], |
42
|
|
|
|
|
|
|
blocked_categories => [], |
43
|
|
|
|
|
|
|
spending_limits => |
44
|
|
|
|
|
|
|
[ |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
amount => 2000000, |
47
|
|
|
|
|
|
|
categories => '', |
48
|
|
|
|
|
|
|
interval => 'monthly', |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
amount => 200000, |
52
|
|
|
|
|
|
|
categories => '', |
53
|
|
|
|
|
|
|
interval => 'weekly', |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
], |
56
|
|
|
|
|
|
|
spending_limits_currency => 'jpy', |
57
|
|
|
|
|
|
|
}); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
v0.100.0 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is instantiated by method B<authorization_controls> in module L<Net::API::Stripe::Issuing::Card::Holder> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 new( %ARG ) |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Card::AuthorizationsControl> object. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 METHODS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 allowed_categories array |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Array of strings containing categories of authorizations permitted on this card. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 blocked_categories array |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Array of strings containing categories of authorizations to always decline on this card. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 spending_limits array of hashes |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Limit the spending with rules based on time intervals and categories. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This is an array of L<Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit> objects. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 spending_limits_currency currency |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Currency for the amounts within spending_limits. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 API SAMPLE |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
{ |
96
|
|
|
|
|
|
|
"id": "ich_fake123456789", |
97
|
|
|
|
|
|
|
"object": "issuing.cardholder", |
98
|
|
|
|
|
|
|
"authorization_controls": { |
99
|
|
|
|
|
|
|
"allowed_categories": [], |
100
|
|
|
|
|
|
|
"blocked_categories": [], |
101
|
|
|
|
|
|
|
"spending_limits": [], |
102
|
|
|
|
|
|
|
"spending_limits_currency": null |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
"billing": { |
105
|
|
|
|
|
|
|
"address": { |
106
|
|
|
|
|
|
|
"city": "Beverly Hills", |
107
|
|
|
|
|
|
|
"country": "US", |
108
|
|
|
|
|
|
|
"line1": "123 Fake St", |
109
|
|
|
|
|
|
|
"line2": "Apt 3", |
110
|
|
|
|
|
|
|
"postal_code": "90210", |
111
|
|
|
|
|
|
|
"state": "CA" |
112
|
|
|
|
|
|
|
}, |
113
|
|
|
|
|
|
|
"name": "Jenny Rosen" |
114
|
|
|
|
|
|
|
}, |
115
|
|
|
|
|
|
|
"company": null, |
116
|
|
|
|
|
|
|
"created": 1540111055, |
117
|
|
|
|
|
|
|
"email": "jenny@example.com", |
118
|
|
|
|
|
|
|
"individual": null, |
119
|
|
|
|
|
|
|
"is_default": false, |
120
|
|
|
|
|
|
|
"livemode": false, |
121
|
|
|
|
|
|
|
"metadata": {}, |
122
|
|
|
|
|
|
|
"name": "Jenny Rosen", |
123
|
|
|
|
|
|
|
"phone_number": "+18008675309", |
124
|
|
|
|
|
|
|
"requirements": { |
125
|
|
|
|
|
|
|
"disabled_reason": null, |
126
|
|
|
|
|
|
|
"past_due": [] |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
"status": "active", |
129
|
|
|
|
|
|
|
"type": "individual" |
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/issuing/cardholders/object> |
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 |