public class SalesSummary extends GenericParcelable implements Validator, JSONifiable
Gross Sales, Net Sales, Amount Collected and the other figures that contribute to their calculation like total Taxes, Discounts, Refunds, Service Charges, Tips, Non-revenue Items and Gift Card Activations.
Modifier and Type | Class and Description |
---|---|
static interface |
SalesSummary.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<SalesSummary> |
CREATOR |
static JSONifiable.Creator<SalesSummary> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
SalesSummary()
Constructs a new empty instance.
|
protected |
SalesSummary(boolean noInit)
Constructs a new empty instance.
|
|
SalesSummary(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.
|
|
SalesSummary(SalesSummary src)
Constructs a new instance that is a deep copy of the source instance.
|
|
SalesSummary(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAmountCollected()
Clears the 'amountCollected' field, the 'has' method for this field will now return false
|
void |
clearDiscountAmount()
Clears the 'discountAmount' 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 |
clearExchangeAmount()
Clears the 'exchangeAmount' field, the 'has' method for this field will now return false
|
void |
clearGiftCardLoads()
Clears the 'giftCardLoads' field, the 'has' method for this field will now return false
|
void |
clearGrossSales()
Clears the 'grossSales' field, the 'has' method for this field will now return false
|
void |
clearNet()
Clears the 'net' field, the 'has' method for this field will now return false
|
void |
clearNonRevenueItems()
Clears the 'nonRevenueItems' field, the 'has' method for this field will now return false
|
void |
clearNumFullyPaidOrders()
Clears the 'numFullyPaidOrders' field, the 'has' method for this field will now return false
|
void |
clearNumPartiallyPaidOrders()
Clears the 'numPartiallyPaidOrders' field, the 'has' method for this field will now return false
|
void |
clearRefundAmount()
Clears the 'refundAmount' field, the 'has' method for this field will now return false
|
void |
clearRefundRepaymentAmount()
Clears the 'refundRepaymentAmount' 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 |
clearTaxAmountCollected()
Clears the 'taxAmountCollected' 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
|
void |
clearUnpaidBalance()
Clears the 'unpaidBalance' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
SalesSummary |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getAmountCollected()
Total amount of money collected minus total amount refunded or manually refunded.
|
Long |
getDiscountAmount()
Total of all discounts applied on orders that have some payment.
|
Long |
getEndTimestamp()
End of the time period for this summary.
|
Long |
getExchangeAmount()
Price of all items that were returned to the merchant in a direct exchange.
|
protected GenericClient |
getGenericClient() |
Long |
getGiftCardLoads()
Total paid gift card activations and loads.
|
Long |
getGrossSales()
The amount that would have been paid before discounts were applied.
|
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 |
getNet()
The total of all orders with any payment with discounts and with refunds and manual refunds deducted.
|
Long |
getNonRevenueItems()
Total of all non-revenue items without tax and excluding paid gift card activations and loads.
|
Long |
getNumFullyPaidOrders()
Number of fully paid orders.
|
Long |
getNumPartiallyPaidOrders()
Number of partially paid orders.
|
Long |
getRefundAmount()
Total of all refunds and manual refunds excluding tax, tip, service charge, and non-revenue items.
|
Long |
getRefundRepaymentAmount()
Amount of money re-paid after item was fully paid and then refunded.
|
Integer |
getSegmentLabel()
An identifier that may be used to align report segments across different merchants.
|
Long |
getServiceChargeAmount()
Total service charges on orders with payment minus total service charge refunded.
|
Long |
getStartTimestamp()
Beginning of the time period for this summary.
|
Long |
getTaxAmount()
The total tax liability.
|
Long |
getTaxAmountCollected()
The net of total tax collected.
|
Long |
getTipAmount()
Total of all tips paid minus total tips refunded.
|
Long |
getUnpaidBalance()
The net of orders with payment minus the amount collected.
|
boolean |
hasAmountCollected()
Checks whether the 'amountCollected' field has been set, however the value could be null
|
boolean |
hasDiscountAmount()
Checks whether the 'discountAmount' 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 |
hasExchangeAmount()
Checks whether the 'exchangeAmount' field has been set, however the value could be null
|
boolean |
hasGiftCardLoads()
Checks whether the 'giftCardLoads' field has been set, however the value could be null
|
boolean |
hasGrossSales()
Checks whether the 'grossSales' field has been set, however the value could be null
|
boolean |
hasNet()
Checks whether the 'net' field has been set, however the value could be null
|
boolean |
hasNonRevenueItems()
Checks whether the 'nonRevenueItems' field has been set, however the value could be null
|
boolean |
hasNumFullyPaidOrders()
Checks whether the 'numFullyPaidOrders' field has been set, however the value could be null
|
boolean |
hasNumPartiallyPaidOrders()
Checks whether the 'numPartiallyPaidOrders' field has been set, however the value could be null
|
boolean |
hasRefundAmount()
Checks whether the 'refundAmount' field has been set, however the value could be null
|
boolean |
hasRefundRepaymentAmount()
Checks whether the 'refundRepaymentAmount' 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 |
hasTaxAmountCollected()
Checks whether the 'taxAmountCollected' 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 |
hasUnpaidBalance()
Checks whether the 'unpaidBalance' field has been set, however the value could be null
|
boolean |
isNotNullAmountCollected()
Checks whether the 'amountCollected' field is set and is not null
|
boolean |
isNotNullDiscountAmount()
Checks whether the 'discountAmount' field is set and is not null
|
boolean |
isNotNullEndTimestamp()
Checks whether the 'endTimestamp' field is set and is not null
|
boolean |
isNotNullExchangeAmount()
Checks whether the 'exchangeAmount' field is set and is not null
|
boolean |
isNotNullGiftCardLoads()
Checks whether the 'giftCardLoads' field is set and is not null
|
boolean |
isNotNullGrossSales()
Checks whether the 'grossSales' field is set and is not null
|
boolean |
isNotNullNet()
Checks whether the 'net' field is set and is not null
|
boolean |
isNotNullNonRevenueItems()
Checks whether the 'nonRevenueItems' field is set and is not null
|
boolean |
isNotNullNumFullyPaidOrders()
Checks whether the 'numFullyPaidOrders' field is set and is not null
|
boolean |
isNotNullNumPartiallyPaidOrders()
Checks whether the 'numPartiallyPaidOrders' field is set and is not null
|
boolean |
isNotNullRefundAmount()
Checks whether the 'refundAmount' field is set and is not null
|
boolean |
isNotNullRefundRepaymentAmount()
Checks whether the 'refundRepaymentAmount' 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 |
isNotNullTaxAmountCollected()
Checks whether the 'taxAmountCollected' field is set and is not null
|
boolean |
isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not null
|
boolean |
isNotNullUnpaidBalance()
Checks whether the 'unpaidBalance' field is set and is not null
|
void |
mergeChanges(SalesSummary 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.
|
SalesSummary |
setAmountCollected(Long amountCollected)
Sets the field 'amountCollected'.
|
SalesSummary |
setDiscountAmount(Long discountAmount)
Sets the field 'discountAmount'.
|
SalesSummary |
setEndTimestamp(Long endTimestamp)
Sets the field 'endTimestamp'.
|
SalesSummary |
setExchangeAmount(Long exchangeAmount)
Sets the field 'exchangeAmount'.
|
SalesSummary |
setGiftCardLoads(Long giftCardLoads)
Sets the field 'giftCardLoads'.
|
SalesSummary |
setGrossSales(Long grossSales)
Sets the field 'grossSales'.
|
SalesSummary |
setNet(Long net)
Sets the field 'net'.
|
SalesSummary |
setNonRevenueItems(Long nonRevenueItems)
Sets the field 'nonRevenueItems'.
|
SalesSummary |
setNumFullyPaidOrders(Long numFullyPaidOrders)
Sets the field 'numFullyPaidOrders'.
|
SalesSummary |
setNumPartiallyPaidOrders(Long numPartiallyPaidOrders)
Sets the field 'numPartiallyPaidOrders'.
|
SalesSummary |
setRefundAmount(Long refundAmount)
Sets the field 'refundAmount'.
|
SalesSummary |
setRefundRepaymentAmount(Long refundRepaymentAmount)
Sets the field 'refundRepaymentAmount'.
|
SalesSummary |
setSegmentLabel(Integer segmentLabel)
Sets the field 'segmentLabel'.
|
SalesSummary |
setServiceChargeAmount(Long serviceChargeAmount)
Sets the field 'serviceChargeAmount'.
|
SalesSummary |
setStartTimestamp(Long startTimestamp)
Sets the field 'startTimestamp'.
|
SalesSummary |
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
|
SalesSummary |
setTaxAmountCollected(Long taxAmountCollected)
Sets the field 'taxAmountCollected'.
|
SalesSummary |
setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.
|
SalesSummary |
setUnpaidBalance(Long unpaidBalance)
Sets the field 'unpaidBalance'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<SalesSummary> CREATOR
public static final JSONifiable.Creator<SalesSummary> JSON_CREATOR
public SalesSummary()
protected SalesSummary(boolean noInit)
public SalesSummary(String json) throws IllegalArgumentException
IllegalArgumentException
public SalesSummary(JSONObject jsonObject)
public SalesSummary(SalesSummary src)
public Long getStartTimestamp()
public Long getEndTimestamp()
public Integer getSegmentLabel()
public Long getGrossSales()
public Long getExchangeAmount()
public Long getDiscountAmount()
public Long getRefundAmount()
public Long getRefundRepaymentAmount()
public Long getNet()
public Long getGiftCardLoads()
public Long getNonRevenueItems()
public Long getServiceChargeAmount()
public Long getTipAmount()
public Long getTaxAmount()
public Long getTaxAmountCollected()
public Long getAmountCollected()
public Long getUnpaidBalance()
public Long getNumFullyPaidOrders()
public Long getNumPartiallyPaidOrders()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullStartTimestamp()
public boolean isNotNullEndTimestamp()
public boolean isNotNullSegmentLabel()
public boolean isNotNullGrossSales()
public boolean isNotNullExchangeAmount()
public boolean isNotNullDiscountAmount()
public boolean isNotNullRefundAmount()
public boolean isNotNullRefundRepaymentAmount()
public boolean isNotNullNet()
public boolean isNotNullGiftCardLoads()
public boolean isNotNullNonRevenueItems()
public boolean isNotNullServiceChargeAmount()
public boolean isNotNullTipAmount()
public boolean isNotNullTaxAmount()
public boolean isNotNullTaxAmountCollected()
public boolean isNotNullAmountCollected()
public boolean isNotNullUnpaidBalance()
public boolean isNotNullNumFullyPaidOrders()
public boolean isNotNullNumPartiallyPaidOrders()
public boolean hasStartTimestamp()
public boolean hasEndTimestamp()
public boolean hasSegmentLabel()
public boolean hasGrossSales()
public boolean hasExchangeAmount()
public boolean hasDiscountAmount()
public boolean hasRefundAmount()
public boolean hasRefundRepaymentAmount()
public boolean hasNet()
public boolean hasGiftCardLoads()
public boolean hasNonRevenueItems()
public boolean hasServiceChargeAmount()
public boolean hasTipAmount()
public boolean hasTaxAmount()
public boolean hasTaxAmountCollected()
public boolean hasAmountCollected()
public boolean hasUnpaidBalance()
public boolean hasNumFullyPaidOrders()
public boolean hasNumPartiallyPaidOrders()
public SalesSummary setStartTimestamp(Long startTimestamp)
public SalesSummary setEndTimestamp(Long endTimestamp)
public SalesSummary setSegmentLabel(Integer segmentLabel)
public SalesSummary setGrossSales(Long grossSales)
public SalesSummary setExchangeAmount(Long exchangeAmount)
public SalesSummary setDiscountAmount(Long discountAmount)
public SalesSummary setRefundAmount(Long refundAmount)
public SalesSummary setRefundRepaymentAmount(Long refundRepaymentAmount)
public SalesSummary setNet(Long net)
public SalesSummary setGiftCardLoads(Long giftCardLoads)
public SalesSummary setNonRevenueItems(Long nonRevenueItems)
public SalesSummary setServiceChargeAmount(Long serviceChargeAmount)
public SalesSummary setTipAmount(Long tipAmount)
public SalesSummary setTaxAmount(Long taxAmount)
public SalesSummary setTaxAmountCollected(Long taxAmountCollected)
public SalesSummary setAmountCollected(Long amountCollected)
public SalesSummary setUnpaidBalance(Long unpaidBalance)
public SalesSummary setNumFullyPaidOrders(Long numFullyPaidOrders)
public SalesSummary setNumPartiallyPaidOrders(Long numPartiallyPaidOrders)
public void clearStartTimestamp()
public void clearEndTimestamp()
public void clearSegmentLabel()
public void clearGrossSales()
public void clearExchangeAmount()
public void clearDiscountAmount()
public void clearRefundAmount()
public void clearRefundRepaymentAmount()
public void clearNet()
public void clearGiftCardLoads()
public void clearNonRevenueItems()
public void clearServiceChargeAmount()
public void clearTipAmount()
public void clearTaxAmount()
public void clearTaxAmountCollected()
public void clearAmountCollected()
public void clearUnpaidBalance()
public void clearNumFullyPaidOrders()
public void clearNumPartiallyPaidOrders()
public boolean containsChanges()
public void resetChangeLog()
public SalesSummary copyChanges()
public void mergeChanges(SalesSummary src)