Package com.clover.sdk.v3.payments
Class ECommTransactionInfo
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.ECommTransactionInfo
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class ECommTransactionInfo extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ECommTransactionInfo.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<ECommTransactionInfo>
CREATOR
static JSONifiable.Creator<ECommTransactionInfo>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description ECommTransactionInfo()
Constructs a new empty instance.protected
ECommTransactionInfo(boolean noInit)
Constructs a new empty instance.ECommTransactionInfo(ECommTransactionInfo src)
Constructs a new instance that is a deep copy of the source instance.ECommTransactionInfo(String json)
Constructs a new instance from the given JSON String.ECommTransactionInfo(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
clearCredentialOnFile()
Clears the 'credentialOnFile' field, the 'has' method for this field will now return falsevoid
clearECommTransaction()
Clears the 'eCommTransaction' field, the 'has' method for this field will now return falsevoid
clearTokenType()
Clears the 'tokenType' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.ECommTransactionInfo
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Boolean
getCredentialOnFile()
Set to true when Card On File is used for the transactionBoolean
getECommTransaction()
Set to True when it is an Ecomm Transactionprotected 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.TokenType
getTokenType()
boolean
hasCredentialOnFile()
Checks whether the 'credentialOnFile' field has been set, however the value could be nullboolean
hasECommTransaction()
Checks whether the 'eCommTransaction' field has been set, however the value could be nullboolean
hasTokenType()
Checks whether the 'tokenType' field has been set, however the value could be nullboolean
isNotNullCredentialOnFile()
Checks whether the 'credentialOnFile' field is set and is not nullboolean
isNotNullECommTransaction()
Checks whether the 'eCommTransaction' field is set and is not nullboolean
isNotNullTokenType()
Checks whether the 'tokenType' field is set and is not nullvoid
mergeChanges(ECommTransactionInfo 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.ECommTransactionInfo
setCredentialOnFile(Boolean credentialOnFile)
Sets the field 'credentialOnFile'.ECommTransactionInfo
setECommTransaction(Boolean eCommTransaction)
Sets the field 'eCommTransaction'.ECommTransactionInfo
setTokenType(TokenType tokenType)
Sets the field 'tokenType'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<ECommTransactionInfo> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<ECommTransactionInfo> JSON_CREATOR
-
-
Constructor Detail
-
ECommTransactionInfo
public ECommTransactionInfo()
Constructs a new empty instance.
-
ECommTransactionInfo
protected ECommTransactionInfo(boolean noInit)
Constructs a new empty instance.
-
ECommTransactionInfo
public ECommTransactionInfo(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
ECommTransactionInfo
public ECommTransactionInfo(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.
-
ECommTransactionInfo
public ECommTransactionInfo(ECommTransactionInfo src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getECommTransaction
public Boolean getECommTransaction()
Set to True when it is an Ecomm Transaction
-
getCredentialOnFile
public Boolean getCredentialOnFile()
Set to true when Card On File is used for the transaction
-
getTokenType
public TokenType getTokenType()
-
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
-
isNotNullECommTransaction
public boolean isNotNullECommTransaction()
Checks whether the 'eCommTransaction' field is set and is not null
-
isNotNullCredentialOnFile
public boolean isNotNullCredentialOnFile()
Checks whether the 'credentialOnFile' field is set and is not null
-
isNotNullTokenType
public boolean isNotNullTokenType()
Checks whether the 'tokenType' field is set and is not null
-
hasECommTransaction
public boolean hasECommTransaction()
Checks whether the 'eCommTransaction' field has been set, however the value could be null
-
hasCredentialOnFile
public boolean hasCredentialOnFile()
Checks whether the 'credentialOnFile' field has been set, however the value could be null
-
hasTokenType
public boolean hasTokenType()
Checks whether the 'tokenType' field has been set, however the value could be null
-
setECommTransaction
public ECommTransactionInfo setECommTransaction(Boolean eCommTransaction)
Sets the field 'eCommTransaction'.
-
setCredentialOnFile
public ECommTransactionInfo setCredentialOnFile(Boolean credentialOnFile)
Sets the field 'credentialOnFile'.
-
setTokenType
public ECommTransactionInfo setTokenType(TokenType tokenType)
Sets the field 'tokenType'.
-
clearECommTransaction
public void clearECommTransaction()
Clears the 'eCommTransaction' field, the 'has' method for this field will now return false
-
clearCredentialOnFile
public void clearCredentialOnFile()
Clears the 'credentialOnFile' field, the 'has' method for this field will now return false
-
clearTokenType
public void clearTokenType()
Clears the 'tokenType' 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 ECommTransactionInfo copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(ECommTransactionInfo src)
Copy all the changed fields from the given source to this instance.
-
-