| 1 | package WebService::PivotalTracker::Label; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | our $VERSION = '0.12'; | |
| 8 | |||
| 9 | 1 | ▶ | use WebService::PivotalTracker::PropertyAttributes; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | use WebService::PivotalTracker::Types | ||
| 11 | 1 | ▶ | qw( DateTimeObject NonEmptyStr PositiveInt PositiveOrZeroInt ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 1 | has( @{$_} ) for props_to_attributes( | |
| 16 | id => PositiveInt, | ||
| 17 | project_id => PositiveInt, | ||
| 18 | name => NonEmptyStr, | ||
| 19 | created_at => { | ||
| 20 | type => DateTimeObject, | ||
| 21 | inflator => '_inflate_iso8601_datetime', | ||
| 22 | }, | ||
| 23 | updated_at => { | ||
| 24 | type => DateTimeObject, | ||
| 25 | inflator => '_inflate_iso8601_datetime', | ||
| 26 | }, | ||
| 27 | counts => { | ||
| 28 | type => PositiveOrZeroInt, | ||
| 29 | may_require_refresh => 1, | ||
| 30 | }, | ||
| 31 | kind => NonEmptyStr, | ||
| 32 | ); | ||
| 33 | |||
| 34 | 1 | with 'WebService::PivotalTracker::Entity'; | |
| 35 | |||
| 36 | ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) | ||
| 37 | 0 | ▶ | sub _self_uri { |
|
Subroutine
_self_uri: not called CC=1 SCAR=6.9
| |||
| 38 | 0 | my $self = shift; | |
| 39 | |||
| 40 | 0 | return sprintf( '/projects/%s/labels/%s', $self->project_id, $self->id ); | |
| 41 | } | ||
| 42 | ## use critic | ||
| 43 | |||
| 44 | 1 | 1; | |
| 45 | |||
| 46 | # ABSTRACT: A label on a story | ||
| 47 | |||
| 48 | __END__ | ||