
io.electrum.suv.api.models.RedemptionResponse Maven / Gradle / Ivy
package io.electrum.suv.api.models;
import java.util.Objects;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.electrum.vas.Utils;
import io.electrum.vas.model.Amounts;
import io.electrum.vas.model.Transaction;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Information about the voucher redemption outcome.
*/
@ApiModel(description = "Information about the voucher redemption outcome.")
public final class RedemptionResponse extends Transaction {
private Voucher voucher = null;
private Amounts amounts = null;
public RedemptionResponse amounts(Amounts amounts) {
this.amounts = amounts;
return this;
}
/**
* Describes various amounts pertaining to the voucher provisioned.
*
* @return amounts
**/
@JsonProperty("amounts")
@ApiModelProperty(value = "Amounts which make up the transaction. Absent amounts have zero value.")
@Valid
public Amounts getAmounts() {
return amounts;
}
public void setAmounts(Amounts amounts) {
this.amounts = amounts;
}
public RedemptionResponse voucher(Voucher voucher) {
this.voucher = voucher;
return this;
}
/**
* The voucher used for the redemption if the vendor processed the request successfully.
*
* @return voucher
**/
@JsonProperty("voucher")
@ApiModelProperty(value = "Describes the voucher provisioned by the vendor.")
@Valid
public Voucher getVoucher() {
return voucher;
}
public void setVoucher(Voucher voucher) {
this.voucher = voucher;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
if (!super.equals(o))
return false;
RedemptionResponse that = (RedemptionResponse) o;
return Objects.equals(voucher, that.voucher) && Objects.equals(amounts, that.amounts);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), voucher, amounts);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RedemptionResponse {\n");
sb.append(" id: ").append(Utils.toIndentedString(id)).append("\n");
sb.append(" time: ").append(Utils.toIndentedString(time)).append("\n");
sb.append(" originator: ").append(Utils.toIndentedString(originator)).append("\n");
sb.append(" client: ").append(Utils.toIndentedString(client)).append("\n");
sb.append(" settlementEntity: ").append(Utils.toIndentedString(settlementEntity)).append("\n");
sb.append(" receiver: ").append(Utils.toIndentedString(receiver)).append("\n");
sb.append(" thirdPartyIdentifiers: ").append(Utils.toIndentedString(thirdPartyIdentifiers)).append("\n");
sb.append(" slipData: ").append(Utils.toIndentedString(slipData)).append("\n");
sb.append(" basketRef: ").append(Utils.toIndentedString(basketRef)).append("\n");
sb.append(" tranType: ").append(Utils.toIndentedString(tranType)).append("\n");
sb.append(" srcAccType: ").append(Utils.toIndentedString(srcAccType)).append("\n");
sb.append(" destAccType: ").append(Utils.toIndentedString(destAccType)).append("\n");
sb.append(" amounts: ").append(Utils.toIndentedString(amounts)).append("\n");
sb.append(" voucher: ").append(Utils.toIndentedString(voucher)).append("\n");
sb.append("}");
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy