Package com.clover.sdk.util
Class CloverAuth.AuthResult
- java.lang.Object
-
- com.clover.sdk.util.CloverAuth.AuthResult
-
- Enclosing class:
- CloverAuth
public static class CloverAuth.AuthResult extends Object
Container for the data returned when an account authenticates with the Clover service. If an error occurs while trying to obtain the token (due to network down, server error or permission error) only the errorMessage field is guaranteed to be set, all other values may be null.
-
-
Field Summary
Fields Modifier and Type Field Description String
appId
The id of the app that performed authentication.Bundle
authData
The complete set of data returned byAccountManager
.String
authToken
The auth token, used for sending subsequent requests to the service.String
baseUrl
The base URL of the Clover service.String
errorMessage
Error message that was generated during authentication, ornull
.String
merchantId
The id of the merchant associated with the authenticated account.
-
Constructor Summary
Constructors Constructor Description AuthResult(Bundle authData)
-
-
-
Field Detail
-
authToken
public final String authToken
The auth token, used for sending subsequent requests to the service. May be null on error.
-
baseUrl
public final String baseUrl
The base URL of the Clover service. REST API endpoints are relative to this URL. May be null on error.
-
errorMessage
public final String errorMessage
Error message that was generated during authentication, ornull
.
-
merchantId
public final String merchantId
The id of the merchant associated with the authenticated account. May be null on error.Prefer
new MerchantConnector(...).getMerchant().getId()
, which always works even if an auth token cannot be obtained due to error.
-
appId
public final String appId
The id of the app that performed authentication. May be null on error.
-
authData
public final Bundle authData
The complete set of data returned byAccountManager
.
-
-
Constructor Detail
-
AuthResult
public AuthResult(Bundle authData)
-
-