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
|
|
|
|
|
|
|
package Net::API::Stripe::Issuing::Card::AuthorizationsControl; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
1062
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
14
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
15
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
7
|
|
16
|
1
|
|
|
1
|
|
71
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
17
|
1
|
|
|
1
|
|
18
|
our( $VERSION ) = 'v0.100.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
21
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
196
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub allowed_categories { return( shift->_set_get_array( 'allowed_categories', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub blocked_categories { return( shift->_set_get_array( 'blocked_categories', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
|
sub max_amount { return( shift->_set_get_number( 'max_amount', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
0
|
|
sub max_approvals { return( shift->_set_get_scalar( 'max_approvals', @_ ) ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub spending_limits { return( shift->_set_get_object_array( 'spending_limits', 'Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit', @_ ) ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub spending_limits_currency { return( shift->_set_get_scalar( 'spending_limits_currency', @_ ) ); } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Net::API::Stripe::Issuing::Card::AuthorizationsControl - An interface to Stripe API |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $auth = $stripe->card_holder->authorization_controls({ |
50
|
|
|
|
|
|
|
allowed_categories => [], |
51
|
|
|
|
|
|
|
blocked_categories => [], |
52
|
|
|
|
|
|
|
spending_limits => |
53
|
|
|
|
|
|
|
[ |
54
|
|
|
|
|
|
|
{ |
55
|
|
|
|
|
|
|
amount => 2000000, |
56
|
|
|
|
|
|
|
categories => '', |
57
|
|
|
|
|
|
|
interval => 'monthly', |
58
|
|
|
|
|
|
|
}, |
59
|
|
|
|
|
|
|
{ |
60
|
|
|
|
|
|
|
amount => 200000, |
61
|
|
|
|
|
|
|
categories => '', |
62
|
|
|
|
|
|
|
interval => 'weekly', |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
], |
65
|
|
|
|
|
|
|
spending_limits_currency => 'jpy', |
66
|
|
|
|
|
|
|
}); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
v0.100.0 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 DESCRIPTION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This is instantiated by method B<authorization_controls> in module L<Net::API::Stripe::Issuing::Card::Holder> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 new( %ARG ) |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Card::AuthorizationsControl> object. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 METHODS |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 allowed_categories array |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Array of strings containing categories of authorizations permitted on this card. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 blocked_categories array |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Array of strings containing categories of authorizations to always decline on this card. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 spending_limits array of hashes |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Limit the spending with rules based on time intervals and categories. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This is an array of L<Net::API::Stripe::Issuing::Card::AuthorizationsControl::SpendingLimit> objects. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 spending_limits_currency currency |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Currency for the amounts within spending_limits. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 API SAMPLE |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
{ |
105
|
|
|
|
|
|
|
"id": "ich_fake123456789", |
106
|
|
|
|
|
|
|
"object": "issuing.cardholder", |
107
|
|
|
|
|
|
|
"authorization_controls": { |
108
|
|
|
|
|
|
|
"allowed_categories": [], |
109
|
|
|
|
|
|
|
"blocked_categories": [], |
110
|
|
|
|
|
|
|
"spending_limits": [], |
111
|
|
|
|
|
|
|
"spending_limits_currency": null |
112
|
|
|
|
|
|
|
}, |
113
|
|
|
|
|
|
|
"billing": { |
114
|
|
|
|
|
|
|
"address": { |
115
|
|
|
|
|
|
|
"city": "Beverly Hills", |
116
|
|
|
|
|
|
|
"country": "US", |
117
|
|
|
|
|
|
|
"line1": "123 Fake St", |
118
|
|
|
|
|
|
|
"line2": "Apt 3", |
119
|
|
|
|
|
|
|
"postal_code": "90210", |
120
|
|
|
|
|
|
|
"state": "CA" |
121
|
|
|
|
|
|
|
}, |
122
|
|
|
|
|
|
|
"name": "Jenny Rosen" |
123
|
|
|
|
|
|
|
}, |
124
|
|
|
|
|
|
|
"company": null, |
125
|
|
|
|
|
|
|
"created": 1540111055, |
126
|
|
|
|
|
|
|
"email": "jenny@example.com", |
127
|
|
|
|
|
|
|
"individual": null, |
128
|
|
|
|
|
|
|
"is_default": false, |
129
|
|
|
|
|
|
|
"livemode": false, |
130
|
|
|
|
|
|
|
"metadata": {}, |
131
|
|
|
|
|
|
|
"name": "Jenny Rosen", |
132
|
|
|
|
|
|
|
"phone_number": "+18008675309", |
133
|
|
|
|
|
|
|
"requirements": { |
134
|
|
|
|
|
|
|
"disabled_reason": null, |
135
|
|
|
|
|
|
|
"past_due": [] |
136
|
|
|
|
|
|
|
}, |
137
|
|
|
|
|
|
|
"status": "active", |
138
|
|
|
|
|
|
|
"type": "individual" |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 HISTORY |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 v0.1 |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Initial version |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 AUTHOR |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 SEE ALSO |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Stripe API documentation: |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/issuing/cardholders/object> |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
162
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=cut |