Bug 24545: Fix license statements
[srvgit] / Koha / SMS / Provider.pm
1 package Koha::SMS::Provider;
2
3 # Copyright ByWater Solutions 2016
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # Koha is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20 use Modern::Perl;
21
22 use Carp;
23
24 use Koha::Patrons;
25
26 use base qw(Koha::Object);
27
28 =head1 NAME
29
30 Koha::Biblio - Koha Biblio Object class
31 Koha::SMS::Provider - Koha SMS Provider object class
32
33 =head1 API
34
35 =head2 Class Methods
36
37 =cut
38
39 =head3 patrons_using
40
41 my $count = $provider->patrons_using()
42
43 Gives the number of patrons using this provider
44
45 =cut
46
47 sub patrons_using {
48     my ( $self ) = @_;
49
50     return Koha::Patrons->search( { sms_provider_id => $self->id } )->count();
51 }
52
53 =head3 _type
54
55 =cut
56
57 sub _type {
58     return 'SmsProvider';
59 }
60
61 =head1 AUTHOR
62
63 Kyle M Hall <kyle@bywatersolutions.com>
64
65 =cut
66
67 1;