Package com.clover.sdk.v3.report
Class Summary
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.report.Summary
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Summary 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
Summary.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<Summary>
CREATOR
static JSONifiable.Creator<Summary>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Summary()
Constructs a new empty instance.protected
Summary(boolean noInit)
Constructs a new empty instance.Summary(Summary src)
Constructs a new instance that is a deep copy of the source instance.Summary(String json)
Constructs a new instance from the given JSON String.Summary(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
clearAmountWithoutTips()
Clears the 'amountWithoutTips' field, the 'has' method for this field will now return falsevoid
clearEndTimestamp()
Clears the 'endTimestamp' 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
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearNetQuantity()
Clears the 'netQuantity' field, the 'has' method for this field will now return falsevoid
clearNum()
Clears the 'num' field, the 'has' method for this field will now return falsevoid
clearSegmentLabel()
Clears the 'segmentLabel' field, the 'has' method for this field will now return falsevoid
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return falsevoid
clearStartTimestamp()
Clears the 'startTimestamp' field, the 'has' method for this field will now return falsevoid
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return falsevoid
clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Summary
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
The amount paid or refunded.Long
getAmountWithoutTips()
The amount paid or refunded.Long
getEndTimestamp()
End of the time period for this summaryprotected 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.String
getName()
Optional name field relevant in some scenarios, for example while storing name of line item for top 5 items soldDouble
getNetQuantity()
Optional field, total quantity of items soldLong
getNum()
Integer
getSegmentLabel()
An identifier that may be used to align report segments across different merchants.Long
getServiceChargeAmount()
Long
getStartTimestamp()
Beginning of the time period for this summaryLong
getTaxAmount()
Long
getTipAmount()
boolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasAmountWithoutTips()
Checks whether the 'amountWithoutTips' field has been set, however the value could be nullboolean
hasEndTimestamp()
Checks whether the 'endTimestamp' 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
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasNetQuantity()
Checks whether the 'netQuantity' field has been set, however the value could be nullboolean
hasNum()
Checks whether the 'num' field has been set, however the value could be nullboolean
hasSegmentLabel()
Checks whether the 'segmentLabel' field has been set, however the value could be nullboolean
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be nullboolean
hasStartTimestamp()
Checks whether the 'startTimestamp' field has been set, however the value could be nullboolean
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be nullboolean
hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullAmountWithoutTips()
Checks whether the 'amountWithoutTips' field is set and is not nullboolean
isNotNullEndTimestamp()
Checks whether the 'endTimestamp' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullNetQuantity()
Checks whether the 'netQuantity' field is set and is not nullboolean
isNotNullNum()
Checks whether the 'num' field is set and is not nullboolean
isNotNullSegmentLabel()
Checks whether the 'segmentLabel' field is set and is not nullboolean
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not nullboolean
isNotNullStartTimestamp()
Checks whether the 'startTimestamp' field is set and is not nullboolean
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not nullboolean
isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not nullvoid
mergeChanges(Summary 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.Summary
setAmount(Long amount)
Sets the field 'amount'.Summary
setAmountWithoutTips(Long amountWithoutTips)
Sets the field 'amountWithoutTips'.Summary
setEndTimestamp(Long endTimestamp)
Sets the field 'endTimestamp'.Summary
setId(String id)
Sets the field 'id'.Summary
setName(String name)
Sets the field 'name'.Summary
setNetQuantity(Double netQuantity)
Sets the field 'netQuantity'.Summary
setNum(Long num)
Sets the field 'num'.Summary
setSegmentLabel(Integer segmentLabel)
Sets the field 'segmentLabel'.Summary
setServiceChargeAmount(Long serviceChargeAmount)
Sets the field 'serviceChargeAmount'.Summary
setStartTimestamp(Long startTimestamp)
Sets the field 'startTimestamp'.Summary
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.Summary
setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Summary> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Summary> JSON_CREATOR
-
-
Constructor Detail
-
Summary
public Summary()
Constructs a new empty instance.
-
Summary
protected Summary(boolean noInit)
Constructs a new empty instance.
-
Summary
public Summary(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Summary
public Summary(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.
-
Summary
public Summary(Summary 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()
-
getNum
public Long getNum()
-
getSegmentLabel
public Integer getSegmentLabel()
An identifier that may be used to align report segments across different merchants.
-
getName
public String getName()
Optional name field relevant in some scenarios, for example while storing name of line item for top 5 items sold
-
getAmount
public Long getAmount()
The amount paid or refunded. This includes tax, discounts and service charge. This is not supposed to include tip, though there are times when refunds mistakenly include tips. A new field amountWithoutTips has been added for those incorrect endpoints.
-
getTipAmount
public Long getTipAmount()
-
getTaxAmount
public Long getTaxAmount()
-
getServiceChargeAmount
public Long getServiceChargeAmount()
-
getStartTimestamp
public Long getStartTimestamp()
Beginning of the time period for this summary
-
getEndTimestamp
public Long getEndTimestamp()
End of the time period for this summary
-
getAmountWithoutTips
public Long getAmountWithoutTips()
The amount paid or refunded. This includes tax, discounts and service charge. This does not include tip.
-
getNetQuantity
public Double getNetQuantity()
Optional field, total quantity of items 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
-
isNotNullNum
public boolean isNotNullNum()
Checks whether the 'num' field is set and is not null
-
isNotNullSegmentLabel
public boolean isNotNullSegmentLabel()
Checks whether the 'segmentLabel' 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
-
isNotNullTipAmount
public boolean isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not null
-
isNotNullTaxAmount
public boolean isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
-
isNotNullServiceChargeAmount
public boolean isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
-
isNotNullStartTimestamp
public boolean isNotNullStartTimestamp()
Checks whether the 'startTimestamp' field is set and is not null
-
isNotNullEndTimestamp
public boolean isNotNullEndTimestamp()
Checks whether the 'endTimestamp' field is set and is not null
-
isNotNullAmountWithoutTips
public boolean isNotNullAmountWithoutTips()
Checks whether the 'amountWithoutTips' field is set and is not null
-
isNotNullNetQuantity
public boolean isNotNullNetQuantity()
Checks whether the 'netQuantity' 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
-
hasNum
public boolean hasNum()
Checks whether the 'num' field has been set, however the value could be null
-
hasSegmentLabel
public boolean hasSegmentLabel()
Checks whether the 'segmentLabel' 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
-
hasTipAmount
public boolean hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be null
-
hasTaxAmount
public boolean hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
-
hasServiceChargeAmount
public boolean hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
-
hasStartTimestamp
public boolean hasStartTimestamp()
Checks whether the 'startTimestamp' field has been set, however the value could be null
-
hasEndTimestamp
public boolean hasEndTimestamp()
Checks whether the 'endTimestamp' field has been set, however the value could be null
-
hasAmountWithoutTips
public boolean hasAmountWithoutTips()
Checks whether the 'amountWithoutTips' field has been set, however the value could be null
-
hasNetQuantity
public boolean hasNetQuantity()
Checks whether the 'netQuantity' field has been set, however the value could be null
-
setSegmentLabel
public Summary setSegmentLabel(Integer segmentLabel)
Sets the field 'segmentLabel'.
-
setServiceChargeAmount
public Summary setServiceChargeAmount(Long serviceChargeAmount)
Sets the field 'serviceChargeAmount'.
-
setStartTimestamp
public Summary setStartTimestamp(Long startTimestamp)
Sets the field 'startTimestamp'.
-
setAmountWithoutTips
public Summary setAmountWithoutTips(Long amountWithoutTips)
Sets the field 'amountWithoutTips'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearNum
public void clearNum()
Clears the 'num' field, the 'has' method for this field will now return false
-
clearSegmentLabel
public void clearSegmentLabel()
Clears the 'segmentLabel' 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
-
clearTipAmount
public void clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return false
-
clearTaxAmount
public void clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
-
clearServiceChargeAmount
public void clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
-
clearStartTimestamp
public void clearStartTimestamp()
Clears the 'startTimestamp' field, the 'has' method for this field will now return false
-
clearEndTimestamp
public void clearEndTimestamp()
Clears the 'endTimestamp' field, the 'has' method for this field will now return false
-
clearAmountWithoutTips
public void clearAmountWithoutTips()
Clears the 'amountWithoutTips' field, the 'has' method for this field will now return false
-
clearNetQuantity
public void clearNetQuantity()
Clears the 'netQuantity' 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 Summary copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Summary src)
Copy all the changed fields from the given source to this instance.
-
-