Class Purchase
public class Purchase extends Request
Field Summary
Fields inherited from class com.mypos.myposcheckout.ipc.request.Request
config, outputFormat
Constructor Summary
Constructor and Description |
---|
Purchase(Config config) |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getAmount() |
java.net.URL |
getCancelUrl() |
CardTokenRequest |
getCardTokenRequest() |
Cart |
getCart() |
Currency |
getCurrency() |
Customer |
getCustomer() |
java.lang.String |
getNote() |
java.net.URL |
getNotifyUrl() |
java.lang.String |
getOrderId() |
PaymentParametersRequired |
getParametersRequired() |
java.net.URL |
getSuccessUrl() |
boolean |
process()
Gather all request parameters needed to make an API call.
|
void |
setAmount(java.math.BigDecimal amount) |
void |
setCancelUrl(java.net.URL cancelUrl) |
void |
setCardTokenRequest(CardTokenRequest cardTokenRequest) |
void |
setCart(Cart cart) |
void |
setCurrency(Currency currency) |
void |
setCustomer(Customer customer) |
void |
setNote(java.lang.String note) |
void |
setNotifyUrl(java.net.URL notifyUrl) |
void |
setOrderId(java.lang.String orderId) |
void |
setParametersRequired(PaymentParametersRequired parametersRequired) |
void |
setSuccessUrl(java.net.URL successUrl) |
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
Purchase
public Purchase(Config config)
Method Detail
getAmount
public java.math.BigDecimal getAmount()
setAmount
public void setAmount(java.math.BigDecimal amount)
getCurrency
public Currency getCurrency()
setCurrency
public void setCurrency(Currency currency)
getCart
public Cart getCart()
setCart
public void setCart(Cart cart)
getCustomer
public Customer getCustomer()
setCustomer
public void setCustomer(Customer customer)
getSuccessUrl
public java.net.URL getSuccessUrl()
setSuccessUrl
public void setSuccessUrl(java.net.URL successUrl)
getCancelUrl
public java.net.URL getCancelUrl()
setCancelUrl
public void setCancelUrl(java.net.URL cancelUrl)
getNotifyUrl
public java.net.URL getNotifyUrl()
setNotifyUrl
public void setNotifyUrl(java.net.URL notifyUrl)
getCardTokenRequest
public CardTokenRequest getCardTokenRequest()
setCardTokenRequest
public void setCardTokenRequest(CardTokenRequest cardTokenRequest)
getParametersRequired
public PaymentParametersRequired getParametersRequired()
setParametersRequired
public void setParametersRequired(PaymentParametersRequired parametersRequired)
getOrderId
public java.lang.String getOrderId()
setOrderId
public void setOrderId(java.lang.String orderId)
getNote
public java.lang.String getNote()
setNote
public void setNote(java.lang.String note)
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 boolean process() throws IPCException
- Returns:
- true if all parameters and configurations are valid, throws otherwise
- Throws:
IPCException
- If there are invalid or missing parameters, or configuration values.