mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
165 lines
6.1 KiB
Go
165 lines
6.1 KiB
Go
/*
|
|
Real-time Online/Offline Charging System (OCS) 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 <http://www.gnu.org/licenses/>
|
|
*/
|
|
|
|
// do not modify this code because it's generated
|
|
package dispatchers
|
|
|
|
import (
|
|
"github.com/cgrates/birpc/context"
|
|
"github.com/cgrates/cgrates/utils"
|
|
)
|
|
|
|
func (dS *DispatcherService) AccountSv1AccountsForEvent(ctx *context.Context, args *utils.CGREvent, reply *[]*utils.Account) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1AccountsForEvent, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1ActionRemoveBalance(ctx *context.Context, args *utils.ArgsActRemoveBalances, reply *string) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1ActionRemoveBalance, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1ActionSetBalance(ctx *context.Context, args *utils.ArgsActSetBalance, reply *string) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1ActionSetBalance, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1DebitAbstracts(ctx *context.Context, args *utils.CGREvent, reply *utils.EventCharges) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1DebitAbstracts, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1DebitConcretes(ctx *context.Context, args *utils.CGREvent, reply *utils.EventCharges) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1DebitConcretes, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1GetAccount(ctx *context.Context, args *utils.TenantIDWithAPIOpts, reply *utils.Account) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && (args.TenantID != nil && len(args.TenantID.Tenant) != 0) {
|
|
tnt = args.TenantID.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1GetAccount, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1MaxAbstracts(ctx *context.Context, args *utils.CGREvent, reply *utils.EventCharges) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1MaxAbstracts, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1MaxConcretes(ctx *context.Context, args *utils.CGREvent, reply *utils.EventCharges) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1MaxConcretes, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1Ping(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
if args != nil {
|
|
ev = args.Event
|
|
}
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1Ping, args, reply)
|
|
}
|
|
func (dS *DispatcherService) AccountSv1RefundCharges(ctx *context.Context, args *utils.APIEventCharges, reply *string) (err error) {
|
|
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
|
if args != nil && len(args.Tenant) != 0 {
|
|
tnt = args.Tenant
|
|
}
|
|
ev := make(map[string]interface{})
|
|
opts := make(map[string]interface{})
|
|
if args != nil {
|
|
opts = args.APIOpts
|
|
}
|
|
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaAccounts, utils.AccountSv1RefundCharges, args, reply)
|
|
}
|