Newsletter/Categories.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 5 / 5 totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Newsletter/Lists.pm ↑ Summary Newsletter/Identity.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 package WebService::SendGrid::Newsletter::Categories;
4  
5 8 ▶use parent 'WebService::SendGrid::Newsletter::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
9 1 my ($class, %args) = @_;
10  
11 1 my $self = {};
12 1 bless($self, $class);
13  
14 1 $self->{sgn} = $args{sgn};
15  
16 1 return $self;
17 }
18  
19  
20 2 ▶sub create {
Subroutine create: called CC=1 SCAR=0.0
Pod documented
21 2 my ($self, %args) = @_;
22  
23 2 $self->_check_required_args([ qw( category ) ], %args);
24  
25 1 return $self->{sgn}->_send_request('category/create', %args);
26 }
27  
28  
29 2 ▶sub add {
Subroutine add: called CC=1 SCAR=0.0
Pod documented
30 2 my ($self, %args) = @_;
31  
32 2 $self->_check_required_args([ qw( category name ) ], %args);
33  
34 1 return $self->{sgn}->_send_request('category/add', %args);
35 }
36  
37  
38 1 ▶sub list {
Subroutine list: called CC=1 SCAR=0.0
Pod documented
39 1 my ($self, %args) = @_;
40  
41 1 return $self->{sgn}->_send_request('category/list', %args);
42 }
43  
44  
45 2 ▶sub remove {
Subroutine remove: called CC=1 SCAR=0.0
Pod documented
46 2 my ($self, %args) = @_;
47  
48 2 $self->_check_required_args([ qw( name ) ], %args);
49  
50 1 return $self->{sgn}->_send_request('category/remove', %args);
51 }
52  
53 8 1;
54  
55 __END__
« Newsletter/Lists.pm ↑ Summary Newsletter/Identity.pm »