Package com.clover.sdk.v3.base
Class Tender
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.base.Tender
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Tender 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
Tender.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<Tender>
CREATOR
static JSONifiable.Creator<Tender>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Tender()
Constructs a new empty instance.protected
Tender(boolean noInit)
Constructs a new empty instance.Tender(Tender src)
Constructs a new instance that is a deep copy of the source instance.Tender(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearEditable()
Clears the 'editable' field, the 'has' method for this field will now return falsevoid
clearEnabled()
Clears the 'enabled' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearInstructions()
Clears the 'instructions' field, the 'has' method for this field will now return falsevoid
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return falsevoid
clearLabelKey()
Clears the 'labelKey' field, the 'has' method for this field will now return falsevoid
clearOpensCashDrawer()
Clears the 'opensCashDrawer' field, the 'has' method for this field will now return falsevoid
clearSupportsTipping()
Clears the 'supportsTipping' field, the 'has' method for this field will now return falsevoid
clearVisible()
Clears the 'visible' field, the 'has' method for this field will now return falseboolean
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 editableBoolean
getEnabled()
If this merchant tender is enabledprotected GenericClient
getGenericClient()
String
getId()
Unique identifierString
getInstructions()
Label KeyJSONObject
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 KeyString
getLabelKey()
Label KeyBoolean
getOpensCashDrawer()
If this tender opens the cash drawerBoolean
getSupportsTipping()
Allow tipping on payment from tenderBoolean
getVisible()
If this merchant tender is visibleboolean
hasEditable()
Checks whether the 'editable' field has been set, however the value could be nullboolean
hasEnabled()
Checks whether the 'enabled' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasInstructions()
Checks whether the 'instructions' field has been set, however the value could be nullboolean
hasLabel()
Checks whether the 'label' field has been set, however the value could be nullboolean
hasLabelKey()
Checks whether the 'labelKey' field has been set, however the value could be nullboolean
hasOpensCashDrawer()
Checks whether the 'opensCashDrawer' field has been set, however the value could be nullboolean
hasSupportsTipping()
Checks whether the 'supportsTipping' field has been set, however the value could be nullboolean
hasVisible()
Checks whether the 'visible' field has been set, however the value could be nullboolean
isNotNullEditable()
Checks whether the 'editable' field is set and is not nullboolean
isNotNullEnabled()
Checks whether the 'enabled' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullInstructions()
Checks whether the 'instructions' field is set and is not nullboolean
isNotNullLabel()
Checks whether the 'label' field is set and is not nullboolean
isNotNullLabelKey()
Checks whether the 'labelKey' field is set and is not nullboolean
isNotNullOpensCashDrawer()
Checks whether the 'opensCashDrawer' field is set and is not nullboolean
isNotNullSupportsTipping()
Checks whether the 'supportsTipping' field is set and is not nullboolean
isNotNullVisible()
Checks whether the 'visible' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Tender> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Tender> JSON_CREATOR
-
-
Constructor Detail
-
Tender
public Tender()
Constructs a new empty instance.
-
Tender
protected Tender(boolean noInit)
Constructs a new empty instance.
-
Tender
public Tender(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Tender
public 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
public Tender(Tender src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
Unique identifier
-
getEditable
public Boolean getEditable()
If this merchant tender is editable
-
getLabelKey
public String getLabelKey()
Label Key
-
getLabel
public String getLabel()
Label Key
-
getOpensCashDrawer
public Boolean getOpensCashDrawer()
If this tender opens the cash drawer
-
getSupportsTipping
public Boolean getSupportsTipping()
Allow tipping on payment from tender
-
getEnabled
public Boolean getEnabled()
If this merchant tender is enabled
-
getVisible
public Boolean getVisible()
If this merchant tender is visible
-
getInstructions
public String getInstructions()
Label Key
-
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
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullEditable
public boolean isNotNullEditable()
Checks whether the 'editable' field is set and is not null
-
isNotNullLabelKey
public boolean isNotNullLabelKey()
Checks whether the 'labelKey' field is set and is not null
-
isNotNullLabel
public boolean isNotNullLabel()
Checks whether the 'label' field is set and is not null
-
isNotNullOpensCashDrawer
public boolean isNotNullOpensCashDrawer()
Checks whether the 'opensCashDrawer' field is set and is not null
-
isNotNullSupportsTipping
public boolean isNotNullSupportsTipping()
Checks whether the 'supportsTipping' field is set and is not null
-
isNotNullEnabled
public boolean isNotNullEnabled()
Checks whether the 'enabled' field is set and is not null
-
isNotNullVisible
public boolean isNotNullVisible()
Checks whether the 'visible' field is set and is not null
-
isNotNullInstructions
public boolean isNotNullInstructions()
Checks whether the 'instructions' field is set and is not null
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasEditable
public boolean hasEditable()
Checks whether the 'editable' field has been set, however the value could be null
-
hasLabelKey
public boolean hasLabelKey()
Checks whether the 'labelKey' field has been set, however the value could be null
-
hasLabel
public boolean hasLabel()
Checks whether the 'label' field has been set, however the value could be null
-
hasOpensCashDrawer
public boolean hasOpensCashDrawer()
Checks whether the 'opensCashDrawer' field has been set, however the value could be null
-
hasSupportsTipping
public boolean hasSupportsTipping()
Checks whether the 'supportsTipping' field has been set, however the value could be null
-
hasEnabled
public boolean hasEnabled()
Checks whether the 'enabled' field has been set, however the value could be null
-
hasVisible
public boolean hasVisible()
Checks whether the 'visible' field has been set, however the value could be null
-
hasInstructions
public boolean hasInstructions()
Checks whether the 'instructions' field has been set, however the value could be null
-
setOpensCashDrawer
public Tender setOpensCashDrawer(Boolean opensCashDrawer)
Sets the field 'opensCashDrawer'.
-
setSupportsTipping
public Tender setSupportsTipping(Boolean supportsTipping)
Sets the field 'supportsTipping'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearEditable
public void clearEditable()
Clears the 'editable' field, the 'has' method for this field will now return false
-
clearLabelKey
public void clearLabelKey()
Clears the 'labelKey' field, the 'has' method for this field will now return false
-
clearLabel
public void clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
-
clearOpensCashDrawer
public void clearOpensCashDrawer()
Clears the 'opensCashDrawer' field, the 'has' method for this field will now return false
-
clearSupportsTipping
public void clearSupportsTipping()
Clears the 'supportsTipping' field, the 'has' method for this field will now return false
-
clearEnabled
public void clearEnabled()
Clears the 'enabled' field, the 'has' method for this field will now return false
-
clearVisible
public void clearVisible()
Clears the 'visible' field, the 'has' method for this field will now return false
-
clearInstructions
public void clearInstructions()
Clears the 'instructions' 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 Tender copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Tender src)
Copy all the changed fields from the given source to this instance.
-
-