File Coverage

blib/lib/WebService/SendGrid/Newsletter/Recipients.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 4 4 100.0
total 34 34 100.0


line stmt bran cond sub pod time code
1 6     6   26 use strict;
  6         11  
  6         145  
2 6     6   27 use warnings;
  6         9  
  6         220  
3             package WebService::SendGrid::Newsletter::Recipients;
4              
5 6     6   28 use parent 'WebService::SendGrid::Newsletter::Base';
  6         10  
  6         96  
6              
7              
8             sub new {
9 2     2 1 8 my ($class, %args) = @_;
10            
11 2         4 my $self = {};
12 2         5 bless($self, $class);
13            
14 2         16 $self->{sgn} = $args{sgn};
15            
16 2         11 return $self;
17             }
18              
19              
20             sub add {
21 3     3 1 10 my ($self, %args) = @_;
22              
23 3         25 $self->_check_required_args([ qw( name list ) ], %args);
24              
25 2         11 $self->{sgn}->_send_request('recipients/add', %args);
26             }
27              
28              
29             sub get {
30 2     2 1 5 my ($self, %args) = @_;
31              
32 2         12 $self->_check_required_args([ qw( name ) ], %args);
33            
34 1         5 $self->{sgn}->_send_request('recipients/get', %args);
35             }
36              
37              
38             sub delete {
39 2     2 1 6 my ($self, %args) = @_;
40              
41 2         11 $self->_check_required_args([ qw( name list ) ], %args);
42            
43 1         6 $self->{sgn}->_send_request('recipients/delete', %args);
44             }
45              
46             1;
47              
48             __END__