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