Package io.electrum.suv.api.models
Class Voucher
- java.lang.Object
-
- io.electrum.suv.api.models.Voucher
-
public class Voucher extends Object
Describes the voucher provisioned by the vendor.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringcodeprotected org.joda.time.DateTimeexpiryDateprotected io.electrum.vas.model.Pinpinprotected List<String>redeemInstructionsprotected StringserialNumber
-
Constructor Summary
Constructors Constructor Description Voucher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vouchercode(String code)The voucher’s code used by the customer to redeem the voucher.booleanequals(Object o)VoucherexpiryDate(org.joda.time.DateTime expiryDate)The date and time at which the voucher expires.StringgetCode()org.joda.time.DateTimegetExpiryDate()io.electrum.vas.model.PingetPin()List<String>getRedeemInstructions()StringgetSerialNumber()inthashCode()Voucherpin(io.electrum.vas.model.Pin pin)A secret value which is required to be provided by a customer when redeeming the voucher using the code.VoucherredeemInstructions(List<String> redeemInstructions)An array of free text lines which provide the customer with information on how to redeem the voucher.VoucherserialNumber(String serialNumber)The voucher's serial number.voidsetCode(String code)voidsetExpiryDate(org.joda.time.DateTime expiryDate)voidsetPin(io.electrum.vas.model.Pin pin)voidsetRedeemInstructions(List<String> redeemInstructions)voidsetSerialNumber(String serialNumber)StringtoString()
-
-
-
Method Detail
-
code
public Voucher code(String code)
The voucher’s code used by the customer to redeem the voucher. This must be present in ProvisionResponse, RedemptionRequest and RefundRequest messages. This may be present in a ProvisionRequest if the voucher vendor allows the client to set the voucher code. It is recommended this field not be populated in other instances as it may be considered sensitive data.
-
getCode
@Length(max=40) public String getCode()
-
setCode
public void setCode(String code)
-
expiryDate
public Voucher expiryDate(org.joda.time.DateTime expiryDate)
The date and time at which the voucher expires. The format shall be as defined for date-time in [RFC 3339 section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
-
getExpiryDate
public org.joda.time.DateTime getExpiryDate()
-
setExpiryDate
public void setExpiryDate(org.joda.time.DateTime expiryDate)
-
redeemInstructions
public Voucher redeemInstructions(List<String> redeemInstructions)
An array of free text lines which provide the customer with information on how to redeem the voucher. These are intended to be printed on a customer's receipt slip.
-
pin
public Voucher pin(io.electrum.vas.model.Pin pin)
A secret value which is required to be provided by a customer when redeeming the voucher using the code. Use of a PIN in addition to the voucher code adds security to the voucher redemption process.- Since:
- v1.8.0
-
getPin
public io.electrum.vas.model.Pin getPin()
-
setPin
public void setPin(io.electrum.vas.model.Pin pin)
-
serialNumber
public Voucher serialNumber(String serialNumber)
The voucher's serial number. This can be used to identify the voucher in the vendor's system but cannot be used to redeem the voucher.- Since:
- v1.8.0
-
getSerialNumber
@Length(max=40) public String getSerialNumber()
-
setSerialNumber
public void setSerialNumber(String serialNumber)
-
-