API-ParallelsWPB

 view release on metacpan or  search on metacpan

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


    return $self->f_request( [qw/ system trial-mode messages /],
        { req_type => 'get' } );
}


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

    confess "Required parameter message!" unless ( $param{message} );

    return $self->f_request( [ qw/ system promo-footer / ],
        {
           req_type  => 'put',
           post_data => [ $param{message} ],
        }
    );
}


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

    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.

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

    Embedded Video module.

imagegallery

    Image Gallery module.

blog

    Blog module.

eshop

    Online Store and Shopping Cart modules.

commenting

    Commenting module.

contact

    Contact Form module.

sharethis

    Social Sharing module.

advertisement

    Advertisement module.

map

    Map module.

search

    Search module.

navigation

    Navigation module.

breadcrumbs

    Breadcrumbs module.

siteLogo

    Site Logo module.

script

    Script module.

slider

    Image Slider module.

L<Restricting Resources by Means of the API|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide/index.htm?fileName=71986.htm>

=head2 B<configure_buy_and_publish_dialog>

Configuration for Buy & Publish dialog box in constructor.

$params:

    [
        {
            "localeCode" => "de_DE",

            "messages" => {

                "upsellDialogTitle" => $title,
                "upsellDialogMsg"   => $html

            }
        },
        {
            "localeCode" => "ru_RU",

            "messages" => {

                "upsellDialogTitle" => $title,
                "upsellDialogMsg"   => $html

            }
        }
    ]

L<Configuring the Buy and Publish Dialog Window|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide/index.htm?fileName=71987.htm>

=head1 NAME

API::ParallelsWPB::Requests

=head1 SEE ALSO

L<Parallels Presence Builder Guide|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide>

L<API::ParallelsWPB>

L<API::ParallelsWPB::Response>

=head1 AUTHORS

=over 4

=item *

Alexander Ruzhnikov <a.ruzhnikov@reg.ru>

=item *

Polina Shubina <shubina@reg.ru>

=back

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by REG.RU LLC.



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