RateS - adding V1CostForEvent API method

This commit is contained in:
DanB
2020-11-15 14:37:37 +01:00
parent d2d1139de0
commit 8940ebd7e8
4 changed files with 43 additions and 229 deletions

View File

@@ -173,6 +173,12 @@ type RateSIncrement struct {
cost *utils.Decimal // unexported total increment cost
}
type RateProfileCost struct {
ID string // RateProfileID
Cost float64
RateSIntervals []*RateSInterval
}
// Sort will sort the IntervalRates from each Rate based on IntervalStart
func (rpp *RateProfile) Sort() {
for _, rate := range rpp.Rates {