Package com.clover.sdk.util
Class CloverAccount
- java.lang.Object
-
- com.clover.sdk.util.CloverAccount
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLOVER_ACCOUNT_TYPE
The account type string for Clover accounts.static String
CLOVER_AUTHTOKEN_TYPE
static int
GET_AUTH_TOKEN_ERROR_CODE_INVALID_TYPE
AccountManager.KEY_ERROR_CODE
indicating that an undefined account type was passed.static int
GET_AUTH_TOKEN_ERROR_CODE_NETWORK
AccountManager.KEY_ERROR_CODE
indicating that a network-related error occurred retrieving a Clover app auth token.static int
GET_AUTH_TOKEN_ERROR_CODE_NO_TOKEN
AccountManager.KEY_ERROR_CODE
indicating that no app token existed for the calling application.static int
GET_AUTH_TOKEN_ERROR_CODE_UNKNOWN
AccountManager.KEY_ERROR_CODE
indicating that an unknown error occurred retrieving a Clover app auth token.static String
KEY_APP_ID
static String
KEY_BASE_URL
static String
KEY_FORCE_VALIDATE
static String
KEY_MERCHANT_ID
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Account
getAccount(Context context)
Get the Clover Account on the device.static Account[]
getAccounts(Context context)
Deprecated.UsegetAccount(Context)
instead.
-
-
-
Field Detail
-
CLOVER_ACCOUNT_TYPE
public static final String CLOVER_ACCOUNT_TYPE
The account type string for Clover accounts.- See Also:
- Constant Field Values
-
CLOVER_AUTHTOKEN_TYPE
public static final String CLOVER_AUTHTOKEN_TYPE
- See Also:
- Constant Field Values
-
KEY_BASE_URL
public static final String KEY_BASE_URL
- See Also:
- Constant Field Values
-
KEY_MERCHANT_ID
public static final String KEY_MERCHANT_ID
- See Also:
- Constant Field Values
-
KEY_APP_ID
public static final String KEY_APP_ID
- See Also:
- Constant Field Values
-
KEY_FORCE_VALIDATE
public static final String KEY_FORCE_VALIDATE
- See Also:
- Constant Field Values
-
GET_AUTH_TOKEN_ERROR_CODE_UNKNOWN
public static final int GET_AUTH_TOKEN_ERROR_CODE_UNKNOWN
AccountManager.KEY_ERROR_CODE
indicating that an unknown error occurred retrieving a Clover app auth token.- See Also:
- Constant Field Values
-
GET_AUTH_TOKEN_ERROR_CODE_NETWORK
public static final int GET_AUTH_TOKEN_ERROR_CODE_NETWORK
AccountManager.KEY_ERROR_CODE
indicating that a network-related error occurred retrieving a Clover app auth token.- See Also:
- Constant Field Values
-
GET_AUTH_TOKEN_ERROR_CODE_NO_TOKEN
public static final int GET_AUTH_TOKEN_ERROR_CODE_NO_TOKEN
AccountManager.KEY_ERROR_CODE
indicating that no app token existed for the calling application.- See Also:
- Constant Field Values
-
GET_AUTH_TOKEN_ERROR_CODE_INVALID_TYPE
public static final int GET_AUTH_TOKEN_ERROR_CODE_INVALID_TYPE
AccountManager.KEY_ERROR_CODE
indicating that an undefined account type was passed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccount
public static Account getAccount(Context context)
Get the Clover Account on the device. The Clover Account is needed by most Clover service connectors.- Parameters:
context
- the context from your Android application or component- Returns:
- the Clover account on the device, should never return null
-
getAccounts
@Deprecated public static Account[] getAccounts(Context context)
Deprecated.UsegetAccount(Context)
instead. Very early versions of Clover software supported multiple Clover Accounts on a single device, but this is no longer the case, there is now always a single Clover Account on each device.
-
-