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