public class Tender extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Tender.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Tender> |
CREATOR |
static JSONifiable.Creator<Tender> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Tender()
Constructs a new empty instance.
|
protected |
Tender(boolean noInit)
Constructs a new empty instance.
|
|
Tender(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.
|
|
Tender(String json)
Constructs a new instance from the given JSON String.
|
|
Tender(Tender src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEditable()
Clears the 'editable' field, the 'has' method for this field will now return false
|
void |
clearEnabled()
Clears the 'enabled' 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 |
clearInstructions()
Clears the 'instructions' field, the 'has' method for this field will now return false
|
void |
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
|
void |
clearLabelKey()
Clears the 'labelKey' field, the 'has' method for this field will now return false
|
void |
clearOpensCashDrawer()
Clears the 'opensCashDrawer' field, the 'has' method for this field will now return false
|
void |
clearSupportsTipping()
Clears the 'supportsTipping' field, the 'has' method for this field will now return false
|
void |
clearVisible()
Clears the 'visible' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Tender |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Boolean |
getEditable()
If this merchant tender is editable
|
Boolean |
getEnabled()
If this merchant tender is enabled
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
String |
getInstructions()
Label Key
|
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 |
getLabel()
Label Key
|
String |
getLabelKey()
Label Key
|
Boolean |
getOpensCashDrawer()
If this tender opens the cash drawer
|
Boolean |
getSupportsTipping()
Allow tipping on payment from tender
|
Boolean |
getVisible()
If this merchant tender is visible
|
boolean |
hasEditable()
Checks whether the 'editable' field has been set, however the value could be null
|
boolean |
hasEnabled()
Checks whether the 'enabled' 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 |
hasInstructions()
Checks whether the 'instructions' field has been set, however the value could be null
|
boolean |
hasLabel()
Checks whether the 'label' field has been set, however the value could be null
|
boolean |
hasLabelKey()
Checks whether the 'labelKey' field has been set, however the value could be null
|
boolean |
hasOpensCashDrawer()
Checks whether the 'opensCashDrawer' field has been set, however the value could be null
|
boolean |
hasSupportsTipping()
Checks whether the 'supportsTipping' field has been set, however the value could be null
|
boolean |
hasVisible()
Checks whether the 'visible' field has been set, however the value could be null
|
boolean |
isNotNullEditable()
Checks whether the 'editable' field is set and is not null
|
boolean |
isNotNullEnabled()
Checks whether the 'enabled' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullInstructions()
Checks whether the 'instructions' field is set and is not null
|
boolean |
isNotNullLabel()
Checks whether the 'label' field is set and is not null
|
boolean |
isNotNullLabelKey()
Checks whether the 'labelKey' field is set and is not null
|
boolean |
isNotNullOpensCashDrawer()
Checks whether the 'opensCashDrawer' field is set and is not null
|
boolean |
isNotNullSupportsTipping()
Checks whether the 'supportsTipping' field is set and is not null
|
boolean |
isNotNullVisible()
Checks whether the 'visible' field is set and is not null
|
void |
mergeChanges(Tender 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.
|
Tender |
setEditable(Boolean editable)
Sets the field 'editable'.
|
Tender |
setEnabled(Boolean enabled)
Sets the field 'enabled'.
|
Tender |
setId(String id)
Sets the field 'id'.
|
Tender |
setInstructions(String instructions)
Sets the field 'instructions'.
|
Tender |
setLabel(String label)
Sets the field 'label'.
|
Tender |
setLabelKey(String labelKey)
Sets the field 'labelKey'.
|
Tender |
setOpensCashDrawer(Boolean opensCashDrawer)
Sets the field 'opensCashDrawer'.
|
Tender |
setSupportsTipping(Boolean supportsTipping)
Sets the field 'supportsTipping'.
|
Tender |
setVisible(Boolean visible)
Sets the field 'visible'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Tender> CREATOR
public static final JSONifiable.Creator<Tender> JSON_CREATOR
public Tender()
protected Tender(boolean noInit)
public Tender(String json) throws IllegalArgumentException
IllegalArgumentException
public Tender(JSONObject jsonObject)
public Tender(Tender src)
public String getId()
public Boolean getEditable()
public String getLabelKey()
public String getLabel()
public Boolean getOpensCashDrawer()
public Boolean getSupportsTipping()
public Boolean getEnabled()
public Boolean getVisible()
public String getInstructions()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullEditable()
public boolean isNotNullLabelKey()
public boolean isNotNullLabel()
public boolean isNotNullOpensCashDrawer()
public boolean isNotNullSupportsTipping()
public boolean isNotNullEnabled()
public boolean isNotNullVisible()
public boolean isNotNullInstructions()
public boolean hasId()
public boolean hasEditable()
public boolean hasLabelKey()
public boolean hasLabel()
public boolean hasOpensCashDrawer()
public boolean hasSupportsTipping()
public boolean hasEnabled()
public boolean hasVisible()
public boolean hasInstructions()
public Tender setOpensCashDrawer(Boolean opensCashDrawer)
public Tender setSupportsTipping(Boolean supportsTipping)
public void clearId()
public void clearEditable()
public void clearLabelKey()
public void clearLabel()
public void clearOpensCashDrawer()
public void clearSupportsTipping()
public void clearEnabled()
public void clearVisible()
public void clearInstructions()
public boolean containsChanges()
public void resetChangeLog()
public Tender copyChanges()
public void mergeChanges(Tender src)