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