File Coverage

blib/lib/Regru/API/Hosting.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 18 100.0


line stmt bran cond sub pod time code
1              
2             # ABSTRACT: REG.API v2 hosting management functions
3              
4             use strict;
5 1     1   483 use warnings;
  1         3  
  1         24  
6 1     1   4 use Moo;
  1         2  
  1         20  
7 1     1   4 use namespace::autoclean;
  1         1  
  1         5  
8 1     1   2216  
  1         2  
  1         4  
9             our $VERSION = '0.052'; # VERSION
10             our $AUTHORITY = 'cpan:CHIM'; # AUTHORITY
11              
12             with 'Regru::API::Role::Client';
13              
14             has '+namespace' => (
15             default => sub { 'hosting' },
16             );
17              
18             nop
19 1     1   3 get_jelastic_refill_url
20             set_jelastic_refill_url
21             get_parallelswpb_constructor_url
22             )]}
23              
24             __PACKAGE__->namespace_methods;
25             __PACKAGE__->meta->make_immutable;
26              
27             1; # End of Regru::API::Hosting
28              
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             Regru::API::Hosting - REG.API v2 hosting management functions
37              
38             =head1 VERSION
39              
40             version 0.052
41              
42             =head1 DESCRIPTION
43              
44             REG.API hosting management functions. Most of their available only for C<partners>.
45              
46             =head1 ATTRIBUTES
47              
48             =head2 namespace
49              
50             Always returns the name of category: C<hosting>. For internal uses only.
51              
52             =head1 REG.API METHODS
53              
54             =head2 nop
55              
56             For testing purposes. Scope: B<everyone>. Typical usage:
57              
58             $resp = $client->hosting->nop;
59              
60             Returns success response.
61              
62             More info at L<Hosting management: nop|https://www.reg.com/support/help/api2#hosting_nop>.
63              
64             =head2 set_jelastic_refill_url
65              
66             Update Jelastic refill URL for current reseller. That url is used when client hits "Refill" button at his Jelastic account page. Keywords C<< <service_id> >> and C<< <email> >> in url will be replaced
67             with service identifier and user email, which was used for Jelastic account registration.
68             Scope B<partners>.
69              
70             Typical usage:
71              
72             $resp = $client->hosting->set_jelastic_refill_url(
73             url => 'http://mysite.com?service_id=<service_id>&email=<email>'
74             );
75              
76             Returns success response if URL was set.
77             More info at L<Hosting management: set_jelastic_refill_url|https://www.reg.com/support/help/api2#hosting_set_jelastic_refill_url>.
78              
79             =head2 get_jelastic_refill_url
80              
81             Fetch Jelastic refill URL for current reseller. Scope: B<partners>. Typical usage:
82              
83             $resp = $client->hosting->get_jelastic_refill_url;
84              
85             Answer will contain the C<url> field, with reseller refill url.
86              
87             More info at L<Hosting management: get_jelastic_refill_url|https://www.reg.com/support/help/api2#hosting_get_jelastic_refill_url>.
88              
89             =head2 get_parallelswpb_constructor_url
90              
91             Retrieves an URL for ParallelsWPB constructor. Scope: B<clients>. Typical usage:
92              
93             $resp = $client->hosting->get_parallelswpb_constructor_url(
94             service_id => 2312677,
95             );
96              
97             Answer will contain the C<url> field, with URL for ParallelsWPB constructor.
98              
99             More info at L<Hosting management: get_parallelswpb_constructor_url|https://www.reg.com/support/help/api2#hosting_get_parallelswpb_constructor_url>.
100              
101             =head1 SEE ALSO
102              
103             L<Regru::API>
104              
105             L<Regru::API::Role::Client>
106              
107             L<REG.API Hosting management|https://www.reg.com/support/help/api2#hosting_functions>
108              
109             L<REG.API Common error codes|https://www.reg.com/support/help/api2#common_errors>
110              
111             =head1 BUGS
112              
113             Please report any bugs or feature requests on the bugtracker website
114             L<https://github.com/regru/regru-api-perl/issues>
115              
116             When submitting a bug or request, please include a test-file or a
117             patch to an existing test-file that illustrates the bug or desired
118             feature.
119              
120             =head1 AUTHORS
121              
122             =over 4
123              
124             =item *
125              
126             Polina Shubina <shubina@reg.ru>
127              
128             =item *
129              
130             Anton Gerasimov <a.gerasimov@reg.ru>
131              
132             =back
133              
134             =head1 COPYRIGHT AND LICENSE
135              
136             This software is copyright (c) 2013 by REG.RU LLC.
137              
138             This is free software; you can redistribute it and/or modify it under
139             the same terms as the Perl 5 programming language system itself.
140              
141             =cut