Skip to content
QiTASC.com / General Concepts /
Rater Configuration
/ .. /
Rater Configuration










Rater Configuration

Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Rater {
      isActive = <Boolean>
      configurationFilepaths = [<String>, ...],
      timeRoundingMode = <String>,
      priceRoundingMode = <String>,
      units = {
          <currency String> : {
              value = <Number>,
              decimalPlaces = <Number>
          }
          ...
      }
}

Parameters

  • isActive - Can be true or false

  • configurationFilepaths - Points to the rates .csv files

  • priceRoundingMode (optional) - For calculating charges, units and currencies

  • Default is set to HALF_UP

  • timeRoundingMode (optional) - Rounds the call's duration

  • Default is set to UP

  • units (optional) - Allows for the conversion between monetary units when calculating charges

  • currency - The monetary unit (for example, Euro, Dollar)

  • value - The numerical value representing one unit of that currency

  • For example, assigning a value of 100 to a currency called Euro, and a value of 1 to a currency called Cent
  • Default values are:

    • Euro: value = 100, decimalPlaces = 2
    • Cent: value = 1, decimalPlaces = 0
  • decimalPlaces - The amount of decimal places that a currency can be rounded to

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Rater {
        isActive : true
        configurationFilepaths = ["Users/QiTASC/Projects/Rater/Voice.csv"
                                 "Users/QiTASC/Projects/Rater/SMS.csv"
                                 "Users/QiTASC/Projects/Rater/Data.csv"],
        timeRoundingMode = "<UP>",
        priceRoundingMode = "<HALF_UP>",
        units {
           "Euro" {
               value = 100,
               decimalPlaces = 2
           }
           "Cent" {
               value = 1,
               decimalPlaces = 0
           }
           ...
        }
}

Rounding values are:

  • CEILING - Rounding mode to round towards positive infinity

  • UP - Rounding mode to round away from zero

  • DOWN - Rounding mode to round towards zero

  • FLOOR - Rounding mode to round towards negative infinity

  • HALF_DOWN - Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down

  • HALF_UP - Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up