Package com.braintreegateway
Class ValidationError
- java.lang.Object
-
- com.braintreegateway.ValidationError
-
public class ValidationError extends Object
Represents an validation error from the gateway.
-
-
Constructor Summary
Constructors Constructor Description ValidationError(String attribute, ValidationErrorCode code, String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object e)StringgetAttribute()Returns the attribute that this error references, e.g.ValidationErrorCodegetCode()Returns theValidationErrorCodefor the specific validation error.StringgetMessage()Returns the message associated with the validation error.
-
-
-
Field Detail
-
attribute
private String attribute
-
code
private ValidationErrorCode code
-
message
private String message
-
-
Constructor Detail
-
ValidationError
public ValidationError(String attribute, ValidationErrorCode code, String message)
-
-
Method Detail
-
getAttribute
public String getAttribute()
Returns the attribute that this error references, e.g. amount or expirationDate.- Returns:
- the attribute.
-
getCode
public ValidationErrorCode getCode()
Returns theValidationErrorCodefor the specific validation error.- Returns:
- a
ValidationErrorCode.
-
getMessage
public String getMessage()
Returns the message associated with the validation error. Messages may change over time; rely ongetCode()for comparisons.- Returns:
- a String for the message.
-
-