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

PropertyReturnsDescription
cartCartThe cart associated with this transaction, for a debit made against a purchase.
codeStringThe points tag name, for a credit, or reason code, for a debit, recorded against this transaction.
completelyUsedBooleanFor a credit record, whether all of the awarded points have been spent by subsequent debits.
dateDateThe date this transaction was issued.
descriptionStringThe reason recorded against this transaction, shown to the participant in their points history.
expiredBooleanFor a credit record, whether the awarded points have expired or been cancelled. Not meaningful for a debit.
expiryDateFor a credit, the date the awarded points expire.
itemHrefStringThe URL of the store item this transaction relates to, if any.
numPointsdoubleThe number of points this transaction represents. Positive for a credit, negative for a debit.
relatedStringFor a debit, a description of the points record it was spent against.
rewardTxRewardTransactionItemThe underlying Points or PointsDebit entity this transaction was built from.
sourcePointsTransactionFor a credit created from a record with a source points record (eg points converted from another reward), the transaction representing that source record.
sourceIdsList<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.
txTypeStringThe 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.

ParameterDescription
cartthe 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.

ParameterDescription
itemHrefthe 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.

ParameterDescription
relatedthe 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.

ParameterDescription
expirythe 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.

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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.