Search in sources :

Example 6 with KYCUserStatusNotificationBodyModel

use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.

the class IndividualKYCUserNotificationStrategyTest method isApplicable_shouldReturnTrueWhenProfileTypeIsIndividual.

@Test
void isApplicable_shouldReturnTrueWhenProfileTypeIsIndividual() {
    // @formatter:off
    final KYCUserStatusNotificationBodyModel KYCUserStatusNotificationBodyModelStub = KYCUserStatusNotificationBodyModel.builder().profileType(HyperwalletUser.ProfileType.INDIVIDUAL).build();
    // @formatter:on
    final boolean result = testObj.isApplicable(KYCUserStatusNotificationBodyModelStub);
    assertThat(result).isTrue();
}
Also used : KYCUserStatusNotificationBodyModel(com.paypal.kyc.model.KYCUserStatusNotificationBodyModel) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 7 with KYCUserStatusNotificationBodyModel

use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.

the class IndividualKYCUserNotificationStrategyTest method isApplicable_shouldReturnFalseWhenProfileTypeIsNotIndividual.

@MethodSource("nonIndividualProfileTypes")
@ParameterizedTest
void isApplicable_shouldReturnFalseWhenProfileTypeIsNotIndividual(final HyperwalletUser.ProfileType profileType) {
    // @formatter:off
    final KYCUserStatusNotificationBodyModel KYCUserStatusNotificationBodyModelStub = KYCUserStatusNotificationBodyModel.builder().profileType(profileType).build();
    // @formatter:on
    final boolean result = testObj.isApplicable(KYCUserStatusNotificationBodyModelStub);
    assertThat(result).isFalse();
}
Also used : KYCUserStatusNotificationBodyModel(com.paypal.kyc.model.KYCUserStatusNotificationBodyModel) MethodSource(org.junit.jupiter.params.provider.MethodSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 8 with KYCUserStatusNotificationBodyModel

use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.

the class BusinessKycUserNotificationStrategyTest method expectedKycMiraklStatus_shouldSetCorrectMiraklStatus_whenVerificationStatusIsNull.

@Test
void expectedKycMiraklStatus_shouldSetCorrectMiraklStatus_whenVerificationStatusIsNull() {
    // @formatter:off
    final KYCUserStatusNotificationBodyModel KYCUserStatusNotificationBodyModelStub = KYCUserStatusNotificationBodyModel.builder().clientUserId(String.valueOf(CLIENT_USER_ID)).verificationStatus(null).businessStakeholderVerificationStatus(HyperwalletUser.BusinessStakeholderVerificationStatus.VERIFIED).letterOfAuthorizationStatus(HyperwalletUser.LetterOfAuthorizationStatus.VERIFIED).profileType(HyperwalletUser.ProfileType.BUSINESS).build();
    // @formatter:on
    final MiraklShopKycStatus result = testObj.expectedKycMiraklStatus(KYCUserStatusNotificationBodyModelStub);
    assertThat(result).isEqualTo(MiraklShopKycStatus.APPROVED);
}
Also used : MiraklShopKycStatus(com.mirakl.client.mmp.domain.shop.MiraklShopKycStatus) KYCUserStatusNotificationBodyModel(com.paypal.kyc.model.KYCUserStatusNotificationBodyModel) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 9 with KYCUserStatusNotificationBodyModel

use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.

the class BusinessKycUserNotificationStrategyTest method expectedKycMiraklStatus_shouldSetCorrectMiraklStatus_whenLetterOfAuthorizationStatusIsNull.

@Test
void expectedKycMiraklStatus_shouldSetCorrectMiraklStatus_whenLetterOfAuthorizationStatusIsNull() {
    // @formatter:off
    final KYCUserStatusNotificationBodyModel KYCUserStatusNotificationBodyModelStub = KYCUserStatusNotificationBodyModel.builder().clientUserId(String.valueOf(CLIENT_USER_ID)).verificationStatus(HyperwalletUser.VerificationStatus.VERIFIED).businessStakeholderVerificationStatus(HyperwalletUser.BusinessStakeholderVerificationStatus.VERIFIED).letterOfAuthorizationStatus(null).profileType(HyperwalletUser.ProfileType.BUSINESS).build();
    // @formatter:on
    final MiraklShopKycStatus result = testObj.expectedKycMiraklStatus(KYCUserStatusNotificationBodyModelStub);
    assertThat(result).isEqualTo(MiraklShopKycStatus.APPROVED);
}
Also used : MiraklShopKycStatus(com.mirakl.client.mmp.domain.shop.MiraklShopKycStatus) KYCUserStatusNotificationBodyModel(com.paypal.kyc.model.KYCUserStatusNotificationBodyModel) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 10 with KYCUserStatusNotificationBodyModel

use of com.paypal.kyc.model.KYCUserStatusNotificationBodyModel in project mirakl-hyperwallet-connector by paypal.

the class BusinessKycUserNotificationStrategyTest method isApplicable_shouldReturnTrueWhenProfileTypeIsBusiness.

@Test
void isApplicable_shouldReturnTrueWhenProfileTypeIsBusiness() {
    // @formatter:off
    final KYCUserStatusNotificationBodyModel KYCUserStatusNotificationBodyModelStub = KYCUserStatusNotificationBodyModel.builder().profileType(HyperwalletUser.ProfileType.BUSINESS).build();
    // @formatter:on
    final boolean result = testObj.isApplicable(KYCUserStatusNotificationBodyModelStub);
    assertThat(result).isTrue();
}
Also used : KYCUserStatusNotificationBodyModel(com.paypal.kyc.model.KYCUserStatusNotificationBodyModel) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

KYCUserStatusNotificationBodyModel (com.paypal.kyc.model.KYCUserStatusNotificationBodyModel)16 Test (org.junit.jupiter.api.Test)10 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 MiraklShopKycStatus (com.mirakl.client.mmp.domain.shop.MiraklShopKycStatus)6 MethodSource (org.junit.jupiter.params.provider.MethodSource)4 HyperwalletUser (com.hyperwallet.clientsdk.model.HyperwalletUser)1 MiraklException (com.mirakl.client.core.exception.MiraklException)1 ErrorBean (com.mirakl.client.domain.common.error.ErrorBean)1 MiraklShopKyc (com.mirakl.client.mmp.domain.shop.MiraklShopKyc)1 MiraklShopDocument (com.mirakl.client.mmp.domain.shop.document.MiraklShopDocument)1 MiraklMarketplacePlatformOperatorApiClient (com.mirakl.client.mmp.operator.core.MiraklMarketplacePlatformOperatorApiClient)1 MiraklUpdateShop (com.mirakl.client.mmp.operator.domain.shop.update.MiraklUpdateShop)1 MiraklUpdateShopWithErrors (com.mirakl.client.mmp.operator.domain.shop.update.MiraklUpdateShopWithErrors)1 MiraklUpdatedShopReturn (com.mirakl.client.mmp.operator.domain.shop.update.MiraklUpdatedShopReturn)1 MiraklUpdatedShops (com.mirakl.client.mmp.operator.domain.shop.update.MiraklUpdatedShops)1 MiraklUpdateShopsRequest (com.mirakl.client.mmp.operator.request.shop.MiraklUpdateShopsRequest)1 MiraklRequestAdditionalFieldValue (com.mirakl.client.mmp.request.additionalfield.MiraklRequestAdditionalFieldValue)1 MiraklSimpleRequestAdditionalFieldValue (com.mirakl.client.mmp.request.additionalfield.MiraklRequestAdditionalFieldValue.MiraklSimpleRequestAdditionalFieldValue)1 Converter (com.paypal.infrastructure.converter.Converter)1 HMCException (com.paypal.infrastructure.exceptions.HMCException)1