Package com.clover.sdk.v3.report
Class ReportDiscountRow
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.report.ReportDiscountRow
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class ReportDiscountRow 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
ReportDiscountRow.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<ReportDiscountRow>
CREATOR
static JSONifiable.Creator<ReportDiscountRow>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description ReportDiscountRow()
Constructs a new empty instance.protected
ReportDiscountRow(boolean noInit)
Constructs a new empty instance.ReportDiscountRow(ReportDiscountRow src)
Constructs a new instance that is a deep copy of the source instance.ReportDiscountRow(String json)
Constructs a new instance from the given JSON String.ReportDiscountRow(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
clearApprovers()
Clears the 'approvers' field, the 'has' method for this field will now return falsevoid
clearLineItemDiscountCount()
Clears the 'lineItemDiscountCount' field, the 'has' method for this field will now return falsevoid
clearLineItemDiscountTotal()
Clears the 'lineItemDiscountTotal' field, the 'has' method for this field will now return falsevoid
clearOrder()
Clears the 'order' field, the 'has' method for this field will now return falsevoid
clearOrderDiscountCount()
Clears the 'orderDiscountCount' field, the 'has' method for this field will now return falsevoid
clearOrderDiscountTotal()
Clears the 'orderDiscountTotal' field, the 'has' method for this field will now return falsevoid
clearTotalDiscount()
Clears the 'totalDiscount' field, the 'has' method for this field will now return falsevoid
clearTotalDiscountCount()
Clears the 'totalDiscountCount' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.ReportDiscountRow
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<Reference>
getApprovers()
Reference to the employees who approved the discounts on this orderprotected GenericClient
getGenericClient()
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
getLineItemDiscountCount()
Total number of discounts on the order's line itemsLong
getLineItemDiscountTotal()
Total value of discounts on the order's line itemsReference
getOrder()
Reference to the order for this rowLong
getOrderDiscountCount()
Total number of discounts on orderLong
getOrderDiscountTotal()
Total value of discounts on orderLong
getTotalDiscount()
Total value of all line item and order discountsLong
getTotalDiscountCount()
Total count of all line item and order discountsboolean
hasApprovers()
Checks whether the 'approvers' field has been set, however the value could be nullboolean
hasLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field has been set, however the value could be nullboolean
hasLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' field has been set, however the value could be nullboolean
hasOrder()
Checks whether the 'order' field has been set, however the value could be nullboolean
hasOrderDiscountCount()
Checks whether the 'orderDiscountCount' field has been set, however the value could be nullboolean
hasOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field has been set, however the value could be nullboolean
hasTotalDiscount()
Checks whether the 'totalDiscount' field has been set, however the value could be nullboolean
hasTotalDiscountCount()
Checks whether the 'totalDiscountCount' field has been set, however the value could be nullboolean
isNotEmptyApprovers()
Checks whether the 'approvers' field is set and is not null and is not emptyboolean
isNotNullApprovers()
Checks whether the 'approvers' field is set and is not nullboolean
isNotNullLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field is set and is not nullboolean
isNotNullLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' field is set and is not nullboolean
isNotNullOrder()
Checks whether the 'order' field is set and is not nullboolean
isNotNullOrderDiscountCount()
Checks whether the 'orderDiscountCount' field is set and is not nullboolean
isNotNullOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field is set and is not nullboolean
isNotNullTotalDiscount()
Checks whether the 'totalDiscount' field is set and is not nullboolean
isNotNullTotalDiscountCount()
Checks whether the 'totalDiscountCount' field is set and is not nullvoid
mergeChanges(ReportDiscountRow 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.ReportDiscountRow
setApprovers(List<Reference> approvers)
Sets the field 'approvers'.ReportDiscountRow
setLineItemDiscountCount(Long lineItemDiscountCount)
Sets the field 'lineItemDiscountCount'.ReportDiscountRow
setLineItemDiscountTotal(Long lineItemDiscountTotal)
Sets the field 'lineItemDiscountTotal'.ReportDiscountRow
setOrder(Reference order)
Sets the field 'order'.ReportDiscountRow
setOrderDiscountCount(Long orderDiscountCount)
Sets the field 'orderDiscountCount'.ReportDiscountRow
setOrderDiscountTotal(Long orderDiscountTotal)
Sets the field 'orderDiscountTotal'.ReportDiscountRow
setTotalDiscount(Long totalDiscount)
Sets the field 'totalDiscount'.ReportDiscountRow
setTotalDiscountCount(Long totalDiscountCount)
Sets the field 'totalDiscountCount'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<ReportDiscountRow> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<ReportDiscountRow> JSON_CREATOR
-
-
Constructor Detail
-
ReportDiscountRow
public ReportDiscountRow()
Constructs a new empty instance.
-
ReportDiscountRow
protected ReportDiscountRow(boolean noInit)
Constructs a new empty instance.
-
ReportDiscountRow
public ReportDiscountRow(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
ReportDiscountRow
public ReportDiscountRow(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.
-
ReportDiscountRow
public ReportDiscountRow(ReportDiscountRow src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getOrder
public Reference getOrder()
Reference to the order for this row
-
getApprovers
public List<Reference> getApprovers()
Reference to the employees who approved the discounts on this order
-
getOrderDiscountTotal
public Long getOrderDiscountTotal()
Total value of discounts on order
-
getOrderDiscountCount
public Long getOrderDiscountCount()
Total number of discounts on order
-
getLineItemDiscountTotal
public Long getLineItemDiscountTotal()
Total value of discounts on the order's line items
-
getLineItemDiscountCount
public Long getLineItemDiscountCount()
Total number of discounts on the order's line items
-
getTotalDiscount
public Long getTotalDiscount()
Total value of all line item and order discounts
-
getTotalDiscountCount
public Long getTotalDiscountCount()
Total count of all line item and order discounts
-
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
-
isNotNullOrder
public boolean isNotNullOrder()
Checks whether the 'order' field is set and is not null
-
isNotNullApprovers
public boolean isNotNullApprovers()
Checks whether the 'approvers' field is set and is not null
-
isNotEmptyApprovers
public boolean isNotEmptyApprovers()
Checks whether the 'approvers' field is set and is not null and is not empty
-
isNotNullOrderDiscountTotal
public boolean isNotNullOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field is set and is not null
-
isNotNullOrderDiscountCount
public boolean isNotNullOrderDiscountCount()
Checks whether the 'orderDiscountCount' field is set and is not null
-
isNotNullLineItemDiscountTotal
public boolean isNotNullLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' field is set and is not null
-
isNotNullLineItemDiscountCount
public boolean isNotNullLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field is set and is not null
-
isNotNullTotalDiscount
public boolean isNotNullTotalDiscount()
Checks whether the 'totalDiscount' field is set and is not null
-
isNotNullTotalDiscountCount
public boolean isNotNullTotalDiscountCount()
Checks whether the 'totalDiscountCount' field is set and is not null
-
hasOrder
public boolean hasOrder()
Checks whether the 'order' field has been set, however the value could be null
-
hasApprovers
public boolean hasApprovers()
Checks whether the 'approvers' field has been set, however the value could be null
-
hasOrderDiscountTotal
public boolean hasOrderDiscountTotal()
Checks whether the 'orderDiscountTotal' field has been set, however the value could be null
-
hasOrderDiscountCount
public boolean hasOrderDiscountCount()
Checks whether the 'orderDiscountCount' field has been set, however the value could be null
-
hasLineItemDiscountTotal
public boolean hasLineItemDiscountTotal()
Checks whether the 'lineItemDiscountTotal' field has been set, however the value could be null
-
hasLineItemDiscountCount
public boolean hasLineItemDiscountCount()
Checks whether the 'lineItemDiscountCount' field has been set, however the value could be null
-
hasTotalDiscount
public boolean hasTotalDiscount()
Checks whether the 'totalDiscount' field has been set, however the value could be null
-
hasTotalDiscountCount
public boolean hasTotalDiscountCount()
Checks whether the 'totalDiscountCount' field has been set, however the value could be null
-
setOrder
public ReportDiscountRow setOrder(Reference order)
Sets the field 'order'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setApprovers
public ReportDiscountRow setApprovers(List<Reference> approvers)
Sets the field 'approvers'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setOrderDiscountTotal
public ReportDiscountRow setOrderDiscountTotal(Long orderDiscountTotal)
Sets the field 'orderDiscountTotal'.
-
setOrderDiscountCount
public ReportDiscountRow setOrderDiscountCount(Long orderDiscountCount)
Sets the field 'orderDiscountCount'.
-
setLineItemDiscountTotal
public ReportDiscountRow setLineItemDiscountTotal(Long lineItemDiscountTotal)
Sets the field 'lineItemDiscountTotal'.
-
setLineItemDiscountCount
public ReportDiscountRow setLineItemDiscountCount(Long lineItemDiscountCount)
Sets the field 'lineItemDiscountCount'.
-
setTotalDiscount
public ReportDiscountRow setTotalDiscount(Long totalDiscount)
Sets the field 'totalDiscount'.
-
setTotalDiscountCount
public ReportDiscountRow setTotalDiscountCount(Long totalDiscountCount)
Sets the field 'totalDiscountCount'.
-
clearOrder
public void clearOrder()
Clears the 'order' field, the 'has' method for this field will now return false
-
clearApprovers
public void clearApprovers()
Clears the 'approvers' field, the 'has' method for this field will now return false
-
clearOrderDiscountTotal
public void clearOrderDiscountTotal()
Clears the 'orderDiscountTotal' field, the 'has' method for this field will now return false
-
clearOrderDiscountCount
public void clearOrderDiscountCount()
Clears the 'orderDiscountCount' field, the 'has' method for this field will now return false
-
clearLineItemDiscountTotal
public void clearLineItemDiscountTotal()
Clears the 'lineItemDiscountTotal' field, the 'has' method for this field will now return false
-
clearLineItemDiscountCount
public void clearLineItemDiscountCount()
Clears the 'lineItemDiscountCount' field, the 'has' method for this field will now return false
-
clearTotalDiscount
public void clearTotalDiscount()
Clears the 'totalDiscount' field, the 'has' method for this field will now return false
-
clearTotalDiscountCount
public void clearTotalDiscountCount()
Clears the 'totalDiscountCount' 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 ReportDiscountRow copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(ReportDiscountRow src)
Copy all the changed fields from the given source to this instance.
-
-