Fluent builder for changing a voucher's status, recording who made the change, when, at which organisation and with what notes. Obtained from VoucherManager.newVoucherStatusBuilder(Voucher) and completed with build().
Group: Builders
Methods
status(String status)
Returns: VoucherStatusBuilder
Sets the new status for the voucher.
| Parameter | Description |
|---|---|
status | the new status |
changedDate(Date changedDate)
Returns: VoucherStatusBuilder
Sets the date when the status change occurred.
| Parameter | Description |
|---|---|
changedDate | the change date |
changedBy(Profile changedBy)
Returns: VoucherStatusBuilder
Sets the profile that performed the status change.
| Parameter | Description |
|---|---|
changedBy | the profile that changed the status |
changedByOrg(Organisation changedByOrg)
Returns: VoucherStatusBuilder
Sets the organisation associated with the status change.
| Parameter | Description |
|---|---|
changedByOrg | the organisation associated with the change |
notes(String notes)
Returns: VoucherStatusBuilder
Sets the notes associated with the status change.
| Parameter | Description |
|---|---|
notes | the change notes |
build()
Returns: Voucher
Applies the status change to the voucher, defaulting the change date to now when none was set, and fires a voucher change event. Throws if the voucher or the status was not set.