Class RequestMoney
public class RequestMoney extends Request
Field Summary
Fields inherited from class com.mypos.myposcheckout.ipc.request.Request
config, outputFormat
Constructor Summary
Constructor and Description |
---|
RequestMoney(Config config) |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getAmount() |
Currency |
getCurrency() |
java.lang.String |
getCustomerWalletNumber() |
java.lang.String |
getMandateReference() |
java.lang.String |
getOrderId() |
java.lang.String |
getReason() |
boolean |
getReversalIndicator() |
BasicResponse |
process()
Gather all request parameters needed to make an API call, and make one.
|
void |
setAmount(java.math.BigDecimal amount) |
void |
setCurrency(Currency currency) |
void |
setCustomerWalletNumber(java.lang.String customerWalletNumber) |
void |
setMandateReference(java.lang.String mandateReference) |
void |
setOrderId(java.lang.String orderId) |
void |
setReason(java.lang.String reason) |
void |
setReversalIndicator(boolean reversalIndicator) |
boolean |
validate()
Checks if the class members are valid API request parameter values.
|
Methods inherited from class com.mypos.myposcheckout.ipc.request.Request
addRequestParam, addRequestParam, addRequestParam, addRequestParam, addRequestParam, addStandardParams, clearRequestParams, createApiCallFormHtml, createApiCallFormHtml,createApiCallFormHtml, createSignature, getConfig, getOutputFormat, getSignedRequestParams, processApiCall, removeRequestParam, setConfig, setOutputFormat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RequestMoney
public RequestMoney(Config config)
Method Detail
getMandateReference
public java.lang.String getMandateReference()
setMandateReference
public void setMandateReference(java.lang.String mandateReference)
getCustomerWalletNumber
public java.lang.String getCustomerWalletNumber()
setCustomerWalletNumber
public void setCustomerWalletNumber(java.lang.String customerWalletNumber)
getOrderId
public java.lang.String getOrderId()
setOrderId
public void setOrderId(java.lang.String orderId)
getReversalIndicator
public boolean getReversalIndicator()
setReversalIndicator
public void setReversalIndicator(boolean reversalIndicator)
getAmount
public java.math.BigDecimal getAmount()
setAmount
public void setAmount(java.math.BigDecimal amount)
getCurrency
public Currency getCurrency()
setCurrency
public void setCurrency(Currency currency)
getReason
public java.lang.String getReason()
setReason
public void setReason(java.lang.String reason)
validate
public boolean validate() throws IPCException
- Returns:
- true if all members can be used as valid API request parameters
- Throws:
IPCException
- If there are values which are missing, or invalid API request parameters.
process
public BasicResponse process() throws IPCException
- Returns:
- the decoded API response
- Throws:
IPCException
- If there are invalid or missing parameters, or configuration values. If there were errors while making the call to the API, or decoding it's response.