public class Summary extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Summary.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Summary> |
CREATOR |
static JSONifiable.Creator<Summary> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Summary()
Constructs a new empty instance.
|
protected |
Summary(boolean noInit)
Constructs a new empty instance.
|
|
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(String json)
Constructs a new instance from the given JSON String.
|
|
Summary(Summary src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
|
void |
clearAmountWithoutTips()
Clears the 'amountWithoutTips' field, the 'has' method for this field will now return false
|
void |
clearEndTimestamp()
Clears the 'endTimestamp' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearNetQuantity()
Clears the 'netQuantity' field, the 'has' method for this field will now return false
|
void |
clearNum()
Clears the 'num' field, the 'has' method for this field will now return false
|
void |
clearSegmentLabel()
Clears the 'segmentLabel' field, the 'has' method for this field will now return false
|
void |
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
|
void |
clearStartTimestamp()
Clears the 'startTimestamp' field, the 'has' method for this field will now return false
|
void |
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
|
void |
clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return false
|
boolean |
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 summary
|
protected 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 sold
|
Double |
getNetQuantity()
Optional field, total quantity of items sold
|
Long |
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 summary
|
Long |
getTaxAmount() |
Long |
getTipAmount() |
boolean |
hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
|
boolean |
hasAmountWithoutTips()
Checks whether the 'amountWithoutTips' field has been set, however the value could be null
|
boolean |
hasEndTimestamp()
Checks whether the 'endTimestamp' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasNetQuantity()
Checks whether the 'netQuantity' field has been set, however the value could be null
|
boolean |
hasNum()
Checks whether the 'num' field has been set, however the value could be null
|
boolean |
hasSegmentLabel()
Checks whether the 'segmentLabel' field has been set, however the value could be null
|
boolean |
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
|
boolean |
hasStartTimestamp()
Checks whether the 'startTimestamp' field has been set, however the value could be null
|
boolean |
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
|
boolean |
hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be null
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullAmountWithoutTips()
Checks whether the 'amountWithoutTips' field is set and is not null
|
boolean |
isNotNullEndTimestamp()
Checks whether the 'endTimestamp' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullNetQuantity()
Checks whether the 'netQuantity' field is set and is not null
|
boolean |
isNotNullNum()
Checks whether the 'num' field is set and is not null
|
boolean |
isNotNullSegmentLabel()
Checks whether the 'segmentLabel' field is set and is not null
|
boolean |
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
|
boolean |
isNotNullStartTimestamp()
Checks whether the 'startTimestamp' field is set and is not null
|
boolean |
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
|
boolean |
isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not null
|
void |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Summary> CREATOR
public static final JSONifiable.Creator<Summary> JSON_CREATOR
public Summary()
protected Summary(boolean noInit)
public Summary(String json) throws IllegalArgumentException
IllegalArgumentException
public Summary(JSONObject jsonObject)
public Summary(Summary src)
public String getId()
public Long getNum()
public Integer getSegmentLabel()
public String getName()
public Long getAmount()
public Long getTipAmount()
public Long getTaxAmount()
public Long getServiceChargeAmount()
public Long getStartTimestamp()
public Long getEndTimestamp()
public Long getAmountWithoutTips()
public Double getNetQuantity()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullNum()
public boolean isNotNullSegmentLabel()
public boolean isNotNullName()
public boolean isNotNullAmount()
public boolean isNotNullTipAmount()
public boolean isNotNullTaxAmount()
public boolean isNotNullServiceChargeAmount()
public boolean isNotNullStartTimestamp()
public boolean isNotNullEndTimestamp()
public boolean isNotNullAmountWithoutTips()
public boolean isNotNullNetQuantity()
public boolean hasId()
public boolean hasNum()
public boolean hasSegmentLabel()
public boolean hasName()
public boolean hasAmount()
public boolean hasTipAmount()
public boolean hasTaxAmount()
public boolean hasServiceChargeAmount()
public boolean hasStartTimestamp()
public boolean hasEndTimestamp()
public boolean hasAmountWithoutTips()
public boolean hasNetQuantity()
public Summary setServiceChargeAmount(Long serviceChargeAmount)
public Summary setStartTimestamp(Long startTimestamp)
public Summary setAmountWithoutTips(Long amountWithoutTips)
public void clearId()
public void clearNum()
public void clearSegmentLabel()
public void clearName()
public void clearAmount()
public void clearTipAmount()
public void clearTaxAmount()
public void clearServiceChargeAmount()
public void clearStartTimestamp()
public void clearEndTimestamp()
public void clearAmountWithoutTips()
public void clearNetQuantity()
public boolean containsChanges()
public void resetChangeLog()
public Summary copyChanges()
public void mergeChanges(Summary src)