line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Domain |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
1030
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
37
|
|
12
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
42
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
10
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
13
|
|
15
|
2
|
|
|
2
|
|
568
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
26
|
|
16
|
2
|
|
|
2
|
|
2259
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
17
|
2
|
|
|
2
|
|
794
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
150
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
12
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
154
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
958
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'add' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
32
|
|
|
|
|
|
|
password => { type => Str, optional => 0 }, |
33
|
|
|
|
|
|
|
context_id => { type => Str, optional => 1 }, |
34
|
|
|
|
|
|
|
create_new_context_id => { type => Boolean, optional => 1 }, |
35
|
|
|
|
|
|
|
memo => { type => Str, optional => 1 }, |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
), |
39
|
|
|
|
|
|
|
'del' => validation_for( |
40
|
|
|
|
|
|
|
params => { |
41
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
42
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
}, |
45
|
|
|
|
|
|
|
), |
46
|
|
|
|
|
|
|
'get' => validation_for( |
47
|
|
|
|
|
|
|
params => { |
48
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
), |
52
|
|
|
|
|
|
|
'list' => validation_for( |
53
|
|
|
|
|
|
|
params => { |
54
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
55
|
|
|
|
|
|
|
filter => { type => Str, optional => 1 }, |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
}, |
58
|
|
|
|
|
|
|
), |
59
|
|
|
|
|
|
|
'set' => validation_for( |
60
|
|
|
|
|
|
|
params => { |
61
|
|
|
|
|
|
|
domain => { type => Str, optional => 0 }, |
62
|
|
|
|
|
|
|
password => { type => Str, optional => 1 }, |
63
|
|
|
|
|
|
|
context_id => { type => Str, optional => 1 }, |
64
|
|
|
|
|
|
|
create_new_context_id => { type => Boolean, optional => 1 }, |
65
|
|
|
|
|
|
|
memo => { type => Str, optional => 1 }, |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
}, |
68
|
|
|
|
|
|
|
), |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $validator = $validators{'add'}; |
74
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
|
76
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
return $self->_request( 'domain.add', \%params, \%opt ); |
79
|
|
|
|
|
|
|
} |
80
|
0
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
my $validator = $validators{'del'}; |
82
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
83
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
85
|
0
|
0
|
|
|
|
|
|
86
|
|
|
|
|
|
|
return $self->_request( 'domain.del', \%params, \%opt ); |
87
|
0
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
my $validator = $validators{'get'}; |
90
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
0
|
1
|
|
my %opt = (needs_auth => 1); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
|
|
94
|
0
|
0
|
|
|
|
|
return $self->_request( 'domain.get', \%params, \%opt ); |
95
|
|
|
|
|
|
|
} |
96
|
0
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
my $validator = $validators{'list'}; |
98
|
0
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
101
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
return $self->_request( 'domain.list', \%params, \%opt ); |
103
|
0
|
0
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
0
|
|
|
|
|
|
my $validator = $validators{'set'}; |
106
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
107
|
0
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
109
|
|
|
|
|
|
|
|
110
|
0
|
|
|
0
|
1
|
|
return $self->_request( 'domain.set', \%params, \%opt ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
111
|
0
|
|
|
|
|
|
} |
112
|
0
|
0
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
0
|
|
|
|
|
|
1; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=pod |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=encoding UTF-8 |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 NAME |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
API::MailboxOrg::API::Domain - MailboxOrg::API::Domain |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 VERSION |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
version 1.0.1 |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 SYNOPSIS |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
use API::MailboxOrg; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
my $user = '1234abc'; |
134
|
|
|
|
|
|
|
my $password = '1234abc'; |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
137
|
|
|
|
|
|
|
user => $user, |
138
|
|
|
|
|
|
|
password => $password, |
139
|
|
|
|
|
|
|
); |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 METHODS |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 add |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Adds a domain |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
Available for admin, reseller, account |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Parameters: |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=over 4 |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item * account |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=item * domain |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=item * password |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=item * context_id |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=item * create_new_context_id |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=item * memo |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=back |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
returns: array |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
$api->domain->add(%params); |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head2 del |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Removes a domain from an account |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
Available for admin, reseller, account |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Parameters: |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=over 4 |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=item * account |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=item * domain |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=back |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
returns: boolean |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
$api->domain->del(%params); |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 get |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Returns details about a domain |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Available for admin, reseller, account, domain |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Parameters: |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=over 4 |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=item * domain |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=back |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
returns: array |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
$api->domain->get(%params); |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=head2 list |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
Returns a list of all existing domains |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
Available for admin, reseller, account |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
Parameters: |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
=over 4 |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=item * account |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=item * filter |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=back |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
returns: array |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
$api->domain->list(%params); |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=head2 set |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
Modifies domain properties |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
Available for admin, reseller, account, domain, account, account |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
Parameters: |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=over 4 |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=item * domain |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=item * password |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=item * context_id |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=item * create_new_context_id |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=item * memo |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=back |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
returns: array |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
$api->domain->set(%params); |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=head1 AUTHOR |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
This is free software, licensed under: |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
=cut |