Bug 20256: DBIC schema
[koha.git] / Koha / Subscription / Routinglist.pm
1 package Koha::Subscription::Routinglist;
2
3 #
4 # This file is part of Koha.
5 #
6 # Koha is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # Koha is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19 use Modern::Perl;
20
21
22 use Koha::Database;
23 use Koha::Subscriptions;
24
25 use base qw(Koha::Object);
26
27 =head1 NAME
28
29 Koha::Subscription::Routinglist - Koha subscription routing list object class
30
31 =head1 API
32
33 =head2 Class methods
34
35 =cut
36
37 =head3 subscription
38
39 my $subscription = $routinglist->subscription
40
41 Returns the subscription for a routing list.
42
43 =cut
44
45 sub subscription {
46     my ( $self ) = @_;
47     return Koha::Subscription->_new_from_dbic($self->_result->subscriptionid);
48 }
49
50 =head2 Internal methods
51
52 =head3 _type
53
54 =cut
55
56 sub _type {
57     return 'Subscriptionroutinglist';
58 }
59
60 =head1 AUTHOR
61
62 Katrin Fischer <katrin.fischer@bsz-bw.de>
63
64 =cut
65
66 1;