Net::Plesk::Method::client_add - Perl extension for Plesk XML Remote API client addition


Net-Plesk documentation Contained in the Net-Plesk distribution.

Index


Code Index:

NAME

Top

Net::Plesk::Method::client_add - Perl extension for Plesk XML Remote API client addition

SYNOPSIS

Top

  use Net::Plesk::Method::client_add

  my $p = new Net::Plesk::client_add ( $clientID, 'client.com' );

DESCRIPTION

Top

This module implements an interface to construct a request for a client addition using SWSOFT's Plesk.

METHODS

Top

init args ...

Initializes a Plesk client_add object. The login and password options are required.

BUGS

Top

  Creepy crawlies.

SEE ALSO

Top

SWSOFT Plesk Remote API documentation (1.4.0.0 or later)

AUTHOR

Top

Jeff Finucane <jeff@cmh.net>

COPYRIGHT AND LICENSE

Top


Net-Plesk documentation Contained in the Net-Plesk distribution.
package Net::Plesk::Method::client_add;

use strict;

use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG );

@ISA = qw ( Net::Plesk::Method );
$VERSION = '0.01';

$DEBUG = 0;

sub init {
  my ($self, $pname, $login, $passwd, $phone, $fax, $email, $address, $city,
      $state, $pcode, $country) = @_;
  $$self = join ( "\n", (
	            '<client>',
	            '<add>',
	            '<gen_info>',
	            '<pname>',
	            $self->encode($pname),
	            '</pname>',
	            '<login>',
	            $self->encode($login),
	            '</login>',
	            '<passwd>',
	            $self->encode($passwd),
	            '</passwd>',
	            '<phone>',
	            $self->encode($phone),
	            '</phone>',
	            '<fax>',
	            $self->encode($fax),
	            '</fax>',
	            '<email>',
	            $self->encode($email),
	            '</email>',
	            '<address>',
	            $self->encode($address),
	            '</address>',
	            '<city>',
	            $self->encode($city),
	            '</city>',
	            '<state>',
		    $self->encode($state),
	            '</state>',
	            '<pcode>',
		    $self->encode($pcode),
	            '</pcode>',
	            '<country>',
		    $self->encode($country),
	            '</country>',
	            '</gen_info>',
	            '</add>',
	            '</client>',
	          ));
}

1;