lib/WebService/Braintree/_/Plan.pm

filter: Statementstmt 100% 34 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/WebService/Braintree/_/PaymentMethodNonceDetails.pm ↑ Summary lib/WebService/Braintree/_/SettlementBatchSummary.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::_::Plan;
4 22 $WebService::Braintree::_::Plan::VERSION = '1.7';
5 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WebService::Braintree::_::Plan
11  
12 =head1 PURPOSE
13  
14 This class represents a subscription plan.
15  
16 This class will only be created as part of a L<response|WebService::Braintree::Result> or L<error response|WebService::Braintree::ErrorResult>.
17  
18 =cut
19  
20 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 22 extends 'WebService::Braintree::_';
23  
24 22 ▶use Types::Standard qw(ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
25 22 ▶use WebService::Braintree::Types qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
26 AddOn
27 Discount
28 22 );
29  
30 =head1 ATTRIBUTES
31  
32 =cut
33  
34 =head2 add_ons()
35  
36 This returns the plan's discounts. This will be an arrayref of
37 L<add-ons|WebService::Braintree::_::AddOn/>.
38  
39 =cut
40  
41 22 has add_ons => (
42 is => 'ro',
43 isa => ArrayRef[AddOn],
44 coerce => 1,
45 );
46  
47 =head2 billing_day_of_month()
48  
49 This returns the plan's billing day of month.
50  
51 =cut
52  
53 22 has billing_day_of_month => (
54 is => 'ro',
55 );
56  
57 =head2 billing_frequency()
58  
59 This returns the plan's billing frequency.
60  
61 =cut
62  
63 22 has billing_frequency => (
64 is => 'ro',
65 );
66  
67 =head2 created_at()
68  
69 This returns when this plan was created.
70  
71 =cut
72  
73 22 has created_at => (
74 is => 'ro',
75 );
76  
77 =head2 currency_iso_code()
78  
79 This returns the plan's currency ISO code.
80  
81 =cut
82  
83 22 has currency_iso_code => (
84 is => 'ro',
85 );
86  
87 =head2 description()
88  
89 This returns the plan's description.
90  
91 =cut
92  
93 22 has description => (
94 is => 'ro',
95 );
96  
97 =head2 discounts()
98  
99 This returns the plan's discounts. This will be an arrayref of
100 L<discounts|WebService::Braintree::_::Discount/>.
101  
102 =cut
103  
104 22 has discounts => (
105 is => 'ro',
106 isa => ArrayRef[Discount],
107 coerce => 1,
108 );
109  
110 =head2 id()
111  
112 This returns the plan's ID.
113  
114 =cut
115  
116 22 has id => (
117 is => 'ro',
118 );
119  
120 =head2 merchant_id()
121  
122 This returns the plan's merchant ID.
123  
124 =cut
125  
126 22 has merchant_id => (
127 is => 'ro',
128 );
129  
130 =head2 name()
131  
132 This returns the plan's name.
133  
134 =cut
135  
136 22 has name => (
137 is => 'ro',
138 );
139  
140 =head2 number_of_billing_cycles()
141  
142 This returns the plan's number of billing cycles.
143  
144 =cut
145  
146 22 has number_of_billing_cycles => (
147 is => 'ro',
148 );
149  
150 =head2 price()
151  
152 This returns the plan's price.
153  
154 =cut
155  
156 # Coerce this to "big_decimal"
157 22 has price => (
158 is => 'ro',
159 );
160  
161 =head2 trial_duration()
162  
163 This returns the plan's trial duration.
164  
165 =cut
166  
167 22 has trial_duration => (
168 is => 'ro',
169 );
170  
171 =head2 trial_duration_unit()
172  
173 This returns the plan's unit of time for the trial duration.
174  
175 =cut
176  
177 22 has trial_duration_unit => (
178 is => 'ro',
179 );
180  
181 =head2 trial_period()
182  
183 This returns the plan's trial period.
184  
185 =cut
186  
187 22 has trial_period => (
188 is => 'ro',
189 );
190  
191 =head2 updated_at()
192  
193 This returns when this plan was last updated.
194  
195 =cut
196  
197 22 has updated_at => (
198 is => 'ro',
199 );
200  
201 22 __PACKAGE__->meta->make_immutable;
202  
203 22 1;
204 __END__
« lib/WebService/Braintree/_/PaymentMethodNonceDetails.pm ↑ Summary lib/WebService/Braintree/_/SettlementBatchSummary.pm »