Search in sources :

Example 1 with MaskedUserProfileResponse

use of jp.ne.paypay.model.MaskedUserProfileResponse in project paypayopa-sdk-java by paypay.

the class UserApi method getMaskedUserProfileWithHttpInfo.

/**
 * Get masked user profile
 * Get the masked phone number of the user
 * @param userAuthorizationId  (required)
 * @return ApiResponse<MaskedUserProfileResponse>
 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
 */
protected ApiResponse<MaskedUserProfileResponse> getMaskedUserProfileWithHttpInfo(String userAuthorizationId) throws ApiException {
    Call call = getMaskedUserProfileValidateBeforeCall(userAuthorizationId);
    Type localVarReturnType = new TypeToken<MaskedUserProfileResponse>() {
    }.getType();
    return apiClient.execute(call, localVarReturnType, ApiNameConstants.GET_SECURE_USER_PROFILE);
}
Also used : Call(com.squareup.okhttp.Call) Type(java.lang.reflect.Type) MaskedUserProfileResponse(jp.ne.paypay.model.MaskedUserProfileResponse)

Example 2 with MaskedUserProfileResponse

use of jp.ne.paypay.model.MaskedUserProfileResponse in project paypayopa-sdk-java by paypay.

the class UserApiTest method getMaskedUserProfileTest.

/**
 * Get masked user profile
 *
 * Get the masked phone number of the user
 *
 * @throws ApiException
 *          if the Api call fails
 */
@Test
public void getMaskedUserProfileTest() throws ApiException {
    String userAuthorizationId = "userAuthorizationId";
    MaskedUserProfileResponse maskedUserProfileResponse = new MaskedUserProfileResponse();
    maskedUserProfileResponse.setResultInfo(resultInfo);
    ApiResponse<MaskedUserProfileResponse> maskedUserProfileResponseApiResponse = new ApiResponse<>(00001, null, maskedUserProfileResponse);
    Mockito.when(apiClient.escapeString(userAuthorizationId)).thenReturn(userAuthorizationId);
    Mockito.when(api.getMaskedUserProfileWithHttpInfo(userAuthorizationId)).thenReturn(maskedUserProfileResponseApiResponse);
    MaskedUserProfileResponse response = api.getMaskedUserProfile(userAuthorizationId);
    Assert.assertEquals(response.getResultInfo().getMessage(), "SUCCESS");
}
Also used : MaskedUserProfileResponse(jp.ne.paypay.model.MaskedUserProfileResponse) ApiResponse(jp.ne.paypay.ApiResponse) Test(org.junit.jupiter.api.Test)

Aggregations

MaskedUserProfileResponse (jp.ne.paypay.model.MaskedUserProfileResponse)2 Call (com.squareup.okhttp.Call)1 Type (java.lang.reflect.Type)1 ApiResponse (jp.ne.paypay.ApiResponse)1 Test (org.junit.jupiter.api.Test)1