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