| 1 | package WebService::PivotalTracker::Project; | ||
| 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 | 1 | ▶ | use WebService::PivotalTracker::Story; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | use WebService::PivotalTracker::Types | ||
| 12 | 1 | ▶ | qw( Bool DateTimeObject DayOfWeek HashRef NonEmptyStr PositiveInt PositiveNum ProjectType Str ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 1 | has( @{$_} ) for props_to_attributes( | |
| 17 | id => PositiveInt, | ||
| 18 | name => NonEmptyStr, | ||
| 19 | version => PositiveInt, | ||
| 20 | iteration_length => PositiveInt, | ||
| 21 | week_start_day => DayOfWeek, | ||
| 22 | point_scale => NonEmptyStr, | ||
| 23 | point_scale_is_custom => Bool, | ||
| 24 | bugs_and_chores_are_estimatable => Bool, | ||
| 25 | automatic_planning => Bool, | ||
| 26 | enable_tasks => Bool, | ||
| 27 | start_date => { | ||
| 28 | type => DateTimeObject, | ||
| 29 | inflator => '_inflate_iso8601_datetime', | ||
| 30 | }, | ||
| 31 | time_zone => HashRef, | ||
| 32 | velocity_averaged_over => PositiveInt, | ||
| 33 | show_iterations_start_time => { | ||
| 34 | type => DateTimeObject, | ||
| 35 | inflator => '_inflate_iso8601_datetime', | ||
| 36 | }, | ||
| 37 | start_time => { | ||
| 38 | type => DateTimeObject, | ||
| 39 | inflator => '_inflate_iso8601_datetime', | ||
| 40 | }, | ||
| 41 | number_of_done_iterations_to_show => PositiveInt, | ||
| 42 | has_google_domain => Bool, | ||
| 43 | description => Str, | ||
| 44 | profile_content => Str, | ||
| 45 | enable_incoming_emails => Bool, | ||
| 46 | initial_velocity => PositiveInt, | ||
| 47 | project_type => ProjectType, | ||
| 48 | public => Bool, | ||
| 49 | atom_enabled => Bool, | ||
| 50 | current_iteration_number => PositiveInt, | ||
| 51 | account_id => PositiveInt, | ||
| 52 | created_at => { | ||
| 53 | type => DateTimeObject, | ||
| 54 | inflator => '_inflate_iso8601_datetime', | ||
| 55 | }, | ||
| 56 | updated_at => { | ||
| 57 | type => DateTimeObject, | ||
| 58 | inflator => '_inflate_iso8601_datetime', | ||
| 59 | }, | ||
| 60 | kind => NonEmptyStr, | ||
| 61 | ); | ||
| 62 | |||
| 63 | 1 | with 'WebService::PivotalTracker::Entity'; | |
| 64 | |||
| 65 | 0 | ▶ | sub memberships { |
|
Subroutine
memberships: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 66 | 0 | my $self = shift; | |
| 67 | |||
| 68 | 0 | return $self->_pt_api->project_memberships( | |
| 69 | @_, | ||
| 70 | project_id => $self->id, | ||
| 71 | ); | ||
| 72 | } | ||
| 73 | |||
| 74 | 0 | ▶ | sub stories { |
|
Subroutine
stories: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 75 | 0 | my $self = shift; | |
| 76 | |||
| 77 | return | ||
| 78 | 0 | map { WebService::PivotalTracker::Story->new( %{$_} ) } | |
| 79 | 0 | @{ $self->raw_content->{stories} }; | |
| 80 | } | ||
| 81 | |||
| 82 | 0 | ▶ | sub iterations { |
|
Subroutine
iterations: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 83 | 0 | my $self = shift; | |
| 84 | |||
| 85 | 0 | return $self->_pt_api->project_iterations( | |
| 86 | @_, | ||
| 87 | project_id => $self->id, | ||
| 88 | ); | ||
| 89 | } | ||
| 90 | |||
| 91 | ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) | ||
| 92 | 0 | ▶ | sub _self_uri { |
|
Subroutine
_self_uri: not called CC=1 SCAR=6.9
| |||
| 93 | 0 | my $self = shift; | |
| 94 | |||
| 95 | 0 | return $self->_client->build_uri( | |
| 96 | sprintf( | ||
| 97 | '/projects/%s/iterations/%s', | ||
| 98 | $self->id, | ||
| 99 | $self->number, | ||
| 100 | ) | ||
| 101 | ); | ||
| 102 | } | ||
| 103 | ## use critic | ||
| 104 | |||
| 105 | 1 | 1; | |
| 106 | |||
| 107 | # ABSTRACT: A single iteration in a project | ||
| 108 | |||
| 109 | __END__ | ||