add action triggers id to set account api

This commit is contained in:
Radu Ioan Fericean
2015-09-20 10:54:10 +03:00
parent 991fc09884
commit 2a99f63827
2 changed files with 14 additions and 6 deletions

View File

@@ -182,6 +182,13 @@ func (self *ApierV1) SetAccount(attr utils.AttrSetAccount, reply *string) error
at.AccountIds = append(at.AccountIds, balanceId)
}
}
if len(attr.ActionTriggersId) != 0 {
atrs, err := self.RatingDb.GetActionTriggers(attr.ActionTriggersId)
if err != nil {
return 0, err
}
ub.ActionTriggers = atrs
}
if attr.AllowNegative != nil {
ub.AllowNegative = *attr.AllowNegative
}

View File

@@ -1105,12 +1105,13 @@ type AttrExecuteAction struct {
}
type AttrSetAccount struct {
Tenant string
Direction string
Account string
ActionPlanId string
AllowNegative *bool
Disabled *bool
Tenant string
Direction string
Account string
ActionPlanId string
ActionTriggersId string
AllowNegative *bool
Disabled *bool
}
type AttrRemoveAccount struct {