MailboxOrg/API/Capabilities.pm

filter: Statementstmt 88.5% 31 / 35 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 100% 1 / 1 totaltotal 85.4% 41 / 48 CC 2 SCAR 6.5
CC
2
Cov
84%
set
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« MailboxOrg/API/Hello.pm ↑ Summary MailboxOrg/API/Context.pm »
1 package API::MailboxOrg::API::Capabilities;
2  
3 # ABSTRACT: MailboxOrg::API::Capabilities
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 'set' => validation_for(
30 params => {
31 mail => { type => Str, optional => 0 },
32 capabilities => { type => ArrayRef[Enum[qw(MAIL_SPAMPROTECTION MAIL_BLACKLIST MAIL_BACKUPRECOVER MAIL_OTP MAIL_PASSWORDRESET_SMS BMBO_VIDEOCHAT)]], optional => 0 },
33  
34 },
35 ),
36  
37 );
38  
39  
40 0 ▶sub set ($self, %params) {
Subroutine set: not called CC=2 SCAR=17.9
Pod documented
41 0 my $validator = $validators{'set'};
42 0 ▶ %params = $validator->(%params) if $validator;
Branch: 1 branch
BranchTrueFalseTotal
if $validator 0 0 0
43  
44 0 my %opt = (needs_auth => 1);
45  
46 0 return $self->_request( 'mail.capabilities.set', \%params, \%opt );
47 }
48  
49  
50 2 1;
51  
52 __END__
« MailboxOrg/API/Hello.pm ↑ Summary MailboxOrg/API/Context.pm »