Package com.clover.sdk.v3.payments
Class GiftCard
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.GiftCard
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class GiftCard 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
GiftCard.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<GiftCard>
CREATOR
static JSONifiable.Creator<GiftCard>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description GiftCard()
Constructs a new empty instance.protected
GiftCard(boolean noInit)
Constructs a new empty instance.GiftCard(GiftCard src)
Constructs a new instance that is a deep copy of the source instance.GiftCard(String json)
Constructs a new instance from the given JSON String.GiftCard(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
clearCardNumber()
Clears the 'cardNumber' field, the 'has' method for this field will now return falsevoid
clearDeviceSerial()
Clears the 'deviceSerial' field, the 'has' method for this field will now return falsevoid
clearIsManuallyEntered()
Clears the 'isManuallyEntered' field, the 'has' method for this field will now return falsevoid
clearPromoCode()
Clears the 'promoCode' field, the 'has' method for this field will now return falsevoid
clearTrack2()
Clears the 'track2' field, the 'has' method for this field will now return falsevoid
clearVirtual()
Clears the 'virtual' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.GiftCard
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getCardNumber()
Embossed Card NumberString
getDeviceSerial()
protected GenericClient
getGenericClient()
Boolean
getIsManuallyEntered()
Was Account Number Manually EnteredJSONObject
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
getPromoCode()
Virtual Promo CodeString
getTrack2()
Track 2 Card DataBoolean
getVirtual()
Is this a virtual gift cardboolean
hasCardNumber()
Checks whether the 'cardNumber' field has been set, however the value could be nullboolean
hasDeviceSerial()
Checks whether the 'deviceSerial' field has been set, however the value could be nullboolean
hasIsManuallyEntered()
Checks whether the 'isManuallyEntered' field has been set, however the value could be nullboolean
hasPromoCode()
Checks whether the 'promoCode' field has been set, however the value could be nullboolean
hasTrack2()
Checks whether the 'track2' field has been set, however the value could be nullboolean
hasVirtual()
Checks whether the 'virtual' field has been set, however the value could be nullboolean
isNotNullCardNumber()
Checks whether the 'cardNumber' field is set and is not nullboolean
isNotNullDeviceSerial()
Checks whether the 'deviceSerial' field is set and is not nullboolean
isNotNullIsManuallyEntered()
Checks whether the 'isManuallyEntered' field is set and is not nullboolean
isNotNullPromoCode()
Checks whether the 'promoCode' field is set and is not nullboolean
isNotNullTrack2()
Checks whether the 'track2' field is set and is not nullboolean
isNotNullVirtual()
Checks whether the 'virtual' field is set and is not nullvoid
mergeChanges(GiftCard 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.GiftCard
setCardNumber(String cardNumber)
Sets the field 'cardNumber'.GiftCard
setDeviceSerial(String deviceSerial)
Sets the field 'deviceSerial'.GiftCard
setIsManuallyEntered(Boolean isManuallyEntered)
Sets the field 'isManuallyEntered'.GiftCard
setPromoCode(String promoCode)
Sets the field 'promoCode'.GiftCard
setTrack2(String track2)
Sets the field 'track2'.GiftCard
setVirtual(Boolean virtual)
Sets the field 'virtual'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<GiftCard> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<GiftCard> JSON_CREATOR
-
-
Constructor Detail
-
GiftCard
public GiftCard()
Constructs a new empty instance.
-
GiftCard
protected GiftCard(boolean noInit)
Constructs a new empty instance.
-
GiftCard
public GiftCard(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
GiftCard
public GiftCard(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.
-
GiftCard
public GiftCard(GiftCard src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getTrack2
public String getTrack2()
Track 2 Card Data
-
getCardNumber
public String getCardNumber()
Embossed Card Number
-
getIsManuallyEntered
public Boolean getIsManuallyEntered()
Was Account Number Manually Entered
-
getDeviceSerial
public String getDeviceSerial()
-
getVirtual
public Boolean getVirtual()
Is this a virtual gift card
-
getPromoCode
public String getPromoCode()
Virtual Promo Code
-
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
-
isNotNullTrack2
public boolean isNotNullTrack2()
Checks whether the 'track2' field is set and is not null
-
isNotNullCardNumber
public boolean isNotNullCardNumber()
Checks whether the 'cardNumber' field is set and is not null
-
isNotNullIsManuallyEntered
public boolean isNotNullIsManuallyEntered()
Checks whether the 'isManuallyEntered' field is set and is not null
-
isNotNullDeviceSerial
public boolean isNotNullDeviceSerial()
Checks whether the 'deviceSerial' field is set and is not null
-
isNotNullVirtual
public boolean isNotNullVirtual()
Checks whether the 'virtual' field is set and is not null
-
isNotNullPromoCode
public boolean isNotNullPromoCode()
Checks whether the 'promoCode' field is set and is not null
-
hasTrack2
public boolean hasTrack2()
Checks whether the 'track2' field has been set, however the value could be null
-
hasCardNumber
public boolean hasCardNumber()
Checks whether the 'cardNumber' field has been set, however the value could be null
-
hasIsManuallyEntered
public boolean hasIsManuallyEntered()
Checks whether the 'isManuallyEntered' field has been set, however the value could be null
-
hasDeviceSerial
public boolean hasDeviceSerial()
Checks whether the 'deviceSerial' field has been set, however the value could be null
-
hasVirtual
public boolean hasVirtual()
Checks whether the 'virtual' field has been set, however the value could be null
-
hasPromoCode
public boolean hasPromoCode()
Checks whether the 'promoCode' field has been set, however the value could be null
-
setIsManuallyEntered
public GiftCard setIsManuallyEntered(Boolean isManuallyEntered)
Sets the field 'isManuallyEntered'.
-
setDeviceSerial
public GiftCard setDeviceSerial(String deviceSerial)
Sets the field 'deviceSerial'.
-
clearTrack2
public void clearTrack2()
Clears the 'track2' field, the 'has' method for this field will now return false
-
clearCardNumber
public void clearCardNumber()
Clears the 'cardNumber' field, the 'has' method for this field will now return false
-
clearIsManuallyEntered
public void clearIsManuallyEntered()
Clears the 'isManuallyEntered' field, the 'has' method for this field will now return false
-
clearDeviceSerial
public void clearDeviceSerial()
Clears the 'deviceSerial' field, the 'has' method for this field will now return false
-
clearVirtual
public void clearVirtual()
Clears the 'virtual' field, the 'has' method for this field will now return false
-
clearPromoCode
public void clearPromoCode()
Clears the 'promoCode' 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 GiftCard copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(GiftCard src)
Copy all the changed fields from the given source to this instance.
-
-