Interface UsageRequestBuilder


public interface UsageRequestBuilder
class represents the available API for a UsageRequestBuilder. The builder provides API for setting all of the required attributes that must be present for all Usage Requests. The builder also allows callers to access the PayloadView, which represents the Dynamic portion of the request that is defined by a Service Specification.
  • Method Details

    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, Payload payload) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      payload - the dynamic payload associated with this request.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, Payload payload, String reportingReason) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      payload - the dynamic payload associated with this request.
      reportingReason - reporting reason for diameter requests.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, Payload payload, Boolean ratingConditionChange) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      payload - the dynamic payload associated with this request.
      ratingConditionChange - boolean to represent the rating condition change case
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, Payload payload, Boolean ratingConditionChange, String reportingReason) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      payload - the dynamic payload associated with this request.
      ratingConditionChange - boolean to represent the rating condition change case
      reportingReason - for diameter requests.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, RequestMode requestMode, Payload payload) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      requestMode - Mode of the usage request. ONLINE|OFFLINE
      payload - the dynamic payload associated with this request.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, RequestMode requestMode, Payload payload, String reportingReason) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      requestMode - Mode of the usage request. ONLINE|OFFLINE
      payload - the dynamic payload associated with this request.
      reportingReason - reporting reason for diameter requests.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, RequestMode requestMode, Payload payload, Boolean flagRCC) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      requestMode - Mode of the usage request. ONLINE|OFFLINE
      payload - the dynamic payload associated with this request.
      flagRCC -
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • build

      UsageRequest build(String userIdentity, String requestId, ZonedDateTime requestStart, ZonedDateTime requestEnd, int sequenceNumber, RequestMode requestMode, Payload payload, Boolean flagRCC, String reportingReason) throws MessagesUsageException
      returns an instance of a UsageRequest which was constructed for session based operation types.
      Parameters:
      userIdentity - identity of the subscriber for whom the UsageRequest applies.
      requestId - the id relating to all requests created in this session.
      requestStart - the time at which this usage event commences. If this is a session based charging request, then during an INITIATE request this time will be stored as the session start time.
      requestEnd - the time at which this usage event ends. If this is non-session based charging request, then the request end can be the same as the request start.
      sequenceNumber - the sequence number for the request. This can be set to 1 if the request in NOT session based.
      requestMode - Mode of the usage request. ONLINE|OFFLINE
      payload - the dynamic payload associated with this request.
      flagRCC -
      reportingReason - for diameter requests.
      Returns:
      an instance of a well-formed UsageRequest created using the builder.
      Throws:
      MessagesUsageException - if RequestSpecification contract was violated in any manner.
    • createPayload

      Payload createPayload(Usage operation)
      returns an empty payload that corresponds to RequestSpecification matching the supplied arguments. Callers should use the Payload API to populate the Payload.
      Parameters:
      operation - the version of the relevant RequestSpecification.
      Returns:
      a payload to be populated which aligns to the supplied properties of the RequestSpecification
    • getNetworkMappingDefinitions

      List<NetworkMappingDefinition> getNetworkMappingDefinitions(Usage operation)
      This method returns mapping information for the supplied operation type. All RequestSpec payload fields containing the "network_field" property will be returned to the caller.
      Parameters:
      operation - the operation for which the mapping data is required.
      Returns:
      a list of fields that require mapping to network entities.
    • getNetworkMappingDefinitions

      List<NetworkMappingDefinition> getNetworkMappingDefinitions(Usage operation, String type)
      This method returns mapping information for the supplied operation type and client type. All RequestSpec payload fields containing entries in the mapping spec will be returned to the caller.
      Parameters:
      operation - the operation for which the mapping data is required.
      type - the client type
      Returns:
      a list of fields that require mapping to network entities.
    • getGSUNetworkMappingDefinitions

      List<NetworkMappingDefinition> getGSUNetworkMappingDefinitions()
      This method returns only GSU mapping information. The values are derived from the RSU block fields that contain the "network_field" property. The prefix block names are stripped-off and only the GSU fieldnames are returned.
      Returns:
      a list of RSU fields that require mapping to network entities.
    • getProductType

      String getProductType()
      All UsageRequestBuilder are targeted to build requests for a single ProductType. This method surfaces the product type for which this builder applies.
      Returns:
      the product type for which this builder applies.