Bug 23611: (follow-up) Exclude "actions" column from export
[koha.git] / Koha / SMS / Provider.pm
blobbbc96268bc77c7194d5de3b033caf95feede5ff8
1 package Koha::SMS::Provider;
3 # Copyright ByWater Solutions 2016
5 # This file is part of Koha.
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.
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.
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.
20 use Modern::Perl;
22 use Carp;
24 use Koha::Patrons;
26 use base qw(Koha::Object);
28 =head1 NAME
30 Koha::Biblio - Koha Biblio Object class
31 Koha::SMS::Provider - Koha SMS Provider object class
33 =head1 API
35 =head2 Class Methods
37 =cut
39 =head3 patrons_using
41 my $count = $provider->patrons_using()
43 Gives the number of patrons using this provider
45 =cut
47 sub patrons_using {
48 my ( $self ) = @_;
50 return Koha::Patrons->search( { sms_provider_id => $self->id } )->count();
53 =head3 _type
55 =cut
57 sub _type {
58 return 'SmsProvider';
61 =head1 AUTHOR
63 Kyle M Hall <kyle@bywatersolutions.com>
65 =cut