public class GiftCard extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
GiftCard.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<GiftCard> |
CREATOR |
static JSONifiable.Creator<GiftCard> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and 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(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(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCardNumber()
Clears the 'cardNumber' field, the 'has' method for this field will now return false
|
void |
clearDeviceSerial()
Clears the 'deviceSerial' field, the 'has' method for this field will now return false
|
void |
clearIsManuallyEntered()
Clears the 'isManuallyEntered' field, the 'has' method for this field will now return false
|
void |
clearPromoCode()
Clears the 'promoCode' field, the 'has' method for this field will now return false
|
void |
clearTrack2()
Clears the 'track2' field, the 'has' method for this field will now return false
|
void |
clearVirtual()
Clears the 'virtual' field, the 'has' method for this field will now return false
|
boolean |
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 Number
|
String |
getDeviceSerial() |
protected GenericClient |
getGenericClient() |
Boolean |
getIsManuallyEntered()
Was Account Number Manually Entered
|
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 |
getPromoCode()
Virtual Promo Code
|
String |
getTrack2()
Track 2 Card Data
|
Boolean |
getVirtual()
Is this a virtual gift card
|
boolean |
hasCardNumber()
Checks whether the 'cardNumber' field has been set, however the value could be null
|
boolean |
hasDeviceSerial()
Checks whether the 'deviceSerial' field has been set, however the value could be null
|
boolean |
hasIsManuallyEntered()
Checks whether the 'isManuallyEntered' field has been set, however the value could be null
|
boolean |
hasPromoCode()
Checks whether the 'promoCode' field has been set, however the value could be null
|
boolean |
hasTrack2()
Checks whether the 'track2' field has been set, however the value could be null
|
boolean |
hasVirtual()
Checks whether the 'virtual' field has been set, however the value could be null
|
boolean |
isNotNullCardNumber()
Checks whether the 'cardNumber' field is set and is not null
|
boolean |
isNotNullDeviceSerial()
Checks whether the 'deviceSerial' field is set and is not null
|
boolean |
isNotNullIsManuallyEntered()
Checks whether the 'isManuallyEntered' field is set and is not null
|
boolean |
isNotNullPromoCode()
Checks whether the 'promoCode' field is set and is not null
|
boolean |
isNotNullTrack2()
Checks whether the 'track2' field is set and is not null
|
boolean |
isNotNullVirtual()
Checks whether the 'virtual' field is set and is not null
|
void |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<GiftCard> CREATOR
public static final JSONifiable.Creator<GiftCard> JSON_CREATOR
public GiftCard()
protected GiftCard(boolean noInit)
public GiftCard(String json) throws IllegalArgumentException
IllegalArgumentException
public GiftCard(JSONObject jsonObject)
public GiftCard(GiftCard src)
public String getTrack2()
public String getCardNumber()
public Boolean getIsManuallyEntered()
public String getDeviceSerial()
public Boolean getVirtual()
public String getPromoCode()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullTrack2()
public boolean isNotNullCardNumber()
public boolean isNotNullIsManuallyEntered()
public boolean isNotNullDeviceSerial()
public boolean isNotNullVirtual()
public boolean isNotNullPromoCode()
public boolean hasTrack2()
public boolean hasCardNumber()
public boolean hasIsManuallyEntered()
public boolean hasDeviceSerial()
public boolean hasVirtual()
public boolean hasPromoCode()
public GiftCard setIsManuallyEntered(Boolean isManuallyEntered)
public void clearTrack2()
public void clearCardNumber()
public void clearIsManuallyEntered()
public void clearDeviceSerial()
public void clearVirtual()
public void clearPromoCode()
public boolean containsChanges()
public void resetChangeLog()
public GiftCard copyChanges()
public void mergeChanges(GiftCard src)