File Coverage

blib/lib/PONAPI/Client/Request/RetrieveByRelationship.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 11 12 91.6


line stmt bran cond sub pod time code
1             # ABSTRACT: request - retrieve by relationship
2             package PONAPI::Client::Request::RetrieveByRelationship;
3              
4 1     1   205532 use Moose;
  1         346775  
  1         9  
5              
6             with 'PONAPI::Client::Request',
7             'PONAPI::Client::Request::Role::IsGET',
8             'PONAPI::Client::Request::Role::HasType',
9             'PONAPI::Client::Request::Role::HasId',
10             'PONAPI::Client::Request::Role::HasRelationshipType',
11             'PONAPI::Client::Request::Role::HasFields',
12             'PONAPI::Client::Request::Role::HasFilter',
13             'PONAPI::Client::Request::Role::HasInclude',
14             'PONAPI::Client::Request::Role::HasPage';
15              
16             has uri_template => (
17             is => 'ro',
18             isa => 'Str',
19             default => sub { '/{type}/{id}/{rel_type}' },
20             );
21              
22             sub path {
23 1     1 0 3 my $self = shift;
24 1         35 return +{ type => $self->type, id => $self->id, rel_type => $self->rel_type };
25             }
26              
27             __PACKAGE__->meta->make_immutable;
28 1     1   7813 no Moose; 1;
  1         2  
  1         12  
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             PONAPI::Client::Request::RetrieveByRelationship - request - retrieve by relationship
39              
40             =head1 VERSION
41              
42             version 0.002012
43              
44             =head1 AUTHORS
45              
46             =over 4
47              
48             =item *
49              
50             Mickey Nasriachi <mickey@cpan.org>
51              
52             =item *
53              
54             Stevan Little <stevan@cpan.org>
55              
56             =item *
57              
58             Brian Fraser <hugmeir@cpan.org>
59              
60             =back
61              
62             =head1 COPYRIGHT AND LICENSE
63              
64             This software is copyright (c) 2019 by Mickey Nasriachi, Stevan Little, Brian Fraser.
65              
66             This is free software; you can redistribute it and/or modify it under
67             the same terms as the Perl 5 programming language system itself.
68              
69             =cut