Interface UsageRequest

All Superinterfaces:
Request<Usage>, Serializable, TemporalObject, oracle.communication.brm.charging.ratingview.UsageRequestView

public interface UsageRequest extends Request<Usage>, oracle.communication.brm.charging.ratingview.UsageRequestView
Class represents a UsageRequest which is processed by the ECE Charging Service.
  • Field Details

  • Method Details

    • getRequestId

      String getRequestId()
      get the requestId associated with the UsageRequest. This unique session Id is constant across all INITIATE, UPDATE and TERMINATES corresponding to the same session.
      Specified by:
      getRequestId in interface oracle.communication.brm.charging.ratingview.UsageRequestView
      Returns:
      the sessionId
    • getReportingReason

      String getReportingReason()
      get the requestId associated with the UsageRequest. This unique session Id is constant across all INITIATE, UPDATE and TERMINATES corresponding to the same session.
      Returns:
      the reportingReason
    • setReportingReason

      void setReportingReason(String reportingReason)
      sets the Reporting-Reason
    • getProductType

      String getProductType()
      get the product type associated with the usageRequest.
      Specified by:
      getProductType in interface oracle.communication.brm.charging.ratingview.UsageRequestView
      Returns:
    • getEventType

      String getEventType()
      get the event type associated with the usageRequest.
      Specified by:
      getEventType in interface oracle.communication.brm.charging.ratingview.UsageRequestView
      Returns:
    • setTraced

      void setTraced(boolean traced)
      Set the subscriber trace flag
    • getTraced

      boolean getTraced()
      get the subscriber trace flag
      Returns:
      true if the subscriber request is to be traced or false
    • getSequenceNumber

      int getSequenceNumber()
      get the sequence number for this usage request. Multiple UsageRequest corresponding to the same session will have their sequence number incremented each time.
      Returns:
      the sequence number for this usage request
    • getRatingConditionChange

      Boolean getRatingConditionChange()
      Returns:
      The flag representing if there is rating condition change
    • getUnitReportingMode

      UnitReportingMode getUnitReportingMode()
      Returns:
      The Unit Reporting Mode of this usage Request.
    • withDateTimes

      UsageRequest withDateTimes(ZonedDateTime requestStart, ZonedDateTime requestEnd)
      Method to create a new UsageRequest from the current request using the supplied payload. Values from the request will be used by default. Only the values passed in parameters will be over written.
      Parameters:
      requestStart - session start time
      requestEnd - request end time
      Returns:
      enriched Usage Request
    • getVersion

      String getVersion()
      Get the version of the usage request
      Returns:
      version
    • getDurationAttributeName

      String getDurationAttributeName()
      Gets the name of the USU field that tracks DURATION usage for session based charging.
      Returns:
      the name of the USU field for tracking DURATION. Will return null if the UsageRequest does not contain fields for DURATION based charging.
    • getQtyPropBasedOnCreditBreach

      Long getQtyPropBasedOnCreditBreach(BigDecimalFraction proportion, boolean isDurationRumPresent, long configuredValidity, long tariffSwitchTime, long unratedDuration, boolean ifWorstCostImpacted, long ratedDurationInMillis, boolean isQuotaAttributePresent, int randomizationInterval)
      Get the expiration date and time in case of reverse rating (ONLY)
      Returns:
      long value of the duration to the end time after being adjusted with the proportion in seconds
    • withRequestId

      UsageRequest withRequestId(String newRequestId)
      New UsageRequest with specified newRequestId. All other properties are retained
      Parameters:
      newRequestId - newRequestId
      Returns:
      UsageRequest UsageRequest
    • convertToTerminate

      UsageRequest convertToTerminate(Usage requestType)
      Method to create a TERMINATE Usage Request from the current original UsageRequest. This is used during the ASO Cleanup, Mid session CDR operation and Management Accounting on/off.
      Parameters:
      requestType - request type
      Returns:
      new forcefully created TERMINATE request
    • resolve

      void resolve(UsageRequest oldUsageRequest, UsageRequest newUsageRequest, boolean isInternalOverride)
      Conflict logic to resolve between 2 usage request across clusters.
      Parameters:
      oldUsageRequest -
      newUsageRequest -
    • getRequestMode

      RequestMode getRequestMode()
      Getter
      Returns:
      to get the request mode (ONLINE or OFFLINE)
    • convertToTerminate

      UsageRequest convertToTerminate(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate)
      Method to create a TERMINATE Usage Request from the current original UsageRequest. This is used during the ASO Cleanup, Mid session CDR operation and Management Accounting on/off.
      Parameters:
      requestType - request type
      sessionIdOverridenForLifeCycleUpdate -
      Returns:
      new forcefully created TERMINATE request
    • convertToTerminateZeroUsedUnit

      UsageRequest convertToTerminateZeroUsedUnit(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate)
      Parameters:
      requestType -
      requestStartTime -
      requestEnd -
      isMultipleUSU -
      isBeforeTTC -
      sessionIdOverridenForLifeCycleUpdate -
      Returns:
    • getOverageDetails

      oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl getOverageDetails()
      Getter
      Returns:
      the overageDetails entry
    • setOverageDetails

      void setOverageDetails(oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl overageDetails)
      setter
      Parameters:
      overageDetails - overageDetail objects