public class CardTransaction extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
CardTransaction.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CardTransaction> |
CREATOR |
static JSONifiable.Creator<CardTransaction> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
CardTransaction()
Constructs a new empty instance.
|
protected |
CardTransaction(boolean noInit)
Constructs a new empty instance.
|
|
CardTransaction(CardTransaction src)
Constructs a new instance that is a deep copy of the source instance.
|
|
CardTransaction(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
CardTransaction(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAuthCode()
Clears the 'authCode' field, the 'has' method for this field will now return false
|
void |
clearAvsResult()
Clears the 'avsResult' field, the 'has' method for this field will now return false
|
void |
clearBegBalance()
Clears the 'begBalance' field, the 'has' method for this field will now return false
|
void |
clearCaptured()
Clears the 'captured' field, the 'has' method for this field will now return false
|
void |
clearCardholderName()
Clears the 'cardholderName' field, the 'has' method for this field will now return false
|
void |
clearCardType()
Clears the 'cardType' field, the 'has' method for this field will now return false
|
void |
clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return false
|
void |
clearEndBalance()
Clears the 'endBalance' field, the 'has' method for this field will now return false
|
void |
clearEntryType()
Clears the 'entryType' field, the 'has' method for this field will now return false
|
void |
clearExtra()
Clears the 'extra' field, the 'has' method for this field will now return false
|
void |
clearFirst6()
Clears the 'first6' field, the 'has' method for this field will now return false
|
void |
clearGatewayTxState()
Clears the 'gatewayTxState' field, the 'has' method for this field will now return false
|
void |
clearLast4()
Clears the 'last4' field, the 'has' method for this field will now return false
|
void |
clearReferenceId()
Clears the 'referenceId' field, the 'has' method for this field will now return false
|
void |
clearState()
Clears the 'state' field, the 'has' method for this field will now return false
|
void |
clearToken()
Clears the 'token' field, the 'has' method for this field will now return false
|
void |
clearTransactionNo()
Clears the 'transactionNo' field, the 'has' method for this field will now return false
|
void |
clearType()
Clears the 'type' field, the 'has' method for this field will now return false
|
void |
clearVaultedCard()
Clears the 'vaultedCard' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
CardTransaction |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAuthCode()
Authorization code (if successful)
|
AVSResult |
getAvsResult() |
Long |
getBegBalance() |
Boolean |
getCaptured() |
String |
getCardholderName() |
CardType |
getCardType() |
String |
getCurrency()
Currency code
|
Long |
getEndBalance() |
CardEntryType |
getEntryType() |
Map<String,String> |
getExtra()
Extra info to be stored as part of gateway/card transaction
|
String |
getFirst6()
The first four digits of the card number
|
GatewayTxState |
getGatewayTxState()
The state as currently recorded.
|
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
String |
getLast4()
The last four digits of the card number
|
String |
getReferenceId() |
CardTransactionState |
getState()
A state inferred from transaction type and whether the gateway captured the transaction
|
String |
getToken() |
String |
getTransactionNo() |
CardTransactionType |
getType() |
VaultedCard |
getVaultedCard()
Vaulted card which can be used for subsequent transactions
|
boolean |
hasAuthCode()
Checks whether the 'authCode' field has been set, however the value could be null
|
boolean |
hasAvsResult()
Checks whether the 'avsResult' field has been set, however the value could be null
|
boolean |
hasBegBalance()
Checks whether the 'begBalance' field has been set, however the value could be null
|
boolean |
hasCaptured()
Checks whether the 'captured' field has been set, however the value could be null
|
boolean |
hasCardholderName()
Checks whether the 'cardholderName' field has been set, however the value could be null
|
boolean |
hasCardType()
Checks whether the 'cardType' field has been set, however the value could be null
|
boolean |
hasCurrency()
Checks whether the 'currency' field has been set, however the value could be null
|
boolean |
hasEndBalance()
Checks whether the 'endBalance' field has been set, however the value could be null
|
boolean |
hasEntryType()
Checks whether the 'entryType' field has been set, however the value could be null
|
boolean |
hasExtra()
Checks whether the 'extra' field has been set, however the value could be null
|
boolean |
hasFirst6()
Checks whether the 'first6' field has been set, however the value could be null
|
boolean |
hasGatewayTxState()
Checks whether the 'gatewayTxState' field has been set, however the value could be null
|
boolean |
hasLast4()
Checks whether the 'last4' field has been set, however the value could be null
|
boolean |
hasReferenceId()
Checks whether the 'referenceId' field has been set, however the value could be null
|
boolean |
hasState()
Checks whether the 'state' field has been set, however the value could be null
|
boolean |
hasToken()
Checks whether the 'token' field has been set, however the value could be null
|
boolean |
hasTransactionNo()
Checks whether the 'transactionNo' field has been set, however the value could be null
|
boolean |
hasType()
Checks whether the 'type' field has been set, however the value could be null
|
boolean |
hasVaultedCard()
Checks whether the 'vaultedCard' field has been set, however the value could be null
|
boolean |
isNotEmptyExtra()
Checks whether the 'extra' field is set and is not null and is not empty
|
boolean |
isNotNullAuthCode()
Checks whether the 'authCode' field is set and is not null
|
boolean |
isNotNullAvsResult()
Checks whether the 'avsResult' field is set and is not null
|
boolean |
isNotNullBegBalance()
Checks whether the 'begBalance' field is set and is not null
|
boolean |
isNotNullCaptured()
Checks whether the 'captured' field is set and is not null
|
boolean |
isNotNullCardholderName()
Checks whether the 'cardholderName' field is set and is not null
|
boolean |
isNotNullCardType()
Checks whether the 'cardType' field is set and is not null
|
boolean |
isNotNullCurrency()
Checks whether the 'currency' field is set and is not null
|
boolean |
isNotNullEndBalance()
Checks whether the 'endBalance' field is set and is not null
|
boolean |
isNotNullEntryType()
Checks whether the 'entryType' field is set and is not null
|
boolean |
isNotNullExtra()
Checks whether the 'extra' field is set and is not null
|
boolean |
isNotNullFirst6()
Checks whether the 'first6' field is set and is not null
|
boolean |
isNotNullGatewayTxState()
Checks whether the 'gatewayTxState' field is set and is not null
|
boolean |
isNotNullLast4()
Checks whether the 'last4' field is set and is not null
|
boolean |
isNotNullReferenceId()
Checks whether the 'referenceId' field is set and is not null
|
boolean |
isNotNullState()
Checks whether the 'state' field is set and is not null
|
boolean |
isNotNullToken()
Checks whether the 'token' field is set and is not null
|
boolean |
isNotNullTransactionNo()
Checks whether the 'transactionNo' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
boolean |
isNotNullVaultedCard()
Checks whether the 'vaultedCard' field is set and is not null
|
void |
mergeChanges(CardTransaction src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
CardTransaction |
setAuthCode(String authCode)
Sets the field 'authCode'.
|
CardTransaction |
setAvsResult(AVSResult avsResult)
Sets the field 'avsResult'.
|
CardTransaction |
setBegBalance(Long begBalance)
Sets the field 'begBalance'.
|
CardTransaction |
setCaptured(Boolean captured)
Sets the field 'captured'.
|
CardTransaction |
setCardholderName(String cardholderName)
Sets the field 'cardholderName'.
|
CardTransaction |
setCardType(CardType cardType)
Sets the field 'cardType'.
|
CardTransaction |
setCurrency(String currency)
Sets the field 'currency'.
|
CardTransaction |
setEndBalance(Long endBalance)
Sets the field 'endBalance'.
|
CardTransaction |
setEntryType(CardEntryType entryType)
Sets the field 'entryType'.
|
CardTransaction |
setExtra(Map<String,String> extra)
Sets the field 'extra'.
|
CardTransaction |
setFirst6(String first6)
Sets the field 'first6'.
|
CardTransaction |
setGatewayTxState(GatewayTxState gatewayTxState)
Sets the field 'gatewayTxState'.
|
CardTransaction |
setLast4(String last4)
Sets the field 'last4'.
|
CardTransaction |
setReferenceId(String referenceId)
Sets the field 'referenceId'.
|
CardTransaction |
setState(CardTransactionState state)
Sets the field 'state'.
|
CardTransaction |
setToken(String token)
Sets the field 'token'.
|
CardTransaction |
setTransactionNo(String transactionNo)
Sets the field 'transactionNo'.
|
CardTransaction |
setType(CardTransactionType type)
Sets the field 'type'.
|
CardTransaction |
setVaultedCard(VaultedCard vaultedCard)
Sets the field 'vaultedCard'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<CardTransaction> CREATOR
public static final JSONifiable.Creator<CardTransaction> JSON_CREATOR
public CardTransaction()
protected CardTransaction(boolean noInit)
public CardTransaction(String json) throws IllegalArgumentException
IllegalArgumentException
public CardTransaction(JSONObject jsonObject)
public CardTransaction(CardTransaction src)
public CardType getCardType()
public CardEntryType getEntryType()
public String getFirst6()
public String getLast4()
public CardTransactionType getType()
public String getAuthCode()
public String getReferenceId()
public String getTransactionNo()
public CardTransactionState getState()
public Map<String,String> getExtra()
public Long getBegBalance()
public Long getEndBalance()
public AVSResult getAvsResult()
public String getCardholderName()
public String getToken()
public VaultedCard getVaultedCard()
public GatewayTxState getGatewayTxState()
public String getCurrency()
public Boolean getCaptured()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullCardType()
public boolean isNotNullEntryType()
public boolean isNotNullFirst6()
public boolean isNotNullLast4()
public boolean isNotNullType()
public boolean isNotNullAuthCode()
public boolean isNotNullReferenceId()
public boolean isNotNullTransactionNo()
public boolean isNotNullState()
public boolean isNotNullExtra()
public boolean isNotEmptyExtra()
public boolean isNotNullBegBalance()
public boolean isNotNullEndBalance()
public boolean isNotNullAvsResult()
public boolean isNotNullCardholderName()
public boolean isNotNullToken()
public boolean isNotNullVaultedCard()
public boolean isNotNullGatewayTxState()
public boolean isNotNullCurrency()
public boolean isNotNullCaptured()
public boolean hasCardType()
public boolean hasEntryType()
public boolean hasFirst6()
public boolean hasLast4()
public boolean hasType()
public boolean hasAuthCode()
public boolean hasReferenceId()
public boolean hasTransactionNo()
public boolean hasState()
public boolean hasExtra()
public boolean hasBegBalance()
public boolean hasEndBalance()
public boolean hasAvsResult()
public boolean hasCardholderName()
public boolean hasToken()
public boolean hasVaultedCard()
public boolean hasGatewayTxState()
public boolean hasCurrency()
public boolean hasCaptured()
public CardTransaction setCardType(CardType cardType)
public CardTransaction setEntryType(CardEntryType entryType)
public CardTransaction setFirst6(String first6)
public CardTransaction setLast4(String last4)
public CardTransaction setType(CardTransactionType type)
public CardTransaction setAuthCode(String authCode)
public CardTransaction setReferenceId(String referenceId)
public CardTransaction setTransactionNo(String transactionNo)
public CardTransaction setState(CardTransactionState state)
public CardTransaction setExtra(Map<String,String> extra)
public CardTransaction setBegBalance(Long begBalance)
public CardTransaction setEndBalance(Long endBalance)
public CardTransaction setAvsResult(AVSResult avsResult)
public CardTransaction setCardholderName(String cardholderName)
public CardTransaction setToken(String token)
public CardTransaction setVaultedCard(VaultedCard vaultedCard)
public CardTransaction setGatewayTxState(GatewayTxState gatewayTxState)
public CardTransaction setCurrency(String currency)
public CardTransaction setCaptured(Boolean captured)
public void clearCardType()
public void clearEntryType()
public void clearFirst6()
public void clearLast4()
public void clearType()
public void clearAuthCode()
public void clearReferenceId()
public void clearTransactionNo()
public void clearState()
public void clearExtra()
public void clearBegBalance()
public void clearEndBalance()
public void clearAvsResult()
public void clearCardholderName()
public void clearToken()
public void clearVaultedCard()
public void clearGatewayTxState()
public void clearCurrency()
public void clearCaptured()
public boolean containsChanges()
public void resetChangeLog()
public CardTransaction copyChanges()
public void mergeChanges(CardTransaction src)