API-ParallelsWPB

 view release on metacpan or  search on metacpan

lib/API/ParallelsWPB/Requests.pm  view on Meta::CPAN

    my $uuid = $self->_get_uuid( %param );

    return $self->f_request( [ 'sites', $uuid ], {
            req_type  => 'put',
            post_data => [ { isPromoFooterVisible => 'true' } ],
        }
    );
}


sub set_site_promo_footer_invisible {
    my ( $self, %param ) = @_;

    my $uuid = $self->_get_uuid( %param );

    return $self->f_request( [ 'sites', $uuid ], {
            req_type  => 'put',
            post_data => [ { isPromoFooterVisible => 'false' } ],
        }
    );
}



sub set_limits {
    my ( $self, %param ) = @_;

    my $uuid = $self->_get_uuid( %param );

    return $self->f_request( [ 'sites', $uuid, 'limits' ], {
            req_type  => 'put',
            post_data => [ \%param ],
        }
    );
}


sub configure_buy_and_publish_dialog {
    my ( $self, $params ) = @_;

    return $self->f_request(['system', 'trial-mode', 'messages'], {req_type => 'put', post_data => [ $params ]});

}

sub _get_uuid {
    my ( $self, %param ) = @_;

    my $uuid = $param{uuid} ? $param{uuid} : $self->{uuid};
    confess "Required parameter uuid!" unless ( $uuid );

    return $uuid;
}


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::ParallelsWPB::Requests - processing of API requests

=head1 VERSION

version 0.03

=head1 METHODS

=head2 B<get_version($self)>

Getting the current version of the Parallels Web Presence Builder instance on the defined server.

=head2 B<create_site($self, %param)>

Creating a site.

%param:

state

    trial | suspended | regular

    This parameter is optional.
    It specifies whether the site is in the trial mode, suspended or active (regular value). Sites in the trial mode can be edited, but cannot be published to a hosting account.

publicationSettings

    {
        "targetUrl" => "ftp://username:password@ftp.example.com/path",
        "webSiteUrl" => "http://example.com",
        "fallbackIp" => "192.168.1.3"
    }

    This parameter is optional.

ownerInfo

    {
        "personalName" => "John Doe",
        "companyName"  => "My Company LTD",
        "phone"        => "+1-954-555-555",
        "email"        => "john@example.com",
        "address"      => "New",
        "city"         => "New York",
        "state"        => "New York",
        "zip"          => "10292",
        "country"      => "United states"
    }

    This parameter is optional.

isPromoFooterVisible

    1 | 0

    This parameter is optional.
    It specifies whether a text box containing an advertisement should be shown in a website footer (a section that appears at the bottom of every page on a site).



( run in 0.668 second using v1.01-cache-2.11-cpan-39bf76dae61 )