-use C4::Context;
-
-use base qw(Class::Accessor);
-
-__PACKAGE__->mk_accessors(qw( id name domain ));
-
-=head2 new
-
- my $provider = Koha::SMS::Provider->new($data);
-
-Create a new Koha::SMS::Provider object based on the provided record.
-
-=cut
-
-sub new {
- my $class = shift;
- my $data = shift;
-
- my $self = $class->SUPER::new($data);
-
- bless $self, $class;
- return $self;
-}
-
-=head2 store
-
- Creates or updates the object in the database
-
-=cut
-
-sub store {
- my $self = shift;
-
- if ( $self->id ) {
- return C4::Context->dbh->do( "UPDATE sms_providers SET name = ?, domain = ? WHERE id = ?", undef, ( $self->name, $self->domain, $self->id ) );
- } else {
- return C4::Context->dbh->do( "INSERT INTO sms_providers ( name, domain ) VALUES ( ?, ? )", undef, ( $self->name, $self->domain ) );
- }
-}
-
-=head2 delete