/**
*  This is part of the documentation for the distributed Cretit
*  Card Verification demo.
*
*  This code should give you a basic idea how the full package
*  works.  This demo class will only recognize VISA cards.
*  The full version identifies VISA, MasterCard, AMEX, Diners Club,
*  Discover, and enRoute.
*
*  For additional information, or to see the full documentation
*  go to the "Support" section at http://products.dmmw.com
*
*  All information in this file is Copyright (c) - DMMW
*  All rights reserved.
*/

public class CreditCard {
    // ------ Credit Card Types
    public static final int TYPE_NONE;
    public static final int TYPE_VISA;
    // ------ Error codes
    public static final int ERROR_NONE;
    public static final int ERROR_UNRECOGNIZED_CARD_TYPE;
    public static final int ERROR_FAILED_LUHN_CHECK;
    public static final int ERROR_WRONG_LENGTH;
    public static final int ERROR_INVALID_CHARS;
    // A couple of more constants
    public static final String version;
    public static final String copyright;

    // ------ Constructor
    public CreditCard(java.lang.String);

    // ------ Methods

    // returns the version of the class file
    public String getVersion();

    // returns the copyright of the class file
    public String getCopyright();

    // returns true if all characters are valid
    public boolean hasNoInvalidChars();

    // returns true if the card number passes a validity test
    public boolean LuhnCheck(); 

    // returns either TYPE_VISA or TYPE_NONE
    public int getCardType();	

    // reset the error code before calling the above methods		
    public void resetErrorCode();

    // returns the last error(s)
    public int getLastErrorCode();
}
