line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::Subscription; |
2
|
|
|
|
|
|
|
$Net::Stripe::Subscription::VERSION = '0.40_005'; # TRIAL |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
14
|
$Net::Stripe::Subscription::VERSION = '0.40005';use Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
18
|
|
5
|
2
|
|
|
2
|
|
12205
|
use Kavorka; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
6
|
2
|
|
|
2
|
|
1593
|
use Net::Stripe::Token; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
52
|
|
7
|
2
|
|
|
2
|
|
10
|
use Net::Stripe::Card; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
41
|
|
8
|
2
|
|
|
2
|
|
10
|
use Net::Stripe::Plan; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
9
|
2
|
|
|
2
|
|
11
|
use Net::Stripe::Coupon; |
|
2
|
|
|
|
|
106
|
|
|
2
|
|
|
|
|
377
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'Net::Stripe::Resource'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: represent a Subscription object from Stripe |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'id' => (is => 'ro', isa => 'Maybe[Str]'); |
17
|
|
|
|
|
|
|
has 'plan' => (is => 'rw', isa => 'Maybe[Net::Stripe::Plan|Str]'); |
18
|
|
|
|
|
|
|
has 'coupon' => (is => 'rw', isa => 'Maybe[Net::Stripe::Coupon|Str]'); |
19
|
|
|
|
|
|
|
has 'prorate' => (is => 'rw', isa => 'Maybe[Bool|Object]'); |
20
|
|
|
|
|
|
|
has 'card' => (is => 'rw', isa => 'Maybe[Net::Stripe::Token|Net::Stripe::Card|Str]'); |
21
|
|
|
|
|
|
|
has 'quantity' => (is => 'rw', isa => 'Maybe[Int]', default => 1); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Other fields returned by the API |
24
|
|
|
|
|
|
|
has 'customer' => (is => 'ro', isa => 'Maybe[Str]'); |
25
|
|
|
|
|
|
|
has 'status' => (is => 'ro', isa => 'Maybe[Str]'); |
26
|
|
|
|
|
|
|
has 'start' => (is => 'ro', isa => 'Maybe[Int]'); |
27
|
|
|
|
|
|
|
has 'canceled_at' => (is => 'ro', isa => 'Maybe[Int]'); |
28
|
|
|
|
|
|
|
has 'ended_at' => (is => 'ro', isa => 'Maybe[Int]'); |
29
|
|
|
|
|
|
|
has 'current_period_start' => (is => 'ro', isa => 'Maybe[Int]'); |
30
|
|
|
|
|
|
|
has 'current_period_end' => (is => 'ro', isa => 'Maybe[Int]'); |
31
|
|
|
|
|
|
|
has 'trial_start' => (is => 'ro', isa => 'Maybe[Str]'); |
32
|
|
|
|
|
|
|
has 'trial_end' => (is => 'rw', isa => 'Maybe[Str|Int]'); |
33
|
|
|
|
|
|
|
has 'cancel_at_period_end' => (is => 'rw', isa => 'Maybe[Bool]'); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
2
|
0
|
|
2
|
|
2680
|
method form_fields { |
|
2
|
|
|
0
|
|
4
|
|
|
2
|
|
|
|
|
281
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $self->form_fields_for( |
38
|
|
|
|
|
|
|
qw/coupon prorate trial_end quantity card plan cancel_at_period_end/ |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=pod |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Net::Stripe::Subscription - represent a Subscription object from Stripe |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 0.40_005 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 boolean_attributes |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Reader: boolean_attributes |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Type: ArrayRef[Str] |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 cancel_at_period_end |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Reader: cancel_at_period_end |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Writer: cancel_at_period_end |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Type: Maybe[Bool] |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 canceled_at |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Reader: canceled_at |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Type: Maybe[Int] |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 card |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Reader: card |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Writer: card |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Type: Maybe[Net::Stripe::Card|Net::Stripe::Token|Str] |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 coupon |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Reader: coupon |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Writer: coupon |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Type: Maybe[Net::Stripe::Coupon|Str] |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 current_period_end |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Reader: current_period_end |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Type: Maybe[Int] |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 current_period_start |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Reader: current_period_start |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Type: Maybe[Int] |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 customer |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Reader: customer |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Type: Maybe[Str] |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 ended_at |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Reader: ended_at |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Type: Maybe[Int] |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 id |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Reader: id |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Type: Maybe[Str] |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 plan |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Reader: plan |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Writer: plan |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Type: Maybe[Net::Stripe::Plan|Str] |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 prorate |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Reader: prorate |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Writer: prorate |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Type: Maybe[Bool|Object] |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 quantity |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Reader: quantity |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Writer: quantity |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Type: Maybe[Int] |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head2 start |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Reader: start |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Type: Maybe[Int] |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 status |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Reader: status |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Type: Maybe[Str] |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 trial_end |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Reader: trial_end |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Writer: trial_end |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Type: Maybe[Int|Str] |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 trial_start |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Reader: trial_start |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Type: Maybe[Str] |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head1 AUTHORS |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=over 4 |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item * |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Luke Closs |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=item * |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Rusty Conover |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=back |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC. |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
194
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=cut |