public class TipAdjustedPayload extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
TipAdjustedPayload.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TipAdjustedPayload> |
CREATOR |
static JSONifiable.Creator<TipAdjustedPayload> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
TipAdjustedPayload()
Constructs a new empty instance.
|
protected |
TipAdjustedPayload(boolean noInit)
Constructs a new empty instance.
|
|
TipAdjustedPayload(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.
|
|
TipAdjustedPayload(String json)
Constructs a new instance from the given JSON String.
|
|
TipAdjustedPayload(TipAdjustedPayload src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAdjustAmount()
Clears the 'adjustAmount' field, the 'has' method for this field will now return false
|
void |
clearCardTransaction()
Clears the 'cardTransaction' field, the 'has' method for this field will now return false
|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
TipAdjustedPayload |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Integer |
getAdjustAmount()
Adjusted amount like tip, auth or cash back
|
CardTransaction |
getCardTransaction() |
Long |
getCreatedTime() |
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.
|
Reference |
getMerchant() |
boolean |
hasAdjustAmount()
Checks whether the 'adjustAmount' field has been set, however the value could be null
|
boolean |
hasCardTransaction()
Checks whether the 'cardTransaction' field has been set, however the value could be null
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
|
boolean |
isNotNullAdjustAmount()
Checks whether the 'adjustAmount' field is set and is not null
|
boolean |
isNotNullCardTransaction()
Checks whether the 'cardTransaction' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
void |
mergeChanges(TipAdjustedPayload 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.
|
TipAdjustedPayload |
setAdjustAmount(Integer adjustAmount)
Sets the field 'adjustAmount'.
|
TipAdjustedPayload |
setCardTransaction(CardTransaction cardTransaction)
Sets the field 'cardTransaction'.
|
TipAdjustedPayload |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
TipAdjustedPayload |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<TipAdjustedPayload> CREATOR
public static final JSONifiable.Creator<TipAdjustedPayload> JSON_CREATOR
public TipAdjustedPayload()
protected TipAdjustedPayload(boolean noInit)
public TipAdjustedPayload(String json) throws IllegalArgumentException
IllegalArgumentException
public TipAdjustedPayload(JSONObject jsonObject)
public TipAdjustedPayload(TipAdjustedPayload src)
public Integer getAdjustAmount()
public Long getCreatedTime()
public Reference getMerchant()
public CardTransaction getCardTransaction()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullAdjustAmount()
public boolean isNotNullCreatedTime()
public boolean isNotNullMerchant()
public boolean isNotNullCardTransaction()
public boolean hasAdjustAmount()
public boolean hasCreatedTime()
public boolean hasMerchant()
public boolean hasCardTransaction()
public TipAdjustedPayload setAdjustAmount(Integer adjustAmount)
public TipAdjustedPayload setCreatedTime(Long createdTime)
public TipAdjustedPayload setMerchant(Reference merchant)
public TipAdjustedPayload setCardTransaction(CardTransaction cardTransaction)
public void clearAdjustAmount()
public void clearCreatedTime()
public void clearMerchant()
public void clearCardTransaction()
public boolean containsChanges()
public void resetChangeLog()
public TipAdjustedPayload copyChanges()
public void mergeChanges(TipAdjustedPayload src)