A list of points balances that are due to expire, with helper methods to summarise the remaining amounts by month or day so they can be charted or listed in a statement. Built by the points balance calculators (see PointsBalanceCalculator and PointsBalanceCalculatorV2) and by PointsManager when finding points about to expire for a profile or organisation. Each entry pairs a Points record with the balance still remaining on it at the time the list was built.
Extends: ArrayList
Properties
| Property | Returns | Description |
|---|---|---|
| groupByExpiryDay | Map<Date,Double> | Total remaining points due to expire, grouped by expiry day. Each record is bucketed into the start of its expiry day in the current user or organisation timezone, the same timezone the date is later formatted in. |
| groupByExpiryMonth | Map<Date,Double> | Total remaining points due to expire, grouped by expiry month. The key is the first day of the expiry month plus one day, which avoids a record being placed in the wrong month due to timezone rounding. |
| groupByMonth | Map<Date,Double> | Total remaining points due to expire, grouped by the calendar month in which this list was evaluated (using the month start of each record's expiry date as the key), not by the month of expiry itself. |
| groupedByExpiryMonth | Map<Date,List<ExpiringPointsRecord>> | The individual expiring points records grouped by expiry month, using the same month-plus-one-day key as getGroupByExpiryMonth. Unlike the summing variants this keeps each underlying record, not just the total. |
Methods
getGroupByMonth()
Returns: Map<Date,Double>
Total remaining points due to expire, grouped by the calendar month in which this list was evaluated (using the month start of each record's expiry date as the key), not by the month of expiry itself.
getGroupByExpiryMonth()
Returns: Map<Date,Double>
Total remaining points due to expire, grouped by expiry month. The key is the first day of the expiry month plus one day, which avoids a record being placed in the wrong month due to timezone rounding.
getGroupByExpiryDay()
Returns: Map<Date,Double>
Total remaining points due to expire, grouped by expiry day. Each record is bucketed into the start of its expiry day in the current user or organisation timezone, the same timezone the date is later formatted in.
getGroupedByExpiryMonth()
Returns: Map<Date,List<ExpiringPointsRecord>>
The individual expiring points records grouped by expiry month, using the same month-plus-one-day key as getGroupByExpiryMonth. Unlike the summing variants this keeps each underlying record, not just the total.