Webservice/OVH/Order/Hosting.pm

filter: Statementstmt 58.3% 14 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 1 / 1 totaltotal 54.2% 19 / 35 CC 3 SCAR 16.6
CC
3
Cov
50%
_new
12.0
web
2.0
BEGIN
1.0
CRAP 5.2
« Webservice/OVH/Order/Email.pm ↑ Summary Webservice/OVH.pm »
1 package Webservice::OVH::Order::Hosting;
2  
3 =encoding utf-8
4  
5 =head1 NAME
6  
7 Webservice::OVH::Order::Hosting
8  
9 =head1 SYNOPSIS
10  
11 use Webservice::OVH;
12
13 my $ovh = Webservice::OVH->new_from_json("credentials.json");
14
15 my $info = $ovh->hosting->web->free_email_info;
16  
17 =head1 DESCRIPTION
18  
19 Only Helper Object to Web Api Sub-Object.
20  
21 =head1 METHODS
22  
23 =cut
24  
25 36 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 36 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 36 ▶use Carp qw{ carp croak };
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 36 our $VERSION = 0.48;
30  
31 36 ▶use Webservice::OVH::Order::Hosting::Web;
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 =head2 _new
34  
35 Internal Method to create the Hosting object.
36 This method is not ment to be called directly.
37  
38 =over
39  
40 =item * Parameter: $api_wrapper - ovh api wrapper object, $module - root object, $type - intern type
41  
42 =item * Return: L<Webservice::OVH::Me::Task>
43  
44 =item * Synopsis: Webservice::OVH::Me::Task->_new($ovh_api_wrapper, $type, $module);
45  
46 =back
47  
48 =cut
49  
50 0 ▶sub _new {
Subroutine _new: not called CC=3 SCAR=24.8
51  
52 0 my ( $class, %params ) = @_;
53  
54 0 ▶ die "Missing module" unless $params{module};
Branch: 1 branch
BranchTrueFalseTotal
unless $params{"module"} 0 0 0
55 0 ▶ die "Missing wrapper" unless $params{wrapper};
Branch: 1 branch
BranchTrueFalseTotal
unless $params{"wrapper"} 0 0 0
56  
57 0 my $module = $params{module};
58 0 my $api_wrapper = $params{wrapper};
59  
60 0 my $web = Webservice::OVH::Order::Hosting::Web->_new( wrapper => $api_wrapper, module => $module );
61  
62 0 my $self = bless { _api_wrapper => $api_wrapper, _web => $web }, $class;
63  
64 0 return $self;
65 }
66  
67 =head2 web
68  
69 Gives acces to the /order/hosting/web methods of the ovh api
70  
71 =over
72  
73 =item * Return: L<Webservice::OVH::Order::Hosting::Web>
74  
75 =item * Synopsis: $ovh->order->hosting->web
76  
77 =back
78  
79 =cut
80  
81 0 ▶sub web {
Subroutine web: not called CC=1 SCAR=6.9
Pod documented
82  
83 0 my ($self) = @_;
84  
85 0 return $self->{_web};
86 }
87  
88 36 1;
« Webservice/OVH/Order/Email.pm ↑ Summary Webservice/OVH.pm »