Package com.clover.sdk.v3.order
Class Modification
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.Modification
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Modification extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Snapshot of a line item modifier at the time that the order was placed.
Fields
- See Also:
IOrderService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Modification.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<Modification>
CREATOR
static JSONifiable.Creator<Modification>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Modification()
Constructs a new empty instance.protected
Modification(boolean noInit)
Constructs a new empty instance.Modification(Modification src)
Constructs a new instance that is a deep copy of the source instance.Modification(String json)
Constructs a new instance from the given JSON String.Modification(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
clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return falsevoid
clearAmount()
Clears the 'amount' 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
clearModifier()
Clears the 'modifier' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearQuantitySold()
Clears the 'quantitySold' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Modification
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getAlternateName()
Long
getAmount()
the additional cost of the modifier when it was appliedprotected GenericClient
getGenericClient()
String
getId()
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.Modifier
getModifier()
The modifier object.String
getName()
the name of the modifier when it was appliedLong
getQuantitySold()
This is only used in reports.boolean
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be nullboolean
hasAmount()
Checks whether the 'amount' 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
hasModifier()
Checks whether the 'modifier' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasQuantitySold()
Checks whether the 'quantitySold' field has been set, however the value could be nullboolean
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullModifier()
Checks whether the 'modifier' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullQuantitySold()
Checks whether the 'quantitySold' field is set and is not nullvoid
mergeChanges(Modification 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.Modification
setAlternateName(String alternateName)
Sets the field 'alternateName'.Modification
setAmount(Long amount)
Sets the field 'amount'.Modification
setId(String id)
Sets the field 'id'.Modification
setModifier(Modifier modifier)
Sets the field 'modifier'.Modification
setName(String name)
Sets the field 'name'.Modification
setQuantitySold(Long quantitySold)
Sets the field 'quantitySold'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Modification> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Modification> JSON_CREATOR
-
-
Constructor Detail
-
Modification
public Modification()
Constructs a new empty instance.
-
Modification
protected Modification(boolean noInit)
Constructs a new empty instance.
-
Modification
public Modification(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Modification
public Modification(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.
-
Modification
public Modification(Modification 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()
-
getName
public String getName()
the name of the modifier when it was applied
-
getAlternateName
public String getAlternateName()
-
getAmount
public Long getAmount()
the additional cost of the modifier when it was applied
-
getModifier
public Modifier getModifier()
The modifier object. Values from the Modifier are copied to the Modification at the time that the order is placed. Modifier values may change after the modification is created.
-
getQuantitySold
public Long getQuantitySold()
This is only used in reports. The count of how many of these modifiers that were sold.
-
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
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullAlternateName
public boolean isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullModifier
public boolean isNotNullModifier()
Checks whether the 'modifier' field is set and is not null
-
isNotNullQuantitySold
public boolean isNotNullQuantitySold()
Checks whether the 'quantitySold' 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
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasAlternateName
public boolean hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be null
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasModifier
public boolean hasModifier()
Checks whether the 'modifier' field has been set, however the value could be null
-
hasQuantitySold
public boolean hasQuantitySold()
Checks whether the 'quantitySold' field has been set, however the value could be null
-
setId
public Modification setId(String id)
Sets the field 'id'.
-
setName
public Modification setName(String name)
Sets the field 'name'.
-
setAlternateName
public Modification setAlternateName(String alternateName)
Sets the field 'alternateName'.
-
setAmount
public Modification setAmount(Long amount)
Sets the field 'amount'.
-
setModifier
public Modification setModifier(Modifier modifier)
Sets the field 'modifier'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setQuantitySold
public Modification setQuantitySold(Long quantitySold)
Sets the field 'quantitySold'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearAlternateName
public void clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return false
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearModifier
public void clearModifier()
Clears the 'modifier' field, the 'has' method for this field will now return false
-
clearQuantitySold
public void clearQuantitySold()
Clears the 'quantitySold' 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 Modification copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Modification src)
Copy all the changed fields from the given source to this instance.
-
-