line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=encoding utf-8 |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Webservice::OVH::Order::Domain::Zone |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 SYNOPSIS |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Webservice::OVH; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $ovh = Webservice::OVH->new_from_json("credentials.json"); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $existing_zones = $ovh->order->domain->zone->existing; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Provides the possibility to order domain zones only. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 METHODS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
use strict; |
25
|
36
|
|
|
36
|
|
227
|
use warnings; |
|
36
|
|
|
|
|
71
|
|
|
36
|
|
|
|
|
904
|
|
26
|
36
|
|
|
36
|
|
156
|
use Carp qw{ carp croak }; |
|
36
|
|
|
|
|
86
|
|
|
36
|
|
|
|
|
922
|
|
27
|
36
|
|
|
36
|
|
175
|
|
|
36
|
|
|
|
|
67
|
|
|
36
|
|
|
|
|
2152
|
|
28
|
|
|
|
|
|
|
our $VERSION = 0.47; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use Webservice::OVH::Me::Order; |
31
|
36
|
|
|
36
|
|
227
|
|
|
36
|
|
|
|
|
80
|
|
|
36
|
|
|
|
|
14844
|
|
32
|
|
|
|
|
|
|
=head2 _new |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Internal Method to create the Zone object. |
35
|
|
|
|
|
|
|
This method is not ment to be called directly. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=over |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item * Parameter: $api_wrapper - ovh api wrapper object, $module - root object |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item * Return: L<Webservice::OVH::Order::Domain::Zone> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item * Synopsis: Webservice::OVH::Order::Domain::Zone->_new($ovh_api_wrapper, $module); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=back |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my ( $class, %params ) = @_; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
0
|
|
|
die "Missing module" unless $params{module}; |
53
|
|
|
|
|
|
|
die "Missing wrapper" unless $params{wrapper}; |
54
|
0
|
0
|
|
|
|
|
|
55
|
0
|
0
|
|
|
|
|
my $module = $params{module}; |
56
|
|
|
|
|
|
|
my $api_wrapper = $params{wrapper}; |
57
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my $self = bless { _module => $module, _api_wrapper => $api_wrapper }, $class; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return $self; |
61
|
|
|
|
|
|
|
} |
62
|
0
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 _new |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Returns an array with all available zones connected to the active account. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=over |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * Return: L<ARRAY> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item * Synopsis: my $existing_zones = $ovh->order->domain->zone->existing; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=back |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
my ($self) = @_; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
81
|
0
|
|
|
0
|
1
|
|
|
82
|
|
|
|
|
|
|
my $response = $api->rawCall( method => 'get', path => "/order/domain/zone", noSignature => 0 ); |
83
|
0
|
|
|
|
|
|
croak $response->error if $response->error; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $response->content; |
86
|
0
|
0
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
=head2 _new |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Gets information about a requested zone order. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item * Return: HASH |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * Synopsis: my $existing_zones = $ovh->order->domain->zone->existing; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=back |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
my ($self) = @_; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
0
|
0
|
|
my $response = $api->rawCall( method => 'get', path => "/order/domain/zone/new", noSignature => 0 ); |
108
|
|
|
|
|
|
|
croak $response->error if $response->error; |
109
|
0
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
return $response->content; |
111
|
0
|
|
|
|
|
|
} |
112
|
0
|
0
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 _new |
114
|
0
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Gets information about a requested zone order. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * Parameter: $zone_name - desired zone, $minimized - only mandatory record entries |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item * Return: L<Webservice::OVH::Me::Order> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * Synopsis: my $oder = $ovh->order->domain->zone->order('mydomain.de', 'true'); |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=back |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
my ( $self, $zone_name, $minimized ) = @_; |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
$minimized ||= 'false'; |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
135
|
0
|
|
|
0
|
1
|
|
my $module = $self->{_module}; |
136
|
|
|
|
|
|
|
|
137
|
0
|
|
0
|
|
|
|
my $response = $api->rawCall( method => 'post', path => "/order/domain/zone/new", body => { zoneName => $zone_name, minimized => $minimized }, noSignature => 0 ); |
138
|
|
|
|
|
|
|
croak $response->error if $response->error; |
139
|
0
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
my $order = $module->me->order( $response->content->{orderId} ); |
141
|
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
return $order; |
143
|
0
|
0
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
=head2 _new |
146
|
|
|
|
|
|
|
|
147
|
0
|
|
|
|
|
|
Gets available options for the desired zone order. |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=over |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item * Parameter: $zone_name - desired zone |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item * Return: HASH |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=item * Synopsis: my $options = $ovh->order->domain->zone->options('mydomain.de'); |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=back |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=cut |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
my ( $self, $zone_name ) = @_; |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
my $response = $api->rawCall( method => 'get', path => "/order/domain/zone/$zone_name", noSignature => 0 ); |
167
|
|
|
|
|
|
|
croak $response->error if $response->error; |
168
|
0
|
|
|
0
|
1
|
|
|
169
|
|
|
|
|
|
|
return $response->content; |
170
|
0
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
0
|
|
|
|
|
|
1; |