Initial import
[Net-Plesk.git] / lib / Net / Plesk / Method / domain_add.pm
1 package Net::Plesk::Method::domain_add;
2
3 use strict;
4
5 use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG );
6
7 @ISA = qw( Net::Plesk::Method );
8 $VERSION = '0.01';
9
10 $DEBUG = 0;
11
12 =head1 NAME
13
14 Net::Plesk::Method::domain_add - Perl extension for Plesk XML Remote API domain addition
15
16 =head1 SYNOPSIS
17
18   use Net::Plesk::Method::domain_add
19
20   my $p = new Net::Plesk::Method::domain_add ( $clientID, 'domain.com' );
21
22   $request = $p->endcode;
23
24 =head1 DESCRIPTION
25
26 This module implements an interface to construct a request for a domain
27 addition using SWSOFT's Plesk.
28
29 =head1 METHODS
30
31 =over 4
32
33 =item init args ...
34
35 Initializes a Plesk domain_add object.  The I<domain>, I<client>, and
36 $<ip_address> options are required.
37
38 =cut
39
40 sub init {
41   my ($self, $domain, $client, $ip) = @_;
42   $$self = join ( "\n", (
43                     '<domain>',
44                     '<add>',
45                     '<gen_setup>',
46                     '<name>',
47                     $self->encode($domain),
48                     '</name>',
49                     '<client_id>',
50                     $self->encode($client),
51                     '</client_id>',
52                     '<ip_address>',
53                     $self->encode($ip),
54                     '</ip_address>',
55                     '</gen_setup>',
56                     '</add>',
57                     '</domain>',
58                   ));
59 }
60
61 =back
62
63 =head1 BUGS
64
65   Creepy crawlies.
66
67 =head1 SEE ALSO
68
69 SWSOFT Plesk Remote API documentation (1.4.0.0 or later)
70
71 =head1 AUTHOR
72
73 Jeff Finucane E<lt>jeff@cmh.netE<gt>
74
75 =head1 COPYRIGHT AND LICENSE
76
77 Copyright (C) 2006 Jeff Finucane
78
79 This library is free software; you can redistribute it and/or modify
80 it under the same terms as Perl itself.
81
82 =cut
83
84 1;
85