public class Tokeninfo extends Object
| Constructor and Description |
|---|
Tokeninfo()
Default Constructor
|
Tokeninfo(String accessToken,
String tokenType,
Integer expiresIn)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static Tokeninfo |
createFromAuthorizationCode(APIContext apiContext,
CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters)
Creates an Access Token from an Authorization Code.
|
static Tokeninfo |
createFromAuthorizationCode(CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters)
Creates an Access Token from an Authorization Code.
|
static Tokeninfo |
createFromAuthorizationCodeForFpp(APIContext apiContext,
CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters)
Creates an Access and a Refresh Tokens from an Authorization Code for future payment.
|
Tokeninfo |
createFromRefreshToken(APIContext apiContext,
CreateFromRefreshTokenParameters createFromRefreshTokenParameters)
Creates an Access Token from an Refresh Token.
|
Tokeninfo |
createFromRefreshToken(CreateFromRefreshTokenParameters createFromRefreshTokenParameters)
Creates an Access Token from an Refresh Token.
|
String |
getAccessToken()
Getter for just accessToken without type (e.g., "EEwJ6tF9x5WCIZDYzyZGaz6Khbw7raYRIBV_WxVvgmsG")
|
String |
getAccessTokenWithType()
Getter for accessToken with token type (e.g., "Bearer: EEwJ6tF9x5WCIZDYzyZGaz6Khbw7raYRIBV_WxVvgmsG")
|
Integer |
getExpiresIn()
Getter for expiresIn
|
static String |
getLastRequest()
Returns the last request sent to the Service
|
static String |
getLastResponse()
Returns the last response returned by the Service
|
String |
getRefreshToken()
Getter for refreshToken
|
String |
getScope()
Getter for scope
|
String |
getTokenType()
Getter for tokenType
|
static void |
initConfig(File file)
Initialize using a File(Properties file)
|
static void |
initConfig(InputStream is)
Initialize using InputStream(of a Properties file)
|
static void |
initConfig(Properties properties)
Initialize using Properties
|
void |
setAccessToken(String accessToken)
Setter for accessToken
|
void |
setExpiresIn(Integer expiresIn)
Setter for expiresIn
|
void |
setRefreshToken(String refreshToken)
Setter for refreshToken
|
void |
setScope(String scope)
Setter for scope
|
void |
setTokenType(String tokenType)
Setter for tokenType
|
String |
toJSON()
Returns a JSON string corresponding to object state
|
String |
toString() |
public static String getLastRequest()
public static String getLastResponse()
public static void initConfig(InputStream is) throws PayPalRESTException
is - InputStreamPayPalRESTExceptionpublic static void initConfig(File file) throws PayPalRESTException
file - File object of a properties entityPayPalRESTExceptionpublic static void initConfig(Properties properties)
properties - Properties objectpublic void setScope(String scope)
public String getScope()
public void setAccessToken(String accessToken)
public String getAccessToken()
public String getAccessTokenWithType()
public void setRefreshToken(String refreshToken)
public String getRefreshToken()
public void setTokenType(String tokenType)
public String getTokenType()
public void setExpiresIn(Integer expiresIn)
public Integer getExpiresIn()
public static Tokeninfo createFromAuthorizationCode(CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters) throws PayPalRESTException
createFromAuthorizationCodeParameters - Query parameters used for API callPayPalRESTExceptionpublic static Tokeninfo createFromAuthorizationCode(APIContext apiContext, CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters) throws PayPalRESTException
apiContext - APIContext to be used for the call.createFromAuthorizationCodeParameters - Query parameters used for API callPayPalRESTExceptionpublic static Tokeninfo createFromAuthorizationCodeForFpp(APIContext apiContext, CreateFromAuthorizationCodeParameters createFromAuthorizationCodeParameters) throws PayPalRESTException
apiContext - APIContext to be used for the call.createFromAuthorizationCodeParameters - Query parameters used for API callPayPalRESTExceptionpublic Tokeninfo createFromRefreshToken(CreateFromRefreshTokenParameters createFromRefreshTokenParameters) throws PayPalRESTException
createFromRefreshTokenParameters - Query parameters used for API callPayPalRESTExceptionpublic Tokeninfo createFromRefreshToken(APIContext apiContext, CreateFromRefreshTokenParameters createFromRefreshTokenParameters) throws PayPalRESTException
apiContext - APIContext to be used for the call.createFromRefreshTokenParameters - Query parameters used for API callPayPalRESTExceptionpublic String toJSON()
Copyright © 2016. All Rights Reserved.