File Coverage

blib/lib/XML/SRS/Domain.pm
Criterion Covered Total %
statement 2 4 50.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 4 6 66.6


line stmt bran cond sub pod time code
1              
2             package XML::SRS::Domain;
3             BEGIN {
4 1     1   2427 $XML::SRS::Domain::VERSION = '0.09';
5             }
6 1     1   356 use Moose;
  0            
  0            
7             use PRANG::Graph;
8             use XML::SRS::Types;
9              
10             has_attr 'name' =>
11             is => "ro",
12             isa => "XML::SRS::DomainName",
13             xml_name => "DomainName",
14             ;
15              
16             has_attr 'name_unicode' =>
17             is => "ro",
18             isa => "Str",
19             xml_name => "DomainNameUnicode",
20             xml_required => 0,
21             ;
22            
23             has_attr 'name_unicode_hex' =>
24             is => "ro",
25             isa => "Str",
26             xml_name => "DomainNameUnicodeHex",
27             xml_required => 0,
28             ;
29            
30             has_attr 'name_language' =>
31             is => "ro",
32             isa => "Str",
33             xml_name => "DomainNameLanguage",
34             xml_required => 0,
35             ;
36              
37             has_attr 'registrant_ref' =>
38             is => "ro",
39             isa => "XML::SRS::UID",
40             xml_name => "RegistrantRef",
41             xml_required => 0,
42             ;
43              
44             has_attr 'registrar_name' =>
45             is => "ro",
46             isa => "Str",
47             xml_name => "RegistrarName",
48             xml_required => 0,
49             ;
50              
51             has_attr 'status' =>
52             is => "ro",
53             isa => "Str",
54             xml_name => "Status",
55             xml_required => 0,
56             ;
57              
58             sub is_available {
59             my $self = shift;
60             $self->status eq "Available" ? 1 : 0;
61             }
62              
63             has_attr 'delegate' =>
64             is => "ro",
65             isa => "XML::SRS::Boolean",
66             xml_name => "Delegate",
67             xml_required => 0,
68             ;
69              
70             has_attr 'term' =>
71             is => "ro",
72             isa => "XML::SRS::Term",
73             xml_name => "Term",
74             xml_required => 0,
75             ;
76              
77             has_attr 'registrar_id' =>
78             is => "ro",
79             isa => "XML::SRS::Number",
80             xml_name => "RegistrarId",
81             xml_required => 0,
82             ;
83              
84             has_attr 'UDAI' =>
85             is => "ro",
86             isa => 'Str',
87             xml_name => "UDAI",
88             xml_required => 0,
89             ;
90              
91             # elements
92             has_element 'nameservers' =>
93             is => 'ro',
94             isa => 'XML::SRS::Server::List',
95             xml_nodeName => 'NameServers',
96             xml_required => 0,
97             ;
98            
99             has_element "dns_sec" =>
100             is => "rw",
101             isa => "XML::SRS::DS::List",
102             xml_nodeName => "DNSSEC",
103             xml_required => 0,
104             ;
105              
106             has_element 'contact_registrant' =>
107             is => 'ro',
108             isa => 'XML::SRS::Contact',
109             xml_nodeName => 'RegistrantContact',
110             xml_required => 0,
111             coerce => 1,
112             ;
113              
114             has_element 'contact_registrar_public' =>
115             is => 'ro',
116             isa => 'XML::SRS::Contact',
117             xml_nodeName => 'RegistrarPublicContact',
118             xml_required => 0,
119             coerce => 1,
120             ;
121              
122             has_element 'contact_admin' =>
123             is => 'ro',
124             isa => 'XML::SRS::Contact',
125             xml_nodeName => 'AdminContact',
126             xml_required => 0,
127             coerce => 1,
128             ;
129              
130             has_element 'contact_technical' =>
131             is => 'ro',
132             isa => 'XML::SRS::Contact',
133             xml_nodeName => 'TechnicalContact',
134             xml_required => 0,
135             coerce => 1,
136             ;
137              
138             has_element 'billed_until' =>
139             is => 'ro',
140             isa => 'XML::SRS::TimeStamp',
141             xml_required => 0,
142             xml_nodeName => 'BilledUntil',
143             ;
144              
145             has_element 'registered_date' =>
146             is => 'ro',
147             isa => 'XML::SRS::TimeStamp',
148             xml_required => 0,
149             xml_nodeName => 'RegisteredDate',
150             ;
151              
152             has_element 'cancelled_date' =>
153             is => 'ro',
154             isa => 'XML::SRS::TimeStamp',
155             xml_required => 0,
156             xml_nodeName => 'CancelledDate',
157             ;
158              
159             has_element 'locked_date' =>
160             is => 'ro',
161             isa => 'XML::SRS::TimeStamp',
162             xml_required => 0,
163             xml_nodeName => 'LockedDate',
164             ;
165              
166             has_element 'default_contacts' =>
167             is => 'ro',
168             isa => 'XML::SRS::DefaultContacts',
169             xml_required => 0,
170             xml_nodeName => 'DefaultContacts',
171             ;
172              
173             has_element 'audit' =>
174             is => "rw",
175             isa => "XML::SRS::AuditDetails",
176             xml_nodeName => "AuditDetails",
177             predicate => "has_audit",
178             ;
179              
180             sub root_element {
181             "Domain";
182             }
183             with 'XML::SRS::ActionResponse';
184              
185             1;
186              
187             __END__
188              
189             =head1 NAME
190              
191             XML::SRS::Domain - Class representing an SRS Domain response object
192              
193             =head1 DESCRIPTION
194              
195             This class represents an SRS Domain object, i.e. objects returned from
196             a request involving domains, such as 'Whois'. The root XML element of this
197             class is 'Domain'.
198              
199             =head1 ATTRIBUTES
200              
201             Each attribute of this class has an accessor/mutator of the same name as
202             the attribute. Additionally, they can be passed as parameters to the
203             constructor.
204              
205             =head2 default_contacts
206              
207             Must be of type XML::SRS::DefaultContacts. Maps to the XML element 'DefaultContacts'
208              
209             =head2 locked_date
210              
211             Must be of type XML::SRS::TimeStamp. Maps to the XML element 'LockedDate'
212              
213             =head2 contact_technical
214              
215             Must be of type XML::SRS::Contact. Maps to the XML element 'TechnicalContact'
216              
217             =head2 dns_sec
218              
219             Must be of type XML::SRS::DS::List. Maps to the XML element 'DNSSEC'
220              
221             =head2 status
222              
223             Must be of type Str. Maps to the XML attribute 'Status'
224              
225             =head2 name_unicode
226              
227             Must be of type Str. Maps to the XML attribute 'DomainNameUnicode'
228              
229             =head2 name_language
230              
231             Must be of type Str. Maps to the XML attribute 'DomainNameLanguage'
232              
233             =head2 term
234              
235             Must be of type XML::SRS::Term. Maps to the XML attribute 'Term'
236              
237             =head2 UDAI
238              
239             Must be of type Str. Maps to the XML attribute 'UDAI'
240              
241             =head2 registrar_name
242              
243             Must be of type Str. Maps to the XML attribute 'RegistrarName'
244              
245             =head2 delegate
246              
247             Must be of type XML::SRS::Boolean. Maps to the XML attribute 'Delegate'
248              
249             =head2 registrant_ref
250              
251             Must be of type XML::SRS::UID. Maps to the XML attribute 'RegistrantRef'
252              
253             =head2 contact_registrar_public
254              
255             Must be of type XML::SRS::Contact. Maps to the XML element 'RegistrarPublicContact'
256              
257             =head2 contact_admin
258              
259             Must be of type XML::SRS::Contact. Maps to the XML element 'AdminContact'
260              
261             =head2 name_unicode_hex
262              
263             Must be of type Str. Maps to the XML attribute 'DomainNameUnicodeHex'
264              
265             =head2 contact_registrant
266              
267             Must be of type XML::SRS::Contact. Maps to the XML element 'RegistrantContact'
268              
269             =head2 name
270              
271             Must be of type XML::SRS::DomainName. Maps to the XML attribute 'DomainName'
272              
273             =head2 nameservers
274              
275             Must be of type XML::SRS::Server::List. Maps to the XML element 'NameServers'
276              
277             =head2 registered_date
278              
279             Must be of type XML::SRS::TimeStamp. Maps to the XML element 'RegisteredDate'
280              
281             =head2 registrar_id
282              
283             Must be of type XML::SRS::Number. Maps to the XML attribute 'RegistrarId'
284              
285             =head2 audit
286              
287             Must be of type XML::SRS::AuditDetails. Maps to the XML element 'AuditDetails'
288              
289             =head2 billed_until
290              
291             Must be of type XML::SRS::TimeStamp. Maps to the XML element 'BilledUntil'
292              
293             =head2 cancelled_date
294              
295             Must be of type XML::SRS::TimeStamp. Maps to the XML element 'CancelledDate'
296              
297             =head1 METHODS
298              
299             =head2 new(%params)
300              
301             Construct a new XML::SRS::Request object. %params specifies the initial
302             values of the attributes.
303              
304             =head1 COMPOSED OF
305              
306             L<XML::SRS::ActionResponse>
307