| 1 | # ABSTRACT: request - create relationships | ||
| 2 | package PONAPI::Client::Request::CreateRelationships; | ||
| 3 | |||
| 4 | use Moose; | ||
| 5 | |||
| 6 | with 'PONAPI::Client::Request', | ||
| 7 | 'PONAPI::Client::Request::Role::IsPOST', | ||
| 8 | 'PONAPI::Client::Request::Role::HasType', | ||
| 9 | 'PONAPI::Client::Request::Role::HasId', | ||
| 10 | 'PONAPI::Client::Request::Role::HasRelationshipType', | ||
| 11 | 'PONAPI::Client::Request::Role::HasOneToManyData'; | ||
| 12 | |||
| 13 | sub path { | ||
| 14 | my $self = shift; | ||
| 15 | return '/' . $self->type . '/' . $self->id . '/relationships/' . $self->rel_type; | ||
| 16 | } | ||
| 17 | |||
| 18 | __PACKAGE__->meta->make_immutable; | ||
| 19 | no Moose; 1; | ||
| 20 | |||
| 21 | __END__ | ||
| 22 | |||
| 23 | =pod | ||
| 24 | |||
| 25 | =encoding UTF-8 | ||
| 26 | |||
| 27 | =head1 NAME | ||
| 28 | |||
| 29 | PONAPI::Client::Request::CreateRelationships - request - create relationships | ||
| 30 | |||
| 31 | =head1 VERSION | ||
| 32 | |||
| 33 | version 0.002003 | ||
| 34 | |||
| 35 | =head1 AUTHORS | ||
| 36 | |||
| 37 | =over 4 | ||
| 38 | |||
| 39 | =item * | ||
| 40 | |||
| 41 | Mickey Nasriachi <mickey@cpan.org> | ||
| 42 | |||
| 43 | =item * | ||
| 44 | |||
| 45 | Stevan Little <stevan@cpan.org> | ||
| 46 | |||
| 47 | =item * | ||
| 48 | |||
| 49 | Brian Fraser <hugmeir@cpan.org> | ||
| 50 | |||
| 51 | =back | ||
| 52 | |||
| 53 | =head1 COPYRIGHT AND LICENSE | ||
| 54 | |||
| 55 | This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser. | ||
| 56 | |||
| 57 | This is free software; you can redistribute it and/or modify it under | ||
| 58 | the same terms as the Perl 5 programming language system itself. | ||
| 59 | |||
| 60 | =cut |