public class SampleExternalTopUpRequestLauncher extends AbstractSampleProgram
RESPONSE: Status = SUCCESS
AbstractSampleProgram.SampleResponseConsumer<T extends Response<?>>
Constructor and Description |
---|
SampleExternalTopUpRequestLauncher(java.lang.String userIdentity,
java.lang.String msgId,
java.lang.String productType,
int beId,
java.math.BigDecimal quantity,
java.lang.String validityStartStr,
java.lang.String validityEndStr,
int numberOfMonths,
boolean extendValidity,
java.lang.String requestStartStr,
java.lang.String fuOffsetStr,
java.lang.String fuUnit)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main method to start the sample program
|
protected void |
runSample()
To be implemented by each sample program for specific scenario
|
createDefaultPayLoad, getBatchRequestService, getContext, getExternalTopUpUpdateRequestBuilderFactory, getLogger, getManagementRequestBuilderFactory, getNResponsesReceived, getPolicyRequestBuilderFactory, getQueryRequestBuilderFactory, getResponsesReceived, getServiceSpecRepository, getStackTrace, getStateManager, getUpdateRequestBuilderFactory, getUsageRequestBuilderFactory, resetResponsesReceived, run, sendAsynchronousRequest, sendRequest, sendRequests, sendUpdateRequest, sendUpdateRequests, waitForResponses
public SampleExternalTopUpRequestLauncher(java.lang.String userIdentity, java.lang.String msgId, java.lang.String productType, int beId, java.math.BigDecimal quantity, java.lang.String validityStartStr, java.lang.String validityEndStr, int numberOfMonths, boolean extendValidity, java.lang.String requestStartStr, java.lang.String fuOffsetStr, java.lang.String fuUnit)
userIdentity
- user identity or Public user identitymsgId
- unique string to identify each top-up requestproductType
- the product typebeId
- the balance element IDquantity
- the impact quantityvalidityStartStr
- -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 notrequestStartStr
- request start time stringfuOffsetStr
- first usage offsetfuUnit
- first usage unit. To indicate whether the quantity specified in offset is in DAYS,MONTHS or so onprotected void runSample() throws java.lang.InterruptedException, MessagesException, SystemHealthException, java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionException, UserNotFoundException
AbstractSampleProgram
runSample
in class AbstractSampleProgram
java.lang.InterruptedException
MessagesException
SystemHealthException
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutionException
UserNotFoundException
public static void main(java.lang.String[] args)
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]