Removed BalanceBlocker field from Balance

This commit is contained in:
porosnicuadrian
2021-02-15 11:04:05 +02:00
committed by Dan Christian Bogos
parent b1d63c55e6
commit db53fa7df1
7 changed files with 24 additions and 33 deletions

View File

@@ -77,7 +77,6 @@ type Balance struct {
ID string // Balance identificator, unique within an Account
FilterIDs []string
Weights DynamicWeights
Blocker bool
Type string
Opts map[string]interface{}
CostIncrements []*CostIncrement
@@ -191,7 +190,6 @@ func (aI *ActivationInterval) Clone() *ActivationInterval {
func (bL *Balance) Clone() (blnc *Balance) {
blnc = &Balance{
ID: bL.ID,
Blocker: bL.Blocker,
Weights: bL.Weights.Clone(),
Type: bL.Type,
}
@@ -376,7 +374,6 @@ type APIBalance struct {
ID string // Balance identificator, unique within an Account
FilterIDs []string
Weights string
Blocker bool
Type string
Opts map[string]interface{}
CostIncrements []*APICostIncrement
@@ -391,7 +388,6 @@ func (ext *APIBalance) AsBalance() (balance *Balance, err error) {
balance = &Balance{
ID: ext.ID,
FilterIDs: ext.FilterIDs,
Blocker: ext.Blocker,
Type: ext.Type,
Opts: ext.Opts,
AttributeIDs: ext.AttributeIDs,

View File

@@ -35,8 +35,7 @@ func TestCloneBalance(t *testing.T) {
Weight: 1.1,
},
},
Blocker: true,
Type: "*abstract",
Type: "*abstract",
Opts: map[string]interface{}{
"Destination": 10,
},
@@ -94,8 +93,7 @@ func TestCloneAccountProfile(t *testing.T) {
Weight: 1.1,
},
},
Blocker: true,
Type: "*abstract",
Type: "*abstract",
Opts: map[string]interface{}{
"Destination": 10,
},
@@ -151,7 +149,6 @@ func TestAccountProfileAsAccountProfile(t *testing.T) {
ID: "VoiceBalance",
FilterIDs: []string{"*string:~*req.Account:1001"},
Weights: ";1.2",
Blocker: true,
Type: "*abstract",
Opts: map[string]interface{}{
"Destination": 10,
@@ -174,8 +171,7 @@ func TestAccountProfileAsAccountProfile(t *testing.T) {
Weight: 1.2,
},
},
Blocker: true,
Type: "*abstract",
Type: "*abstract",
Opts: map[string]interface{}{
"Destination": 10,
},