public class SummaryLineItems extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
SummaryLineItems.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<SummaryLineItems> |
CREATOR |
static JSONifiable.Creator<SummaryLineItems> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
SummaryLineItems()
Constructs a new empty instance.
|
protected |
SummaryLineItems(boolean noInit)
Constructs a new empty instance.
|
|
SummaryLineItems(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.
|
|
SummaryLineItems(String json)
Constructs a new instance from the given JSON String.
|
|
SummaryLineItems(SummaryLineItems src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDiscountsTotal()
Clears the 'discountsTotal' field, the 'has' method for this field will now return false
|
void |
clearNetItemSales()
Clears the 'netItemSales' field, the 'has' method for this field will now return false
|
void |
clearRefundsTotal()
Clears the 'refundsTotal' field, the 'has' method for this field will now return false
|
void |
clearVoidedLineItemsTotal()
Clears the 'voidedLineItemsTotal' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
SummaryLineItems |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getDiscountsTotal() |
protected 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 |
getNetItemSales()
Payment summary: original item revenue - taxes - tips - refunds - discounts + modifiers
|
Long |
getRefundsTotal()
net refunds - taxes refunded - tips refunded
|
Long |
getVoidedLineItemsTotal()
Total value of line items removed from orders
|
boolean |
hasDiscountsTotal()
Checks whether the 'discountsTotal' field has been set, however the value could be null
|
boolean |
hasNetItemSales()
Checks whether the 'netItemSales' field has been set, however the value could be null
|
boolean |
hasRefundsTotal()
Checks whether the 'refundsTotal' field has been set, however the value could be null
|
boolean |
hasVoidedLineItemsTotal()
Checks whether the 'voidedLineItemsTotal' field has been set, however the value could be null
|
boolean |
isNotNullDiscountsTotal()
Checks whether the 'discountsTotal' field is set and is not null
|
boolean |
isNotNullNetItemSales()
Checks whether the 'netItemSales' field is set and is not null
|
boolean |
isNotNullRefundsTotal()
Checks whether the 'refundsTotal' field is set and is not null
|
boolean |
isNotNullVoidedLineItemsTotal()
Checks whether the 'voidedLineItemsTotal' field is set and is not null
|
void |
mergeChanges(SummaryLineItems 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.
|
SummaryLineItems |
setDiscountsTotal(Long discountsTotal)
Sets the field 'discountsTotal'.
|
SummaryLineItems |
setNetItemSales(Long netItemSales)
Sets the field 'netItemSales'.
|
SummaryLineItems |
setRefundsTotal(Long refundsTotal)
Sets the field 'refundsTotal'.
|
SummaryLineItems |
setVoidedLineItemsTotal(Long voidedLineItemsTotal)
Sets the field 'voidedLineItemsTotal'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<SummaryLineItems> CREATOR
public static final JSONifiable.Creator<SummaryLineItems> JSON_CREATOR
public SummaryLineItems()
protected SummaryLineItems(boolean noInit)
public SummaryLineItems(String json) throws IllegalArgumentException
IllegalArgumentException
public SummaryLineItems(JSONObject jsonObject)
public SummaryLineItems(SummaryLineItems src)
public Long getRefundsTotal()
public Long getDiscountsTotal()
public Long getVoidedLineItemsTotal()
public Long getNetItemSales()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullRefundsTotal()
public boolean isNotNullDiscountsTotal()
public boolean isNotNullVoidedLineItemsTotal()
public boolean isNotNullNetItemSales()
public boolean hasRefundsTotal()
public boolean hasDiscountsTotal()
public boolean hasVoidedLineItemsTotal()
public boolean hasNetItemSales()
public SummaryLineItems setRefundsTotal(Long refundsTotal)
public SummaryLineItems setDiscountsTotal(Long discountsTotal)
public SummaryLineItems setVoidedLineItemsTotal(Long voidedLineItemsTotal)
public SummaryLineItems setNetItemSales(Long netItemSales)
public void clearRefundsTotal()
public void clearDiscountsTotal()
public void clearVoidedLineItemsTotal()
public void clearNetItemSales()
public boolean containsChanges()
public void resetChangeLog()
public SummaryLineItems copyChanges()
public void mergeChanges(SummaryLineItems src)