The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

API::ISPManager - interface to the ISPManager Hosting Panel API ( http://ispsystem.com )

SYNOPSIS

 use API::ISPManager;
 
 my $connection_params = {
    username => 'username',
    password => 'qwerty',
    host     => '11.22.33.44',
    path     => 'manager',
 };

 ### Get all panel IP
 my $ip_list = API::ISPManager::ip::list( $connection_params );

 unless ($ip_list && ref $ip_list eq 'ARRAY' && scalar @$ip_list) {
    die 'Cannot get ip list from ISP';
 }

 my $ip  = $ip_list->[0];
 my $dname  = 'perlaround.ru';

 my $client_creation_result = API::ISPManager::user::create( {
    %{ $connection_params },
    name      => 'user_login',
    passwd    => 'user_password',
    ip        => '11.11.22.33', 
    preset    => 'template_name',
    domain    => $dname,
 });

 # Switch off account:
 my $suspend_result = API::ISPManager::user::disable( {
    %{ $connection_params },
    elid => $use_login,
 } );

 unless ( $suspend_result ) {
    die "Cannot  suspend account";
 }



 # Switch on account
 my $resume_result = API::ISPManager::user::enable( {
    %{ $connection_params },
    elid => $user_login,
 } );

 unless ( $resume_result ) {
    die "Cannot  suspend account";
 }



 # Delete account
 my $delete_result = API::ISPManager::user::delete( {
    %{ $connection_params },
    elid => $login,
 } );

 unless ( $delete_result ) {
    die "Cannot delete account";
 }