Package com.clover.sdk.v3.happyhour
Class HappyHourDiscount
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.happyhour.HappyHourDiscount
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class HappyHourDiscount 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
HappyHourDiscount.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<HappyHourDiscount>
CREATOR
static JSONifiable.Creator<HappyHourDiscount>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description HappyHourDiscount()
Constructs a new empty instance.protected
HappyHourDiscount(boolean noInit)
Constructs a new empty instance.HappyHourDiscount(HappyHourDiscount src)
Constructs a new instance that is a deep copy of the source instance.HappyHourDiscount(String json)
Constructs a new instance from the given JSON String.HappyHourDiscount(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
clearBeginTimeHours()
Clears the 'beginTimeHours' field, the 'has' method for this field will now return falsevoid
clearBeginTimeMinutes()
Clears the 'beginTimeMinutes' field, the 'has' method for this field will now return falsevoid
clearCategoryIds()
Clears the 'categoryIds' field, the 'has' method for this field will now return falsevoid
clearDaysOfWeek()
Clears the 'daysOfWeek' field, the 'has' method for this field will now return falsevoid
clearEndTimeHours()
Clears the 'endTimeHours' field, the 'has' method for this field will now return falsevoid
clearEndTimeMinutes()
Clears the 'endTimeMinutes' 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
clearItemIds()
Clears the 'itemIds' 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 falseboolean
containsChanges()
Returns true if this instance has any changes.HappyHourDiscount
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
Discount amount in currency units(e.g.Integer
getBeginTimeHours()
Discount begin hours timeInteger
getBeginTimeMinutes()
Discount begin time minutesList<String>
getCategoryIds()
list of category ids associated with this discount.List<String>
getDaysOfWeek()
Days of week on which this discount is applicableInteger
getEndTimeHours()
Discount end hours timeInteger
getEndTimeMinutes()
Discount end time minutesprotected GenericClient
getGenericClient()
String
getId()
Unique identifierList<String>
getItemIds()
list of item ids associated with this discount.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
getName()
Name of the discountLong
getPercentage()
Discount amount in percentboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasBeginTimeHours()
Checks whether the 'beginTimeHours' field has been set, however the value could be nullboolean
hasBeginTimeMinutes()
Checks whether the 'beginTimeMinutes' field has been set, however the value could be nullboolean
hasCategoryIds()
Checks whether the 'categoryIds' field has been set, however the value could be nullboolean
hasDaysOfWeek()
Checks whether the 'daysOfWeek' field has been set, however the value could be nullboolean
hasEndTimeHours()
Checks whether the 'endTimeHours' field has been set, however the value could be nullboolean
hasEndTimeMinutes()
Checks whether the 'endTimeMinutes' 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
hasItemIds()
Checks whether the 'itemIds' 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
isNotEmptyCategoryIds()
Checks whether the 'categoryIds' field is set and is not null and is not emptyboolean
isNotEmptyDaysOfWeek()
Checks whether the 'daysOfWeek' field is set and is not null and is not emptyboolean
isNotEmptyItemIds()
Checks whether the 'itemIds' field is set and is not null and is not emptyboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullBeginTimeHours()
Checks whether the 'beginTimeHours' field is set and is not nullboolean
isNotNullBeginTimeMinutes()
Checks whether the 'beginTimeMinutes' field is set and is not nullboolean
isNotNullCategoryIds()
Checks whether the 'categoryIds' field is set and is not nullboolean
isNotNullDaysOfWeek()
Checks whether the 'daysOfWeek' field is set and is not nullboolean
isNotNullEndTimeHours()
Checks whether the 'endTimeHours' field is set and is not nullboolean
isNotNullEndTimeMinutes()
Checks whether the 'endTimeMinutes' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullItemIds()
Checks whether the 'itemIds' 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 nullvoid
mergeChanges(HappyHourDiscount 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.HappyHourDiscount
setAmount(Long amount)
Sets the field 'amount'.HappyHourDiscount
setBeginTimeHours(Integer beginTimeHours)
Sets the field 'beginTimeHours'.HappyHourDiscount
setBeginTimeMinutes(Integer beginTimeMinutes)
Sets the field 'beginTimeMinutes'.HappyHourDiscount
setCategoryIds(List<String> categoryIds)
Sets the field 'categoryIds'.HappyHourDiscount
setDaysOfWeek(List<String> daysOfWeek)
Sets the field 'daysOfWeek'.HappyHourDiscount
setEndTimeHours(Integer endTimeHours)
Sets the field 'endTimeHours'.HappyHourDiscount
setEndTimeMinutes(Integer endTimeMinutes)
Sets the field 'endTimeMinutes'.HappyHourDiscount
setId(String id)
Sets the field 'id'.HappyHourDiscount
setItemIds(List<String> itemIds)
Sets the field 'itemIds'.HappyHourDiscount
setName(String name)
Sets the field 'name'.HappyHourDiscount
setPercentage(Long percentage)
Sets the field 'percentage'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<HappyHourDiscount> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<HappyHourDiscount> JSON_CREATOR
-
-
Constructor Detail
-
HappyHourDiscount
public HappyHourDiscount()
Constructs a new empty instance.
-
HappyHourDiscount
protected HappyHourDiscount(boolean noInit)
Constructs a new empty instance.
-
HappyHourDiscount
public HappyHourDiscount(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
HappyHourDiscount
public HappyHourDiscount(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.
-
HappyHourDiscount
public HappyHourDiscount(HappyHourDiscount 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
-
getName
public String getName()
Name of the discount
-
getAmount
public Long getAmount()
Discount amount in currency units(e.g. cents)
-
getPercentage
public Long getPercentage()
Discount amount in percent
-
getBeginTimeHours
public Integer getBeginTimeHours()
Discount begin hours time
-
getEndTimeHours
public Integer getEndTimeHours()
Discount end hours time
-
getBeginTimeMinutes
public Integer getBeginTimeMinutes()
Discount begin time minutes
-
getEndTimeMinutes
public Integer getEndTimeMinutes()
Discount end time minutes
-
getCategoryIds
public List<String> getCategoryIds()
list of category ids associated with this discount.
-
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
-
isNotNullBeginTimeHours
public boolean isNotNullBeginTimeHours()
Checks whether the 'beginTimeHours' field is set and is not null
-
isNotNullEndTimeHours
public boolean isNotNullEndTimeHours()
Checks whether the 'endTimeHours' field is set and is not null
-
isNotNullBeginTimeMinutes
public boolean isNotNullBeginTimeMinutes()
Checks whether the 'beginTimeMinutes' field is set and is not null
-
isNotNullEndTimeMinutes
public boolean isNotNullEndTimeMinutes()
Checks whether the 'endTimeMinutes' field is set and is not null
-
isNotNullCategoryIds
public boolean isNotNullCategoryIds()
Checks whether the 'categoryIds' field is set and is not null
-
isNotEmptyCategoryIds
public boolean isNotEmptyCategoryIds()
Checks whether the 'categoryIds' field is set and is not null and is not empty
-
isNotNullItemIds
public boolean isNotNullItemIds()
Checks whether the 'itemIds' field is set and is not null
-
isNotEmptyItemIds
public boolean isNotEmptyItemIds()
Checks whether the 'itemIds' field is set and is not null and is not empty
-
isNotNullDaysOfWeek
public boolean isNotNullDaysOfWeek()
Checks whether the 'daysOfWeek' field is set and is not null
-
isNotEmptyDaysOfWeek
public boolean isNotEmptyDaysOfWeek()
Checks whether the 'daysOfWeek' 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
-
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
-
hasBeginTimeHours
public boolean hasBeginTimeHours()
Checks whether the 'beginTimeHours' field has been set, however the value could be null
-
hasEndTimeHours
public boolean hasEndTimeHours()
Checks whether the 'endTimeHours' field has been set, however the value could be null
-
hasBeginTimeMinutes
public boolean hasBeginTimeMinutes()
Checks whether the 'beginTimeMinutes' field has been set, however the value could be null
-
hasEndTimeMinutes
public boolean hasEndTimeMinutes()
Checks whether the 'endTimeMinutes' field has been set, however the value could be null
-
hasCategoryIds
public boolean hasCategoryIds()
Checks whether the 'categoryIds' field has been set, however the value could be null
-
hasItemIds
public boolean hasItemIds()
Checks whether the 'itemIds' field has been set, however the value could be null
-
hasDaysOfWeek
public boolean hasDaysOfWeek()
Checks whether the 'daysOfWeek' field has been set, however the value could be null
-
setId
public HappyHourDiscount setId(String id)
Sets the field 'id'.
-
setName
public HappyHourDiscount setName(String name)
Sets the field 'name'.
-
setAmount
public HappyHourDiscount setAmount(Long amount)
Sets the field 'amount'.
-
setPercentage
public HappyHourDiscount setPercentage(Long percentage)
Sets the field 'percentage'.
-
setBeginTimeHours
public HappyHourDiscount setBeginTimeHours(Integer beginTimeHours)
Sets the field 'beginTimeHours'.
-
setEndTimeHours
public HappyHourDiscount setEndTimeHours(Integer endTimeHours)
Sets the field 'endTimeHours'.
-
setBeginTimeMinutes
public HappyHourDiscount setBeginTimeMinutes(Integer beginTimeMinutes)
Sets the field 'beginTimeMinutes'.
-
setEndTimeMinutes
public HappyHourDiscount setEndTimeMinutes(Integer endTimeMinutes)
Sets the field 'endTimeMinutes'.
-
setCategoryIds
public HappyHourDiscount setCategoryIds(List<String> categoryIds)
Sets the field 'categoryIds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setItemIds
public HappyHourDiscount setItemIds(List<String> itemIds)
Sets the field 'itemIds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setDaysOfWeek
public HappyHourDiscount setDaysOfWeek(List<String> daysOfWeek)
Sets the field 'daysOfWeek'. 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
-
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
-
clearBeginTimeHours
public void clearBeginTimeHours()
Clears the 'beginTimeHours' field, the 'has' method for this field will now return false
-
clearEndTimeHours
public void clearEndTimeHours()
Clears the 'endTimeHours' field, the 'has' method for this field will now return false
-
clearBeginTimeMinutes
public void clearBeginTimeMinutes()
Clears the 'beginTimeMinutes' field, the 'has' method for this field will now return false
-
clearEndTimeMinutes
public void clearEndTimeMinutes()
Clears the 'endTimeMinutes' field, the 'has' method for this field will now return false
-
clearCategoryIds
public void clearCategoryIds()
Clears the 'categoryIds' field, the 'has' method for this field will now return false
-
clearItemIds
public void clearItemIds()
Clears the 'itemIds' field, the 'has' method for this field will now return false
-
clearDaysOfWeek
public void clearDaysOfWeek()
Clears the 'daysOfWeek' 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 HappyHourDiscount copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(HappyHourDiscount src)
Copy all the changed fields from the given source to this instance.
-
-