Represents a single credit of points issued to a profile or organisation under a reward, such as a prize draw or a set of gift vouchers. This is the credit side of the points ledger; PointsDebit is the debit side, and a participant's points balance is the sum of their credits minus their debits. A credit can optionally be tagged with a PointsTag for grouping, can carry an expiry date after which it is excluded from balance calculations, and can reference another Points record as its source, for example when it represents a bonus generated from an earlier award.

Group: Database Entities

Implements: Serializable, RewardTransactionItem, Auditable


Properties

PropertyReturnsDescription
auditOrgOrganisationThe organisation this record is audited against, taken from the associated reward's organisation.
completelyUsedBooleanWhether all points from this credit have already been used, either debited against purchases or otherwise consumed.
createdDateDateThe date and time this record was created, as distinct from the issued date.
expiredBooleanWhether this credit has been marked as expired by background processing, meaning it can no longer be used. Records are only reliably expired once this flag is set, not merely once the expiry date has passed.
expiryDateDateThe date these points are marked as expired and can no longer be used.
idlongThe unique, database-assigned identifier for this points credit.
issuedByProfileoptional, the user who issued the points. - the field will be blank for points which have been created by the import process - for manually created records it will link to the admin user who created it
issuedDateDateThe date and time these points were issued. Never null.
issuedForProfileoptional, the user who earned the points. Will be null when no single user is attributable
issuedToBaseEntityThe profile or organisation these points were issued to. Never null - every Points record has a recipient.
issuerOrgOrganisationThe organisation which issued these points. Never null.
numPointsdoubleThe number of points awarded. If connected to a module will be the number set when adding the reward to the module
pointsTagPointsTagThe tag used to group this credit with related points transactions, if any.
reasonStringTextual explanation of why these points were awarded
rewardRewardIf these points were issued by awarding a Reward, then that will be connected here
sourcePointsPointsThe Points record this credit was generated from, if any, for example a parent award that this bonus credit derives from.

Inherited from RewardTransactionItem

Methods

asCredit()

Returns: Points

Returns this item as a Points credit, if it is one.

asDebit()

Returns: PointsDebit

Returns this item as a PointsDebit, if it is one.


Methods

getId() · getPointsTag() · getExpired() · getCompletelyUsed() · getIssuerOrg() · getIssuedTo() · getIssuedFor() · getIssuedDate() · getNumPoints() · getReason() · getReward() · getExpiryDate() · getIssuedBy() · getSourcePoints() · getCreatedDate() · expired() · used() · getAuditOrg()

getId()

Returns: long

The unique, database-assigned identifier for this points credit.

getPointsTag()

Returns: PointsTag

The tag used to group this credit with related points transactions, if any.

getExpired()

Returns: Boolean

Whether this credit has been marked as expired by background processing, meaning it can no longer be used. Records are only reliably expired once this flag is set, not merely once the expiry date has passed.

getCompletelyUsed()

Returns: Boolean

Whether all points from this credit have already been used, either debited against purchases or otherwise consumed.

getIssuerOrg()

Returns: Organisation

The organisation which issued these points. Never null.

getIssuedTo()

Returns: BaseEntity

The profile or organisation these points were issued to. Never null - every Points record has a recipient.

getIssuedFor()

Returns: Profile

optional, the user who earned the points. Will be null when no single user is attributable

getIssuedDate()

Returns: Date

The date and time these points were issued. Never null.

getNumPoints()

Returns: double

The number of points awarded. If connected to a module will be the number set when adding the reward to the module

getReason()

Returns: String

Textual explanation of why these points were awarded

getReward()

Returns: Reward

If these points were issued by awarding a Reward, then that will be connected here

getExpiryDate()

Returns: Date

The date these points are marked as expired and can no longer be used.

getIssuedBy()

Returns: Profile

optional, the user who issued the points. - the field will be blank for points which have been created by the import process - for manually created records it will link to the admin user who created it

getSourcePoints()

Returns: Points

The Points record this credit was generated from, if any, for example a parent award that this bonus credit derives from.

getCreatedDate()

Returns: Date

The date and time this record was created, as distinct from the issued date.

expired()

Returns: boolean

Whether this credit is expired, ie its expired flag has been set.

used()

Returns: boolean

Whether this credit has had all of its points used.

getAuditOrg()

Returns: Organisation

The organisation this record is audited against, taken from the associated reward's organisation.

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