
io.electrum.cardaccount.model.ErrorDetail Maven / Gradle / Ivy
The newest version!
/*
* Electrum Gateway Card-Account API
* The Electrum Gateway Card-Account API defines an interface for card and account management.
*
* OpenAPI spec version: 0.0.600
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.electrum.cardaccount.model;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.electrum.vas.Utils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Represents the outcome of a failed transaction.
*/
@ApiModel(description = "Represents the outcome of a failed transaction.")
public class ErrorDetail {
@JsonProperty("id")
private String id = null;
@JsonProperty("errorMessage")
private String errorMessage = null;
/**
* The type of error that occurred.
*/
public enum ErrorType {
AUTHENTICATION_ERROR("AUTHENTICATION_ERROR"),
INSUFFICIENT_FUNDS("INSUFFICIENT_FUNDS"),
INVALID_AMOUNT("INVALID_AMOUNT"),
INVALID_CARD_NUMBER("INVALID_CARD_NUMBER"),
FORMAT_ERROR("FORMAT_ERROR"),
FUNCTION_NOT_SUPPORTED("FUNCTION_NOT_SUPPORTED"),
GENERAL_ERROR("GENERAL_ERROR"),
ROUTING_ERROR("ROUTING_ERROR"),
TRANSACTION_NOT_SUPPORTED("TRANSACTION_NOT_SUPPORTED"),
UNABLE_TO_LOCATE_RECORD("UNABLE_TO_LOCATE_RECORD"),
UPSTREAM_UNAVAILABLE("UPSTREAM_UNAVAILABLE"),
CARD_ALREADY_ALLOCATED("CARD_ALREADY_ALLOCATED"),
CARD_NOT_LINKED_TO_THIS_ACCOUNT("CARD_NOT_LINKED_TO_THIS_ACCOUNT"),
EXPIRED_CARD("EXPIRED_CARD"),
STOPPED_CARD("STOPPED_CARD"),
STOLEN_CARD("STOLEN_CARD"),
CANCELLED_CARD("CANCELLED_CARD"),
LOST_CARD("LOST_CARD"),
DUPLICATE_TRANSACTION("DUPLICATE_TRANSACTION");
private String value;
ErrorType(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ErrorType fromValue(String text) {
for (ErrorType b : ErrorType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("errorType")
private ErrorType errorType = null;
@JsonProperty("detailedMessage")
private Object detailedMessage = null;
@JsonProperty("operation")
private Operation operation = null;
public ErrorDetail id(String id) {
this.id = id;
return this;
}
/**
* The UUID of the message for which the error occurred.
* @return id
**/
@JsonProperty("id")
@ApiModelProperty(required = true, value = "The UUID of the message for which the error occurred.")
@NotNull
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ErrorDetail errorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
/**
* A description of the error.
* @return errorMessage
**/
@JsonProperty("errorMessage")
@ApiModelProperty(required = true, value = "A description of the error.")
@NotNull
@Size(min=0,max=20)
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public ErrorDetail errorType(ErrorType errorType) {
this.errorType = errorType;
return this;
}
/**
* The type of error that occurred.
* @return errorType
**/
@JsonProperty("errorType")
@ApiModelProperty(required = true, value = "The type of error that occurred.")
@NotNull
public ErrorType getErrorType() {
return errorType;
}
public void setErrorType(ErrorType errorType) {
this.errorType = errorType;
}
public ErrorDetail detailedMessage(Object detailedMessage) {
this.detailedMessage = detailedMessage;
return this;
}
/**
* A free form detailed description of a particular failure condition. May be optionally supplied
* @return detailedMessage
**/
@JsonProperty("detailedMessage")
@ApiModelProperty(value = "A free form detailed description of a particular failure condition. May be optionally supplied")
public Object getDetailedMessage() {
return detailedMessage;
}
public void setDetailedMessage(Object detailedMessage) {
this.detailedMessage = detailedMessage;
}
public ErrorDetail requestType(Operation requestType) {
this.operation = requestType;
return this;
}
/**
* The type of request being processed when the error occurred.
* @return requestType
**/
@JsonProperty("requestType")
@ApiModelProperty(required = true, value = "The type of request being processed when the error occurred.")
@NotNull
public Operation getRequestType() {
return operation;
}
public void setRequestType(Operation requestType) {
this.operation = requestType;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ErrorDetail errorDetail = (ErrorDetail) o;
return Objects.equals(this.id, errorDetail.id) &&
Objects.equals(this.errorMessage, errorDetail.errorMessage) &&
Objects.equals(this.errorType, errorDetail.errorType) &&
Objects.equals(this.detailedMessage, errorDetail.detailedMessage) &&
Objects.equals(this.operation, errorDetail.operation);
}
@Override
public int hashCode() {
return Objects.hash(id, errorMessage, errorType, detailedMessage, operation);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ErrorDetail {\n");
sb.append(" id: ").append(Utils.toIndentedString(id)).append("\n");
sb.append(" errorMessage: ").append(Utils.toIndentedString(errorMessage)).append("\n");
sb.append(" errorType: ").append(Utils.toIndentedString(errorType)).append("\n");
sb.append(" detailedMessage: ").append(Utils.toIndentedString(detailedMessage)).append("\n");
sb.append(" requestType: ").append(Utils.toIndentedString(operation)).append("\n");
sb.append("}");
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy