« blib/lib/JIRA/REST/Class/Issue/Changelog.pm
↑ Summary
blib/lib/JIRA/REST/Class/Issue/Changelog/Change/Item.pm »
| 1 | package JIRA::REST::Class::Issue::Changelog::Change; | ||
| 2 | use parent qw( JIRA::REST::Class::Abstract ); | ||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use 5.010; | ||
| 6 | |||
| 7 | our $VERSION = '0.11'; | ||
| 8 | our $SOURCE = 'CPAN'; | ||
| 9 | ## $SOURCE = 'GitHub'; # COMMENT | ||
| 10 | # the line above will be commented out by Dist::Zilla | ||
| 11 | |||
| 12 | # ABSTRACT: A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents an individual change to a JIRA issue as an object. | ||
| 13 | |||
| 14 | __PACKAGE__->mk_ro_accessors( qw/ author created / ); | ||
| 15 | __PACKAGE__->mk_data_ro_accessors( qw/ id / ); | ||
| 16 | __PACKAGE__->mk_contextual_ro_accessors( qw/ items / ); | ||
| 17 | |||
| 18 | sub init { | ||
| 19 | my $self = shift; | ||
| 20 | $self->SUPER::init( @_ ); | ||
| 21 | |||
| 22 | # make user object | ||
| 23 | $self->populate_scalar_data( 'author', 'user', 'author' ); | ||
| 24 | |||
| 25 | # make date object | ||
| 26 | $self->populate_date_data( 'created', 'created' ); | ||
| 27 | |||
| 28 | # make list of changed items | ||
| 29 | $self->populate_list_data( 'items', 'changeitem', 'items' ); | ||
| 30 | |||
| 31 | return; | ||
| 32 | } | ||
| 33 | |||
| 34 | 1; | ||
| 35 | |||
| 36 | #pod =accessor B<author> | ||
| 37 | #pod | ||
| 38 | #pod Returns the author of a JIRA issue's change as a | ||
| 39 | #pod L<JIRA::REST::Class::User|JIRA::REST::Class::User> object. | ||
| 40 | #pod | ||
| 41 | #pod =accessor B<created> | ||
| 42 | #pod | ||
| 43 | #pod Returns the creation time of a JIRA issue's change as a L<DateTime|DateTime> | ||
| 44 | #pod object. | ||
| 45 | #pod | ||
| 46 | #pod =accessor B<id> | ||
| 47 | #pod | ||
| 48 | #pod Returns the id of a JIRA issue's change. | ||
| 49 | #pod | ||
| 50 | #pod =accessor B<items> | ||
| 51 | #pod | ||
| 52 | #pod Returns the list of items modified by a JIRA issue's change as a list of | ||
| 53 | #pod L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item> | ||
| 54 | #pod objects. | ||
| 55 | #pod | ||
| 56 | #pod =cut | ||
| 57 | |||
| 58 | __END__ | ||
| 59 | |||
| 60 | =pod | ||
| 61 | |||
| 62 | =encoding UTF-8 | ||
| 63 | |||
| 64 | =for :stopwords Packy Anderson Alexandr Alexey Ciornii Melezhik | ||
| 65 | |||
| 66 | =head1 NAME | ||
| 67 | |||
| 68 | JIRA::REST::Class::Issue::Changelog::Change - A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents an individual change to a JIRA issue as an object. | ||
| 69 | |||
| 70 | =head1 VERSION | ||
| 71 | |||
| 72 | version 0.11 | ||
| 73 | |||
| 74 | =head1 READ-ONLY ACCESSORS | ||
| 75 | |||
| 76 | =head2 B<author> | ||
| 77 | |||
| 78 | Returns the author of a JIRA issue's change as a | ||
| 79 | L<JIRA::REST::Class::User|JIRA::REST::Class::User> object. | ||
| 80 | |||
| 81 | =head2 B<created> | ||
| 82 | |||
| 83 | Returns the creation time of a JIRA issue's change as a L<DateTime|DateTime> | ||
| 84 | object. | ||
| 85 | |||
| 86 | =head2 B<id> | ||
| 87 | |||
| 88 | Returns the id of a JIRA issue's change. | ||
| 89 | |||
| 90 | =head2 B<items> | ||
| 91 | |||
| 92 | Returns the list of items modified by a JIRA issue's change as a list of | ||
| 93 | L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item> | ||
| 94 | objects. | ||
| 95 | |||
| 96 | =head1 RELATED CLASSES | ||
| 97 | |||
| 98 | =over 2 | ||
| 99 | |||
| 100 | =item * L<JIRA::REST::Class|JIRA::REST::Class> | ||
| 101 | |||
| 102 | =item * L<JIRA::REST::Class::Abstract|JIRA::REST::Class::Abstract> | ||
| 103 | |||
| 104 | =item * L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item> | ||
| 105 | |||
| 106 | =item * L<JIRA::REST::Class::User|JIRA::REST::Class::User> | ||
| 107 | |||
| 108 | =back | ||
| 109 | |||
| 110 | =head1 AUTHOR | ||
| 111 | |||
| 112 | Packy Anderson <packy@cpan.org> | ||
| 113 | |||
| 114 | =head1 COPYRIGHT AND LICENSE | ||
| 115 | |||
| 116 | This software is Copyright (c) 2017 by Packy Anderson. | ||
| 117 | |||
| 118 | This is free software, licensed under: | ||
| 119 | |||
| 120 | The Artistic License 2.0 (GPL Compatible) | ||
| 121 | |||
| 122 | =cut |