| 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
MC/DC0%0/2
$self->name && $self->number
$self->name
$self->number
Truth table0%0/3
A && B
A= $self->nameB= $self->number
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||