Represents a single row in a participant's points history: either a points credit (award) or a points debit (spend). Built from a Points or PointsDebit record via the static create() method, or returned directly by PointsManager search and listing methods, and consumed by templates and JS to render a participant's points statement. Aggregated credits carry the ids of the underlying records that were combined to produce them.
Properties
| Property | Returns | Description |
|---|---|---|
| cart | Cart | The cart associated with this transaction, for a debit made against a purchase. |
| code | String | The points tag name, for a credit, or reason code, for a debit, recorded against this transaction. |
| completelyUsed | Boolean | For a credit record, whether all of the awarded points have been spent by subsequent debits. |
| date | Date | The date this transaction was issued. |
| description | String | The reason recorded against this transaction, shown to the participant in their points history. |
| expired | Boolean | For a credit record, whether the awarded points have expired or been cancelled. Not meaningful for a debit. |
| expiry | Date | For a credit, the date the awarded points expire. |
| itemHref | String | The URL of the store item this transaction relates to, if any. |
| numPoints | double | The number of points this transaction represents. Positive for a credit, negative for a debit. |
| related | String | For a debit, a description of the points record it was spent against. |
| rewardTx | RewardTransactionItem | The underlying Points or PointsDebit entity this transaction was built from. |
| source | PointsTransaction | For a credit created from a record with a source points record (eg points converted from another reward), the transaction representing that source record. |
| sourceIds | List<Long> | The ids of the underlying Points or PointsDebit records which have been aggregated to produce this transaction. Empty if this transaction represents a single, un-aggregated record. |
| txType | String | The type of transaction this record represents: either C for a credit (an award) or D for a debit (a spend). |
Methods
getNumPoints() · getDate() · getTxType() · getDescription() · getSourceIds() · getExpired() · getCompletelyUsed() · getCart() · setCart(Cart cart) · getItemHref() · setItemHref(String itemHref) · getRelated() · setRelated(String related) · getCode() · getExpiry() · setExpiry(Date expiry) · getSource() · getRewardTx() · reconciledLinks()
getNumPoints()
Returns: double
The number of points this transaction represents. Positive for a credit, negative for a debit.
getDate()
Returns: Date
The date this transaction was issued.
getTxType()
Returns: String
The type of transaction this record represents: either C for a credit (an award) or D for a debit (a spend).
getDescription()
Returns: String
The reason recorded against this transaction, shown to the participant in their points history.
getSourceIds()
Returns: List<Long>
The ids of the underlying Points or PointsDebit records which have been aggregated to produce this transaction. Empty if this transaction represents a single, un-aggregated record.
getExpired()
Returns: Boolean
For a credit record, whether the awarded points have expired or been cancelled. Not meaningful for a debit.
getCompletelyUsed()
Returns: Boolean
For a credit record, whether all of the awarded points have been spent by subsequent debits.
getCart()
Returns: Cart
The cart associated with this transaction, for a debit made against a purchase.
setCart(Cart cart)
Returns: void
Sets the cart associated with this transaction.
| Parameter | Description |
|---|---|
cart | the cart this transaction relates to |
getItemHref()
Returns: String
The URL of the store item this transaction relates to, if any.
setItemHref(String itemHref)
Returns: void
Sets the URL of the store item this transaction relates to.
| Parameter | Description |
|---|---|
itemHref | the href of the related item |
getRelated()
Returns: String
For a debit, a description of the points record it was spent against.
setRelated(String related)
Returns: void
Sets the description of the points record this debit was spent against.
| Parameter | Description |
|---|---|
related | the related record description |
getCode()
Returns: String
The points tag name, for a credit, or reason code, for a debit, recorded against this transaction.
getExpiry()
Returns: Date
For a credit, the date the awarded points expire.
setExpiry(Date expiry)
Returns: void
Sets the date the awarded points for this transaction expire.
| Parameter | Description |
|---|---|
expiry | the expiry date to set |
getSource()
Returns: PointsTransaction
For a credit created from a record with a source points record (eg points converted from another reward), the transaction representing that source record.
getRewardTx()
Returns: RewardTransactionItem
The underlying Points or PointsDebit entity this transaction was built from.
reconciledLinks()
Returns: List<PointsDebitLink>
Finds the debit links that reconcile this transaction against the points records it consumes or is consumed by, when the reward's autoReconcile setting is on. The result is looked up once per transaction and cached.