| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=encoding utf-8 |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Webservice::OVH::Domain::Service |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Webservice::OVH; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $ovh = Webservice::OVH->new_from_json("credentials.json"); |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $service = $ovh->domain->service("mydomain.org"); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $info = $service->service_info; |
|
17
|
|
|
|
|
|
|
my $last_update = $service->last_update; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Provieds basic functionality for Services |
|
22
|
|
|
|
|
|
|
A service contact_change can be initialized. |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 METHODS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
use strict; |
|
29
|
36
|
|
|
36
|
|
220
|
use warnings; |
|
|
36
|
|
|
|
|
63
|
|
|
|
36
|
|
|
|
|
853
|
|
|
30
|
36
|
|
|
36
|
|
155
|
use Carp qw{ carp croak }; |
|
|
36
|
|
|
|
|
60
|
|
|
|
36
|
|
|
|
|
802
|
|
|
31
|
36
|
|
|
36
|
|
171
|
use DateTime; |
|
|
36
|
|
|
|
|
64
|
|
|
|
36
|
|
|
|
|
1671
|
|
|
32
|
36
|
|
|
36
|
|
27391
|
use JSON; |
|
|
36
|
|
|
|
|
16476651
|
|
|
|
36
|
|
|
|
|
1603
|
|
|
33
|
36
|
|
|
36
|
|
291
|
|
|
|
36
|
|
|
|
|
74
|
|
|
|
36
|
|
|
|
|
319
|
|
|
34
|
|
|
|
|
|
|
our $VERSION = 0.47; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use Webservice::OVH::Helper; |
|
37
|
36
|
|
|
36
|
|
22948
|
use Webservice::OVH::Me::Contact; |
|
|
36
|
|
|
|
|
132
|
|
|
|
36
|
|
|
|
|
1445
|
|
|
38
|
36
|
|
|
36
|
|
19284
|
|
|
|
36
|
|
|
|
|
102
|
|
|
|
36
|
|
|
|
|
46234
|
|
|
39
|
|
|
|
|
|
|
=head2 _new |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Internal Method to create the service object. |
|
42
|
|
|
|
|
|
|
This method is not ment to be called external. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item * Parameter: $api_wrapper - ovh api wrapper object, $module - root object |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item * Return: L<Webservice::OVH::Domain::Zone> |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item * Synopsis: Webservice::OVH::Domain::Zone->_new($ovh_api_wrapper, $zone_name, $module); |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=back |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my ( $class, %params ) = @_; |
|
58
|
|
|
|
|
|
|
|
|
59
|
0
|
|
|
0
|
|
|
die "Missing module" unless $params{module}; |
|
60
|
|
|
|
|
|
|
die "Missing wrapper" unless $params{wrapper}; |
|
61
|
0
|
0
|
|
|
|
|
die "Missing id" unless $params{id}; |
|
62
|
0
|
0
|
|
|
|
|
|
|
63
|
0
|
0
|
|
|
|
|
my $module = $params{module}; |
|
64
|
|
|
|
|
|
|
my $api_wrapper = $params{wrapper}; |
|
65
|
0
|
|
|
|
|
|
my $service_name = $params{id}; |
|
66
|
0
|
|
|
|
|
|
|
|
67
|
0
|
|
|
|
|
|
my $self = bless { _module => $module, _api_wrapper => $api_wrapper, _name => $service_name, _owner => undef, _service_info => undef, _properties => undef }, $class; |
|
68
|
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
0
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 name |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Name is the unique identifier. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * Return: VALUE |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * Synopsis: my $name = $service->name; |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
my ($self) = @_; |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
return $self->{_name}; |
|
90
|
0
|
|
|
0
|
1
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
=head2 service_infos |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Retrieves additional infos about the service. |
|
95
|
|
|
|
|
|
|
Infos that are not part of the properties |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=over |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * Return: HASH |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * Synopsis: my $info = $service->service_info; |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=back |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
my ($self) = @_; |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
|
111
|
|
|
|
|
|
|
my $service_name = $self->name; |
|
112
|
0
|
|
|
0
|
1
|
|
my $response_service_info = $api->rawCall( method => 'get', path => "/domain/$service_name/serviceInfos", noSignature => 0 ); |
|
113
|
|
|
|
|
|
|
|
|
114
|
0
|
|
|
|
|
|
croak $response_service_info->error if $response_service_info->error; |
|
115
|
0
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
$self->{_service_info} = $response_service_info->content; |
|
117
|
|
|
|
|
|
|
|
|
118
|
0
|
0
|
|
|
|
|
return $self->{_service_info}; |
|
119
|
|
|
|
|
|
|
} |
|
120
|
0
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 properties |
|
122
|
0
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Retrieves properties of the service. |
|
124
|
|
|
|
|
|
|
This method updates the intern property variable. |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=over |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * Return: HASH |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item * Synopsis: my $properties = $service->properties; |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
my ($self) = @_; |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
|
140
|
|
|
|
|
|
|
my $service_name = $self->name; |
|
141
|
|
|
|
|
|
|
my $response_properties = $api->rawCall( method => 'get', path => "/domain/$service_name", noSignature => 0 ); |
|
142
|
0
|
|
|
0
|
1
|
|
|
|
143
|
|
|
|
|
|
|
croak $response_properties->error if $response_properties->error; |
|
144
|
0
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
$self->{_properties} = $response_properties->content; |
|
146
|
0
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
return $self->{_properties}; |
|
148
|
0
|
0
|
|
|
|
|
} |
|
149
|
|
|
|
|
|
|
|
|
150
|
0
|
|
|
|
|
|
=head2 dnssec_supported |
|
151
|
|
|
|
|
|
|
|
|
152
|
0
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=over |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item * Return: VALUE |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item * Synopsis: my $dnssec_supported = $service->dnssec_supported; |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
my ($self) = @_; |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
return $self->{_properties}->{dnssecSupported} ? 1 : 0; |
|
170
|
|
|
|
|
|
|
} |
|
171
|
0
|
|
|
0
|
1
|
|
|
|
172
|
|
|
|
|
|
|
=head2 domain |
|
173
|
0
|
0
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
175
|
0
|
0
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=over |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item * Return: VALUE |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=item * Synopsis: my $domain = $service->domain; |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=back |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=cut |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
my ($self) = @_; |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
return $self->{_properties}->{domain}; |
|
192
|
|
|
|
|
|
|
} |
|
193
|
|
|
|
|
|
|
|
|
194
|
0
|
|
|
0
|
1
|
|
=head2 glue_record_ipv6_supported |
|
195
|
|
|
|
|
|
|
|
|
196
|
0
|
0
|
|
|
|
|
Exposed Property Value. Readonly. |
|
197
|
|
|
|
|
|
|
|
|
198
|
0
|
|
|
|
|
|
=over |
|
199
|
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=item * Return: VALUE |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=item * Synopsis: my $glue_record_ipv6_supported = $service->glue_record_ipv6_supported; |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=back |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=cut |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
my ($self) = @_; |
|
210
|
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
212
|
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
return $self->{_properties}->{glueRecordIpv6Supported} ? 1 : 0; |
|
214
|
|
|
|
|
|
|
} |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head2 glue_record_multi_ip_supported |
|
217
|
0
|
|
|
0
|
1
|
|
|
|
218
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
219
|
0
|
0
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=over |
|
221
|
0
|
0
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=item * Return: VALUE |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=item * Synopsis: my $glue_record_multi_ip_supported = $service->glue_record_multi_ip_supported; |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=back |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=cut |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
my ($self) = @_; |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
return $self->{_properties}->{glueRecordMultiIpSupported} ? 1 : 0; |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=head2 last_update |
|
239
|
|
|
|
|
|
|
|
|
240
|
0
|
|
|
0
|
1
|
|
Exposed Property Value. Readonly. |
|
241
|
|
|
|
|
|
|
|
|
242
|
0
|
0
|
|
|
|
|
=over |
|
243
|
|
|
|
|
|
|
|
|
244
|
0
|
0
|
|
|
|
|
=item * Return: DateTime |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
=item * Synopsis: my $last_update = $service->last_update; |
|
247
|
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=back |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=cut |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
my ($self) = @_; |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
my $str_datetime = $self->{_properties}->{lastUpdate}; |
|
258
|
|
|
|
|
|
|
my $datetime = Webservice::OVH::Helper->parse_datetime($str_datetime); |
|
259
|
|
|
|
|
|
|
return $datetime; |
|
260
|
|
|
|
|
|
|
} |
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=head2 last_update |
|
263
|
0
|
|
|
0
|
1
|
|
|
|
264
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
265
|
0
|
0
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=over |
|
267
|
0
|
|
|
|
|
|
|
|
268
|
0
|
|
|
|
|
|
=item * Return: DateTime |
|
269
|
0
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=item * Synopsis: my $last_update = $service->last_update; |
|
271
|
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
=back |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=cut |
|
275
|
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
my ($self) = @_; |
|
278
|
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
$self->service_infos unless $self->{_service_info}; |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
my $str_datetime = $self->{_service_info}->{expiration}; |
|
282
|
|
|
|
|
|
|
my $datetime = Webservice::OVH::Helper->parse_date($str_datetime); |
|
283
|
|
|
|
|
|
|
return $datetime; |
|
284
|
|
|
|
|
|
|
} |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=head2 name_server_type |
|
287
|
|
|
|
|
|
|
|
|
288
|
0
|
|
|
0
|
0
|
|
Exposed Property Value. Readonly. |
|
289
|
|
|
|
|
|
|
|
|
290
|
0
|
0
|
|
|
|
|
=over |
|
291
|
|
|
|
|
|
|
|
|
292
|
0
|
|
|
|
|
|
=item * Return: VALUE |
|
293
|
0
|
|
|
|
|
|
|
|
294
|
0
|
|
|
|
|
|
=item * Synopsis: my $name_server_type = $service->name_server_type; |
|
295
|
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
=back |
|
297
|
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
=cut |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
my ($self) = @_; |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
return $self->{_properties}->{nameServerType}; |
|
306
|
|
|
|
|
|
|
} |
|
307
|
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
=head2 offer |
|
309
|
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
311
|
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
=over |
|
313
|
0
|
|
|
0
|
1
|
|
|
|
314
|
|
|
|
|
|
|
=item * Return: HASH |
|
315
|
0
|
0
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=item * Synopsis: my $offer = $service->offer; |
|
317
|
0
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=back |
|
319
|
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=cut |
|
321
|
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
my ($self) = @_; |
|
324
|
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
326
|
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
return $self->{_properties}->{offer}; |
|
328
|
|
|
|
|
|
|
} |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=head2 owo_supported |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=over |
|
335
|
|
|
|
|
|
|
|
|
336
|
0
|
|
|
0
|
1
|
|
=item * Return: VALUE |
|
337
|
|
|
|
|
|
|
|
|
338
|
0
|
0
|
|
|
|
|
=item * Synopsis: my $owo_supported = $service->owo_supported; |
|
339
|
|
|
|
|
|
|
|
|
340
|
0
|
|
|
|
|
|
=back |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=cut |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
my ($self) = @_; |
|
346
|
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
348
|
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
return $self->{_properties}->{owoSupported} ? 1 : 0; |
|
350
|
|
|
|
|
|
|
} |
|
351
|
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=head2 parent_service |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
=over |
|
357
|
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
=item * Return: VALUE |
|
359
|
0
|
|
|
0
|
1
|
|
|
|
360
|
|
|
|
|
|
|
=item * Synopsis: my $parent_service = $service->parent_service; |
|
361
|
0
|
0
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=back |
|
363
|
0
|
0
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=cut |
|
365
|
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
my ($self) = @_; |
|
368
|
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
return $self->{_properties}->{parentService}; |
|
372
|
|
|
|
|
|
|
} |
|
373
|
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head2 transfer_lock_status |
|
375
|
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=over |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=item * Return: VALUE |
|
381
|
|
|
|
|
|
|
|
|
382
|
0
|
|
|
0
|
1
|
|
=item * Synopsis: my $transfer_lock_status = $service->transfer_lock_status; |
|
383
|
|
|
|
|
|
|
|
|
384
|
0
|
0
|
|
|
|
|
=back |
|
385
|
|
|
|
|
|
|
|
|
386
|
0
|
|
|
|
|
|
=cut |
|
387
|
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
my ($self) = @_; |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
return $self->{_properties}->{transferLockStatus}; |
|
394
|
|
|
|
|
|
|
} |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=head2 whois_owner |
|
397
|
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
Exposed Property Value. Readonly. |
|
399
|
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
=over |
|
401
|
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=item * Return: L<Webservice::Me::Contact> |
|
403
|
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
=item * Synopsis: my $owner = $service->whois_owner; |
|
405
|
0
|
|
|
0
|
1
|
|
|
|
406
|
|
|
|
|
|
|
=back |
|
407
|
0
|
0
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
=cut |
|
409
|
0
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
my ($self) = @_; |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
|
414
|
|
|
|
|
|
|
my $properties = $self->{_properties} || $self->properties; |
|
415
|
|
|
|
|
|
|
my $owner_id = $properties->{whoisOwner}; |
|
416
|
|
|
|
|
|
|
my $owner = $self->{_owner} = $self->{_owner} || Webservice::OVH::Me::Contact->_new_existing( wrapper => $api, id => $owner_id, module => $self->{_module} ); |
|
417
|
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
return $self->{_owner}; |
|
419
|
|
|
|
|
|
|
} |
|
420
|
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
=head2 change_contact |
|
422
|
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
Initializes a change_contact procedure. |
|
424
|
|
|
|
|
|
|
This generates a task. An email is sent to the other account- |
|
425
|
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=over |
|
427
|
|
|
|
|
|
|
|
|
428
|
0
|
|
|
0
|
1
|
|
=item * Parameter: %params - key => value contact_billing contact_admin contact_tech - ovh account names |
|
429
|
|
|
|
|
|
|
|
|
430
|
0
|
|
|
|
|
|
=item * Return: L<Webservice::Me::Task> |
|
431
|
0
|
|
0
|
|
|
|
|
|
432
|
0
|
|
|
|
|
|
=item * Synopsis: $service->change_contact(contact_tech => 'otheraccount-ovh'); |
|
433
|
0
|
|
0
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=back |
|
435
|
0
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=cut |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
my ( $self, %params ) = @_; |
|
440
|
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
croak "at least one parameter needed: contact_billing contact_admin contact_tech" unless %params; |
|
442
|
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
|
444
|
|
|
|
|
|
|
my $service_name = $self->name; |
|
445
|
|
|
|
|
|
|
my $body = {}; |
|
446
|
|
|
|
|
|
|
$body->{contactBilling} = $params{contact_billing} if exists $params{contact_billing}; |
|
447
|
|
|
|
|
|
|
$body->{contactAdmin} = $params{contact_admin} if exists $params{contact_admin}; |
|
448
|
|
|
|
|
|
|
$body->{contactTech} = $params{contact_tech} if exists $params{contact_tech}; |
|
449
|
|
|
|
|
|
|
my $response = $api->rawCall( method => 'post', path => "/domain/$service_name/changeContact", body => $body, noSignature => 0 ); |
|
450
|
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
croak $response->error if $response->error; |
|
452
|
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
my $tasks = []; |
|
454
|
|
|
|
|
|
|
my $task_ids = $response->content; |
|
455
|
|
|
|
|
|
|
foreach my $task_id (@$task_ids) { |
|
456
|
|
|
|
|
|
|
|
|
457
|
0
|
|
|
0
|
1
|
|
my $task = $api->me->task_contact_change($task_id); |
|
458
|
|
|
|
|
|
|
push @$tasks, $task; |
|
459
|
0
|
0
|
|
|
|
|
} |
|
460
|
|
|
|
|
|
|
|
|
461
|
0
|
|
|
|
|
|
return $tasks; |
|
462
|
0
|
|
|
|
|
|
} |
|
463
|
0
|
|
|
|
|
|
|
|
464
|
0
|
0
|
|
|
|
|
=head2 change_service_infos |
|
465
|
0
|
0
|
|
|
|
|
|
|
466
|
0
|
0
|
|
|
|
|
Change service_infos let you change the autorenewal method for this service |
|
467
|
0
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=over |
|
469
|
0
|
0
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
=item * Parameter: %params - key => value renew(required) => { automatic(required), delete_at_expiration(required), forced(required), period(required) } |
|
471
|
0
|
|
|
|
|
|
|
|
472
|
0
|
|
|
|
|
|
=item * Synopsis: $service->change_service_infos(renew => { automatic => 'yes', delete_at_expiration => 'yes', forced => 'yes', period => 12 }); |
|
473
|
0
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
=back |
|
475
|
0
|
|
|
|
|
|
|
|
476
|
0
|
|
|
|
|
|
=cut |
|
477
|
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
|
|
479
|
0
|
|
|
|
|
|
my ( $self, %params ) = @_; |
|
480
|
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
croak "Missing parameter: renew" unless $params{renew}; |
|
482
|
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
my @keys = qw{ automatic delete_at_expiration forced period }; |
|
484
|
|
|
|
|
|
|
if ( my @missing_parameters = grep { not exists $params{renew}{$_} } @keys ) { |
|
485
|
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
croak "Missing parameter: @missing_parameters"; |
|
487
|
|
|
|
|
|
|
} |
|
488
|
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
my $options = {}; |
|
490
|
|
|
|
|
|
|
$options->{automatic} = $params{renew}{automatic} eq 'true' || $params{renew}{automatic} eq 'yes' || $params{renew}{automatic} eq '1' ? JSON::true : JSON::false; |
|
491
|
|
|
|
|
|
|
$options->{deleteAtExpiration} = $params{renew}{delete_at_expiration} eq 'true' || $params{renew}{delete_at_expiration} eq 'yes' || $params{renew}{delete_at_expiration} eq '1' ? JSON::true : JSON::false; |
|
492
|
|
|
|
|
|
|
$options->{forced} = $params{renew}{forced} eq 'true' || $params{renew}{forced} eq 'yes' || $params{renew}{forced} eq '1' ? JSON::true : JSON::false; |
|
493
|
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
my $api = $self->{_api_wrapper}; |
|
495
|
|
|
|
|
|
|
my $service_name = $self->name; |
|
496
|
|
|
|
|
|
|
my $body = {}; |
|
497
|
|
|
|
|
|
|
$body->{renew}{period} = $params{renew}{period}; |
|
498
|
0
|
|
|
0
|
1
|
|
$body->{renew}{automatic} = $options->{automatic}; |
|
499
|
|
|
|
|
|
|
$body->{renew}{deleteAtExpiration} = $options->{deleteAtExpiration}; |
|
500
|
0
|
0
|
|
|
|
|
$body->{renew}{forced} = $options->{forced}; |
|
501
|
|
|
|
|
|
|
|
|
502
|
0
|
|
|
|
|
|
my $response = $api->rawCall( method => 'put', body => $body, path => "/domain/$service_name/serviceInfos", noSignature => 0 ); |
|
503
|
0
|
0
|
|
|
|
|
croak $response->error if $response->error; |
|
|
0
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
|
|
505
|
0
|
|
|
|
|
|
} |
|
506
|
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
1; |