This commit is contained in:
DanB
2015-03-23 17:40:35 +01:00
32 changed files with 242 additions and 176 deletions

View File

@@ -86,8 +86,8 @@ func (self *TPRate) AsExportSlice() [][]string {
}
// Needed so we make sure we always use SetDurations() on a newly created value
func NewRateSlot(connectFee, maxCost float64, maxCostStrategy string, rate float64, rateUnit, rateIncrement, grpInterval string) (*RateSlot, error) {
rs := &RateSlot{ConnectFee: connectFee, Rate: rate, RateUnit: rateUnit, RateIncrement: rateIncrement, MaxCost: maxCost, MaxCostStrategy: maxCostStrategy,
func NewRateSlot(connectFee, rate float64, rateUnit, rateIncrement, grpInterval string) (*RateSlot, error) {
rs := &RateSlot{ConnectFee: connectFee, Rate: rate, RateUnit: rateUnit, RateIncrement: rateIncrement,
GroupIntervalStart: grpInterval}
if err := rs.SetDurations(); err != nil {
return nil, err
@@ -103,8 +103,6 @@ type RateSlot struct {
GroupIntervalStart string // Group position
rateUnitDur time.Duration
rateIncrementDur time.Duration
MaxCost float64
MaxCostStrategy string
groupIntervalStartDur time.Duration
}
@@ -153,6 +151,8 @@ type DestinationRate struct {
Rate *TPRate
RoundingMethod string
RoundingDecimals int
MaxCost float64
MaxCostStrategy string
}
type ApierTPTiming struct {

View File

@@ -60,8 +60,8 @@ const (
CDR_STATS_CSV = "CdrStats.csv"
TIMINGS_NRCOLS = 6
DESTINATIONS_NRCOLS = 2
RATES_NRCOLS = 8
DESTINATION_RATES_NRCOLS = 5
RATES_NRCOLS = 6
DESTINATION_RATES_NRCOLS = 7
DESTRATE_TIMINGS_NRCOLS = 4
RATE_PROFILES_NRCOLS = 7
SHARED_GROUPS_NRCOLS = 4