Class SampleExternalTopUpRequestLauncher

java.lang.Object
oracle.communication.brm.charging.sdk.AbstractSampleProgram
oracle.communication.brm.charging.sdk.update.SampleExternalTopUpRequestLauncher

public class SampleExternalTopUpRequestLauncher extends AbstractSampleProgram
Sample program to send synchronous ExternalTopUpUpdateRequest to a ECE charging grid. Eg. REQUEST: User identity = 100000 msg id = UNIQUE_MSG_ID Operation type = EXTERNAL_TOP_UP_UPDATE Product type = VOICE Event type = Request time in ZonedDateTime format Balance element Id = 840 for USD Impact quantity = 10 to specify $10 impact Validity start = -1 (for currency resources) or validity start string (non currency resources) Validity end = -1 (for currency resources) or validity end string (non currency resources) Validity extendFlag = TRUE (extends validity of existing bucket) FALSE (creates new bucket if no matching found) First usage offset = If no first usage validity, set this field to -1 Example: offset value 2 and unit set to "DAYS" indicates 2 days from first usage. First usage unit = if no first usage validity, set this field to null Example: ExternalTopUpUpdateRequest.FirstUsageValidityUnit.DAYS To indicate whether the quantity represented in offset is in days/hours/minutes or so on

RESPONSE: Status = SUCCESS

  • Constructor Details

    • SampleExternalTopUpRequestLauncher

      public SampleExternalTopUpRequestLauncher(String userIdentity, String msgId, String productType, int beId, BigDecimal quantity, String validityStartStr, String validityEndStr, int numberOfMonths, boolean extendValidity, String requestStartStr, String fuOffsetStr, String fuUnit)
      Constructor
      Parameters:
      userIdentity - user identity or Public user identity
      msgId - unique string to identify each top-up request
      productType - the product type
      beId - the balance element ID
      quantity - the impact quantity
      validityStartStr - -1 (for currency resources) or validity start string (non currency resources)
      validityEndStr - -1 (for currency resources) or validity end string (non currency resources)
      numberOfMonths - validity of bucket to be set in months. (if specified then validity start and validity end will be ignored)
      extendValidity - whether to extend validity or not
      requestStartStr - request start time string
      fuOffsetStr - first usage offset
      fuUnit - first usage unit. To indicate whether the quantity specified in offset is in DAYS,MONTHS or so on
  • Method Details

    • runSample

      Description copied from class: AbstractSampleProgram
      To be implemented by each sample program for specific scenario
      Specified by:
      runSample in class AbstractSampleProgram
      Throws:
      InterruptedException
      MessagesException
      SystemHealthException
      TimeoutException
      ExecutionException
      UserNotFoundException
    • main

      public static void main(String[] args)
      Main method to start the sample program
      Parameters:
      args - arguments args[0]: user identity; eg. 10000 args[1]: product type; eg. VOICE / SMS / DATA or any args[2]: balance element id: eg. 840 for USD args[3]: impact quantity: eg. 10 to indicate 10$ impact args[4]: validity start: eg. -1 (for currency resources) or validity start string (non currency resources) args[5]: validity end: eg. -1 (for currency resources) or validity end string (non currency resources) args[6]: validity of bucket to be set in months. (if specified then validity start and validity end will be ignored) args[7]: extend validity: If true, then validity of bucket will be extended. args[8]: request time: eg. 2013-01-01T00:01:00 if not specified current time will be taken [optional field] args[9]: first usage offset: eg. offset value 2 and unit set to "DAYS" indicates 2 days from first usage [optional field] args[10]: first usage unit: eg. To indicate whether the quantity represented in offset is in days/hours/minutes or so on [optional field]