File Coverage

blib/lib/XML/SRS/Domain/Query.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::Query;
3             BEGIN {
4 1     1   2528 $XML::SRS::Domain::Query::VERSION = '0.09';
5             }
6              
7 1     1   431 use Moose;
  0            
  0            
8             use PRANG::Graph;
9             use PRANG::XMLSchema::Types;
10             use XML::SRS::Types;
11             use Moose::Util::TypeConstraints;
12             use PRANG::Coerce;
13              
14             use XML::SRS::FieldList;
15             use XML::SRS::Server::Filter::List;
16             use XML::SRS::Contact::Filter;
17             use XML::SRS::Date::Range;
18             use MooseX::Aliases;
19             use MooseX::Aliases::Meta::Trait::Attribute;
20              
21              
22             # attributes
23             has_attr 'status' =>
24             is => 'ro',
25             isa => 'XML::SRS::RegDomainStatus',
26             xml_name => 'Status',
27             xml_required => 0,
28             ;
29              
30             has_attr 'delegate' =>
31             is => 'ro',
32             isa => 'XML::SRS::Boolean',
33             xml_name => 'Delegate',
34             xml_required => 0,
35             ;
36              
37             has_attr 'term' =>
38             is => 'ro',
39             isa => 'XML::SRS::Term',
40             xml_name => 'Term',
41             xml_required => 0,
42             ;
43              
44             has_attr 'registrant_ref' =>
45             is => 'ro',
46             isa => 'XML::SRS::UID',
47             xml_name => 'RegistrantRef',
48             xml_required => 0,
49             ;
50              
51             has_attr 'max_results' =>
52             is => 'rw',
53             isa => 'XML::SRS::Number',
54             xml_name => 'MaxResults',
55             xml_required => 0,
56             ;
57              
58             has_attr 'skip_results' =>
59             is => 'rw',
60             isa => 'XML::SRS::Number',
61             xml_name => 'SkipResults',
62             xml_required => 0,
63             ;
64              
65             has_attr 'count_results' =>
66             is => 'ro',
67             isa => 'XML::SRS::Boolean',
68             xml_name => 'CountResults',
69             xml_required => 0,
70             ;
71              
72             # elements
73             has_element 'domain_name_filter' =>
74             is => 'ro',
75             isa => 'PRANG::Coerce::ArrayRefOfStrs',
76             xml_nodeName => 'DomainNameFilter',
77             xml_required => 0,
78             coerce => 1,
79             ;
80              
81             has_element 'name_server_filter' =>
82             is => 'ro',
83             isa => 'XML::SRS::Server::Filter::List',
84             xml_nodeName => 'NameServerFilter',
85             xml_required => 0,
86             coerce => 1,
87             ;
88              
89             has_element 'registrant_contact_filter' =>
90             is => 'ro',
91             isa => 'XML::SRS::Contact::Filter',
92             xml_nodeName => 'RegistrantContactFilter',
93             xml_required => 0,
94             coerce => 1,
95             traits => [qw(Aliased)],
96             alias => 'contact_registrant',
97             ;
98              
99             has_element 'admin_contact_filter' =>
100             is => 'ro',
101             isa => 'XML::SRS::Contact::Filter',
102             xml_nodeName => 'AdminContactFilter',
103             xml_required => 0,
104             coerce => 1,
105             traits => [qw(Aliased)],
106             alias => 'contact_admin',
107             ;
108              
109             has_element 'technical_contact_filter' =>
110             is => 'ro',
111             isa => 'XML::SRS::Contact::Filter',
112             xml_nodeName => 'TechnicalContactFilter',
113             xml_required => 0,
114             coerce => 1,
115             traits => [qw(Aliased)],
116             alias => 'contact_technical',
117             ;
118              
119             has_element 'result_date_range' =>
120             is => 'ro',
121             isa => 'XML::SRS::Date::Range',
122             xml_required => 0,
123             xml_nodeName => 'ResultDateRange',
124             coerce => 1,
125             ;
126              
127             has_element 'search_date_range' =>
128             is => 'ro',
129             isa => 'XML::SRS::Date::Range',
130             xml_required => 0,
131             xml_nodeName => 'SearchDateRange',
132             coerce => 1,
133             ;
134              
135             has_element 'changed_in_date_range' =>
136             is => 'ro',
137             isa => 'XML::SRS::Date::Range',
138             xml_required => 0,
139             xml_nodeName => 'ChangedInDateRange',
140             coerce => 1,
141             ;
142              
143             has_element 'registered_date_range' =>
144             is => 'ro',
145             isa => 'XML::SRS::Date::Range',
146             xml_required => 0,
147             xml_nodeName => 'RegisteredDateRange',
148             coerce => 1,
149             ;
150              
151             has_element 'locked_date_range' =>
152             is => 'ro',
153             isa => 'XML::SRS::Date::Range',
154             xml_required => 0,
155             xml_nodeName => 'LockedDateRange',
156             coerce => 1,
157             ;
158              
159             has_element 'cancelled_date_range' =>
160             is => 'ro',
161             isa => 'XML::SRS::Date::Range',
162             xml_required => 0,
163             xml_nodeName => 'CancelledDateRange',
164             coerce => 1,
165             ;
166              
167             has_element 'billed_until_date_range' =>
168             is => 'ro',
169             isa => 'XML::SRS::Date::Range',
170             xml_required => 0,
171             xml_nodeName => 'BilledUntilDateRange',
172             coerce => 1,
173             ;
174              
175             has_element 'audit_text_filter' =>
176             is => 'ro',
177             isa => 'Str',
178             xml_required => 0,
179             xml_nodeName => 'AuditTextFilter'
180             ;
181              
182             has_element 'action_id_filter' =>
183             is => 'ro',
184             isa => 'Str',
185             xml_required => 0,
186             xml_nodeName => 'ActionIdFilter'
187             ;
188              
189             has_element 'field_list' =>
190             is => 'ro',
191             isa => 'XML::SRS::FieldList',
192             xml_required => 0,
193             xml_nodeName => 'FieldList',
194             coerce => 1,
195             ;
196              
197             sub root_element {'DomainDetailsQry'}
198             with 'XML::SRS::Query';
199              
200             1;
201              
202              
203             __END__
204              
205             =head1 NAME
206              
207             XML::SRS::Domain::Query - Class representing an SRS DomainDetailsQry transaction
208              
209             =head1 SYNOPSIS
210              
211             my $query = XML::SRS::Domain::Query->new(
212             "domain_name_filter" => ["ddq.co.te", "ddq2.co.te"],
213             "status" => "Active",
214             "delegate" => 1,
215             "term" => 1,
216             "registrant_ref" => "ref",
217             "max_results" => 100,
218             "skip_results" => 100,
219             "count_results" => 0,
220             "name_server_filter" => [
221             {
222             "fqdn" => "ns1.host.co.nz"
223             }
224             ],
225             "registrant_contact_filter" => {
226             "name" => "Name",
227             "email" => "email@email.co.nz",
228             "postal_address_filter" => {
229             "address1" => "111 My House",
230             "address2" => "Burbsville",
231             "city" => "Wellington",
232             "region" => "Willington",
233             "cc" => "NZ",
234             "postcode" => "4444"
235             },
236             "phone" => {
237             "cc" => "64",
238             "ndc" => "4",
239             "subscriber" => "1234567"
240             },
241             "fax" => {
242             "cc" => "64",
243             "ndc" => "4",
244             "subscriber" => "1234567"
245             }
246             },
247             "admin_contact_filter" => {
248             "name" => "Name",
249             "email" => "email@email.co.nz",
250             "postal_address_filter" => {
251             "address1" => "111 My House",
252             "address2" => "Burbsville",
253             "city" => "Wellington",
254             "region" => "Willington",
255             "cc" => "NZ",
256             "postcode" => "4444"
257             },
258             "phone" => {
259             "cc" => "64",
260             "ndc" => "4",
261             "subscriber" => "1234567"
262             },
263             "fax" => {
264             "cc" => "64",
265             "ndc" => "4",
266             "subscriber" => "1234567"
267             }
268             },
269             "search_date_range" => {
270             "begin" => "2000-01-01 00:00:00",
271             "end" => "2020-01-01 00:00:00",
272             },
273             "audit_text_filter" => "audit text *",
274             "action_id_filter" => "ddq setup *",
275             "field_list"= > [
276             "status",
277             "name_servers",
278             "dns_sec",
279             "registrant_contact",
280             "registered_date",
281             "admin_contact",
282             "technical_contact",
283             "locked_date",
284             "delegate",
285             "registrar_id",
286             "registrar_name",
287             "registrant_ref",
288             "last_action_id",
289             "changed_by_registrar_id",
290             "term",
291             "billed_until",
292             "cancelled_date",
293             "audit_text",
294             "effective_from",
295             "default_contacts"
296             ],
297             );
298              
299             =head1 DESCRIPTION
300              
301             This class represents an SRS DomainDetailsQry request. The root XML element of this
302             class is 'DomainDetailsQry'.
303              
304             =head1 ATTRIBUTES
305              
306             Each attribute of this class has an accessor/mutator of the same name as
307             the attribute. Additionally, they can be passed as parameters to the
308             constructor.
309              
310             =head2 action_id_filter
311              
312             Must be of type Str. Maps to the XML element 'ActionIdFilter'
313              
314             =head2 field_list
315              
316             Must be of type XML::SRS::FieldList. Maps to the XML element 'FieldList'
317              
318             =head2 admin_contact_filter
319              
320             Must be of type XML::SRS::Contact::Filter. Maps to the XML element 'AdminContactFilter'
321              
322             =head2 status
323              
324             Must be of type XML::SRS::RegDomainStatus. Maps to the XML attribute 'Status'
325              
326             =head2 audit_text_filter
327              
328             Must be of type Str. Maps to the XML element 'AuditTextFilter'
329              
330             =head2 domain_name_filter
331              
332             Must be of type PRANG::Coerce::ArrayRefOfStrs. Maps to the XML element 'DomainNameFilter'
333              
334             =head2 term
335              
336             Must be of type XML::SRS::Term. Maps to the XML attribute 'Term'
337              
338             =head2 name_server_filter
339              
340             Must be of type XML::SRS::Server::Filter::List. Maps to the XML element 'NameServerFilter'
341              
342             =head2 query_id
343              
344             Must be of type XML::SRS::UID. Maps to the XML attribute 'QryId'
345              
346             =head2 changed_in_date_range
347              
348             Must be of type XML::SRS::Date::Range. Maps to the XML element 'ChangedInDateRange'
349              
350             =head2 registrant_contact_filter
351              
352             Must be of type XML::SRS::Contact::Filter. Maps to the XML element 'RegistrantContactFilter'
353              
354             =head2 billed_until_date_range
355              
356             Must be of type XML::SRS::Date::Range. Maps to the XML element 'BilledUntilDateRange'
357              
358             =head2 delegate
359              
360             Must be of type XML::SRS::Boolean. Maps to the XML attribute 'Delegate'
361              
362             =head2 locked_date_range
363              
364             Must be of type XML::SRS::Date::Range. Maps to the XML element 'LockedDateRange'
365              
366             =head2 registrant_ref
367              
368             Must be of type XML::SRS::UID. Maps to the XML attribute 'RegistrantRef'
369              
370             =head2 registered_date_range
371              
372             Must be of type XML::SRS::Date::Range. Maps to the XML element 'RegisteredDateRange'
373              
374             =head2 count_results
375              
376             Must be of type XML::SRS::Boolean. Maps to the XML attribute 'CountResults'
377              
378             =head2 search_date_range
379              
380             Must be of type XML::SRS::Date::Range. Maps to the XML element 'SearchDateRange'
381              
382             =head2 skip_results
383              
384             Must be of type XML::SRS::Number. Maps to the XML attribute 'SkipResults'
385              
386             =head2 result_date_range
387              
388             Must be of type XML::SRS::Date::Range. Maps to the XML element 'ResultDateRange'
389              
390             =head2 technical_contact_filter
391              
392             Must be of type XML::SRS::Contact::Filter. Maps to the XML element 'TechnicalContactFilter'
393              
394             =head2 cancelled_date_range
395              
396             Must be of type XML::SRS::Date::Range. Maps to the XML element 'CancelledDateRange'
397              
398             =head2 max_results
399              
400             Must be of type XML::SRS::Number. Maps to the XML attribute 'MaxResults'
401              
402             =head1 COMPOSED OF
403              
404             L<XML::SRS::Query>