From 9e7a0e9d645156df8af1e5da2685f689caaa1f11 Mon Sep 17 00:00:00 2001 From: Giorgos Adam Date: Tue, 3 Apr 2018 14:24:32 +0200 Subject: [PATCH] Refactor MarketPay KYC verification results Removed deprecated kycVerificationResults --- .../CreateAccountHolderResponse.java | 5 +- .../marketpay/KYCBankAccountCheckResult.java | 26 ++-- .../adyen/model/marketpay/KYCCheckResult.java | 26 ++-- .../model/marketpay/KYCCheckStatusData.java | 4 +- .../marketpay/KYCShareholderCheckResult.java | 26 ++-- .../marketpay/KYCVerificationResult.java | 121 +++--------------- .../UpdateAccountHolderResponse.java | 36 +----- .../marketpay/v2/KYCVerificationResult.java | 68 ---------- .../com/adyen/MarketPayNotificationTest.java | 5 + src/test/java/com/adyen/MarketPayTest.java | 20 +-- 10 files changed, 82 insertions(+), 255 deletions(-) delete mode 100755 src/main/java/com/adyen/model/marketpay/v2/KYCVerificationResult.java diff --git a/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java index 77b4380ff..c970997da 100755 --- a/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java +++ b/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import com.adyen.model.marketpay.v2.KYCVerificationResult; import com.google.gson.annotations.SerializedName; /** @@ -34,7 +33,7 @@ public class CreateAccountHolderResponse { private AccountStatus accountStatus; @SerializedName("verification") - private com.adyen.model.marketpay.v2.KYCVerificationResult verification; + private KYCVerificationResult verification; @SerializedName("submittedAsync") private Boolean submittedAsync; @@ -232,7 +231,7 @@ public void setPspReference(String pspReference) { this.pspReference = pspReference; } - public com.adyen.model.marketpay.v2.KYCVerificationResult getVerification() { + public KYCVerificationResult getVerification() { return verification; } diff --git a/src/main/java/com/adyen/model/marketpay/KYCBankAccountCheckResult.java b/src/main/java/com/adyen/model/marketpay/KYCBankAccountCheckResult.java index c35a2783d..aacfdfe7b 100755 --- a/src/main/java/com/adyen/model/marketpay/KYCBankAccountCheckResult.java +++ b/src/main/java/com/adyen/model/marketpay/KYCBankAccountCheckResult.java @@ -32,8 +32,8 @@ public class KYCBankAccountCheckResult { @SerializedName("bankAccountUUID") private String bankAccountUUID = null; - @SerializedName("checkStatusData") - private List checkStatusData = new ArrayList(); + @SerializedName("checks") + private List checks = new ArrayList(); public KYCBankAccountCheckResult bankAccountUUID(String bankAccountUUID) { this.bankAccountUUID = bankAccountUUID; @@ -54,26 +54,26 @@ public void setBankAccountUUID(String bankAccountUUID) { } public KYCBankAccountCheckResult checkStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + this.checks = checkStatusData; return this; } public KYCBankAccountCheckResult addCheckStatusDataItem(KYCCheckStatusData checkStatusDataItem) { - this.checkStatusData.add(checkStatusDataItem); + this.checks.add(checkStatusDataItem); return this; } /** - * Get checkStatusData + * Get checks * - * @return checkStatusData + * @return checks **/ - public List getCheckStatusData() { - return checkStatusData; + public List getChecks() { + return checks; } - public void setCheckStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + public void setChecks(List checks) { + this.checks = checks; } @@ -86,12 +86,12 @@ public boolean equals(Object o) { return false; } KYCBankAccountCheckResult kyCBankAccountCheckResult = (KYCBankAccountCheckResult) o; - return Objects.equals(this.bankAccountUUID, kyCBankAccountCheckResult.bankAccountUUID) && Objects.equals(this.checkStatusData, kyCBankAccountCheckResult.checkStatusData); + return Objects.equals(this.bankAccountUUID, kyCBankAccountCheckResult.bankAccountUUID) && Objects.equals(this.checks, kyCBankAccountCheckResult.checks); } @Override public int hashCode() { - return Objects.hash(bankAccountUUID, checkStatusData); + return Objects.hash(bankAccountUUID, checks); } @@ -101,7 +101,7 @@ public String toString() { sb.append("class KYCBankAccountCheckResult {\n"); sb.append(" bankAccountUUID: ").append(toIndentedString(bankAccountUUID)).append("\n"); - sb.append(" checkStatusData: ").append(toIndentedString(checkStatusData)).append("\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/marketpay/KYCCheckResult.java b/src/main/java/com/adyen/model/marketpay/KYCCheckResult.java index 7abd22d1a..b4acc8646 100755 --- a/src/main/java/com/adyen/model/marketpay/KYCCheckResult.java +++ b/src/main/java/com/adyen/model/marketpay/KYCCheckResult.java @@ -29,30 +29,30 @@ * KYCCheckResult */ public class KYCCheckResult { - @SerializedName("checkStatusData") - private List checkStatusData = new ArrayList(); + @SerializedName("checks") + private List checks = new ArrayList(); public KYCCheckResult checkStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + this.checks = checkStatusData; return this; } public KYCCheckResult addCheckStatusDataItem(KYCCheckStatusData checkStatusDataItem) { - this.checkStatusData.add(checkStatusDataItem); + this.checks.add(checkStatusDataItem); return this; } /** - * Get checkStatusData + * Get checks * - * @return checkStatusData + * @return checks **/ - public List getCheckStatusData() { - return checkStatusData; + public List getChecks() { + return checks; } - public void setCheckStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + public void setChecks(List checks) { + this.checks = checks; } @@ -65,12 +65,12 @@ public boolean equals(Object o) { return false; } KYCCheckResult kyCCheckResult = (KYCCheckResult) o; - return Objects.equals(this.checkStatusData, kyCCheckResult.checkStatusData); + return Objects.equals(this.checks, kyCCheckResult.checks); } @Override public int hashCode() { - return Objects.hash(checkStatusData); + return Objects.hash(checks); } @@ -79,7 +79,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KYCCheckResult {\n"); - sb.append(" checkStatusData: ").append(toIndentedString(checkStatusData)).append("\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/marketpay/KYCCheckStatusData.java b/src/main/java/com/adyen/model/marketpay/KYCCheckStatusData.java index bdd0263e4..d63199f9f 100755 --- a/src/main/java/com/adyen/model/marketpay/KYCCheckStatusData.java +++ b/src/main/java/com/adyen/model/marketpay/KYCCheckStatusData.java @@ -57,7 +57,7 @@ public String toString() { } } - @SerializedName("checkType") + @SerializedName("type") private CheckTypeEnum checkType = null; @SerializedName("summary") @@ -106,7 +106,7 @@ public String toString() { } } - @SerializedName("checkStatus") + @SerializedName("status") private CheckStatusEnum checkStatus = null; @SerializedName("requiredFields") diff --git a/src/main/java/com/adyen/model/marketpay/KYCShareholderCheckResult.java b/src/main/java/com/adyen/model/marketpay/KYCShareholderCheckResult.java index 754f6e4a9..d20c227ca 100755 --- a/src/main/java/com/adyen/model/marketpay/KYCShareholderCheckResult.java +++ b/src/main/java/com/adyen/model/marketpay/KYCShareholderCheckResult.java @@ -29,33 +29,33 @@ * KYCShareholderCheckResult */ public class KYCShareholderCheckResult { - @SerializedName("checkStatusData") - private List checkStatusData = new ArrayList(); + @SerializedName("checks") + private List checks = new ArrayList(); @SerializedName("shareholderCode") private String shareholderCode = null; public KYCShareholderCheckResult checkStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + this.checks = checkStatusData; return this; } public KYCShareholderCheckResult addCheckStatusDataItem(KYCCheckStatusData checkStatusDataItem) { - this.checkStatusData.add(checkStatusDataItem); + this.checks.add(checkStatusDataItem); return this; } /** - * Get checkStatusData + * Get checks * - * @return checkStatusData + * @return checks **/ - public List getCheckStatusData() { - return checkStatusData; + public List getChecks() { + return checks; } - public void setCheckStatusData(List checkStatusData) { - this.checkStatusData = checkStatusData; + public void setChecks(List checks) { + this.checks = checks; } public KYCShareholderCheckResult shareholderCode(String shareholderCode) { @@ -86,12 +86,12 @@ public boolean equals(Object o) { return false; } KYCShareholderCheckResult kyCShareholderCheckResult = (KYCShareholderCheckResult) o; - return Objects.equals(this.checkStatusData, kyCShareholderCheckResult.checkStatusData) && Objects.equals(this.shareholderCode, kyCShareholderCheckResult.shareholderCode); + return Objects.equals(this.checks, kyCShareholderCheckResult.checks) && Objects.equals(this.shareholderCode, kyCShareholderCheckResult.shareholderCode); } @Override public int hashCode() { - return Objects.hash(checkStatusData, shareholderCode); + return Objects.hash(checks, shareholderCode); } @@ -100,7 +100,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KYCShareholderCheckResult {\n"); - sb.append(" checkStatusData: ").append(toIndentedString(checkStatusData)).append("\n"); + sb.append(" checks: ").append(toIndentedString(checks)).append("\n"); sb.append(" shareholderCode: ").append(toIndentedString(shareholderCode)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/marketpay/KYCVerificationResult.java b/src/main/java/com/adyen/model/marketpay/KYCVerificationResult.java index 47d8ddb5d..d88ed0cce 100755 --- a/src/main/java/com/adyen/model/marketpay/KYCVerificationResult.java +++ b/src/main/java/com/adyen/model/marketpay/KYCVerificationResult.java @@ -22,130 +22,47 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import com.google.gson.annotations.SerializedName; /** * KYCVerificationResult */ public class KYCVerificationResult { - @SerializedName("shareholderCheckResult") - private List shareholderCheckResult = new ArrayList(); + @SerializedName("shareholders") + private List shareholders = new ArrayList(); - @SerializedName("accountHolderCheckResult") - private KYCCheckResult accountHolderCheckResult = null; + @SerializedName("accountHolder") + private KYCCheckResult accountHolder; - @SerializedName("bankAccountCheckResult") - private List bankAccountCheckResult = new ArrayList(); + @SerializedName("bankAccounts") + private List bankAccounts = new ArrayList(); - public KYCVerificationResult shareholderCheckResult(List shareholderCheckResult) { - this.shareholderCheckResult = shareholderCheckResult; - return this; + public List getShareholders() { + return shareholders; } - public KYCVerificationResult addShareholderCheckResultItem(KYCShareholderCheckResult shareholderCheckResultItem) { - this.shareholderCheckResult.add(shareholderCheckResultItem); - return this; + public void setShareholders(List shareholders) { + this.shareholders = shareholders; } - /** - * KYC check results for the shareholders - * - * @return shareholderCheckResult - **/ - public List getShareholderCheckResult() { - return shareholderCheckResult; + public KYCCheckResult getAccountHolder() { + return accountHolder; } - public void setShareholderCheckResult(List shareholderCheckResult) { - this.shareholderCheckResult = shareholderCheckResult; + public void setAccountHolder(KYCCheckResult accountHolder) { + this.accountHolder = accountHolder; } - public KYCVerificationResult accountHolderCheckResult(KYCCheckResult accountHolderCheckResult) { - this.accountHolderCheckResult = accountHolderCheckResult; - return this; + public List getBankAccounts() { + return bankAccounts; } - /** - * KYC check results for the account holder itself - * - * @return accountHolderCheckResult - **/ - public KYCCheckResult getAccountHolderCheckResult() { - return accountHolderCheckResult; + public void setBankAccounts(List bankAccounts) { + this.bankAccounts = bankAccounts; } - public void setAccountHolderCheckResult(KYCCheckResult accountHolderCheckResult) { - this.accountHolderCheckResult = accountHolderCheckResult; - } - - public KYCVerificationResult bankAccountCheckResult(List bankAccountCheckResult) { - this.bankAccountCheckResult = bankAccountCheckResult; - return this; - } - - public KYCVerificationResult addBankAccountCheckResultItem(KYCBankAccountCheckResult bankAccountCheckResultItem) { - this.bankAccountCheckResult.add(bankAccountCheckResultItem); - return this; - } - - /** - * KYC check results for the bank accounts - * - * @return bankAccountCheckResult - **/ - public List getBankAccountCheckResult() { - return bankAccountCheckResult; - } - - public void setBankAccountCheckResult(List bankAccountCheckResult) { - this.bankAccountCheckResult = bankAccountCheckResult; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - KYCVerificationResult kyCVerificationResult = (KYCVerificationResult) o; - return Objects.equals(this.shareholderCheckResult, kyCVerificationResult.shareholderCheckResult) - && Objects.equals(this.accountHolderCheckResult, - kyCVerificationResult.accountHolderCheckResult) - && Objects.equals(this.bankAccountCheckResult, kyCVerificationResult.bankAccountCheckResult); - } - - @Override - public int hashCode() { - return Objects.hash(shareholderCheckResult, accountHolderCheckResult, bankAccountCheckResult); - } - - @Override public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KYCVerificationResult {\n"); - - sb.append(" shareholderCheckResult: ").append(toIndentedString(shareholderCheckResult)).append("\n"); - sb.append(" accountHolderCheckResult: ").append(toIndentedString(accountHolderCheckResult)).append("\n"); - sb.append(" bankAccountCheckResult: ").append(toIndentedString(bankAccountCheckResult)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return "KYCVerificationResult{" + "shareholders=" + shareholders + ", accountHolder=" + accountHolder + ", bankAccounts=" + bankAccounts + '}'; } - } - diff --git a/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderResponse.java index 9740f1a00..1aa1cc616 100755 --- a/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderResponse.java +++ b/src/main/java/com/adyen/model/marketpay/UpdateAccountHolderResponse.java @@ -32,7 +32,7 @@ public class UpdateAccountHolderResponse { @SerializedName("accountStatus") private AccountStatus accountStatus = null; - @SerializedName("verificationResult") + @SerializedName("verification") private KYCVerificationResult verificationResult = null; @SerializedName("submittedAsync") @@ -61,9 +61,6 @@ public class UpdateAccountHolderResponse { @SerializedName("pspReference") private String pspReference = null; - @SerializedName("kycVerificationResults") - private List kycVerificationResults = new ArrayList(); - public UpdateAccountHolderResponse accountStatus(AccountStatus accountStatus) { this.accountStatus = accountStatus; return this; @@ -288,30 +285,6 @@ public void setPspReference(String pspReference) { this.pspReference = pspReference; } - public UpdateAccountHolderResponse kycVerificationResults(List kycVerificationResults) { - this.kycVerificationResults = kycVerificationResults; - return this; - } - - public UpdateAccountHolderResponse addKycVerificationResultsItem(KYCVerificationResult kycVerificationResultsItem) { - this.kycVerificationResults.add(kycVerificationResultsItem); - return this; - } - - /** - * KYC verification results - * - * @return kycVerificationResults - **/ - public List getKycVerificationResults() { - return kycVerificationResults; - } - - public void setKycVerificationResults(List kycVerificationResults) { - this.kycVerificationResults = kycVerificationResults; - } - - @Override public boolean equals(Object o) { if (this == o) { @@ -330,8 +303,7 @@ public boolean equals(Object o) { && Objects.equals(this.invalidFieldsContainers, updateAccountHolderResponse.invalidFieldsContainers) && Objects.equals(this.accountHolderDetails, updateAccountHolderResponse.accountHolderDetails) && Objects.equals(this.accountHolderStatus, updateAccountHolderResponse.accountHolderStatus) - && Objects.equals(this.pspReference, updateAccountHolderResponse.pspReference) - && Objects.equals(this.kycVerificationResults, updateAccountHolderResponse.kycVerificationResults); + && Objects.equals(this.pspReference, updateAccountHolderResponse.pspReference); } @Override @@ -345,8 +317,7 @@ public int hashCode() { invalidFieldsContainers, accountHolderDetails, accountHolderStatus, - pspReference, - kycVerificationResults); + pspReference); } @@ -368,7 +339,6 @@ public String toString() { sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n"); sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n"); sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); - sb.append(" kycVerificationResults: ").append(toIndentedString(kycVerificationResults)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/marketpay/v2/KYCVerificationResult.java b/src/main/java/com/adyen/model/marketpay/v2/KYCVerificationResult.java deleted file mode 100755 index d1da422d7..000000000 --- a/src/main/java/com/adyen/model/marketpay/v2/KYCVerificationResult.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * ###### - * ###### - * ############ ####( ###### #####. ###### ############ ############ - * ############# #####( ###### #####. ###### ############# ############# - * ###### #####( ###### #####. ###### ##### ###### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### - * ###### ###### #####( ###### #####. ###### ##### ##### ###### - * ############# ############# ############# ############# ##### ###### - * ############ ############ ############# ############ ##### ###### - * ###### - * ############# - * ############ - * - * Adyen Java API Library - * - * Copyright (c) 2017 Adyen B.V. - * This file is open source and available under the MIT license. - * See the LICENSE file for more info. - */ - -package com.adyen.model.marketpay.v2; - -import java.util.ArrayList; -import java.util.List; -import com.adyen.model.marketpay.KYCBankAccountCheckResult; -import com.adyen.model.marketpay.KYCCheckResult; -import com.adyen.model.marketpay.KYCShareholderCheckResult; -import com.google.gson.annotations.SerializedName; - -/** - * KYCVerificationResult - */ -public class KYCVerificationResult { - @SerializedName("shareholders") - private List shareholderCheckResult = new ArrayList(); - - @SerializedName("accountHolder") - private KYCCheckResult accountHolder; - - @SerializedName("bankAccounts") - private List bankAccountCheckResult = new ArrayList(); - - public List getShareholderCheckResult() { - return shareholderCheckResult; - } - - public void setShareholderCheckResult(List shareholderCheckResult) { - this.shareholderCheckResult = shareholderCheckResult; - } - - public KYCCheckResult getAccountHolder() { - return accountHolder; - } - - public void setAccountHolder(KYCCheckResult accountHolder) { - this.accountHolder = accountHolder; - } - - public List getBankAccountCheckResult() { - return bankAccountCheckResult; - } - - public void setBankAccountCheckResult(List bankAccountCheckResult) { - this.bankAccountCheckResult = bankAccountCheckResult; - } -} - diff --git a/src/test/java/com/adyen/MarketPayNotificationTest.java b/src/test/java/com/adyen/MarketPayNotificationTest.java index 1d6da76f6..3c17808bd 100644 --- a/src/test/java/com/adyen/MarketPayNotificationTest.java +++ b/src/test/java/com/adyen/MarketPayNotificationTest.java @@ -52,6 +52,7 @@ import com.adyen.notification.NotificationHandler; import com.adyen.service.Notification; import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.DATA_PROVIDED; +import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.COMPANY_VERIFICATION; import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.IDENTITY_VERIFICATION; import static com.adyen.model.marketpay.Transaction.TransactionStatusEnum.PENDINGCREDIT; import static com.adyen.model.marketpay.notification.NotificationEventConfiguration.EventTypeEnum.ACCOUNT_HOLDER_STATUS_CHANGE; @@ -246,10 +247,14 @@ public void testMarketPayAccountHolderUpdatedNotification() { assertEquals(GenericNotification.EventTypeEnum.ACCOUNT_HOLDER_UPDATED, notificationMessage.getEventType()); AccountHolderUpdatedNotification notification = (AccountHolderUpdatedNotification) notificationMessage; + assertNotNull(notification.getContent()); assertEquals("accountHolderCode", notification.getContent().getAccountHolderCode()); assertEquals(AccountHolderStatus.StatusEnum.ACTIVE, notification.getContent().getAccountHolderStatus().getStatus()); + assertEquals(COMPANY_VERIFICATION, notification.getContent().getVerificationResult().getAccountHolder().getChecks().get(0).getCheckType()); + assertEquals(DATA_PROVIDED, notification.getContent().getVerificationResult().getAccountHolder().getChecks().get(0).getCheckStatus()); + assertEquals(DATA_PROVIDED, notification.getContent().getVerificationResult().getShareholders().get(0).getChecks().get(0).getCheckStatus()); } @Test diff --git a/src/test/java/com/adyen/MarketPayTest.java b/src/test/java/com/adyen/MarketPayTest.java index 73547b10b..d96a794e1 100644 --- a/src/test/java/com/adyen/MarketPayTest.java +++ b/src/test/java/com/adyen/MarketPayTest.java @@ -24,14 +24,20 @@ import java.util.ArrayList; import java.util.List; import org.junit.Test; +import com.adyen.model.Address; +import com.adyen.model.Amount; +import com.adyen.model.FraudCheckResult; +import com.adyen.model.Name; +import com.adyen.model.PaymentRequest; +import com.adyen.model.PaymentResult; +import com.adyen.model.additionalData.SplitPayment; +import com.adyen.model.additionalData.SplitPaymentItem; import com.adyen.model.marketpay.AccountHolderBalanceRequest; import com.adyen.model.marketpay.AccountHolderBalanceResponse; import com.adyen.model.marketpay.AccountHolderDetails; import com.adyen.model.marketpay.AccountHolderStatus; import com.adyen.model.marketpay.AccountHolderTransactionListRequest; import com.adyen.model.marketpay.AccountHolderTransactionListResponse; -import com.adyen.model.Address; -import com.adyen.model.Amount; import com.adyen.model.marketpay.BankAccountDetail; import com.adyen.model.marketpay.CloseAccountHolderRequest; import com.adyen.model.marketpay.CloseAccountHolderResponse; @@ -46,16 +52,12 @@ import com.adyen.model.marketpay.DeleteShareholderRequest; import com.adyen.model.marketpay.DeleteShareholderResponse; import com.adyen.model.marketpay.DocumentDetail; -import com.adyen.model.FraudCheckResult; import com.adyen.model.marketpay.GetAccountHolderRequest; import com.adyen.model.marketpay.GetAccountHolderResponse; import com.adyen.model.marketpay.GetTierConfigurationResponse; import com.adyen.model.marketpay.GetUploadedDocumentsRequest; import com.adyen.model.marketpay.GetUploadedDocumentsResponse; import com.adyen.model.marketpay.IndividualDetails; -import com.adyen.model.Name; -import com.adyen.model.PaymentRequest; -import com.adyen.model.PaymentResult; import com.adyen.model.marketpay.PayoutAccountHolderRequest; import com.adyen.model.marketpay.PayoutAccountHolderResponse; import com.adyen.model.marketpay.PayoutScheduleResponse; @@ -81,11 +83,11 @@ import com.adyen.model.marketpay.UpdatePayoutScheduleRequest; import com.adyen.model.marketpay.UploadDocumentRequest; import com.adyen.model.marketpay.UploadDocumentResponse; -import com.adyen.model.additionalData.SplitPayment; -import com.adyen.model.additionalData.SplitPaymentItem; import com.adyen.service.Account; import com.adyen.service.Fund; import com.adyen.service.Payment; +import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.PASSED; +import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.BANK_ACCOUNT_VERIFICATION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -252,6 +254,8 @@ public void TestCreateAccountHolderSuccess() throws Exception { assertEquals("140922935", createAccountHolderResponse.getAccountCode()); assertEquals("681d5df6-cf38-4557-aecd-ac8ed0c04195", createAccountHolderResponse.getAccountHolderDetails().getBankAccountDetails().get(0).getBankAccountUUID()); + assertEquals(BANK_ACCOUNT_VERIFICATION, createAccountHolderResponse.getVerification().getBankAccounts().get(0).getChecks().get(0).getCheckType()); + assertEquals(PASSED, createAccountHolderResponse.getVerification().getBankAccounts().get(0).getChecks().get(0).getCheckStatus()); }