diff --git a/apier/v1/accounts.go b/apier/v1/accounts.go index 734e964d8..b9d8df241 100644 --- a/apier/v1/accounts.go +++ b/apier/v1/accounts.go @@ -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 } diff --git a/utils/apitpdata.go b/utils/apitpdata.go index 1c5d2af73..328c86322 100644 --- a/utils/apitpdata.go +++ b/utils/apitpdata.go @@ -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 {