Package com.clover.sdk.v3.order
Class OrderType
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.OrderType
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class OrderType extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
- See Also:
IOrderService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
OrderType.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 String
AUTHORITY
static Parcelable.Creator<OrderType>
CREATOR
static JSONifiable.Creator<OrderType>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description OrderType()
Constructs a new empty instance.protected
OrderType(boolean noInit)
Constructs a new empty instance.OrderType(OrderType src)
Constructs a new instance that is a deep copy of the source instance.OrderType(String json)
Constructs a new instance from the given JSON String.OrderType(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
clearAvgOrderTime()
Clears the 'avgOrderTime' field, the 'has' method for this field will now return falsevoid
clearCategories()
Clears the 'categories' field, the 'has' method for this field will now return falsevoid
clearCustomerIdMethod()
Clears the 'customerIdMethod' field, the 'has' method for this field will now return falsevoid
clearFee()
Clears the 'fee' field, the 'has' method for this field will now return falsevoid
clearFilterCategories()
Clears the 'filterCategories' field, the 'has' method for this field will now return falsevoid
clearHours()
Clears the 'hours' field, the 'has' method for this field will now return falsevoid
clearHoursAvailable()
Clears the 'hoursAvailable' 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
clearIsDeleted()
Clears the 'isDeleted' 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
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
clearMaxOrderAmount()
Clears the 'maxOrderAmount' field, the 'has' method for this field will now return falsevoid
clearMaxRadius()
Clears the 'maxRadius' field, the 'has' method for this field will now return falsevoid
clearMinOrderAmount()
Clears the 'minOrderAmount' field, the 'has' method for this field will now return falsevoid
clearSystemOrderTypeId()
Clears the 'systemOrderTypeId' field, the 'has' method for this field will now return falsevoid
clearTaxable()
Clears the 'taxable' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.OrderType
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAvgOrderTime()
The average time it takes to complete the orderList<Reference>
getCategories()
The categories of items that can be assigned to this order typeCustomerIdMethod
getCustomerIdMethod()
Long
getFee()
The price of a fee added to this order type, not fully implemented at this time.Boolean
getFilterCategories()
If set to false, then this order type includes all of the merchant's categories.protected GenericClient
getGenericClient()
HoursSet
getHours()
The hours this order type is available (if they differ from normal merchant hours)HoursAvailable
getHoursAvailable()
String
getId()
Unique identifierBoolean
getIsDefault()
If this order type is the defaultBoolean
getIsDeleted()
If this order type is deletedBoolean
getIsHidden()
If this order type is hidden on the registerJSONObject
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 KeyLong
getMaxOrderAmount()
The maximum amount for an order allowedLong
getMaxRadius()
The maximum radius allowed for an order (i.e.Long
getMinOrderAmount()
The minimum amount required for an order to be placedString
getSystemOrderTypeId()
Optional system order type that this order type is associated with.Boolean
getTaxable()
If this order type is taxableboolean
hasAvgOrderTime()
Checks whether the 'avgOrderTime' field has been set, however the value could be nullboolean
hasCategories()
Checks whether the 'categories' field has been set, however the value could be nullboolean
hasCustomerIdMethod()
Checks whether the 'customerIdMethod' field has been set, however the value could be nullboolean
hasFee()
Checks whether the 'fee' field has been set, however the value could be nullboolean
hasFilterCategories()
Checks whether the 'filterCategories' field has been set, however the value could be nullboolean
hasHours()
Checks whether the 'hours' field has been set, however the value could be nullboolean
hasHoursAvailable()
Checks whether the 'hoursAvailable' 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
hasIsDeleted()
Checks whether the 'isDeleted' 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
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
hasMaxOrderAmount()
Checks whether the 'maxOrderAmount' field has been set, however the value could be nullboolean
hasMaxRadius()
Checks whether the 'maxRadius' field has been set, however the value could be nullboolean
hasMinOrderAmount()
Checks whether the 'minOrderAmount' field has been set, however the value could be nullboolean
hasSystemOrderTypeId()
Checks whether the 'systemOrderTypeId' field has been set, however the value could be nullboolean
hasTaxable()
Checks whether the 'taxable' field has been set, however the value could be nullboolean
isNotEmptyCategories()
Checks whether the 'categories' field is set and is not null and is not emptyboolean
isNotNullAvgOrderTime()
Checks whether the 'avgOrderTime' field is set and is not nullboolean
isNotNullCategories()
Checks whether the 'categories' field is set and is not nullboolean
isNotNullCustomerIdMethod()
Checks whether the 'customerIdMethod' field is set and is not nullboolean
isNotNullFee()
Checks whether the 'fee' field is set and is not nullboolean
isNotNullFilterCategories()
Checks whether the 'filterCategories' field is set and is not nullboolean
isNotNullHours()
Checks whether the 'hours' field is set and is not nullboolean
isNotNullHoursAvailable()
Checks whether the 'hoursAvailable' 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
isNotNullIsDeleted()
Checks whether the 'isDeleted' field is set and is not nullboolean
isNotNullIsHidden()
Checks whether the 'isHidden' 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
isNotNullMaxOrderAmount()
Checks whether the 'maxOrderAmount' field is set and is not nullboolean
isNotNullMaxRadius()
Checks whether the 'maxRadius' field is set and is not nullboolean
isNotNullMinOrderAmount()
Checks whether the 'minOrderAmount' field is set and is not nullboolean
isNotNullSystemOrderTypeId()
Checks whether the 'systemOrderTypeId' field is set and is not nullboolean
isNotNullTaxable()
Checks whether the 'taxable' field is set and is not nullvoid
mergeChanges(OrderType 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.OrderType
setAvgOrderTime(Long avgOrderTime)
Sets the field 'avgOrderTime'.OrderType
setCategories(List<Reference> categories)
Sets the field 'categories'.OrderType
setCustomerIdMethod(CustomerIdMethod customerIdMethod)
Sets the field 'customerIdMethod'.OrderType
setFee(Long fee)
Sets the field 'fee'.OrderType
setFilterCategories(Boolean filterCategories)
Sets the field 'filterCategories'.OrderType
setHours(HoursSet hours)
Sets the field 'hours'.OrderType
setHoursAvailable(HoursAvailable hoursAvailable)
Sets the field 'hoursAvailable'.OrderType
setId(String id)
Sets the field 'id'.OrderType
setIsDefault(Boolean isDefault)
Sets the field 'isDefault'.OrderType
setIsDeleted(Boolean isDeleted)
Sets the field 'isDeleted'.OrderType
setIsHidden(Boolean isHidden)
Sets the field 'isHidden'.OrderType
setLabel(String label)
Sets the field 'label'.OrderType
setLabelKey(String labelKey)
Sets the field 'labelKey'.OrderType
setMaxOrderAmount(Long maxOrderAmount)
Sets the field 'maxOrderAmount'.OrderType
setMaxRadius(Long maxRadius)
Sets the field 'maxRadius'.OrderType
setMinOrderAmount(Long minOrderAmount)
Sets the field 'minOrderAmount'.OrderType
setSystemOrderTypeId(String systemOrderTypeId)
Sets the field 'systemOrderTypeId'.OrderType
setTaxable(Boolean taxable)
Sets the field 'taxable'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
AUTHORITY
public static final String AUTHORITY
- See Also:
- Constant Field Values
-
CREATOR
public static final Parcelable.Creator<OrderType> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<OrderType> JSON_CREATOR
-
-
Constructor Detail
-
OrderType
public OrderType()
Constructs a new empty instance.
-
OrderType
protected OrderType(boolean noInit)
Constructs a new empty instance.
-
OrderType
public OrderType(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
OrderType
public OrderType(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.
-
OrderType
public OrderType(OrderType 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
-
getLabelKey
public String getLabelKey()
Label Key
-
getLabel
public String getLabel()
Label Key
-
getTaxable
public Boolean getTaxable()
If this order type is taxable
-
getIsDefault
public Boolean getIsDefault()
If this order type is the default
-
getFilterCategories
public Boolean getFilterCategories()
If set to false, then this order type includes all of the merchant's categories. Otherwise, it only contains the categories defined in the "categories" field on this object.
-
getIsHidden
public Boolean getIsHidden()
If this order type is hidden on the register
-
getFee
public Long getFee()
The price of a fee added to this order type, not fully implemented at this time.
-
getMinOrderAmount
public Long getMinOrderAmount()
The minimum amount required for an order to be placed
-
getMaxOrderAmount
public Long getMaxOrderAmount()
The maximum amount for an order allowed
-
getMaxRadius
public Long getMaxRadius()
The maximum radius allowed for an order (i.e. delivery)
-
getAvgOrderTime
public Long getAvgOrderTime()
The average time it takes to complete the order
-
getHoursAvailable
public HoursAvailable getHoursAvailable()
-
getCustomerIdMethod
public CustomerIdMethod getCustomerIdMethod()
-
getIsDeleted
public Boolean getIsDeleted()
If this order type is deleted
-
getSystemOrderTypeId
public String getSystemOrderTypeId()
Optional system order type that this order type is associated with.
-
getHours
public HoursSet getHours()
The hours this order type is available (if they differ from normal merchant hours)
-
getCategories
public List<Reference> getCategories()
The categories of items that can be assigned to this order type
-
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
-
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
-
isNotNullTaxable
public boolean isNotNullTaxable()
Checks whether the 'taxable' field is set and is not null
-
isNotNullIsDefault
public boolean isNotNullIsDefault()
Checks whether the 'isDefault' field is set and is not null
-
isNotNullFilterCategories
public boolean isNotNullFilterCategories()
Checks whether the 'filterCategories' field is set and is not null
-
isNotNullIsHidden
public boolean isNotNullIsHidden()
Checks whether the 'isHidden' field is set and is not null
-
isNotNullFee
public boolean isNotNullFee()
Checks whether the 'fee' field is set and is not null
-
isNotNullMinOrderAmount
public boolean isNotNullMinOrderAmount()
Checks whether the 'minOrderAmount' field is set and is not null
-
isNotNullMaxOrderAmount
public boolean isNotNullMaxOrderAmount()
Checks whether the 'maxOrderAmount' field is set and is not null
-
isNotNullMaxRadius
public boolean isNotNullMaxRadius()
Checks whether the 'maxRadius' field is set and is not null
-
isNotNullAvgOrderTime
public boolean isNotNullAvgOrderTime()
Checks whether the 'avgOrderTime' field is set and is not null
-
isNotNullHoursAvailable
public boolean isNotNullHoursAvailable()
Checks whether the 'hoursAvailable' field is set and is not null
-
isNotNullCustomerIdMethod
public boolean isNotNullCustomerIdMethod()
Checks whether the 'customerIdMethod' field is set and is not null
-
isNotNullIsDeleted
public boolean isNotNullIsDeleted()
Checks whether the 'isDeleted' field is set and is not null
-
isNotNullSystemOrderTypeId
public boolean isNotNullSystemOrderTypeId()
Checks whether the 'systemOrderTypeId' field is set and is not null
-
isNotNullHours
public boolean isNotNullHours()
Checks whether the 'hours' field is set and is not null
-
isNotNullCategories
public boolean isNotNullCategories()
Checks whether the 'categories' field is set and is not null
-
isNotEmptyCategories
public boolean isNotEmptyCategories()
Checks whether the 'categories' field is set and is not null and is not empty
-
hasId
public boolean hasId()
Checks whether the 'id' 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
-
hasTaxable
public boolean hasTaxable()
Checks whether the 'taxable' 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
-
hasFilterCategories
public boolean hasFilterCategories()
Checks whether the 'filterCategories' 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
-
hasFee
public boolean hasFee()
Checks whether the 'fee' field has been set, however the value could be null
-
hasMinOrderAmount
public boolean hasMinOrderAmount()
Checks whether the 'minOrderAmount' field has been set, however the value could be null
-
hasMaxOrderAmount
public boolean hasMaxOrderAmount()
Checks whether the 'maxOrderAmount' field has been set, however the value could be null
-
hasMaxRadius
public boolean hasMaxRadius()
Checks whether the 'maxRadius' field has been set, however the value could be null
-
hasAvgOrderTime
public boolean hasAvgOrderTime()
Checks whether the 'avgOrderTime' field has been set, however the value could be null
-
hasHoursAvailable
public boolean hasHoursAvailable()
Checks whether the 'hoursAvailable' field has been set, however the value could be null
-
hasCustomerIdMethod
public boolean hasCustomerIdMethod()
Checks whether the 'customerIdMethod' field has been set, however the value could be null
-
hasIsDeleted
public boolean hasIsDeleted()
Checks whether the 'isDeleted' field has been set, however the value could be null
-
hasSystemOrderTypeId
public boolean hasSystemOrderTypeId()
Checks whether the 'systemOrderTypeId' field has been set, however the value could be null
-
hasHours
public boolean hasHours()
Checks whether the 'hours' field has been set, however the value could be null
-
hasCategories
public boolean hasCategories()
Checks whether the 'categories' field has been set, however the value could be null
-
setFilterCategories
public OrderType setFilterCategories(Boolean filterCategories)
Sets the field 'filterCategories'.
-
setMinOrderAmount
public OrderType setMinOrderAmount(Long minOrderAmount)
Sets the field 'minOrderAmount'.
-
setMaxOrderAmount
public OrderType setMaxOrderAmount(Long maxOrderAmount)
Sets the field 'maxOrderAmount'.
-
setHoursAvailable
public OrderType setHoursAvailable(HoursAvailable hoursAvailable)
Sets the field 'hoursAvailable'.
-
setCustomerIdMethod
public OrderType setCustomerIdMethod(CustomerIdMethod customerIdMethod)
Sets the field 'customerIdMethod'.
-
setSystemOrderTypeId
public OrderType setSystemOrderTypeId(String systemOrderTypeId)
Sets the field 'systemOrderTypeId'.
-
setHours
public OrderType setHours(HoursSet hours)
Sets the field 'hours'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setCategories
public OrderType setCategories(List<Reference> categories)
Sets the field 'categories'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearId
public void clearId()
Clears the 'id' 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
-
clearTaxable
public void clearTaxable()
Clears the 'taxable' 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
-
clearFilterCategories
public void clearFilterCategories()
Clears the 'filterCategories' 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
-
clearFee
public void clearFee()
Clears the 'fee' field, the 'has' method for this field will now return false
-
clearMinOrderAmount
public void clearMinOrderAmount()
Clears the 'minOrderAmount' field, the 'has' method for this field will now return false
-
clearMaxOrderAmount
public void clearMaxOrderAmount()
Clears the 'maxOrderAmount' field, the 'has' method for this field will now return false
-
clearMaxRadius
public void clearMaxRadius()
Clears the 'maxRadius' field, the 'has' method for this field will now return false
-
clearAvgOrderTime
public void clearAvgOrderTime()
Clears the 'avgOrderTime' field, the 'has' method for this field will now return false
-
clearHoursAvailable
public void clearHoursAvailable()
Clears the 'hoursAvailable' field, the 'has' method for this field will now return false
-
clearCustomerIdMethod
public void clearCustomerIdMethod()
Clears the 'customerIdMethod' field, the 'has' method for this field will now return false
-
clearIsDeleted
public void clearIsDeleted()
Clears the 'isDeleted' field, the 'has' method for this field will now return false
-
clearSystemOrderTypeId
public void clearSystemOrderTypeId()
Clears the 'systemOrderTypeId' field, the 'has' method for this field will now return false
-
clearHours
public void clearHours()
Clears the 'hours' field, the 'has' method for this field will now return false
-
clearCategories
public void clearCategories()
Clears the 'categories' 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 OrderType copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(OrderType src)
Copy all the changed fields from the given source to this instance.
-
-