API/Role/SendBy.pm

filter: Statementstmt 56.0% 14 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 100% 2 / 2 totaltotal 58.8% 20 / 34 CC 1 SCAR 3.6
CC
1
Cov
56%
send_by_email
2.0
send_by_snail_mail
2.0
_send_using
2.0
CRAP 1.4
« API/Recurring/AutoBill/Card.pm ↑ Summary API/Client/Contact.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::Role::SendBy;
5 8 $Net::FreshBooks::API::Role::SendBy::VERSION = '0.24';
6 8 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use Data::Dump qw( dump );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub send_by_email {
Subroutine send_by_email: not called CC=1 SCAR=6.9
Pod documented
10 0 my $self = shift;
11 0 return $self->_send_using( 'sendByEmail' );
12 }
13  
14 0 ▶sub send_by_snail_mail {
Subroutine send_by_snail_mail: not called CC=1 SCAR=6.9
Pod documented
15 0 my $self = shift;
16 0 return $self->_send_using( 'sendBySnailMail' );
17 }
18  
19 0 ▶sub _send_using {
Subroutine _send_using: not called CC=1 SCAR=6.9
20 0 my $self = shift;
21 0 my $how = shift;
22  
23 0 my $method = $self->method_string( $how );
24 0 my $id_field = $self->id_field;
25  
26 0 my $res = $self->send_request(
27 { _method => $method,
28 $id_field => $self->$id_field,
29 }
30 );
31  
32 # refetch the estimate so that the flags are updated.
33 0 $self->get( { $id_field => $self->$id_field } );
34  
35 0 return 1;
36 }
37  
38 8 1;
39  
40 # ABSTRACT: Send by email and snail mail roles
41  
42 __END__
« API/Recurring/AutoBill/Card.pm ↑ Summary API/Client/Contact.pm »