mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
add action triggers id to set account api
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user