Package com.clover.sdk.v3.payments
Class VaultedCard
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.VaultedCard
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class VaultedCard 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
VaultedCard.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<VaultedCard>
CREATOR
static JSONifiable.Creator<VaultedCard>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description VaultedCard()
Constructs a new empty instance.protected
VaultedCard(boolean noInit)
Constructs a new empty instance.VaultedCard(VaultedCard src)
Constructs a new instance that is a deep copy of the source instance.VaultedCard(String json)
Constructs a new instance from the given JSON String.VaultedCard(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
clearCardholderName()
Clears the 'cardholderName' field, the 'has' method for this field will now return falsevoid
clearExpirationDate()
Clears the 'expirationDate' 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
clearLast4()
Clears the 'last4' 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 falseboolean
containsChanges()
Returns true if this instance has any changes.VaultedCard
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getCardholderName()
String
getExpirationDate()
String
getFirst6()
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()
String
getToken()
boolean
hasCardholderName()
Checks whether the 'cardholderName' field has been set, however the value could be nullboolean
hasExpirationDate()
Checks whether the 'expirationDate' 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
hasLast4()
Checks whether the 'last4' 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
isNotNullCardholderName()
Checks whether the 'cardholderName' field is set and is not nullboolean
isNotNullExpirationDate()
Checks whether the 'expirationDate' field is set and is not nullboolean
isNotNullFirst6()
Checks whether the 'first6' field is set and is not nullboolean
isNotNullLast4()
Checks whether the 'last4' field is set and is not nullboolean
isNotNullToken()
Checks whether the 'token' field is set and is not nullvoid
mergeChanges(VaultedCard 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.VaultedCard
setCardholderName(String cardholderName)
Sets the field 'cardholderName'.VaultedCard
setExpirationDate(String expirationDate)
Sets the field 'expirationDate'.VaultedCard
setFirst6(String first6)
Sets the field 'first6'.VaultedCard
setLast4(String last4)
Sets the field 'last4'.VaultedCard
setToken(String token)
Sets the field 'token'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<VaultedCard> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<VaultedCard> JSON_CREATOR
-
-
Constructor Detail
-
VaultedCard
public VaultedCard()
Constructs a new empty instance.
-
VaultedCard
protected VaultedCard(boolean noInit)
Constructs a new empty instance.
-
VaultedCard
public VaultedCard(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
VaultedCard
public VaultedCard(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.
-
VaultedCard
public VaultedCard(VaultedCard src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getFirst6
public String getFirst6()
-
getLast4
public String getLast4()
-
getCardholderName
public String getCardholderName()
-
getExpirationDate
public String getExpirationDate()
-
getToken
public String getToken()
-
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
-
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
-
isNotNullCardholderName
public boolean isNotNullCardholderName()
Checks whether the 'cardholderName' field is set and is not null
-
isNotNullExpirationDate
public boolean isNotNullExpirationDate()
Checks whether the 'expirationDate' field is set and is not null
-
isNotNullToken
public boolean isNotNullToken()
Checks whether the 'token' field is set and is not 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
-
hasCardholderName
public boolean hasCardholderName()
Checks whether the 'cardholderName' field has been set, however the value could be null
-
hasExpirationDate
public boolean hasExpirationDate()
Checks whether the 'expirationDate' 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
-
setFirst6
public VaultedCard setFirst6(String first6)
Sets the field 'first6'.
-
setLast4
public VaultedCard setLast4(String last4)
Sets the field 'last4'.
-
setCardholderName
public VaultedCard setCardholderName(String cardholderName)
Sets the field 'cardholderName'.
-
setExpirationDate
public VaultedCard setExpirationDate(String expirationDate)
Sets the field 'expirationDate'.
-
setToken
public VaultedCard setToken(String token)
Sets the field 'token'.
-
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
-
clearCardholderName
public void clearCardholderName()
Clears the 'cardholderName' field, the 'has' method for this field will now return false
-
clearExpirationDate
public void clearExpirationDate()
Clears the 'expirationDate' 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
-
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 VaultedCard copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(VaultedCard src)
Copy all the changed fields from the given source to this instance.
-
-