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