Stripe/Plan.pm

filter: Statementstmt 84.8% 28 / 33 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod n/a totaltotal 72.7% 32 / 44 CC 3 SCAR 9.2
CC
3
Cov
76%
__ANON__
6.0
form_fields
2.7
__ANON__
1.1
CRAP 2.5
« Stripe/Invoiceitem.pm ↑ Summary Stripe/Error.pm »
1 package Net::Stripe::Plan;
2 2 $Net::Stripe::Plan::VERSION = '0.43';
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Moose::Util::TypeConstraints qw(subtype as where message);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Kavorka;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 extends 'Net::Stripe::Resource';
7  
8 # ABSTRACT: represent a Plan object from Stripe
9  
10 subtype 'StatementDescriptor',
11 as 'Str',
12 0 ▶ where { !defined($_) || $_ =~ /^[^<>"']{0,15}$/ },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
not defined $_ or $_ =~ /^[^<>"']{0,15}$/ 0 0 0
13 0 ▶ message { "The statement descriptor you provided '$_' must be 15 characters or less and not contain <>\"'." };
Subroutine __ANON__: not called CC=1 SCAR=1.2
14  
15 2 has 'id' => (is => 'ro', isa => 'Maybe[Str]', required => 1);
16 2 has 'amount' => (is => 'ro', isa => 'Maybe[Int]', required => 1);
17 2 has 'currency' => (is => 'ro', isa => 'Maybe[Str]', required => 1);
18 2 has 'interval' => (is => 'ro', isa => 'Maybe[Str]', required => 1);
19 2 has 'interval_count' => (is => 'ro', isa => 'Maybe[Int]', required => 0);
20 2 has 'name' => (is => 'ro', isa => 'Maybe[Str]');
21 2 has 'trial_period_days' => (is => 'ro', isa => 'Maybe[Int]');
22 2 has 'statement_descriptor' => (is => 'ro', isa => 'Maybe[StatementDescriptor]', required => 0);
23 2 has 'metadata' => (is => 'ro', isa => 'Maybe[HashRef]');
24 2 has 'product' => (is => 'ro', isa => 'Maybe[StripeProductId|Str]');
25  
26 0 ▶method form_fields {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine form_fields: not called CC=2 SCAR=9.9
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 0 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 2 __PACKAGE__->meta->make_immutable;
34 2 1;
35  
36 __END__
« Stripe/Invoiceitem.pm ↑ Summary Stripe/Error.pm »