Read-only view of a Voucher entity, flattened for use in Velocity templates and JSON responses. Combines the voucher's own status/allocation fields with a snapshot of its voucher type's title, code, content and notes, so a template does not need to navigate the entity graph. Instances are produced by toBean(Voucher) / toVoucherBeans(List) and are never persisted themselves.


Properties

PropertyReturnsDescription
allocatedToExtProfileBeanThe profile this voucher is allocated to, or null if it has not been allocated to a known profile.
allocatedToIdStringThe raw identifier this voucher is allocated to, which may reference a profile that does not exist in Kademi (e.g. an external user identifier).
cashValueBigDecimalThe final cash value of this voucher.
createdByExtProfileBeanThe profile that created this voucher.
createdDateDateThe date this voucher was created.
expiryDateDateThe date this voucher expires, or null if it has no expiry.
fieldsMap<String,String>The voucher's custom field values, keyed by field name.
idlongThe Kademi internal database ID for this voucher.
redeemingOrgOrgDataThe organisation permitted to redeem this voucher's voucher type, or null if none is configured.
statusStringThe voucher's current status code, normalised to an empty string rather than null.
statusChangedByExtProfileBeanThe profile that last changed this voucher's status, or null if the status has never been changed.
statusChangedForOrgOrgDataThe organisation the last status change was recorded for, or null if none was set.
statusDateDateThe date the voucher's status was last changed.
voucherIdStringThe voucher's user-facing identifier, as generated from the voucher type's ID template or a random value.
voucherStatusChangesList<VoucherStatusChangeBean>The full history of status changes recorded against this voucher, for auditing.
voucherTypeCodeStringThe name (portable, code-like identifier) of this voucher's voucher type.
voucherTypeContentStringThe free-text content (e.g. terms, description) configured on this voucher's voucher type.
voucherTypeNotesStringInternal notes configured on this voucher's voucher type.
voucherTypeTitleStringThe display title of this voucher's voucher type.

Methods

getId() · getVoucherId() · getStatusChangedBy() · getVoucherTypeCode() · getVoucherTypeTitle() · getVoucherTypeContent() · getCreatedDate() · getExpiryDate() · getCashValue() · getCreatedBy() · getAllocatedTo() · getAllocatedToId() · getStatus() · getStatusDate() · getVoucherStatusChanges() · getFields() · getStatusChangedForOrg() · getRedeemingOrg() · getVoucherTypeNotes()

getId()

Returns: long

The Kademi internal database ID for this voucher.

getVoucherId()

Returns: String

The voucher's user-facing identifier, as generated from the voucher type's ID template or a random value.

getStatusChangedBy()

Returns: ExtProfileBean

The profile that last changed this voucher's status, or null if the status has never been changed.

getVoucherTypeCode()

Returns: String

The name (portable, code-like identifier) of this voucher's voucher type.

getVoucherTypeTitle()

Returns: String

The display title of this voucher's voucher type.

getVoucherTypeContent()

Returns: String

The free-text content (e.g. terms, description) configured on this voucher's voucher type.

getCreatedDate()

Returns: Date

The date this voucher was created.

getExpiryDate()

Returns: Date

The date this voucher expires, or null if it has no expiry.

getCashValue()

Returns: BigDecimal

The final cash value of this voucher.

getCreatedBy()

Returns: ExtProfileBean

The profile that created this voucher.

getAllocatedTo()

Returns: ExtProfileBean

The profile this voucher is allocated to, or null if it has not been allocated to a known profile.

getAllocatedToId()

Returns: String

The raw identifier this voucher is allocated to, which may reference a profile that does not exist in Kademi (e.g. an external user identifier).

getStatus()

Returns: String

The voucher's current status code, normalised to an empty string rather than null.

getStatusDate()

Returns: Date

The date the voucher's status was last changed.

getVoucherStatusChanges()

Returns: List<VoucherStatusChangeBean>

The full history of status changes recorded against this voucher, for auditing.

getFields()

Returns: Map<String,String>

The voucher's custom field values, keyed by field name.

getStatusChangedForOrg()

Returns: OrgData

The organisation the last status change was recorded for, or null if none was set.

getRedeemingOrg()

Returns: OrgData

The organisation permitted to redeem this voucher's voucher type, or null if none is configured.

getVoucherTypeNotes()

Returns: String

Internal notes configured on this voucher's voucher type.

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