API-MailboxOrg
view release on metacpan or search on metacpan
lib/API/MailboxOrg/API/Account.pm view on Meta::CPAN
package API::MailboxOrg::API::Account;
# ABSTRACT: MailboxOrg::API::Account
# ---
# 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 => {
account => { type => Str, optional => 0 },
password => { type => Str, optional => 0 },
plan => { type => Enum[qw(basic profi profixl reseller)], optional => 0 },
tarifflimits => { type => HashRefRestricted[qw(basic profi profixl reseller)], optional => 1 },
memo => { type => Str, optional => 1 },
},
),
'del' => validation_for(
params => {
account => { type => Str, optional => 0 },
},
),
'get' => validation_for(
params => {
account => { type => Str, optional => 0 },
},
),
'set' => validation_for(
params => {
account => { type => Str, optional => 0 },
password => { type => Str, optional => 1 },
plan => { type => Enum[qw(basic profi profixl reseller)], optional => 1 },
memo => { type => Str, optional => 1 },
address_payment_first_name => { type => Str, optional => 1 },
address_payment_last_name => { type => Str, optional => 1 },
address_payment_street => { type => Str, optional => 1 },
address_payment_zipcode => { type => Str, optional => 1 },
address_payment_town => { type => Str, optional => 1 },
av_contract_accept_name => { type => Str, optional => 1 },
tarifflimits => { type => HashRefRestricted[qw(basic profi profixl reseller)], optional => 1 },
},
),
);
sub add ($self, %params) {
my $validator = $validators{'add'};
%params = $validator->(%params) if $validator;
my %opt = (needs_auth => 1);
return $self->_request( 'account.add', \%params, \%opt );
}
sub del ($self, %params) {
my $validator = $validators{'del'};
%params = $validator->(%params) if $validator;
( run in 0.998 second using v1.01-cache-2.11-cpan-39bf76dae61 )