Package com.clover.sdk.v3.inventory
Class OrderFee
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.inventory.OrderFee
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class OrderFee 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
OrderFee.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<OrderFee>
CREATOR
static JSONifiable.Creator<OrderFee>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description OrderFee()
Constructs a new empty instance.protected
OrderFee(boolean noInit)
Constructs a new empty instance.OrderFee(OrderFee src)
Constructs a new instance that is a deep copy of the source instance.OrderFee(String json)
Constructs a new instance from the given JSON String.OrderFee(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
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return falsevoid
clearDeletedTime()
Clears the 'deletedTime' 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
clearIsDefault()
Clears the 'isDefault' field, the 'has' method for this field will now return falsevoid
clearIsHidden()
Clears the 'isHidden' field, the 'has' method for this field will now return falsevoid
clearModifiedTime()
Clears the 'modifiedTime' 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
clearPercentage()
Clears the 'percentage' field, the 'has' method for this field will now return falsevoid
clearReadOnly()
Clears the 'readOnly' field, the 'has' method for this field will now return falsevoid
clearServiceChargeUuid()
Clears the 'serviceChargeUuid' field, the 'has' method for this field will now return falsevoid
clearTaxRates()
Clears the 'taxRates' field, the 'has' method for this field will now return falsevoid
clearType()
Clears the 'type' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.OrderFee
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
For a flat order fee, expressed as number of centsLong
getCreatedTime()
Timestamp when the order fee was createdLong
getDeletedTime()
Timestamp when order fee was last deletedprotected GenericClient
getGenericClient()
String
getId()
Boolean
getIsDefault()
Boolean
getIsHidden()
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
getModifiedTime()
Timestamp when the order fee was last modifiedString
getName()
Long
getPercentage()
For percentage based order fee, percent to charge times 10000, e.g.Boolean
getReadOnly()
String
getServiceChargeUuid()
Original service charge uuidList<TaxRate>
getTaxRates()
A reference to an associated tax rate applied to the order feeString
getType()
Used to define type of order fee, e.g.boolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be nullboolean
hasDeletedTime()
Checks whether the 'deletedTime' 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
hasIsDefault()
Checks whether the 'isDefault' field has been set, however the value could be nullboolean
hasIsHidden()
Checks whether the 'isHidden' field has been set, however the value could be nullboolean
hasModifiedTime()
Checks whether the 'modifiedTime' 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
hasPercentage()
Checks whether the 'percentage' field has been set, however the value could be nullboolean
hasReadOnly()
Checks whether the 'readOnly' field has been set, however the value could be nullboolean
hasServiceChargeUuid()
Checks whether the 'serviceChargeUuid' field has been set, however the value could be nullboolean
hasTaxRates()
Checks whether the 'taxRates' field has been set, however the value could be nullboolean
hasType()
Checks whether the 'type' field has been set, however the value could be nullboolean
isNotEmptyTaxRates()
Checks whether the 'taxRates' field is set and is not null and is not emptyboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIsDefault()
Checks whether the 'isDefault' field is set and is not nullboolean
isNotNullIsHidden()
Checks whether the 'isHidden' field is set and is not nullboolean
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullPercentage()
Checks whether the 'percentage' field is set and is not nullboolean
isNotNullReadOnly()
Checks whether the 'readOnly' field is set and is not nullboolean
isNotNullServiceChargeUuid()
Checks whether the 'serviceChargeUuid' field is set and is not nullboolean
isNotNullTaxRates()
Checks whether the 'taxRates' field is set and is not nullboolean
isNotNullType()
Checks whether the 'type' field is set and is not nullvoid
mergeChanges(OrderFee 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.OrderFee
setAmount(Long amount)
Sets the field 'amount'.OrderFee
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.OrderFee
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.OrderFee
setId(String id)
Sets the field 'id'.OrderFee
setIsDefault(Boolean isDefault)
Sets the field 'isDefault'.OrderFee
setIsHidden(Boolean isHidden)
Sets the field 'isHidden'.OrderFee
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.OrderFee
setName(String name)
Sets the field 'name'.OrderFee
setPercentage(Long percentage)
Sets the field 'percentage'.OrderFee
setReadOnly(Boolean readOnly)
Sets the field 'readOnly'.OrderFee
setServiceChargeUuid(String serviceChargeUuid)
Sets the field 'serviceChargeUuid'.OrderFee
setTaxRates(List<TaxRate> taxRates)
Sets the field 'taxRates'.OrderFee
setType(String type)
Sets the field 'type'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<OrderFee> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<OrderFee> JSON_CREATOR
-
-
Constructor Detail
-
OrderFee
public OrderFee()
Constructs a new empty instance.
-
OrderFee
protected OrderFee(boolean noInit)
Constructs a new empty instance.
-
OrderFee
public OrderFee(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
OrderFee
public OrderFee(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.
-
OrderFee
public OrderFee(OrderFee 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()
-
getAmount
public Long getAmount()
For a flat order fee, expressed as number of cents
-
getPercentage
public Long getPercentage()
For percentage based order fee, percent to charge times 10000, e.g. 12.5% will be 125000
-
getIsDefault
public Boolean getIsDefault()
-
getIsHidden
public Boolean getIsHidden()
-
getReadOnly
public Boolean getReadOnly()
-
getTaxRates
public List<TaxRate> getTaxRates()
A reference to an associated tax rate applied to the order fee
-
getCreatedTime
public Long getCreatedTime()
Timestamp when the order fee was created
-
getModifiedTime
public Long getModifiedTime()
Timestamp when the order fee was last modified
-
getDeletedTime
public Long getDeletedTime()
Timestamp when order fee was last deleted
-
getType
public String getType()
Used to define type of order fee, e.g. gratuity
-
getServiceChargeUuid
public String getServiceChargeUuid()
Original service charge uuid
-
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
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullPercentage
public boolean isNotNullPercentage()
Checks whether the 'percentage' field is set and is not null
-
isNotNullIsDefault
public boolean isNotNullIsDefault()
Checks whether the 'isDefault' field is set and is not null
-
isNotNullIsHidden
public boolean isNotNullIsHidden()
Checks whether the 'isHidden' field is set and is not null
-
isNotNullReadOnly
public boolean isNotNullReadOnly()
Checks whether the 'readOnly' field is set and is not null
-
isNotNullTaxRates
public boolean isNotNullTaxRates()
Checks whether the 'taxRates' field is set and is not null
-
isNotEmptyTaxRates
public boolean isNotEmptyTaxRates()
Checks whether the 'taxRates' field is set and is not null and is not empty
-
isNotNullCreatedTime
public boolean isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
-
isNotNullModifiedTime
public boolean isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
-
isNotNullDeletedTime
public boolean isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
-
isNotNullType
public boolean isNotNullType()
Checks whether the 'type' field is set and is not null
-
isNotNullServiceChargeUuid
public boolean isNotNullServiceChargeUuid()
Checks whether the 'serviceChargeUuid' 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
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasPercentage
public boolean hasPercentage()
Checks whether the 'percentage' field has been set, however the value could be null
-
hasIsDefault
public boolean hasIsDefault()
Checks whether the 'isDefault' field has been set, however the value could be null
-
hasIsHidden
public boolean hasIsHidden()
Checks whether the 'isHidden' field has been set, however the value could be null
-
hasReadOnly
public boolean hasReadOnly()
Checks whether the 'readOnly' field has been set, however the value could be null
-
hasTaxRates
public boolean hasTaxRates()
Checks whether the 'taxRates' field has been set, however the value could be null
-
hasCreatedTime
public boolean hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
-
hasModifiedTime
public boolean hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
-
hasDeletedTime
public boolean hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
-
hasType
public boolean hasType()
Checks whether the 'type' field has been set, however the value could be null
-
hasServiceChargeUuid
public boolean hasServiceChargeUuid()
Checks whether the 'serviceChargeUuid' field has been set, however the value could be null
-
setTaxRates
public OrderFee setTaxRates(List<TaxRate> taxRates)
Sets the field 'taxRates'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setServiceChargeUuid
public OrderFee setServiceChargeUuid(String serviceChargeUuid)
Sets the field 'serviceChargeUuid'.
-
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
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearPercentage
public void clearPercentage()
Clears the 'percentage' field, the 'has' method for this field will now return false
-
clearIsDefault
public void clearIsDefault()
Clears the 'isDefault' field, the 'has' method for this field will now return false
-
clearIsHidden
public void clearIsHidden()
Clears the 'isHidden' field, the 'has' method for this field will now return false
-
clearReadOnly
public void clearReadOnly()
Clears the 'readOnly' field, the 'has' method for this field will now return false
-
clearTaxRates
public void clearTaxRates()
Clears the 'taxRates' field, the 'has' method for this field will now return false
-
clearCreatedTime
public void clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
-
clearModifiedTime
public void clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
-
clearDeletedTime
public void clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return false
-
clearType
public void clearType()
Clears the 'type' field, the 'has' method for this field will now return false
-
clearServiceChargeUuid
public void clearServiceChargeUuid()
Clears the 'serviceChargeUuid' 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 OrderFee copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(OrderFee src)
Copy all the changed fields from the given source to this instance.
-
-