line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::Plan; |
2
|
|
|
|
|
|
|
$Net::Stripe::Plan::VERSION = '0.42'; |
3
|
2
|
|
|
2
|
|
17
|
use Moose; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
18
|
|
4
|
2
|
|
|
2
|
|
14388
|
use Moose::Util::TypeConstraints qw(subtype as where message); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
20
|
|
5
|
2
|
|
|
2
|
|
1689
|
use Kavorka; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
17
|
|
6
|
|
|
|
|
|
|
extends 'Net::Stripe::Resource'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: represent a Plan object from Stripe |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
subtype 'StatementDescriptor', |
11
|
|
|
|
|
|
|
as 'Str', |
12
|
|
|
|
|
|
|
where { !defined($_) || $_ =~ /^[^<>"']{0,15}$/ }, |
13
|
|
|
|
|
|
|
message { "The statement descriptor you provided '$_' must be 15 characters or less and not contain <>\"'." }; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'id' => (is => 'ro', isa => 'Maybe[Str]', required => 1); |
16
|
|
|
|
|
|
|
has 'amount' => (is => 'ro', isa => 'Maybe[Int]', required => 1); |
17
|
|
|
|
|
|
|
has 'currency' => (is => 'ro', isa => 'Maybe[Str]', required => 1); |
18
|
|
|
|
|
|
|
has 'interval' => (is => 'ro', isa => 'Maybe[Str]', required => 1); |
19
|
|
|
|
|
|
|
has 'interval_count' => (is => 'ro', isa => 'Maybe[Int]', required => 0); |
20
|
|
|
|
|
|
|
has 'name' => (is => 'ro', isa => 'Maybe[Str]'); |
21
|
|
|
|
|
|
|
has 'trial_period_days' => (is => 'ro', isa => 'Maybe[Int]'); |
22
|
|
|
|
|
|
|
has 'statement_descriptor' => (is => 'ro', isa => 'Maybe[StatementDescriptor]', required => 0); |
23
|
|
|
|
|
|
|
has 'metadata' => (is => 'ro', isa => 'Maybe[HashRef]'); |
24
|
|
|
|
|
|
|
has 'product' => (is => 'ro', isa => 'Maybe[StripeProductId|Str]'); |
25
|
|
|
|
|
|
|
|
26
|
2
|
0
|
|
2
|
|
5262
|
method form_fields { |
|
2
|
|
|
0
|
|
5
|
|
|
2
|
|
|
|
|
336
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $self->form_fields_for( |
28
|
|
|
|
|
|
|
qw/id amount currency interval interval_count name statement_descriptor |
29
|
|
|
|
|
|
|
trial_period_days metadata product/ |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Net::Stripe::Plan - represent a Plan object from Stripe |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
version 0.42 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 amount |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Reader: amount |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Type: Maybe[Int] |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This attribute is required. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 boolean_attributes |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Reader: boolean_attributes |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Type: ArrayRef[Str] |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 currency |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Reader: currency |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Type: Maybe[Str] |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This attribute is required. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 id |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Reader: id |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Type: Maybe[Str] |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This attribute is required. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 interval |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Reader: interval |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Type: Maybe[Str] |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This attribute is required. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 interval_count |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Reader: interval_count |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Type: Maybe[Int] |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 metadata |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Reader: metadata |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Type: Maybe[HashRef] |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 name |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Reader: name |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Type: Maybe[Str] |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 product |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Reader: product |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Type: Maybe[Str|StripeProductId] |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 statement_descriptor |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Reader: statement_descriptor |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Type: Maybe[StatementDescriptor] |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 trial_period_days |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Reader: trial_period_days |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Type: Maybe[Int] |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 AUTHORS |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over 4 |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Luke Closs |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Rusty Conover |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=back |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
143
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=cut |