Routing formulas – methods

Routing formulas Method Summary


  • Method Detail

    • setCarrierPercentage

      public void setCarrierPercentage(java.lang.String carrierName,
                              java.lang.Integer percentage)
      Sets a percentage value for a carrier. Sets dial code routing type to percentage routing.
      Parameters:
      carrierName – The carrier to set percentage for.
      percentage – Percentage value

    • setCarrierPosition

      public void setCarrierPosition(java.lang.String carrierName,
                            java.lang.Integer override)
      Overrides a position of a carrier.
      Parameters:
      carrierName – The carrier to set position for.
      override – Desired position.

    • excludeCarrier

      public void excludeCarrier(java.lang.String carrierName)
      Excludes a carrier.
      Parameters:
      carrierName – Carrier to exclude

    • makeCarriersExclusive

      public void makeCarriersExclusive(java.lang.String... carrierName)
      Makes carriers exclusive wih desired order of the carriers.
      Parameters:
      carrierName – The carriers to use in the desired order. Separated by commas.

    • makeCarrierExclusive

      public void makeCarrierExclusive(java.lang.String carrierName)
      Makes a carrier exclusive without applying position override.
      Parameters:
      carrierName – The carrier to use

    • block

      public void block()
      Blocks a dial code(s).

    • exclude

      public void exclude()
      Excludes a dial code(s).

    • getCarrierPosition

      public int getCarrierPosition(java.lang.String carrieName)
      Returns a carrier position in routing for current dialcode by. If carrier is nnot present then returns -1.
      Parameters:
      carrierName – The carrier to set find position of.
      Returns:
      Position in routing of the desired carrier if it is present. Otherwise it returns -1. Indexes starts with 0.

    • setCarrierMixedPercentage

      public void setCarrierMixedPercentage(java.lang.String carrieName, 
      java.lang.Integer percentage)
      Sets a percentage for the selected carrier and changes destination routing type to Mixed.
      Parameters:
      carrierName – The carrier to set percentage for.
      percentage – Desired percentage value.

    • excludeCarrierIfPriceAbove

      public void excludeCarrierIfPriceAbove(double threshold)
      Excludes from routing all carriers that have prive above the defined threshold.
      Parameters:
      threshold – the threshold to check the carrier price against.

    • excludeCarrierIfPriceAboveOrEqual

      public void excludeCarrierIfPriceAboveOrEqual(double threshold)
      Excludes from routing all carriers that have prive above or equal to the defined threshold.
      Parameters:
      threshold – the threshold to check the carrier price against.

    • getCarrierPrice

      public double getCarrierPrice(java.lang.String carrierName)
      Gets the price of the desired carrier.
      Parameters:
      carrierName – the carrier to get the price of.
      Returns:
      The price of the desired carrier if it exists in Routing. Otherwise it returns 10000.0

    • createSet

      public java.util.Set createSet(java.lang.String... values)
      Creates a set of values to use in a formula.
      Parameters:
      values – Comma separated values.
      Returns:
      Set of the values passed as a parameter.

Similar Posts