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
| Property | Returns | Description |
|---|---|---|
| allocatedTo | ExtProfileBean | The profile this voucher is allocated to, or null if it has not been allocated to a known profile. |
| allocatedToId | 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). |
| cashValue | BigDecimal | The final cash value of this voucher. |
| createdBy | ExtProfileBean | The profile that created this voucher. |
| createdDate | Date | The date this voucher was created. |
| expiryDate | Date | The date this voucher expires, or null if it has no expiry. |
| fields | Map<String,String> | The voucher's custom field values, keyed by field name. |
| id | long | The Kademi internal database ID for this voucher. |
| redeemingOrg | OrgData | The organisation permitted to redeem this voucher's voucher type, or null if none is configured. |
| status | String | The voucher's current status code, normalised to an empty string rather than null. |
| statusChangedBy | ExtProfileBean | The profile that last changed this voucher's status, or null if the status has never been changed. |
| statusChangedForOrg | OrgData | The organisation the last status change was recorded for, or null if none was set. |
| statusDate | Date | The date the voucher's status was last changed. |
| voucherId | String | The voucher's user-facing identifier, as generated from the voucher type's ID template or a random value. |
| voucherStatusChanges | List<VoucherStatusChangeBean> | The full history of status changes recorded against this voucher, for auditing. |
| voucherTypeCode | String | The name (portable, code-like identifier) of this voucher's voucher type. |
| voucherTypeContent | String | The free-text content (e.g. terms, description) configured on this voucher's voucher type. |
| voucherTypeNotes | String | Internal notes configured on this voucher's voucher type. |
| voucherTypeTitle | String | The 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.