MailboxOrg/API/Blacklist.pm

filter: Statementstmt 72.0% 31 / 43 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 9 / 12 Podpod 100% 3 / 3 totaltotal 67.1% 43 / 64 CC 4 SCAR 11.0
CC
4
Cov
63%
add
6.0
del
6.0
list
6.0
CRAP 3.0
« MailboxOrg/API/Base.pm ↑ Summary MailboxOrg/API/Passwordreset.pm »
1 package API::MailboxOrg::API::Blacklist;
2  
3 # ABSTRACT: MailboxOrg::API::Blacklist
4  
5 # ---
6 # This class is auto-generated by bin/get_mailbox_api.pl
7 # ---
8  
9 2 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use Types::Standard qw(Enum Str Int InstanceOf ArrayRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use API::MailboxOrg::Types qw(HashRefRestricted Boolean);
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶use Params::ValidationCompiler qw(validation_for);
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 2 extends 'API::MailboxOrg::APIBase';
20  
21 2 with 'MooX::Singleton';
22  
23 2 ▶use feature 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶no warnings 'experimental::signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 2 our $VERSION = '1.0.2'; # VERSION
27  
28 2 my %validators = (
29 'add' => validation_for(
30 params => {
31 mail => { type => Str, optional => 0 },
32 add_address => { type => Str, optional => 0 },
33  
34 },
35 ),
36 'del' => validation_for(
37 params => {
38 mail => { type => Str, optional => 0 },
39 delete_address => { type => Str, optional => 0 },
40  
41 },
42 ),
43 'list' => validation_for(
44 params => {
45 mail => { type => Str, optional => 0 },
46  
47 },
48 ),
49  
50 );
51  
52  
53 0 ▶sub add ($self, %params) {
Subroutine add: not called CC=2 SCAR=17.9
Pod documented
54 0 my $validator = $validators{'add'};
55 0 ▶ %params = $validator->(%params) if $validator;
Branch: 1 branch
BranchTrueFalseTotal
if $validator 0 0 0
56  
57 0 my %opt = (needs_auth => 1);
58  
59 0 return $self->_request( 'mail.blacklist.add', \%params, \%opt );
60 }
61  
62 0 ▶sub del ($self, %params) {
Subroutine del: not called CC=2 SCAR=17.9
Pod documented
63 0 my $validator = $validators{'del'};
64 0 ▶ %params = $validator->(%params) if $validator;
Branch: 1 branch
BranchTrueFalseTotal
if $validator 0 0 0
65  
66 0 my %opt = (needs_auth => 1);
67  
68 0 return $self->_request( 'mail.blacklist.del', \%params, \%opt );
69 }
70  
71 0 ▶sub list ($self, %params) {
Subroutine list: not called CC=2 SCAR=17.9
Pod documented
72 0 my $validator = $validators{'list'};
73 0 ▶ %params = $validator->(%params) if $validator;
Branch: 1 branch
BranchTrueFalseTotal
if $validator 0 0 0
74  
75 0 my %opt = (needs_auth => 1);
76  
77 0 return $self->_request( 'mail.blacklist.list', \%params, \%opt );
78 }
79  
80  
81 2 1;
82  
83 __END__
« MailboxOrg/API/Base.pm ↑ Summary MailboxOrg/API/Passwordreset.pm »