Bug 17177 - about.pl references a module that doesn't exist
[koha.git] / 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 under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
10 # version.
11 #
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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;