line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Billing/Plan/Tiers.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
|
|
1013
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
14
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
67
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
17
|
1
|
|
|
1
|
|
19
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
21
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
147
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
|
30
|
|
|
|
|
|
|
=encoding utf8 |
31
|
0
|
|
|
0
|
1
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Net::API::Stripe::Billing::Plan::Tiers - A Stripe Plan Tiers Object |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $tiers = $plan->tiers({ |
39
|
|
|
|
|
|
|
flat_amount => 2000, |
40
|
|
|
|
|
|
|
flat_amount_decimal => 2000, |
41
|
|
|
|
|
|
|
}); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
v0.100.0 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 new( %ARG ) |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Billing::Plan::Tiers> object. |
56
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 METHODS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 flat_amount integer |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Price for the entire tier. This is a L<AI::API::Stripe::Number> object. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 flat_amount_decimal decimal string |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Same as flat_amount, but contains a decimal value with at most 12 decimal places. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is a L<AI::API::Stripe::Number> object. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 unit_amount integer |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Per unit price for units relevant to the tier. This is a L<AI::API::Stripe::Number> object. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 unit_amount_decimal decimal string |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Same as unit_amount, but contains a decimal value with at most 12 decimal places. This is a L<AI::API::Stripe::Number> object. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 up_to integer |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Up to and including to this quantity will be contained in the tier. This is a L<AI::API::Stripe::Number> object. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 API SAMPLE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
{ |
85
|
|
|
|
|
|
|
"id": "expert-monthly-jpy", |
86
|
|
|
|
|
|
|
"object": "plan", |
87
|
|
|
|
|
|
|
"active": true, |
88
|
|
|
|
|
|
|
"aggregate_usage": null, |
89
|
|
|
|
|
|
|
"amount": 8000, |
90
|
|
|
|
|
|
|
"amount_decimal": "8000", |
91
|
|
|
|
|
|
|
"billing_scheme": "per_unit", |
92
|
|
|
|
|
|
|
"created": 1507273129, |
93
|
|
|
|
|
|
|
"currency": "jpy", |
94
|
|
|
|
|
|
|
"interval": "month", |
95
|
|
|
|
|
|
|
"interval_count": 1, |
96
|
|
|
|
|
|
|
"livemode": false, |
97
|
|
|
|
|
|
|
"metadata": {}, |
98
|
|
|
|
|
|
|
"nickname": null, |
99
|
|
|
|
|
|
|
"product": "prod_fake123456789", |
100
|
|
|
|
|
|
|
"tiers": null, |
101
|
|
|
|
|
|
|
"tiers_mode": null, |
102
|
|
|
|
|
|
|
"transform_usage": null, |
103
|
|
|
|
|
|
|
"trial_period_days": null, |
104
|
|
|
|
|
|
|
"usage_type": "licensed" |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 HISTORY |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 v0.1 |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Initial version |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 AUTHOR |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 SEE ALSO |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Stripe API documentation: |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/plans/object> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
128
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=cut |