Class SalesSummary

    • Constructor Detail

      • SalesSummary

        public SalesSummary()
        Constructs a new empty instance.
      • SalesSummary

        protected SalesSummary​(boolean noInit)
        Constructs a new empty instance.
      • SalesSummary

        public 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

        public SalesSummary​(SalesSummary src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getStartTimestamp

        public Long getStartTimestamp()
        Beginning of the time period for this summary.
      • getEndTimestamp

        public Long getEndTimestamp()
        End of the time period for this summary.
      • getSegmentLabel

        public Integer getSegmentLabel()
        An identifier that may be used to align report segments across different merchants.
      • getGrossSales

        public Long getGrossSales()
        The amount that would have been paid before discounts were applied. This does not include non-revenue items. It does not include tax. This is the amount before any refunds occurred. This is the total of orders where the first payment is in the reporting time range.
      • getExchangeAmount

        public Long getExchangeAmount()
        Price of all items that were returned to the merchant in a direct exchange. Does not include order level discounts. Shouldn't be modifiers or line item discounts in exchanges.
      • getDiscountAmount

        public Long getDiscountAmount()
        Total of all discounts applied on orders that have some payment. Reported as a negative number since it is subtracted from Gross Sales to arrive at Net Sales.
      • getRefundAmount

        public Long getRefundAmount()
        Total of all refunds and manual refunds excluding tax, tip, service charge, and non-revenue items. Reported as a negative number since it is subtracted from Gross Sales to arrive at Net Sales.
      • getRefundRepaymentAmount

        public Long getRefundRepaymentAmount()
        Amount of money re-paid after item was fully paid and then refunded.
      • getNet

        public Long getNet()
        The total of all orders with any payment with discounts and with refunds and manual refunds deducted. Excludes non-revenue items, service charges, tips and taxes.
      • getGiftCardLoads

        public Long getGiftCardLoads()
        Total paid gift card activations and loads. Reported as a positive number since it is added to Net to arrive at Amount Collected.
      • getNonRevenueItems

        public Long getNonRevenueItems()
        Total of all non-revenue items without tax and excluding paid gift card activations and loads. Reported as a positive number since it is added to Net to arrive at Amount Collected.
      • getServiceChargeAmount

        public Long getServiceChargeAmount()
        Total service charges on orders with payment minus total service charge refunded. Reported as a positive number since it is added to Net to arrive at Amount Collected.
      • getTipAmount

        public Long getTipAmount()
        Total of all tips paid minus total tips refunded. Reported as a positive number since it is added to Net to arrive at Amount Collected.
      • getTaxAmount

        public Long getTaxAmount()
        The total tax liability. That is, the total of all taxes and flat tax on orders in Gross Sales minus total of all tax and flat tax refunded. Reported as a positive number since it is added to Net to arrive at Amount Collected.
      • getTaxAmountCollected

        public Long getTaxAmountCollected()
        The net of total tax collected. That is, the total of all taxes and flat fees paid minus taxes and flat fees that were refunded or credited.
      • getAmountCollected

        public Long getAmountCollected()
        Total amount of money collected minus total amount refunded or manually refunded. Includes tax, tip, service charge, non-revenue items, paid gift card activations and loads and discounts
      • getUnpaidBalance

        public Long getUnpaidBalance()
        The net of orders with payment minus the amount collected. Includes refunds, manual refunds, tax, tip, service charge, non-revenue items, paid gift card activations and loads and discounts
      • getNumFullyPaidOrders

        public Long getNumFullyPaidOrders()
        Number of fully paid orders. Fully paid orders are orders where the sum of payments minus the sum of refunds equals the sum of the value of line items with modifiers and discounts.
      • getNumPartiallyPaidOrders

        public Long getNumPartiallyPaidOrders()
        Number of partially paid orders. Partially paid orders are orders where the sum of payments is less than the sum of the value of line items with modifiers and discounts.
      • 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 interface JSONifiable
      • 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
      • isNotNullSegmentLabel

        public boolean isNotNullSegmentLabel()
        Checks whether the 'segmentLabel' field is set and is not null
      • isNotNullGrossSales

        public boolean isNotNullGrossSales()
        Checks whether the 'grossSales' field is set and is not null
      • isNotNullExchangeAmount

        public boolean isNotNullExchangeAmount()
        Checks whether the 'exchangeAmount' field is set and is not null
      • isNotNullDiscountAmount

        public boolean isNotNullDiscountAmount()
        Checks whether the 'discountAmount' field is set and is not null
      • isNotNullRefundAmount

        public boolean isNotNullRefundAmount()
        Checks whether the 'refundAmount' field is set and is not null
      • isNotNullRefundRepaymentAmount

        public boolean isNotNullRefundRepaymentAmount()
        Checks whether the 'refundRepaymentAmount' field is set and is not null
      • isNotNullNet

        public boolean isNotNullNet()
        Checks whether the 'net' field is set and is not null
      • isNotNullGiftCardLoads

        public boolean isNotNullGiftCardLoads()
        Checks whether the 'giftCardLoads' field is set and is not null
      • isNotNullNonRevenueItems

        public boolean isNotNullNonRevenueItems()
        Checks whether the 'nonRevenueItems' field is set and is not null
      • isNotNullServiceChargeAmount

        public boolean isNotNullServiceChargeAmount()
        Checks whether the 'serviceChargeAmount' 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
      • isNotNullTaxAmountCollected

        public boolean isNotNullTaxAmountCollected()
        Checks whether the 'taxAmountCollected' field is set and is not null
      • isNotNullAmountCollected

        public boolean isNotNullAmountCollected()
        Checks whether the 'amountCollected' field is set and is not null
      • isNotNullUnpaidBalance

        public boolean isNotNullUnpaidBalance()
        Checks whether the 'unpaidBalance' field is set and is not null
      • isNotNullNumFullyPaidOrders

        public boolean isNotNullNumFullyPaidOrders()
        Checks whether the 'numFullyPaidOrders' field is set and is not null
      • isNotNullNumPartiallyPaidOrders

        public boolean isNotNullNumPartiallyPaidOrders()
        Checks whether the 'numPartiallyPaidOrders' field is set and is not 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
      • hasSegmentLabel

        public boolean hasSegmentLabel()
        Checks whether the 'segmentLabel' field has been set, however the value could be null
      • hasGrossSales

        public boolean hasGrossSales()
        Checks whether the 'grossSales' field has been set, however the value could be null
      • hasExchangeAmount

        public boolean hasExchangeAmount()
        Checks whether the 'exchangeAmount' field has been set, however the value could be null
      • hasDiscountAmount

        public boolean hasDiscountAmount()
        Checks whether the 'discountAmount' field has been set, however the value could be null
      • hasRefundAmount

        public boolean hasRefundAmount()
        Checks whether the 'refundAmount' field has been set, however the value could be null
      • hasRefundRepaymentAmount

        public boolean hasRefundRepaymentAmount()
        Checks whether the 'refundRepaymentAmount' field has been set, however the value could be null
      • hasNet

        public boolean hasNet()
        Checks whether the 'net' field has been set, however the value could be null
      • hasGiftCardLoads

        public boolean hasGiftCardLoads()
        Checks whether the 'giftCardLoads' field has been set, however the value could be null
      • hasNonRevenueItems

        public boolean hasNonRevenueItems()
        Checks whether the 'nonRevenueItems' 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
      • 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
      • hasTaxAmountCollected

        public boolean hasTaxAmountCollected()
        Checks whether the 'taxAmountCollected' field has been set, however the value could be null
      • hasAmountCollected

        public boolean hasAmountCollected()
        Checks whether the 'amountCollected' field has been set, however the value could be null
      • hasUnpaidBalance

        public boolean hasUnpaidBalance()
        Checks whether the 'unpaidBalance' field has been set, however the value could be null
      • hasNumFullyPaidOrders

        public boolean hasNumFullyPaidOrders()
        Checks whether the 'numFullyPaidOrders' field has been set, however the value could be null
      • hasNumPartiallyPaidOrders

        public boolean hasNumPartiallyPaidOrders()
        Checks whether the 'numPartiallyPaidOrders' field has been set, however the value could be null
      • setStartTimestamp

        public SalesSummary setStartTimestamp​(Long startTimestamp)
        Sets the field 'startTimestamp'.
      • setEndTimestamp

        public SalesSummary setEndTimestamp​(Long endTimestamp)
        Sets the field 'endTimestamp'.
      • setSegmentLabel

        public SalesSummary setSegmentLabel​(Integer segmentLabel)
        Sets the field 'segmentLabel'.
      • setGrossSales

        public SalesSummary setGrossSales​(Long grossSales)
        Sets the field 'grossSales'.
      • setExchangeAmount

        public SalesSummary setExchangeAmount​(Long exchangeAmount)
        Sets the field 'exchangeAmount'.
      • setDiscountAmount

        public SalesSummary setDiscountAmount​(Long discountAmount)
        Sets the field 'discountAmount'.
      • setRefundAmount

        public SalesSummary setRefundAmount​(Long refundAmount)
        Sets the field 'refundAmount'.
      • setRefundRepaymentAmount

        public SalesSummary setRefundRepaymentAmount​(Long refundRepaymentAmount)
        Sets the field 'refundRepaymentAmount'.
      • setGiftCardLoads

        public SalesSummary setGiftCardLoads​(Long giftCardLoads)
        Sets the field 'giftCardLoads'.
      • setNonRevenueItems

        public SalesSummary setNonRevenueItems​(Long nonRevenueItems)
        Sets the field 'nonRevenueItems'.
      • setServiceChargeAmount

        public SalesSummary setServiceChargeAmount​(Long serviceChargeAmount)
        Sets the field 'serviceChargeAmount'.
      • setTipAmount

        public SalesSummary setTipAmount​(Long tipAmount)
        Sets the field 'tipAmount'.
      • setTaxAmount

        public SalesSummary setTaxAmount​(Long taxAmount)
        Sets the field 'taxAmount'.
      • setTaxAmountCollected

        public SalesSummary setTaxAmountCollected​(Long taxAmountCollected)
        Sets the field 'taxAmountCollected'.
      • setAmountCollected

        public SalesSummary setAmountCollected​(Long amountCollected)
        Sets the field 'amountCollected'.
      • setUnpaidBalance

        public SalesSummary setUnpaidBalance​(Long unpaidBalance)
        Sets the field 'unpaidBalance'.
      • setNumFullyPaidOrders

        public SalesSummary setNumFullyPaidOrders​(Long numFullyPaidOrders)
        Sets the field 'numFullyPaidOrders'.
      • setNumPartiallyPaidOrders

        public SalesSummary setNumPartiallyPaidOrders​(Long numPartiallyPaidOrders)
        Sets the field 'numPartiallyPaidOrders'.
      • 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
      • clearSegmentLabel

        public void clearSegmentLabel()
        Clears the 'segmentLabel' field, the 'has' method for this field will now return false
      • clearGrossSales

        public void clearGrossSales()
        Clears the 'grossSales' field, the 'has' method for this field will now return false
      • clearExchangeAmount

        public void clearExchangeAmount()
        Clears the 'exchangeAmount' field, the 'has' method for this field will now return false
      • clearDiscountAmount

        public void clearDiscountAmount()
        Clears the 'discountAmount' field, the 'has' method for this field will now return false
      • clearRefundAmount

        public void clearRefundAmount()
        Clears the 'refundAmount' field, the 'has' method for this field will now return false
      • clearRefundRepaymentAmount

        public void clearRefundRepaymentAmount()
        Clears the 'refundRepaymentAmount' field, the 'has' method for this field will now return false
      • clearNet

        public void clearNet()
        Clears the 'net' field, the 'has' method for this field will now return false
      • clearGiftCardLoads

        public void clearGiftCardLoads()
        Clears the 'giftCardLoads' field, the 'has' method for this field will now return false
      • clearNonRevenueItems

        public void clearNonRevenueItems()
        Clears the 'nonRevenueItems' 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
      • 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
      • clearTaxAmountCollected

        public void clearTaxAmountCollected()
        Clears the 'taxAmountCollected' field, the 'has' method for this field will now return false
      • clearAmountCollected

        public void clearAmountCollected()
        Clears the 'amountCollected' field, the 'has' method for this field will now return false
      • clearUnpaidBalance

        public void clearUnpaidBalance()
        Clears the 'unpaidBalance' field, the 'has' method for this field will now return false
      • clearNumFullyPaidOrders

        public void clearNumFullyPaidOrders()
        Clears the 'numFullyPaidOrders' field, the 'has' method for this field will now return false
      • clearNumPartiallyPaidOrders

        public void clearNumPartiallyPaidOrders()
        Clears the 'numPartiallyPaidOrders' 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 SalesSummary copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(SalesSummary src)
        Copy all the changed fields from the given source to this instance.