Skip to content

Commit 678ae64

Browse files
authored
Merge pull request #109 from Adyen/develop
Release 1.5.2
2 parents d4f911c + da99e9d commit 678ae64

File tree

8 files changed

+44
-131
lines changed

8 files changed

+44
-131
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Add this dependency to your project's POM:
2323
<dependency>
2424
<groupId>com.adyen</groupId>
2525
<artifactId>adyen-java-api-library</artifactId>
26-
<version>1.5.1</version>
26+
<version>1.5.2</version>
2727
</dependency>
2828
```
2929

docs/install-library.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h3><a id="Maven_86"></a>Maven</h3>
4949
class="hljs-tag">&lt;/<span class="hljs-title">groupId</span>&gt;</span>
5050
<span class="hljs-tag">&lt;<span class="hljs-title">artifactId</span>&gt;</span>adyen-java-api-library<span
5151
class="hljs-tag">&lt;/<span class="hljs-title">artifactId</span>&gt;</span>
52-
<span class="hljs-tag">&lt;<span class="hljs-title">version</span>&gt;</span>1.5.1<span class="hljs-tag">&lt;/<span
52+
<span class="hljs-tag">&lt;<span class="hljs-title">version</span>&gt;</span>1.5.2<span class="hljs-tag">&lt;/<span
5353
class="hljs-title">version</span>&gt;</span>
5454
<span class="hljs-tag">&lt;/<span class="hljs-title">dependency</span>&gt;</span>
5555
</code></pre>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.adyen</groupId>
55
<artifactId>adyen-java-api-library</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.5.1</version>
7+
<version>1.5.2</version>
88
<name>Adyen Java API Library</name>
99
<description>Adyen API Client Library for Java</description>
1010
<url>https://github.com/adyen/adyen-java-api-library</url>

src/main/java/com/adyen/Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class Client {
4040
public static final String MARKETPAY_FUND_API_VERSION = "v3";
4141
public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v1";
4242
public static final String USER_AGENT_SUFFIX = "adyen-java-api-library/";
43-
public static final String LIB_VERSION = "1.5.1";
43+
public static final String LIB_VERSION = "1.5.2";
4444
public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com";
4545
public static final String CHECKOUT_ENDPOINT_LIVE = "https://checkout-live.adyen.com";
4646
public static final String CHECKOUT_API_VERSION = "v32";

src/main/java/com/adyen/constants/HPPConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ interface Response {
4646
String PSP_REFERENCE = "pspReference";
4747
String SHOPPER_LOCALE = "shopperLocale";
4848
String SKIN_CODE = "skinCode";
49+
String MERCHANT_RETURN_DATA = "merchantReturnData";
4950

5051
/*
5152
authResult Returns the outcome of the payment.

src/main/java/com/adyen/model/marketpay/CreateAccountHolderResponse.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
* CreateAccountHolderResponse
3535
*/
3636
public class CreateAccountHolderResponse {
37-
@SerializedName("accountStatus")
38-
private AccountStatus accountStatus;
39-
4037
@SerializedName("verification")
4138
private KYCVerificationResult verification;
4239

@@ -113,24 +110,6 @@ public LegalEntityEnum read(final JsonReader jsonReader) throws IOException {
113110
@SerializedName("legalEntity")
114111
private LegalEntityEnum legalEntity = null;
115112

116-
public CreateAccountHolderResponse accountStatus(AccountStatus accountStatus) {
117-
this.accountStatus = accountStatus;
118-
return this;
119-
}
120-
121-
/**
122-
* status of created account holder
123-
*
124-
* @return accountStatus
125-
**/
126-
public AccountStatus getAccountStatus() {
127-
return accountStatus;
128-
}
129-
130-
public void setAccountStatus(AccountStatus accountStatus) {
131-
this.accountStatus = accountStatus;
132-
}
133-
134113
public CreateAccountHolderResponse submittedAsync(Boolean submittedAsync) {
135114
this.submittedAsync = submittedAsync;
136115
return this;
@@ -327,8 +306,7 @@ public boolean equals(Object o) {
327306
return false;
328307
}
329308
CreateAccountHolderResponse createAccountHolderResponse = (CreateAccountHolderResponse) o;
330-
return Objects.equals(this.accountStatus, createAccountHolderResponse.accountStatus)
331-
&& Objects.equals(this.verification, createAccountHolderResponse.verification)
309+
return Objects.equals(this.verification, createAccountHolderResponse.verification)
332310
&& Objects.equals(this.submittedAsync, createAccountHolderResponse.submittedAsync)
333311
&& Objects.equals(this.accountHolderCode, createAccountHolderResponse.accountHolderCode)
334312
&& Objects.equals(this.accountCode, createAccountHolderResponse.accountCode)
@@ -342,8 +320,7 @@ public boolean equals(Object o) {
342320

343321
@Override
344322
public int hashCode() {
345-
return Objects.hash(accountStatus,
346-
verification,
323+
return Objects.hash(verification,
347324
submittedAsync,
348325
accountHolderCode,
349326
accountCode,
@@ -363,7 +340,6 @@ public String toString() {
363340

364341
StringBuilder sb = new StringBuilder();
365342
sb.append("class CreateAccountHolderResponse {\n");
366-
sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n");
367343
sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
368344
sb.append(" submittedAsync: ").append(toIndentedString(submittedAsync)).append("\n");
369345
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");

src/main/java/com/adyen/model/marketpay/GetAccountHolderResponse.java

Lines changed: 29 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,15 @@
3030
* GetAccountHolderResponse
3131
*/
3232
public class GetAccountHolderResponse {
33-
@SerializedName("accountStatus")
34-
private AccountStatus accountStatus = null;
35-
36-
@SerializedName("verificationResult")
37-
private KYCVerificationResult verificationResult = null;
33+
@SerializedName("verification")
34+
private KYCVerificationResult verification = null;
3835

3936
@SerializedName("submittedAsync")
4037
private Boolean submittedAsync = null;
4138

4239
@SerializedName("accountHolderCode")
4340
private String accountHolderCode = null;
4441

45-
@SerializedName("virtualAccounts")
46-
private List<String> virtualAccounts = new ArrayList<String>();
47-
4842
@SerializedName("requirementsForNextAccountState")
4943
private List<AccountStateRequirement> requirementsForNextAccountState = new ArrayList<AccountStateRequirement>();
5044

@@ -65,9 +59,6 @@ public class GetAccountHolderResponse {
6559
@SerializedName("pspReference")
6660
private String pspReference = null;
6761

68-
@SerializedName("kycVerificationResults")
69-
private List<KYCVerificationResult> kycVerificationResults = new ArrayList<KYCVerificationResult>();
70-
7162
/**
7263
* account holder legal entity type (Busines / Individual)
7364
*/
@@ -94,40 +85,32 @@ public String toString() {
9485
@SerializedName("primaryCurrency")
9586
private String primaryCurrency = null;
9687

97-
public GetAccountHolderResponse accountStatus(AccountStatus accountStatus) {
98-
this.accountStatus = accountStatus;
88+
public GetAccountHolderResponse verificationResult(KYCVerificationResult verificationResult) {
89+
this.verification = verificationResult;
9990
return this;
10091
}
10192

10293
/**
103-
* account holder status
94+
* verification result
10495
*
105-
* @return accountStatus
96+
* @return verificationResult
97+
* @deprecated
10698
**/
107-
public AccountStatus getAccountStatus() {
108-
return accountStatus;
109-
}
110-
111-
public void setAccountStatus(AccountStatus accountStatus) {
112-
this.accountStatus = accountStatus;
113-
}
114-
115-
public GetAccountHolderResponse verificationResult(KYCVerificationResult verificationResult) {
116-
this.verificationResult = verificationResult;
117-
return this;
99+
public KYCVerificationResult getVerificationResult() {
100+
return verification;
118101
}
119102

120103
/**
121104
* verification result
122105
*
123-
* @return verificationResult
106+
* @return verification
124107
**/
125-
public KYCVerificationResult getVerificationResult() {
126-
return verificationResult;
108+
public KYCVerificationResult getVerification() {
109+
return verification;
127110
}
128111

129-
public void setVerificationResult(KYCVerificationResult verificationResult) {
130-
this.verificationResult = verificationResult;
112+
public void setVerification(KYCVerificationResult verification) {
113+
this.verification = verification;
131114
}
132115

133116
public GetAccountHolderResponse submittedAsync(Boolean submittedAsync) {
@@ -166,29 +149,6 @@ public void setAccountHolderCode(String accountHolderCode) {
166149
this.accountHolderCode = accountHolderCode;
167150
}
168151

169-
public GetAccountHolderResponse virtualAccounts(List<String> virtualAccounts) {
170-
this.virtualAccounts = virtualAccounts;
171-
return this;
172-
}
173-
174-
public GetAccountHolderResponse addVirtualAccountsItem(String virtualAccountsItem) {
175-
this.virtualAccounts.add(virtualAccountsItem);
176-
return this;
177-
}
178-
179-
/**
180-
* account holder's accounts
181-
*
182-
* @return virtualAccounts
183-
**/
184-
public List<String> getVirtualAccounts() {
185-
return virtualAccounts;
186-
}
187-
188-
public void setVirtualAccounts(List<String> virtualAccounts) {
189-
this.virtualAccounts = virtualAccounts;
190-
}
191-
192152
public GetAccountHolderResponse requirementsForNextAccountState(List<AccountStateRequirement> requirementsForNextAccountState) {
193153
this.requirementsForNextAccountState = requirementsForNextAccountState;
194154
return this;
@@ -334,29 +294,6 @@ public void setPspReference(String pspReference) {
334294
this.pspReference = pspReference;
335295
}
336296

337-
public GetAccountHolderResponse kycVerificationResults(List<KYCVerificationResult> kycVerificationResults) {
338-
this.kycVerificationResults = kycVerificationResults;
339-
return this;
340-
}
341-
342-
public GetAccountHolderResponse addKycVerificationResultsItem(KYCVerificationResult kycVerificationResultsItem) {
343-
this.kycVerificationResults.add(kycVerificationResultsItem);
344-
return this;
345-
}
346-
347-
/**
348-
* Get kycVerificationResults
349-
*
350-
* @return kycVerificationResults
351-
**/
352-
public List<KYCVerificationResult> getKycVerificationResults() {
353-
return kycVerificationResults;
354-
}
355-
356-
public void setKycVerificationResults(List<KYCVerificationResult> kycVerificationResults) {
357-
this.kycVerificationResults = kycVerificationResults;
358-
}
359-
360297
public GetAccountHolderResponse legalEntity(LegalEntityEnum legalEntity) {
361298
this.legalEntity = legalEntity;
362299
return this;
@@ -393,38 +330,32 @@ public boolean equals(Object o) {
393330
return false;
394331
}
395332
GetAccountHolderResponse getAccountHolderResponse = (GetAccountHolderResponse) o;
396-
return Objects.equals(this.accountStatus, getAccountHolderResponse.accountStatus)
397-
&& Objects.equals(this.verificationResult, getAccountHolderResponse.verificationResult)
333+
return Objects.equals(this.verification, getAccountHolderResponse.verification)
398334
&& Objects.equals(this.submittedAsync, getAccountHolderResponse.submittedAsync)
399335
&& Objects.equals(this.accountHolderCode, getAccountHolderResponse.accountHolderCode)
400-
&& Objects.equals(this.virtualAccounts, getAccountHolderResponse.virtualAccounts)
401336
&& Objects.equals(this.requirementsForNextAccountState, getAccountHolderResponse.requirementsForNextAccountState)
402337
&& Objects.equals(this.accountHolderDetails, getAccountHolderResponse.accountHolderDetails)
403338
&& Objects.equals(this.accountHolderStatus, getAccountHolderResponse.accountHolderStatus)
404339
&& Objects.equals(this.accountContainers, getAccountHolderResponse.accountContainers)
405340
&& Objects.equals(this.description, getAccountHolderResponse.description)
406341
&& Objects.equals(this.pspReference, getAccountHolderResponse.pspReference)
407-
&& Objects.equals(this.kycVerificationResults, getAccountHolderResponse.kycVerificationResults)
408342
&& Objects.equals(this.legalEntity, getAccountHolderResponse.legalEntity)
409-
&& Objects.equals(this.legalEntity, getAccountHolderResponse.primaryCurrency);
343+
&& Objects.equals(this.primaryCurrency, getAccountHolderResponse.primaryCurrency);
410344
}
411345

412346
@Override
413347
public int hashCode() {
414-
return Objects.hash(accountStatus,
415-
verificationResult,
416-
submittedAsync,
417-
accountHolderCode,
418-
virtualAccounts,
419-
requirementsForNextAccountState,
420-
accountHolderDetails,
421-
accountHolderStatus,
422-
accountContainers,
423-
description,
424-
pspReference,
425-
kycVerificationResults,
426-
legalEntity,
427-
primaryCurrency);
348+
return Objects.hash(verification,
349+
submittedAsync,
350+
accountHolderCode,
351+
requirementsForNextAccountState,
352+
accountHolderDetails,
353+
accountHolderStatus,
354+
accountContainers,
355+
description,
356+
pspReference,
357+
legalEntity,
358+
primaryCurrency);
428359
}
429360

430361

@@ -435,20 +366,17 @@ public String toString() {
435366

436367
StringBuilder sb = new StringBuilder();
437368
sb.append("class GetAccountHolderResponse {\n");
438-
439-
sb.append(" accountStatus: ").append(toIndentedString(accountStatus)).append("\n");
440-
sb.append(" verificationResult: ").append(toIndentedString(verificationResult)).append("\n");
369+
sb.append(" verification: ").append(toIndentedString(verification)).append("\n");
441370
sb.append(" submittedAsync: ").append(toIndentedString(submittedAsync)).append("\n");
442371
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
443-
sb.append(" virtualAccounts: ").append(toIndentedString(virtualAccounts)).append("\n");
444372
sb.append(" requirementsForNextAccountState: ").append(toIndentedString(requirementsForNextAccountState)).append("\n");
445373
sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
446374
sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n");
447375
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
448376
sb.append(" description: ").append(toIndentedString(description)).append("\n");
449377
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
450-
sb.append(" kycVerificationResults: ").append(toIndentedString(kycVerificationResults)).append("\n");
451378
sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
379+
sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
452380
sb.append("}");
453381
return sb.toString();
454382
}

src/test/java/com/adyen/MarketPayTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@
8686
import com.adyen.service.Account;
8787
import com.adyen.service.Fund;
8888
import com.adyen.service.Payment;
89+
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.AWAITING_DATA;
8990
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckStatusEnum.PASSED;
9091
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.BANK_ACCOUNT_VERIFICATION;
92+
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.COMPANY_VERIFICATION;
93+
import static com.adyen.model.marketpay.KYCCheckStatusData.CheckTypeEnum.PASSPORT_VERIFICATION;
9194
import static org.junit.Assert.assertEquals;
9295
import static org.junit.Assert.assertFalse;
9396
import static org.junit.Assert.assertTrue;
@@ -361,6 +364,8 @@ public void TestGetIndividualAccountHolderSuccess() throws Exception {
361364

362365
assertEquals("681d5df6-cf38-4557-aecd-ac8ed0c04195", getAccountHolderResponse.getAccountHolderDetails().getBankAccountDetails().get(0).getBankAccountUUID());
363366
assertEquals("140922935", getAccountHolderResponse.getAccounts().get(0).getAccountCode());
367+
assertEquals(PASSPORT_VERIFICATION, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckType());
368+
assertEquals(AWAITING_DATA, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckStatus());
364369
}
365370

366371
@Test
@@ -381,6 +386,9 @@ public void TestGetBusinessAccountHolderSuccess() throws Exception {
381386
assertEquals("1abf8304-58c7-4a9e-8bd3-4d7eff9801e4", getAccountHolderResponse.getAccountHolderDetails().getBankAccountDetails().get(0).getBankAccountUUID());
382387
assertEquals("67890", getAccountHolderResponse.getAccountHolderDetails().getBusinessDetails().getShareholders().get(0).getAddress().getPostalCode());
383388
assertEquals("123370698", getAccountHolderResponse.getAccounts().get(0).getAccountCode());
389+
assertEquals(COMPANY_VERIFICATION, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckType());
390+
assertEquals(PASSED, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getCheckStatus());
391+
assertEquals(1602, getAccountHolderResponse.getVerification().getAccountHolder().getChecks().get(0).getSummary().getCode().intValue());
384392
}
385393

386394
@Test

0 commit comments

Comments
 (0)