diff --git a/apier/v2/tp.go b/apier/v2/tp.go new file mode 100644 index 000000000..756a17546 --- /dev/null +++ b/apier/v2/tp.go @@ -0,0 +1,34 @@ +/* +Real-time Charging System for Telecom & ISP environments +Copyright (C) ITsysCOM GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +package v2 + +import ( + "fmt" + + "github.com/cgrates/cgrates/utils" +) + +func (self *ApierV2) RemTP(tpid string, reply *string) error { + if err := self.StorDb.RemTPData("", tpid); err != nil { + return fmt.Errorf("%s:%s", utils.ERR_SERVER_ERROR, err.Error()) + } else { + *reply = "OK" + } + return nil +}