public class LineItemPayment extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
LineItemPayment.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<LineItemPayment> |
CREATOR |
static JSONifiable.Creator<LineItemPayment> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
LineItemPayment()
Constructs a new empty instance.
|
protected |
LineItemPayment(boolean noInit)
Constructs a new empty instance.
|
|
LineItemPayment(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.
|
|
LineItemPayment(LineItemPayment src)
Constructs a new instance that is a deep copy of the source instance.
|
|
LineItemPayment(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearBinName()
Clears the 'binName' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearPercentage()
Clears the 'percentage' field, the 'has' method for this field will now return false
|
void |
clearRefunded()
Clears the 'refunded' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
LineItemPayment |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getBinName()
Bin this line item payment was for
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier; TBD this is confusing because it's used as either line item id or payment id
|
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.
|
Long |
getPercentage()
Percent of this line item covered by this payment
|
Boolean |
getRefunded()
Payment has been refunded
|
boolean |
hasBinName()
Checks whether the 'binName' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasPercentage()
Checks whether the 'percentage' field has been set, however the value could be null
|
boolean |
hasRefunded()
Checks whether the 'refunded' field has been set, however the value could be null
|
boolean |
isNotNullBinName()
Checks whether the 'binName' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullPercentage()
Checks whether the 'percentage' field is set and is not null
|
boolean |
isNotNullRefunded()
Checks whether the 'refunded' field is set and is not null
|
void |
mergeChanges(LineItemPayment 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.
|
LineItemPayment |
setBinName(String binName)
Sets the field 'binName'.
|
LineItemPayment |
setId(String id)
Sets the field 'id'.
|
LineItemPayment |
setPercentage(Long percentage)
Sets the field 'percentage'.
|
LineItemPayment |
setRefunded(Boolean refunded)
Sets the field 'refunded'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<LineItemPayment> CREATOR
public static final JSONifiable.Creator<LineItemPayment> JSON_CREATOR
public LineItemPayment()
protected LineItemPayment(boolean noInit)
public LineItemPayment(String json) throws IllegalArgumentException
IllegalArgumentException
public LineItemPayment(JSONObject jsonObject)
public LineItemPayment(LineItemPayment src)
public String getId()
public Long getPercentage()
public String getBinName()
public Boolean getRefunded()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullPercentage()
public boolean isNotNullBinName()
public boolean isNotNullRefunded()
public boolean hasId()
public boolean hasPercentage()
public boolean hasBinName()
public boolean hasRefunded()
public LineItemPayment setId(String id)
public LineItemPayment setPercentage(Long percentage)
public LineItemPayment setBinName(String binName)
public LineItemPayment setRefunded(Boolean refunded)
public void clearId()
public void clearPercentage()
public void clearBinName()
public void clearRefunded()
public boolean containsChanges()
public void resetChangeLog()
public LineItemPayment copyChanges()
public void mergeChanges(LineItemPayment src)