line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Test |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1077
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
12
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
10
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
15
|
2
|
|
|
2
|
|
598
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
18
|
|
16
|
2
|
|
|
2
|
|
2430
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
17
|
2
|
|
|
2
|
|
838
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
127
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
9
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
161
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
451
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'accountallowed' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
), |
34
|
|
|
|
|
|
|
'domainallowed' => validation_for( |
35
|
|
|
|
|
|
|
params => { |
36
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
}, |
39
|
|
|
|
|
|
|
), |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $validator = $validators{'accountallowed'}; |
45
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
my %opt = (); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
return $self->_request( 'test.accountallowed', \%params, \%opt ); |
50
|
|
|
|
|
|
|
} |
51
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $validator = $validators{'domainallowed'}; |
53
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
54
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my %opt = (); |
56
|
0
|
0
|
|
|
|
|
|
57
|
|
|
|
|
|
|
return $self->_request( 'test.domainallowed', \%params, \%opt ); |
58
|
0
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=pod |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=encoding UTF-8 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 NAME |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
API::MailboxOrg::API::Test - MailboxOrg::API::Test |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 VERSION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
version 1.0.1 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
use API::MailboxOrg; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
my $user = '1234abc'; |
81
|
|
|
|
|
|
|
my $password = '1234abc'; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
84
|
|
|
|
|
|
|
user => $user, |
85
|
|
|
|
|
|
|
password => $password, |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 METHODS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 accountallowed |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Confirms if the account can be administrated using the current ACLs |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Parameters: |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * account |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
returns: boolean |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
$api->test->accountallowed(%params); |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 domainallowed |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Confirms if the domain can be administrated using the current ACLs |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Parameters: |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over 4 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * domain |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
returns: boolean |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
$api->test->domainallowed(%params); |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 AUTHOR |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
This is free software, licensed under: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |