Destination in APierV1.GetCost

This commit is contained in:
DanB
2017-11-27 15:17:12 +01:00
parent b1bff453ea
commit b26040ccfe

View File

@@ -26,11 +26,12 @@ import (
)
type AttrGetCost struct {
Tenant string
Category string
Subject string
AnswerTime time.Time
Usage string
Tenant string
Category string
Subject string
AnswerTime time.Time
Destination string
Usage string
}
func (apier *ApierV1) GetCost(attrs AttrGetCost, ec *engine.EventCost) error {
@@ -43,6 +44,7 @@ func (apier *ApierV1) GetCost(attrs AttrGetCost, ec *engine.EventCost) error {
Category: attrs.Category,
Tenant: attrs.Tenant,
Subject: attrs.Subject,
Destination: attrs.Destination,
TimeStart: attrs.AnswerTime,
TimeEnd: attrs.AnswerTime.Add(usage),
DurationIndex: usage,