API/Recurring/AutoBill/Card.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 62.5% 5 / 8 Podpod 100% 1 / 1 totaltotal 69.2% 27 / 39 CC 2 SCAR 8.5
CC
2
Cov
75%
_validates
6.0
node_name
2.0
_fields
2.0
CRAP 2.3
« API/Role/LineItem.pm ↑ Summary API/Role/SendBy.pm »
1 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Net::FreshBooks::API::Recurring::AutoBill::Card;
5 8 $Net::FreshBooks::API::Recurring::AutoBill::Card::VERSION = '0.24';
6 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 extends 'Net::FreshBooks::API::Base';
8  
9 8 ▶use Net::FreshBooks::API::Recurring::AutoBill::Card::Expiration;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 8 has 'expiration' => (
12 is => 'rw',
13 lazy_build => 1,
14 handles => [ 'month', 'year' ],
15 );
16  
17 8 has 'name' => ( is => 'rw', );
18  
19 8 has 'number' => ( is => 'rw', );
20  
21 0 ▶sub node_name { return 'card' }
Subroutine node_name: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub _fields {
Subroutine _fields: not called CC=1 SCAR=6.9
24 return {
25 0 number => { is => 'rw' },
26 name => { is => 'rw' },
27 expiration => {
28 is => 'rw',
29 made_of =>
30 'Net::FreshBooks::API::Recurring::AutoBill::Card::Expiration',
31 presented_as => 'object',
32 },
33 };
34 }
35  
36 # make sure unitialized objects don't make the cut
37 0 ▶sub _validates {
Subroutine _validates: not called CC=2 SCAR=17.9
38  
39 0 my $self = shift;
40  
41 0 ▶ return ( $self->name && $self->number );
Condition0%0/3
$self->name && $self->number
!ll&&!rl&&r
000
MC/DC0%0/2
$self->name && $self->number
$self->name $self->number
Truth table0%0/3
A && B
A= $self->nameB= $self->number
ABresult
0X0
100
111
42  
43 }
44  
45 2 ▶sub _build_expiration {
Subroutine _build_expiration: called CC=1 SCAR=0.0
46  
47 2 my $self = shift;
48 2 return Net::FreshBooks::API::Recurring::AutoBill::Card::Expiration->new;
49 }
50  
51 8 __PACKAGE__->meta->make_immutable();
52  
53 8 1;
54  
55 # ABSTRACT: FreshBooks Autobill Credit Card access
56  
57 __END__
« API/Role/LineItem.pm ↑ Summary API/Role/SendBy.pm »