| 1 | #!perl | ||
| 2 | # PODNAME: RT::Client::REST::Queue | ||
| 3 | # ABSTRACT: queue object representation. | ||
| 4 | |||
| 5 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | package RT::Client::REST::Queue; | ||
| 9 | 2 | $RT::Client::REST::Queue::VERSION = '0.73'; | |
| 10 | 2 | ▶ | use Params::Validate qw(:types); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 2 | ▶ | use RT::Client::REST; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 2 | ▶ | use RT::Client::REST::Object; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 2 | ▶ | use RT::Client::REST::Object::Exception; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 2 | ▶ | use RT::Client::REST::SearchResult; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 2 | ▶ | use RT::Client::REST::Ticket; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 2 | ▶ | use parent 'RT::Client::REST::Object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | |||
| 19 | 2 | ▶ | sub _attributes {{ |
|
Subroutine
_attributes: called CC=1 SCAR=3.5
| |||
| 20 | id => { | ||
| 21 | validation => { | ||
| 22 | type => SCALAR, | ||
| 23 | }, | ||
| 24 | 0 | ▶ | form2value => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 25 | 0 | shift =~ m~^queue/(\d+)$~i; | |
| 26 | 0 | return $1; | |
| 27 | }, | ||
| 28 | 0 | ▶ | value2form => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 29 | 0 | return 'queue/' . shift; | |
| 30 | }, | ||
| 31 | }, | ||
| 32 | |||
| 33 | 2 | name => { | |
| 34 | validation => { | ||
| 35 | type => SCALAR, | ||
| 36 | }, | ||
| 37 | }, | ||
| 38 | |||
| 39 | description => { | ||
| 40 | validation => { | ||
| 41 | type => SCALAR, | ||
| 42 | }, | ||
| 43 | }, | ||
| 44 | |||
| 45 | correspond_address => { | ||
| 46 | validation => { | ||
| 47 | type => SCALAR, | ||
| 48 | }, | ||
| 49 | rest_name => 'CorrespondAddress', | ||
| 50 | }, | ||
| 51 | |||
| 52 | comment_address => { | ||
| 53 | validation => { | ||
| 54 | type => SCALAR, | ||
| 55 | }, | ||
| 56 | rest_name => 'CommentAddress', | ||
| 57 | }, | ||
| 58 | |||
| 59 | initial_priority => { | ||
| 60 | validation => { | ||
| 61 | type => SCALAR, | ||
| 62 | }, | ||
| 63 | rest_name => 'InitialPriority', | ||
| 64 | }, | ||
| 65 | |||
| 66 | final_priority => { | ||
| 67 | validation => { | ||
| 68 | type => SCALAR, | ||
| 69 | }, | ||
| 70 | rest_name => 'FinalPriority', | ||
| 71 | }, | ||
| 72 | |||
| 73 | default_due_in => { | ||
| 74 | validation => { | ||
| 75 | type => SCALAR, | ||
| 76 | }, | ||
| 77 | rest_name => 'DefaultDueIn', | ||
| 78 | }, | ||
| 79 | |||
| 80 | disabled => { | ||
| 81 | validation => { | ||
| 82 | type => SCALAR, | ||
| 83 | }, | ||
| 84 | rest_name => 'Disabled', | ||
| 85 | }, | ||
| 86 | |||
| 87 | admin_cc_addresses => { | ||
| 88 | validation => { | ||
| 89 | type => SCALAR, | ||
| 90 | }, | ||
| 91 | rest_name => 'AdminCcAddresses', | ||
| 92 | }, | ||
| 93 | |||
| 94 | cc_addresses => { | ||
| 95 | validation => { | ||
| 96 | type => SCALAR, | ||
| 97 | }, | ||
| 98 | rest_name => 'CcAddresses', | ||
| 99 | }, | ||
| 100 | |||
| 101 | sla_disabled => { | ||
| 102 | validation => { | ||
| 103 | type => SCALAR, | ||
| 104 | }, | ||
| 105 | rest_name => 'SLADisabled', | ||
| 106 | }, | ||
| 107 | |||
| 108 | }} | ||
| 109 | |||
| 110 | |||
| 111 | 0 | ▶ | sub tickets { |
|
Subroutine
tickets: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 112 | 0 | my $self = shift; | |
| 113 | |||
| 114 | 0 | $self->_assert_rt_and_id; | |
| 115 | |||
| 116 | 0 | return RT::Client::REST::Ticket | |
| 117 | ->new(rt => $self->rt) | ||
| 118 | ->search(limits => [ | ||
| 119 | {attribute => 'queue', operator => '=', value => $self->id}, | ||
| 120 | ]); | ||
| 121 | } | ||
| 122 | |||
| 123 | |||
| 124 | 1 | ▶ | sub rt_type { 'queue' } |
|
Subroutine
rt_type: called CC=1 SCAR=0.0
Pod
documented
| |||
| 125 | |||
| 126 | |||
| 127 | 2 | __PACKAGE__->_generate_methods; | |
| 128 | |||
| 129 | 2 | 1; | |
| 130 | |||
| 131 | __END__ | ||