line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Capabilities |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1023
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
42
|
|
12
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
8
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
13
|
|
15
|
2
|
|
|
2
|
|
564
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
19
|
|
16
|
2
|
|
|
2
|
|
2281
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
843
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
136
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
12
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
156
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
351
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'set' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
capabilities => { type => ArrayRef[Enum[qw(MAIL_SPAMPROTECTION MAIL_BLACKLIST MAIL_BACKUPRECOVER MAIL_OTP MAIL_PASSWORDRESET_SMS BMBO_VIDEOCHAT)]], optional => 0 }, |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
), |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $validator = $validators{'set'}; |
40
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return $self->_request( 'mail.capabilities.set', \%params, \%opt ); |
45
|
|
|
|
|
|
|
} |
46
|
0
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=pod |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=encoding UTF-8 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
API::MailboxOrg::API::Capabilities - MailboxOrg::API::Capabilities |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 VERSION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
version 1.0.1 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SYNOPSIS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
use API::MailboxOrg; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
my $user = '1234abc'; |
68
|
|
|
|
|
|
|
my $password = '1234abc'; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
71
|
|
|
|
|
|
|
user => $user, |
72
|
|
|
|
|
|
|
password => $password, |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 METHODS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 set |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Modifies email capabilities |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Available for admin, reseller, account, domain |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Parameters: |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=over 4 |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=item * mail |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * capabilities |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=back |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
returns: boolean |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
$api->capabilities->set(%params); |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHOR |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This is free software, licensed under: |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |