The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

API::PleskExpand::Accounts - extension module for the management Plesk user accounts from Plesk Expand.

SYNOPSIS

Directly not used, calls via API::PleskExpand.

 use API::PleskExpand;

 some code

DESCRIPTION

The module provides full support operations with Plesk accounts from Plesk Expand.

EXPORT

None by default.

METHODS

create()

Params: 'select' => 'optimal', 'template-id' => 1, 'general_info' => { login => 'plesk_login', pname => 'perldonal name', passwd => 'userpasswd', status => 0, # active cname => '', # company name phone => '', fax => '', email => '', address => '', city => '', state => '', # state, for USA onlu pcode => '', country => 'RU', }

Return (Data::Dumper output):

  VAR1 = bless( {
    'answer_data'   => [ {
      'server_id'   => '1',
      'status'      => 'ok',
      'expiration'  => '-1',
      'tmpl_id'     => '1',
      'id'          => '15'
    } ], 
    'error_codes' => ''
  }, 'API::Plesk::Response' );
modify(%params)

Changes the account params.

Params: general_info -- hashref`s with new user details id -- client id

Return: $VAR1 = bless( { 'answer_data' => [ { 'server_id' => '1', 'status' => 'ok', 'tmpl_id' => '1', 'id' => '15', 'plesk_client_id' => '384', 'login' => 'suxdffffxx' } ], 'error_codes' => '' }, 'API::Plesk::Response' );

Example (client deactivation): print Dumper $client->Accounts->modify( id => 10, general_info => { status => 16 } );

delete(%params)

Delete accounts.

Params: id -- client id in Plesk

Return:

    $VAR1 = bless( {
        'answer_data' => [ {
            'server_id' => '1',
            'status' => 'ok',
            'id' => '15'
        } ],
        'error_codes' => ''
    }, 'API::Plesk::Response' );

Example: print Dumper $client->Accounts->delete( id => 11 );

SEE ALSO

Blank.

AUTHOR

Odintsov Pavel <nrg[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by NRG

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.