| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WebService::PivotalTracker::Label; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 6 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 28 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 23 |  | 
| 5 | 1 |  |  | 1 |  | 6 | use namespace::autoclean; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 8 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | our $VERSION = '0.12'; | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 1 |  |  | 1 |  | 78 | use WebService::PivotalTracker::PropertyAttributes; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 48 |  | 
| 10 |  |  |  |  |  |  | use WebService::PivotalTracker::Types | 
| 11 | 1 |  |  | 1 |  | 5 | qw( DateTimeObject NonEmptyStr PositiveInt PositiveOrZeroInt ); | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 8 |  | 
| 12 |  |  |  |  |  |  |  | 
| 13 | 1 |  |  | 1 |  | 1065 | use Moo; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | 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 |  |  |  |  |  |  | with 'WebService::PivotalTracker::Entity'; | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) | 
| 37 |  |  |  |  |  |  | sub _self_uri { | 
| 38 | 0 |  |  | 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; | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | # ABSTRACT: A label on a story | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | __END__ | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | =pod | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =encoding UTF-8 | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | =head1 NAME | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | WebService::PivotalTracker::Label - A label on a story | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =head1 VERSION | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | version 0.12 | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | This class represents a label on a story. | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =for Test::Synopsis my $story; | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | my $label = $story->labels->[0]; | 
| 71 |  |  |  |  |  |  | say $label->name; | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | =head1 ATTRIBUTES | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | This class provides the following attribute accessor methods. Each one | 
| 76 |  |  |  |  |  |  | corresponds to a property defined by the L<PT REST API V5 label resource | 
| 77 |  |  |  |  |  |  | docs|https://www.pivotaltracker.com/help/api/rest/v5#label_resource>. | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | =head2 id | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | =head2 project_id | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | =head2 name | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | =head2 created_at | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | This will be returned as a L<DateTime> object. | 
| 88 |  |  |  |  |  |  |  | 
| 89 |  |  |  |  |  |  | =head2 updated_at | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | This will be returned as a L<DateTime> object. | 
| 92 |  |  |  |  |  |  |  | 
| 93 |  |  |  |  |  |  | =head2 counts | 
| 94 |  |  |  |  |  |  |  | 
| 95 |  |  |  |  |  |  | =head2 kind | 
| 96 |  |  |  |  |  |  |  | 
| 97 |  |  |  |  |  |  | =head2 raw_content | 
| 98 |  |  |  |  |  |  |  | 
| 99 |  |  |  |  |  |  | The raw JSON used to create this object. | 
| 100 |  |  |  |  |  |  |  | 
| 101 |  |  |  |  |  |  | =head1 SUPPORT | 
| 102 |  |  |  |  |  |  |  | 
| 103 |  |  |  |  |  |  | Bugs may be submitted through L<https://github.com/maxmind/WebService-PivotalTracker/issues>. | 
| 104 |  |  |  |  |  |  |  | 
| 105 |  |  |  |  |  |  | =head1 AUTHOR | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | Dave Rolsky <autarch@urth.org> | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 110 |  |  |  |  |  |  |  | 
| 111 |  |  |  |  |  |  | This software is Copyright (c) 2016 - 2020 by MaxMind, Inc. | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  | This is free software, licensed under: | 
| 114 |  |  |  |  |  |  |  | 
| 115 |  |  |  |  |  |  | The Artistic License 2.0 (GPL Compatible) | 
| 116 |  |  |  |  |  |  |  | 
| 117 |  |  |  |  |  |  | =cut |