
io.electrum.cardaccount.model.AdminNotification Maven / Gradle / Ivy
The newest version!
package io.electrum.cardaccount.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.electrum.vas.Utils;
import io.electrum.vas.model.Institution;
import io.electrum.vas.model.ThirdPartyIdentifier;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* The data required in administrative messages.
**/
@ApiModel(description = "The data required in administrative messages.")
public class AdminNotification {
protected String id = null;
protected DateTime time = null;
protected Institution originator = null;
protected Institution client = null;
protected Institution receiver = null;
protected List thirdPartyIdentifiers = new ArrayList();
private String terminalId = null;
/**
* The randomly generated UUID identifying this transaction, as defined for a variant 4 UUID in [RFC
* 4122](https://tools.ietf.org/html/rfc4122)
**/
public AdminNotification id(String id) {
this.id = id;
return this;
}
@ApiModelProperty(required = true, value = "The randomly generated UUID identifying this transaction, as defined for a variant 4 UUID in [RFC 4122](https://tools.ietf.org/html/rfc4122)")
@JsonProperty("id")
@NotNull
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/**
* The date and time of the message in UTC, as recorded by the sender. The format shall be as defined for date-time
* in [RFC 3339 section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is recommended that the optional
* time-secfrac be included up to millisecond precision
**/
public AdminNotification time(DateTime time) {
this.time = time;
return this;
}
@ApiModelProperty(required = true, value = "The date and time of the message as recorded by the sender. The format shall be as defined for date-time in [RFC 3339 section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). It is recommended that the optional time-secfrac be included up to millisecond precision")
@JsonProperty("time")
@NotNull
public DateTime getTime() {
return time;
}
public void setTime(DateTime time) {
this.time = time;
}
/**
* Data relating to the originator of the transaction
**/
public AdminNotification originator(Institution originator) {
this.originator = originator;
return this;
}
@ApiModelProperty(required = true, value = "Data relating to the originator of the transaction")
@JsonProperty("originator")
@NotNull
public Institution getOriginator() {
return originator;
}
public void setOriginator(Institution originator) {
this.originator = originator;
}
/**
* Data relating to the sender of BasicRequest.
**/
public AdminNotification client(Institution client) {
this.client = client;
return this;
}
@ApiModelProperty(required = true, value = "Data relating to the sender of Transaction.")
@JsonProperty("client")
@NotNull
public Institution getClient() {
return client;
}
public void setClient(Institution client) {
this.client = client;
}
/**
* Data relating to the entity which ultimately processes the request.
**/
public AdminNotification receiver(Institution receiver) {
this.receiver = receiver;
return this;
}
@ApiModelProperty(value = "Data relating to the entity which ultimately processes the request.")
@JsonProperty("receiver")
public Institution getReceiver() {
return receiver;
}
public void setReceiver(Institution receiver) {
this.receiver = receiver;
}
/**
* An array of identifiers which each identify the transaction within each entity's system.
**/
public AdminNotification thirdPartyIdentifiers(List transactionIdentifiers) {
this.thirdPartyIdentifiers = transactionIdentifiers;
return this;
}
@ApiModelProperty(required = true, value = "An array of identifiers which each identify the transaction within each entity's system.")
@JsonProperty("thirdPartyIdentifiers")
@NotNull
public List getThirdPartyIdentifiers() {
return thirdPartyIdentifiers;
}
public void setThirdPartyIdentifiers(List transactionIdentifiers) {
this.thirdPartyIdentifiers = transactionIdentifiers;
}
/**
* The id that uniquely identifies each device or system in an originator's institution capable of sending requests.
* Required for transactions initiated from physical card entry or point-of-sale devices
**/
public AdminNotification terminalId(String terminalId) {
this.terminalId = terminalId;
return this;
}
@ApiModelProperty(required = true, value = "The ID that uniquely identifies each device or system in an originator's institution capable of sending requests. Required for transactions initiated from physical card entry or point-of-sale devices")
@JsonProperty("terminalId")
@Length(min = 8, max = 8)
@NotNull
public String getTerminalId() {
return terminalId;
}
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdminNotification vasRequest = (AdminNotification) o;
return Objects.equals(id, vasRequest.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Transaction {\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(" receiver: ").append(Utils.toIndentedString(receiver)).append("\n");
sb.append(" thirdPartyIdentifiers: ").append(Utils.toIndentedString(thirdPartyIdentifiers)).append("\n");
sb.append(" terminalId: ").append(Utils.toIndentedString(terminalId)).append("\n");
sb.append("}");
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy