org.starhope.appius.pay.util
Enum AddressVerificationCode

java.lang.Object
  extended by java.lang.Enum<AddressVerificationCode>
      extended by org.starhope.appius.pay.util.AddressVerificationCode
All Implemented Interfaces:
Serializable, Comparable<AddressVerificationCode>

public enum AddressVerificationCode
extends Enum<AddressVerificationCode>

This is based upon the following codes enumerated by Authorize.Net. (Future gateways may add other codes or reuse existing codes for conformity.)

A = Address (Street) matches, ZIP does not

B = Address information not provided for AVS check

TODO: Case "C" Response.Write"Street address and Postal Code not verified for international transaction due to incompatible formats. (Acquirer sent both street address and Postal Code.)" Case "D" Response.Write "International Transaction: Street address and Postal Code match."

E = AVS error

G = Non-U.S. Card Issuing Bank

N = No Match on Address (Street) or ZIP

P = AVS not applicable for this transaction

R = Retry – System unavailable or timed out

S = Service not supported by issuer

U = Address information is unavailable

W = Nine digit ZIP matches, Address (Street) does not

X = Address (Street) and nine digit ZIP match

Y = Address (Street) and five digit ZIP match

Z = Five digit ZIP matches, Address (Street) does not

TODO: Copy the documentation and codes from here (the class Javadocs) into the individual Javadoc comments for each enumerated value.

Author:
brpocock

Enum Constant Summary
ADDRESS_AND_ZIP_MISMATCH
           
ADDRESS_AND_ZIP_OK
           
ADDRESS_AND_ZIP_PLUS4_OK
           
ADDRESS_NOT_PROVIDED
           
ADDRESS_OK_ZIP_BAD
           
ADDRESS_UNAVAILABLE
           
AVS_ERROR
           
AVS_NOT_APPLICABLE
           
AVS_NOT_SUPPORTED_BY_BANK
           
AVS_SYSTEM_UNAVAIL_RETRY
           
INVALID_AVS
           
NON_US_ADDRESS
           
NON_US_BANK
           
NON_US_STREET_AND_POSTAL_OK
           
ZIP_OK_ADDRESS_BAD
           
ZIP_PLUS4_OK_ADDRESS_BAD
           
 
Method Summary
static String explain(AddressVerificationCode avs)
          Generate a human-presentable (end-user-visible) explanation of this status code.
static Object forAuthorizeNetCode(String string)
          WRITEME: document this method (brpocock, Jul 14, 2009)
static AddressVerificationCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AddressVerificationCode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADDRESS_AND_ZIP_MISMATCH

public static final AddressVerificationCode ADDRESS_AND_ZIP_MISMATCH

ADDRESS_AND_ZIP_OK

public static final AddressVerificationCode ADDRESS_AND_ZIP_OK

ADDRESS_AND_ZIP_PLUS4_OK

public static final AddressVerificationCode ADDRESS_AND_ZIP_PLUS4_OK

ADDRESS_NOT_PROVIDED

public static final AddressVerificationCode ADDRESS_NOT_PROVIDED

ADDRESS_OK_ZIP_BAD

public static final AddressVerificationCode ADDRESS_OK_ZIP_BAD

ADDRESS_UNAVAILABLE

public static final AddressVerificationCode ADDRESS_UNAVAILABLE

AVS_ERROR

public static final AddressVerificationCode AVS_ERROR

AVS_NOT_APPLICABLE

public static final AddressVerificationCode AVS_NOT_APPLICABLE

AVS_NOT_SUPPORTED_BY_BANK

public static final AddressVerificationCode AVS_NOT_SUPPORTED_BY_BANK

AVS_SYSTEM_UNAVAIL_RETRY

public static final AddressVerificationCode AVS_SYSTEM_UNAVAIL_RETRY

INVALID_AVS

public static final AddressVerificationCode INVALID_AVS

NON_US_ADDRESS

public static final AddressVerificationCode NON_US_ADDRESS

NON_US_BANK

public static final AddressVerificationCode NON_US_BANK

NON_US_STREET_AND_POSTAL_OK

public static final AddressVerificationCode NON_US_STREET_AND_POSTAL_OK

ZIP_OK_ADDRESS_BAD

public static final AddressVerificationCode ZIP_OK_ADDRESS_BAD

ZIP_PLUS4_OK_ADDRESS_BAD

public static final AddressVerificationCode ZIP_PLUS4_OK_ADDRESS_BAD
Method Detail

values

public static AddressVerificationCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AddressVerificationCode c : AddressVerificationCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AddressVerificationCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

explain

public static String explain(AddressVerificationCode avs)
Generate a human-presentable (end-user-visible) explanation of this status code. May be verbose, as needed.

Parameters:
avs - The AddressVerificationCode to be explained
Returns:
the string explanation of that value

forAuthorizeNetCode

public static Object forAuthorizeNetCode(String string)
WRITEME: document this method (brpocock, Jul 14, 2009)

Parameters:
string -
Returns: