use of jp.ne.paypay.model.UserAuthorizationStatus in project paypayopa-sdk-java by paypay.
the class UserApi method getUserAuthorizationStatusWithHttpInfo.
/**
* Get user authorization status
* Get the authorization status of a user **Timeout: 15s**
* @param userAuthorizationId (required)
* @return ApiResponse<UserAuthorizationStatus>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
protected ApiResponse<UserAuthorizationStatus> getUserAuthorizationStatusWithHttpInfo(String userAuthorizationId) throws ApiException {
Call call = getUserAuthorizationStatusValidateBeforeCall(userAuthorizationId);
Type localVarReturnType = new TypeToken<UserAuthorizationStatus>() {
}.getType();
return apiClient.execute(call, localVarReturnType, ApiNameConstants.GET_USER_AUTH_STATUS);
}
use of jp.ne.paypay.model.UserAuthorizationStatus in project paypayopa-sdk-java by paypay.
the class UserApiExample method getOrUnlinkUser.
private static void getOrUnlinkUser(String userAuthorizationId, UserApi userApi, boolean unlinkUser) {
try {
if (unlinkUser) {
NotDataResponse notDataResponse = userApi.unlinkUser(userAuthorizationId);
System.out.println(notDataResponse);
} else {
UserAuthorizationStatus userAuthorizationStatus = userApi.getUserAuthorizationStatus(userAuthorizationId);
System.out.println(userAuthorizationStatus);
}
} catch (ApiException e) {
System.out.println(e.getResponseBody());
}
}
use of jp.ne.paypay.model.UserAuthorizationStatus in project paypayopa-sdk-java by paypay.
the class UserApiTest method getUserAuthorizationStatusTest.
/**
* Get user authorization status
*
* Get the authorization status of a user **Timeout: 15s**
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void getUserAuthorizationStatusTest() throws ApiException {
String userAuthorizationId = "userAuthorizationId";
UserAuthorizationStatus userAuthorizationStatus = new UserAuthorizationStatus();
userAuthorizationStatus.setResultInfo(resultInfo);
ApiResponse<UserAuthorizationStatus> userAuthorizationStatusApiResponse = new ApiResponse<>(00001, null, userAuthorizationStatus);
Mockito.when(apiClient.escapeString(userAuthorizationId)).thenReturn(userAuthorizationId);
Mockito.when(api.getUserAuthorizationStatusWithHttpInfo(userAuthorizationId)).thenReturn(userAuthorizationStatusApiResponse);
UserAuthorizationStatus response = api.getUserAuthorizationStatus(userAuthorizationId);
Assert.assertEquals(response.getResultInfo().getMessage(), "SUCCESS");
}
Aggregations