use Id instead of ID

This commit is contained in:
Radu Ioan Fericean
2015-05-15 14:38:18 +03:00
parent d59468f7c8
commit 1e5e025cc3
5 changed files with 13 additions and 13 deletions

View File

@@ -133,8 +133,8 @@ func (cc *CallCost) ToDataCost() (*DataCost, error) {
DataIndex: callDuration,
MatchedSubject: ts.MatchedSubject,
MatchedPrefix: ts.MatchedPrefix,
MatchedDestID: ts.MatchedDestID,
RatingPlanID: ts.RatingPlanID,
MatchedDestId: ts.MatchedDestId,
RatingPlanId: ts.RatingPlanId,
}
dc.DataSpans[i].Increments = make([]*DataIncrement, len(ts.Increments))
for j, incr := range ts.Increments {

View File

@@ -133,7 +133,7 @@ func TestSplitSpansWeekend(t *testing.T) {
&RatingInfo{
MatchedSubject: "*out:foehn:postpaid:foehn",
MatchedPrefix: "0034678",
MatchedDestID: "SPN_MOB",
MatchedDestId: "SPN_MOB",
ActivationTime: time.Date(2015, 4, 23, 0, 0, 0, 0, time.UTC),
RateIntervals: []*RateInterval{
&RateInterval{

View File

@@ -31,7 +31,7 @@ type DataSpan struct {
RateInterval *RateInterval
DataIndex float64 // the data transfer so far till DataEnd
Increments []*DataIncrement
MatchedSubject, MatchedPrefix, MatchedDestID, RatingPlanID string
MatchedSubject, MatchedPrefix, MatchedDestId, RatingPlanId string
}
type DataIncrement struct {

View File

@@ -82,9 +82,9 @@ func (rpas RatingPlanActivations) GetActiveForCall(cd *CallDescriptor) RatingPla
type RatingInfo struct {
MatchedSubject string
RatingPlanID string
RatingPlanId string
MatchedPrefix string
MatchedDestID string
MatchedDestId string
ActivationTime time.Time
RateIntervals RateIntervalList
FallbackKeys []string
@@ -163,7 +163,7 @@ func (rp *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error)
ris = append(ris, &RatingInfo{
MatchedSubject: "",
MatchedPrefix: "",
MatchedDestID: "",
MatchedDestId: "",
ActivationTime: cd.TimeStart,
RateIntervals: nil,
FallbackKeys: []string{cd.GetKey(FALLBACK_SUBJECT)}})
@@ -171,9 +171,9 @@ func (rp *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error)
if len(prefix) > 0 {
ris = append(ris, &RatingInfo{
MatchedSubject: rp.Id,
RatingPlanID: rpl.Id,
RatingPlanId: rpl.Id,
MatchedPrefix: prefix,
MatchedDestID: destinationId,
MatchedDestId: destinationId,
ActivationTime: rpa.ActivationTime,
RateIntervals: rps,
FallbackKeys: rpa.FallbackKeys})
@@ -182,7 +182,7 @@ func (rp *RatingProfile) GetRatingPlansForPrefix(cd *CallDescriptor) (err error)
ris = append(ris, &RatingInfo{
MatchedSubject: "",
MatchedPrefix: "",
MatchedDestID: "",
MatchedDestId: "",
ActivationTime: rpa.ActivationTime,
RateIntervals: nil,
FallbackKeys: rpa.FallbackKeys,

View File

@@ -37,7 +37,7 @@ type TimeSpan struct {
RateInterval *RateInterval
DurationIndex time.Duration // the call duration so far till TimeEnd
Increments Increments
MatchedSubject, MatchedPrefix, MatchedDestID, RatingPlanID string
MatchedSubject, MatchedPrefix, MatchedDestId, RatingPlanId string
}
type Increment struct {
@@ -281,8 +281,8 @@ func (ts *TimeSpan) setRatingInfo(rp *RatingInfo) {
ts.ratingInfo = rp
ts.MatchedSubject = rp.MatchedSubject
ts.MatchedPrefix = rp.MatchedPrefix
ts.MatchedDestID = rp.MatchedDestID
ts.RatingPlanID = rp.RatingPlanID
ts.MatchedDestId = rp.MatchedDestId
ts.RatingPlanId = rp.RatingPlanId
}
func (ts *TimeSpan) createIncrementsSlice() {