line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Webservice::OVH::Email::Domain::Domain::Task::Mailinglist; |
2
|
|
|
|
|
|
|
|
3
|
36
|
|
|
36
|
|
251
|
use strict; |
|
36
|
|
|
|
|
81
|
|
|
36
|
|
|
|
|
1051
|
|
4
|
36
|
|
|
36
|
|
192
|
use warnings; |
|
36
|
|
|
|
|
89
|
|
|
36
|
|
|
|
|
969
|
|
5
|
36
|
|
|
36
|
|
229
|
use Carp qw{ carp croak }; |
|
36
|
|
|
|
|
80
|
|
|
36
|
|
|
|
|
23578
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = 0.48; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub _new_existing { |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
|
|
my ( $class, %params ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
0
|
|
|
|
|
die "Missing module" unless $params{module}; |
14
|
0
|
0
|
|
|
|
|
die "Missing wrapper" unless $params{wrapper}; |
15
|
0
|
0
|
|
|
|
|
die "Missing id" unless $params{id}; |
16
|
0
|
0
|
|
|
|
|
die "Missing domain" unless $params{domain}; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $module = $params{module}; |
19
|
0
|
|
|
|
|
|
my $api_wrapper = $params{wrapper}; |
20
|
0
|
|
|
|
|
|
my $id = $params{id}; |
21
|
0
|
|
|
|
|
|
my $domain = $params{domain}; |
22
|
0
|
|
|
|
|
|
my $domain_name = $domain->name; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $self = bless { _module => $module, _valid => 1, _wrapper => $api_wrapper, _id => $id, _properties => undef, _domain => $domain }, $class; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub is_valid { |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
$self->properties; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $self->{_valid}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub properties { |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $domain_name = $self->{_domain}->name; |
45
|
0
|
|
|
|
|
|
my $id = $self->{_id}; |
46
|
0
|
|
|
|
|
|
my $api_wrapper = $self->{_wrapper}; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $response = $api_wrapper->rawCall( method => 'get', path => "/email/domain/$domain_name/task/mailinglist/$id", noSignature => 0 ); |
49
|
0
|
0
|
|
|
|
|
carp $response->error if $response->error; |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
if ( !$response->error ) { |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
my $properties = $response->content; |
54
|
0
|
|
|
|
|
|
return $properties; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
} else { |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
$self->{_valid} = 0; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub account { |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
66
|
|
|
|
|
|
|
|
67
|
0
|
0
|
|
|
|
|
$self->properties unless $self->{_properties}; |
68
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
69
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
return $self->{_properties}{account}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub language { |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
76
|
|
|
|
|
|
|
|
77
|
0
|
0
|
|
|
|
|
$self->properties unless $self->{_properties}; |
78
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $self->{_properties}{language}; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub id { |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
86
|
|
|
|
|
|
|
|
87
|
0
|
|
|
|
|
|
return $self->{_id}; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub domain { |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
93
|
|
|
|
|
|
|
|
94
|
0
|
|
|
|
|
|
return $self->{_domain}; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub date { |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
0
|
|
|
|
|
$self->properties unless $self->{_properties}; |
102
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
return $self->{_properties}{date}; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub action { |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
|
|
|
$self->properties unless $self->{_properties}; |
112
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
113
|
|
|
|
|
|
|
|
114
|
0
|
|
|
|
|
|
return $self->{_properties}{action}; |
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
1; |