| 1 | |||
| 2 | package XML::SRS::GetMessages; | ||
| 3 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | $XML::SRS::GetMessages::VERSION = '0.09'; | |
| 5 | } | ||
| 6 | |||
| 7 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use PRANG::Graph; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use XML::SRS::Types; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 0 | ▶ | sub root_element { |
|
Subroutine
root_element: not called CC=1 SCAR=6.9
| |||
| 12 | 0 | "GetMessages"; | |
| 13 | } | ||
| 14 | |||
| 15 | 1 | has_attr 'originating_registrar' => | |
| 16 | is => "ro", | ||
| 17 | isa => "Str", | ||
| 18 | xml_name => "OriginatingRegistrarId", | ||
| 19 | ; | ||
| 20 | |||
| 21 | 1 | has_attr 'recipient_registrar' => | |
| 22 | is => "ro", | ||
| 23 | isa => "Str", | ||
| 24 | xml_name => "RecipientRegistrarId", | ||
| 25 | ; | ||
| 26 | |||
| 27 | 1 | has_attr 'queue' => | |
| 28 | is => "ro", | ||
| 29 | isa => "Bool", | ||
| 30 | xml_name => "QueueMode", | ||
| 31 | ; | ||
| 32 | |||
| 33 | 1 | has_element "when" => | |
| 34 | is => "ro", | ||
| 35 | isa => "ArrayRef[XML::SRS::Date::Range]", | ||
| 36 | xml_nodeName => "TransDateRange", | ||
| 37 | xml_required => 0, | ||
| 38 | ; | ||
| 39 | |||
| 40 | 1 | has_attr 'max_results' => | |
| 41 | is => 'ro', | ||
| 42 | isa => 'XML::SRS::Number', | ||
| 43 | xml_name => 'MaxResults', | ||
| 44 | xml_required => 0, | ||
| 45 | ; | ||
| 46 | |||
| 47 | 1 | ▶ | use XML::SRS::GetMessages::TypeFilter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 48 | 1 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | |||
| 50 | # For some reason, we have to create this subtype | ||
| 51 | # Supposedly, it should work without it if we define the coercion | ||
| 52 | # after the 'has_element', but that generated a warning. Possible Moose bug? | ||
| 53 | 1 | subtype 'TypeFilterArrayRef' => | |
| 54 | as 'ArrayRef[XML::SRS::GetMessages::TypeFilter]'; | ||
| 55 | |||
| 56 | coerce 'TypeFilterArrayRef' | ||
| 57 | => from "ArrayRef[Str]" | ||
| 58 | 0 | ▶ | => via { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 59 | [ map { | ||
| 60 | 0 | XML::SRS::GetMessages::TypeFilter->new( | |
| 61 | Type => $_, | ||
| 62 | ); | ||
| 63 | } @$_ | ||
| 64 | ]; | ||
| 65 | 1 | }; | |
| 66 | |||
| 67 | 1 | has_element "type_filter" => | |
| 68 | is => "ro", | ||
| 69 | isa => "TypeFilterArrayRef", | ||
| 70 | xml_min => 0, | ||
| 71 | xml_nodeName => "TypeFilter", | ||
| 72 | coerce => 1, | ||
| 73 | ; | ||
| 74 | |||
| 75 | 1 | with 'XML::SRS::Query'; | |
| 76 | 1 | 1; | |