API-MailboxOrg
view release on metacpan or search on metacpan
lib/API/MailboxOrg/API/Mailinglist.pm view on Meta::CPAN
package API::MailboxOrg::API::Mailinglist;
# ABSTRACT: MailboxOrg::API::Mailinglist
# ---
# This class is auto-generated by bin/get_mailbox_api.pl
# ---
use v5.24;
use strict;
use warnings;
use Moo;
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef);
use API::MailboxOrg::Types qw(HashRefRestricted Boolean);
use Params::ValidationCompiler qw(validation_for);
extends 'API::MailboxOrg::APIBase';
with 'MooX::Singleton';
use feature 'signatures';
no warnings 'experimental::signatures';
our $VERSION = '1.0.2'; # VERSION
my %validators = (
'add' => validation_for(
params => {
mailinglist => { type => Str, optional => 0 },
password => { type => Str, optional => 0 },
account => { type => Str, optional => 0 },
adminmail => { type => Str, optional => 1 },
},
),
'del' => validation_for(
params => {
mailinglist => { type => Str, optional => 0 },
account => { type => Str, optional => 0 },
},
),
'get' => validation_for(
params => {
mailinglist => { type => Str, optional => 0 },
account => { type => Str, optional => 0 },
},
),
'list' => validation_for(
params => {
account => { type => Str, optional => 0 },
},
),
'set' => validation_for(
params => {
mailinglist => { type => Str, optional => 0 },
account => { type => Str, optional => 0 },
password => { type => Str, optional => 1 },
adminmail => { type => Str, optional => 1 },
},
),
);
sub add ($self, %params) {
my $validator = $validators{'add'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'mailinglist.add', \%params, \%opt );
}
sub del ($self, %params) {
my $validator = $validators{'del'};
%params = $validator->(%params) if $validator;
( run in 1.205 second using v1.01-cache-2.11-cpan-39bf76dae61 )