com.braintreegateway
Class ValidationError

java.lang.Object
  extended by com.braintreegateway.ValidationError

public class ValidationError
extends Object

Represents an validation error from the gateway.


Field Summary
private  String attribute
           
private  ValidationErrorCode code
           
private  String message
           
 
Constructor Summary
ValidationError(String attribute, ValidationErrorCode code, String message)
           
 
Method Summary
 String getAttribute()
          Returns the attribute that this error references, e.g.
 ValidationErrorCode getCode()
          Returns the ValidationErrorCode for the specific validation error.
 String getMessage()
          Returns the message associated with the validation error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 the ValidationErrorCode for 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 on getCode() for comparisons.

Returns:
a String for the message.


Copyright © 2013. All Rights Reserved.