diff --git a/README.md b/README.md
index f0cdbbab1..b4fbdbf7d 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ Add this dependency to your project's POM:
com.adyen
adyen-java-api-library
- 1.5.1
+ 1.5.2
```
diff --git a/docs/install-library.html b/docs/install-library.html
index 08ed96d98..00ac248c6 100755
--- a/docs/install-library.html
+++ b/docs/install-library.html
@@ -49,7 +49,7 @@
Maven
class="hljs-tag"></groupId>
<artifactId>adyen-java-api-library</artifactId>
- <version>1.5.1</<version>1.5.2</version>
</dependency>
diff --git a/pom.xml b/pom.xml
index f64832be5..534972834 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.adyen
adyen-java-api-library
jar
- 1.5.1
+ 1.5.2
Adyen Java API Library
Adyen API Client Library for Java
https://github.com/adyen/adyen-java-api-library
diff --git a/src/main/java/com/adyen/Client.java b/src/main/java/com/adyen/Client.java
index 00f54b420..bf921ec8d 100644
--- a/src/main/java/com/adyen/Client.java
+++ b/src/main/java/com/adyen/Client.java
@@ -40,7 +40,7 @@ public class Client {
public static final String MARKETPAY_FUND_API_VERSION = "v3";
public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v1";
public static final String USER_AGENT_SUFFIX = "adyen-java-api-library/";
- public static final String LIB_VERSION = "1.5.1";
+ public static final String LIB_VERSION = "1.5.2";
public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com";
public static final String CHECKOUT_ENDPOINT_LIVE = "https://checkout-live.adyen.com";
public static final String CHECKOUT_API_VERSION = "v32";
diff --git a/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java
index b1372e3f7..199a0d065 100755
--- a/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java
+++ b/src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java
@@ -34,9 +34,6 @@
* CreateAccountHolderResponse
*/
public class CreateAccountHolderResponse {
- @SerializedName("accountStatus")
- private AccountStatus accountStatus;
-
@SerializedName("verification")
private KYCVerificationResult verification;
@@ -113,24 +110,6 @@ public LegalEntityEnum read(final JsonReader jsonReader) throws IOException {
@SerializedName("legalEntity")
private LegalEntityEnum legalEntity = null;
- public CreateAccountHolderResponse accountStatus(AccountStatus accountStatus) {
- this.accountStatus = accountStatus;
- return this;
- }
-
- /**
- * status of created account holder
- *
- * @return accountStatus
- **/
- public AccountStatus getAccountStatus() {
- return accountStatus;
- }
-
- public void setAccountStatus(AccountStatus accountStatus) {
- this.accountStatus = accountStatus;
- }
-
public CreateAccountHolderResponse submittedAsync(Boolean submittedAsync) {
this.submittedAsync = submittedAsync;
return this;
@@ -327,8 +306,7 @@ public boolean equals(Object o) {
return false;
}
CreateAccountHolderResponse createAccountHolderResponse = (CreateAccountHolderResponse) o;
- return Objects.equals(this.accountStatus, createAccountHolderResponse.accountStatus)
- && Objects.equals(this.verification, createAccountHolderResponse.verification)
+ return Objects.equals(this.verification, createAccountHolderResponse.verification)
&& Objects.equals(this.submittedAsync, createAccountHolderResponse.submittedAsync)
&& Objects.equals(this.accountHolderCode, createAccountHolderResponse.accountHolderCode)
&& Objects.equals(this.accountCode, createAccountHolderResponse.accountCode)
@@ -342,8 +320,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(accountStatus,
- verification,
+ return Objects.hash(verification,
submittedAsync,
accountHolderCode,
accountCode,
@@ -363,7 +340,6 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateAccountHolderResponse {\n");
- sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n");
sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
sb.append(" submittedAsync: ").append(toIndentedString(submittedAsync)).append("\n");
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
diff --git a/src/main/java/com/adyen/model/marketpay/GetAccountHolderResponse.java b/src/main/java/com/adyen/model/marketpay/GetAccountHolderResponse.java
index fd95fa873..029d31a42 100755
--- a/src/main/java/com/adyen/model/marketpay/GetAccountHolderResponse.java
+++ b/src/main/java/com/adyen/model/marketpay/GetAccountHolderResponse.java
@@ -30,11 +30,8 @@
* GetAccountHolderResponse
*/
public class GetAccountHolderResponse {
- @SerializedName("accountStatus")
- private AccountStatus accountStatus = null;
-
- @SerializedName("verificationResult")
- private KYCVerificationResult verificationResult = null;
+ @SerializedName("verification")
+ private KYCVerificationResult verification = null;
@SerializedName("submittedAsync")
private Boolean submittedAsync = null;
@@ -42,9 +39,6 @@ public class GetAccountHolderResponse {
@SerializedName("accountHolderCode")
private String accountHolderCode = null;
- @SerializedName("virtualAccounts")
- private List virtualAccounts = new ArrayList();
-
@SerializedName("requirementsForNextAccountState")
private List requirementsForNextAccountState = new ArrayList();
@@ -65,9 +59,6 @@ public class GetAccountHolderResponse {
@SerializedName("pspReference")
private String pspReference = null;
- @SerializedName("kycVerificationResults")
- private List kycVerificationResults = new ArrayList();
-
/**
* account holder legal entity type (Busines / Individual)
*/
@@ -94,40 +85,32 @@ public String toString() {
@SerializedName("primaryCurrency")
private String primaryCurrency = null;
- public GetAccountHolderResponse accountStatus(AccountStatus accountStatus) {
- this.accountStatus = accountStatus;
+ public GetAccountHolderResponse verificationResult(KYCVerificationResult verificationResult) {
+ this.verification = verificationResult;
return this;
}
/**
- * account holder status
+ * verification result
*
- * @return accountStatus
+ * @return verificationResult
+ * @deprecated
**/
- public AccountStatus getAccountStatus() {
- return accountStatus;
- }
-
- public void setAccountStatus(AccountStatus accountStatus) {
- this.accountStatus = accountStatus;
- }
-
- public GetAccountHolderResponse verificationResult(KYCVerificationResult verificationResult) {
- this.verificationResult = verificationResult;
- return this;
+ public KYCVerificationResult getVerificationResult() {
+ return verification;
}
/**
* verification result
*
- * @return verificationResult
+ * @return verification
**/
- public KYCVerificationResult getVerificationResult() {
- return verificationResult;
+ public KYCVerificationResult getVerification() {
+ return verification;
}
- public void setVerificationResult(KYCVerificationResult verificationResult) {
- this.verificationResult = verificationResult;
+ public void setVerification(KYCVerificationResult verification) {
+ this.verification = verification;
}
public GetAccountHolderResponse submittedAsync(Boolean submittedAsync) {
@@ -166,29 +149,6 @@ public void setAccountHolderCode(String accountHolderCode) {
this.accountHolderCode = accountHolderCode;
}
- public GetAccountHolderResponse virtualAccounts(List virtualAccounts) {
- this.virtualAccounts = virtualAccounts;
- return this;
- }
-
- public GetAccountHolderResponse addVirtualAccountsItem(String virtualAccountsItem) {
- this.virtualAccounts.add(virtualAccountsItem);
- return this;
- }
-
- /**
- * account holder's accounts
- *
- * @return virtualAccounts
- **/
- public List getVirtualAccounts() {
- return virtualAccounts;
- }
-
- public void setVirtualAccounts(List virtualAccounts) {
- this.virtualAccounts = virtualAccounts;
- }
-
public GetAccountHolderResponse requirementsForNextAccountState(List requirementsForNextAccountState) {
this.requirementsForNextAccountState = requirementsForNextAccountState;
return this;
@@ -334,29 +294,6 @@ public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}
- public GetAccountHolderResponse kycVerificationResults(List kycVerificationResults) {
- this.kycVerificationResults = kycVerificationResults;
- return this;
- }
-
- public GetAccountHolderResponse addKycVerificationResultsItem(KYCVerificationResult kycVerificationResultsItem) {
- this.kycVerificationResults.add(kycVerificationResultsItem);
- return this;
- }
-
- /**
- * Get kycVerificationResults
- *
- * @return kycVerificationResults
- **/
- public List getKycVerificationResults() {
- return kycVerificationResults;
- }
-
- public void setKycVerificationResults(List kycVerificationResults) {
- this.kycVerificationResults = kycVerificationResults;
- }
-
public GetAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) {
this.legalEntity = legalEntity;
return this;
@@ -393,38 +330,32 @@ public boolean equals(Object o) {
return false;
}
GetAccountHolderResponse getAccountHolderResponse = (GetAccountHolderResponse) o;
- return Objects.equals(this.accountStatus, getAccountHolderResponse.accountStatus)
- && Objects.equals(this.verificationResult, getAccountHolderResponse.verificationResult)
+ return Objects.equals(this.verification, getAccountHolderResponse.verification)
&& Objects.equals(this.submittedAsync, getAccountHolderResponse.submittedAsync)
&& Objects.equals(this.accountHolderCode, getAccountHolderResponse.accountHolderCode)
- && Objects.equals(this.virtualAccounts, getAccountHolderResponse.virtualAccounts)
&& Objects.equals(this.requirementsForNextAccountState, getAccountHolderResponse.requirementsForNextAccountState)
&& Objects.equals(this.accountHolderDetails, getAccountHolderResponse.accountHolderDetails)
&& Objects.equals(this.accountHolderStatus, getAccountHolderResponse.accountHolderStatus)
&& Objects.equals(this.accountContainers, getAccountHolderResponse.accountContainers)
&& Objects.equals(this.description, getAccountHolderResponse.description)
&& Objects.equals(this.pspReference, getAccountHolderResponse.pspReference)
- && Objects.equals(this.kycVerificationResults, getAccountHolderResponse.kycVerificationResults)
&& Objects.equals(this.legalEntity, getAccountHolderResponse.legalEntity)
- && Objects.equals(this.legalEntity, getAccountHolderResponse.primaryCurrency);
+ && Objects.equals(this.primaryCurrency, getAccountHolderResponse.primaryCurrency);
}
@Override
public int hashCode() {
- return Objects.hash(accountStatus,
- verificationResult,
- submittedAsync,
- accountHolderCode,
- virtualAccounts,
- requirementsForNextAccountState,
- accountHolderDetails,
- accountHolderStatus,
- accountContainers,
- description,
- pspReference,
- kycVerificationResults,
- legalEntity,
- primaryCurrency);
+ return Objects.hash(verification,
+ submittedAsync,
+ accountHolderCode,
+ requirementsForNextAccountState,
+ accountHolderDetails,
+ accountHolderStatus,
+ accountContainers,
+ description,
+ pspReference,
+ legalEntity,
+ primaryCurrency);
}
@@ -435,20 +366,17 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetAccountHolderResponse {\n");
-
- sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n");
- sb.append(" verificationResult: ").append(toIndentedString(verificationResult)).append("\n");
+ sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
sb.append(" submittedAsync: ").append(toIndentedString(submittedAsync)).append("\n");
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
- sb.append(" virtualAccounts: ").append(toIndentedString(virtualAccounts)).append("\n");
sb.append(" requirementsForNextAccountState: ").append(toIndentedString(requirementsForNextAccountState)).append("\n");
sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n");
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
- sb.append(" kycVerificationResults: ").append(toIndentedString(kycVerificationResults)).append("\n");
sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
+ sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/src/test/java/com/adyen/MarketPayTest.java b/src/test/java/com/adyen/MarketPayTest.java
index d96a794e1..e3ad55ffa 100644
--- a/src/test/java/com/adyen/MarketPayTest.java
+++ b/src/test/java/com/adyen/MarketPayTest.java
@@ -86,8 +86,11 @@
import com.adyen.service.Account;
import com.adyen.service.Fund;
import com.adyen.service.Payment;
+import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.AWAITING_DATA;
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.PASSED;
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.BANK_ACCOUNT_VERIFICATION;
+import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.COMPANY_VERIFICATION;
+import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.PASSPORT_VERIFICATION;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -361,6 +364,8 @@ public void TestGetIndividualAccountHolderSuccess() throws Exception {
assertEquals("681d5df6-cf38-4557-aecd-ac8ed0c04195", getAccountHolderResponse.getAccountHolderDetails().getBankAccountDetails().get(0).getBankAccountUUID());
assertEquals("140922935", getAccountHolderResponse.getAccounts().get(0).getAccountCode());
+ assertEquals(PASSPORT_VERIFICATION, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckType());
+ assertEquals(AWAITING_DATA, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckStatus());
}
@Test
@@ -381,6 +386,9 @@ public void TestGetBusinessAccountHolderSuccess() throws Exception {
assertEquals("1abf8304-58c7-4a9e-8bd3-4d7eff9801e4", getAccountHolderResponse.getAccountHolderDetails().getBankAccountDetails().get(0).getBankAccountUUID());
assertEquals("67890", getAccountHolderResponse.getAccountHolderDetails().getBusinessDetails().getShareholders().get(0).getAddress().getPostalCode());
assertEquals("123370698", getAccountHolderResponse.getAccounts().get(0).getAccountCode());
+ assertEquals(COMPANY_VERIFICATION, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckType());
+ assertEquals(PASSED, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckStatus());
+ assertEquals(1602, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getSummary().getCode().intValue());
}
@Test