API-MailboxOrg
view release on metacpan or search on metacpan
lib/API/MailboxOrg/API/Mail.pm view on Meta::CPAN
package API::MailboxOrg::API::Mail;
# ABSTRACT: MailboxOrg::API::Mail
# ---
# 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 => {
mail => { type => Str, optional => 0 },
password => { type => Str, optional => 0 },
password_hash => { type => Str, optional => 1 },
plan => { type => Enum[qw(light standard premium)], optional => 0 },
additional_mail_quota => { type => Str, optional => 1 },
additional_cloud_quota => { type => Str, optional => 1 },
first_name => { type => Str, optional => 0 },
last_name => { type => Str, optional => 0 },
inboxsave => { type => Boolean, optional => 0 },
forwards => { type => ArrayRef, optional => 0 },
memo => { type => Str, optional => 1 },
catchall => { type => Boolean, optional => 1 },
create_own_context => { type => Boolean, optional => 1 },
title => { type => Str, optional => 1 },
birthday => { type => Str, optional => 1 },
position => { type => Str, optional => 1 },
department => { type => Str, optional => 1 },
company => { type => Str, optional => 1 },
street => { type => Str, optional => 1 },
postal_code => { type => Str, optional => 1 },
city => { type => Str, optional => 1 },
phone => { type => Str, optional => 1 },
fax => { type => Str, optional => 1 },
cell_phone => { type => Str, optional => 1 },
recover => { type => Boolean, optional => 1 },
skip_welcome_mail => { type => Boolean, optional => 1 },
},
),
'del' => validation_for(
params => {
mail => { type => Str, optional => 0 },
},
),
'get' => validation_for(
params => {
mail => { type => Str, optional => 0 },
},
),
'list' => validation_for(
params => {
domain => { type => Str, optional => 0 },
},
),
'register' => validation_for(
params => {
token => { type => Str, optional => 0 },
mail => { type => Str, optional => 0 },
password => { type => Str, optional => 0 },
alternate_mail => { type => Str, optional => 1 },
first_name => { type => Str, optional => 0 },
last_name => { type => Str, optional => 0 },
lang => { type => Enum[qw(de en fr)], optional => 1 },
},
),
'set' => validation_for(
params => {
mail => { type => Str, optional => 0 },
password => { type => Str, optional => 1 },
password_hash => { type => Str, optional => 1 },
plan => { type => Enum[qw(MAIL MAILXL MAILXXL MAILXXXL Office OfficeXL OfficeXXL OfficeXXXL light standard premium)], optional => 1 },
additional_mail_quota => { type => Str, optional => 1 },
additional_cloud_quota => { type => Str, optional => 1 },
first_name => { type => Str, optional => 1 },
last_name => { type => Str, optional => 1 },
inboxsave => { type => Boolean, optional => 1 },
forwards => { type => ArrayRef, optional => 1 },
aliases => { type => ArrayRef, optional => 1 },
alternate_mail => { type => Str, optional => 1 },
memo => { type => Str, optional => 1 },
active => { type => Boolean, optional => 1 },
title => { type => Str, optional => 1 },
birthday => { type => Str, optional => 1 },
position => { type => Str, optional => 1 },
department => { type => Str, optional => 1 },
company => { type => Str, optional => 1 },
street => { type => Str, optional => 1 },
postal_code => { type => Str, optional => 1 },
city => { type => Str, optional => 1 },
phone => { type => Str, optional => 1 },
fax => { type => Str, optional => 1 },
cell_phone => { 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( 'mail.add', \%params, \%opt );
}
sub del ($self, %params) {
my $validator = $validators{'del'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'mail.del', \%params, \%opt );
}
sub get ($self, %params) {
my $validator = $validators{'get'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'mail.get', \%params, \%opt );
}
sub list ($self, %params) {
my $validator = $validators{'list'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'mail.list', \%params, \%opt );
}
sub register ($self, %params) {
my $validator = $validators{'register'};
%params = $validator->(%params) if $validator;
my %opt = ();
return $self->_request( 'mail.register', \%params, \%opt );
}
sub set ($self, %params) {
my $validator = $validators{'set'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'mail.set', \%params, \%opt );
}
( run in 0.524 second using v1.01-cache-2.11-cpan-df04353d9ac )