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