File Coverage

blib/lib/Finance/LocalBitcoins/API/Request/Message.pm
Criterion Covered Total %
statement 12 20 60.0
branch 0 2 0.0
condition n/a
subroutine 4 9 44.4
pod 0 5 0.0
total 16 36 44.4


line stmt bran cond sub pod time code
1             package Finance::LocalBitcoins::API::Request::Message;
2 1     1   5 use base qw(Finance::LocalBitcoins::API::Request);
  1         2  
  1         81  
3 1     1   6 use strict;
  1         1  
  1         33  
4              
5 1     1   5 use constant URL => 'https://localbitcoins.com/api/contact_message_post/%s/';
  1         2  
  1         51  
6 1     1   5 use constant ATTRIBUTES => qw(contact_id msg);
  1         2  
  1         247  
7              
8 0     0 0   sub contact_id { my $self = shift; $self->get_set(@_) }
  0            
9 0     0 0   sub msg { my $self = shift; $self->get_set(@_) }
  0            
10 0     0 0   sub url { sprintf URL, shift->contact_id }
11 0     0 0   sub attributes { ATTRIBUTES }
12             sub is_ready_to_send {
13 0     0 0   my $self = shift;
14 0 0         return defined $self->contact_id and defined $self->msg;
15             }
16              
17             1;
18              
19             __END__