Skip to content

Commit d4f911c

Browse files
authored
Merge pull request #104 from Adyen/develop
Release 1.5.1
2 parents 30d5ca2 + 7f51b10 commit d4f911c

19 files changed

+496
-41
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.0</version>
26+
<version>1.5.1</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.0<span class="hljs-tag">&lt;/<span
52+
<span class="hljs-tag">&lt;<span class="hljs-title">version</span>&gt;</span>1.5.1<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.0</version>
7+
<version>1.5.1</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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public class Client {
3636
public static final String MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services";
3737
public static final String API_VERSION = "v30";
3838
public static final String RECURRING_API_VERSION = "v25";
39-
public static final String MARKETPAY_ACCOUNT_API_VERSION = "v3";
39+
public static final String MARKETPAY_ACCOUNT_API_VERSION = "v4";
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.0";
43+
public static final String LIB_VERSION = "1.5.1";
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/model/marketpay/Account.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package com.adyen.model.marketpay;
2222

2323
import java.util.Objects;
24+
2425
import com.google.gson.annotations.SerializedName;
2526

2627
/**
@@ -36,9 +37,15 @@ public class Account {
3637
@SerializedName("beneficiaryMerchantReference")
3738
private String beneficiaryMerchantReference = null;
3839

40+
@SerializedName("description")
41+
private String description = null;
42+
3943
@SerializedName("payoutSchedule")
4044
private PayoutScheduleResponse payoutSchedule = null;
4145

46+
@SerializedName("status")
47+
private String status = null;
48+
4249
public Account accountCode(String accountCode) {
4350
this.accountCode = accountCode;
4451
return this;
@@ -93,6 +100,15 @@ public void setBeneficiaryMerchantReference(String beneficiaryMerchantReference)
93100
this.beneficiaryMerchantReference = beneficiaryMerchantReference;
94101
}
95102

103+
public String getDescription() {
104+
return description;
105+
}
106+
107+
public void setDescription(String description) {
108+
this.description = description;
109+
}
110+
111+
96112
public Account payoutSchedule(PayoutScheduleResponse payoutSchedule) {
97113
this.payoutSchedule = payoutSchedule;
98114
return this;
@@ -111,6 +127,13 @@ public void setPayoutSchedule(PayoutScheduleResponse payoutSchedule) {
111127
this.payoutSchedule = payoutSchedule;
112128
}
113129

130+
public String getStatus() {
131+
return status;
132+
}
133+
134+
public void setStatus(String status) {
135+
this.status = status;
136+
}
114137

115138
@Override
116139
public boolean equals(Object o) {
@@ -124,7 +147,7 @@ public boolean equals(Object o) {
124147
return Objects.equals(this.accountCode, account.accountCode)
125148
&& Objects.equals(this.beneficiaryAccount, account.beneficiaryAccount)
126149
&& Objects.equals(this.beneficiaryMerchantReference,
127-
account.beneficiaryMerchantReference)
150+
account.beneficiaryMerchantReference)
128151
&& Objects.equals(this.payoutSchedule, account.payoutSchedule);
129152
}
130153

@@ -142,7 +165,9 @@ public String toString() {
142165
sb.append(" accountCode: ").append(toIndentedString(accountCode)).append("\n");
143166
sb.append(" beneficiaryAccount: ").append(toIndentedString(beneficiaryAccount)).append("\n");
144167
sb.append(" beneficiaryMerchantReference: ").append(toIndentedString(beneficiaryMerchantReference)).append("\n");
168+
sb.append(" description: ").append(toIndentedString(description)).append("\n");
145169
sb.append(" payoutSchedule: ").append(toIndentedString(payoutSchedule)).append("\n");
170+
sb.append(" status: ").append(toIndentedString(status)).append("\n");
146171
sb.append("}");
147172
return sb.toString();
148173
}

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.ArrayList;
2424
import java.util.List;
2525
import java.util.Objects;
26+
2627
import com.google.gson.annotations.SerializedName;
2728

2829
/**
@@ -43,6 +44,9 @@ public class BusinessDetails {
4344
@SerializedName("legalBusinessName")
4445
private String legalBusinessName = null;
4546

47+
@SerializedName("registrationNumber")
48+
private String registrationNumber = null;
49+
4650
/**
4751
* Populate the virtual shareholders to bypass the shareholderContactContainers list
4852
*
@@ -52,7 +56,7 @@ public List<ShareholderContact> getShareholders() {
5256
if (shareholders == null) {
5357
shareholders = new ArrayList<ShareholderContact>();
5458

55-
if (shareholderContactContainers != null && ! shareholderContactContainers.isEmpty()) {
59+
if (shareholderContactContainers != null && !shareholderContactContainers.isEmpty()) {
5660
for (ShareholderContactContainer shareholderContactContainer : shareholderContactContainers) {
5761
shareholders.add((shareholderContactContainer.getShareholderContact()));
5862
}
@@ -155,6 +159,13 @@ public void setLegalBusinessName(String legalBusinessName) {
155159
this.legalBusinessName = legalBusinessName;
156160
}
157161

162+
public String getRegistrationNumber() {
163+
return registrationNumber;
164+
}
165+
166+
public void setRegistrationNumber(String registrationNumber) {
167+
this.registrationNumber = registrationNumber;
168+
}
158169

159170
@Override
160171
public boolean equals(Object o) {
@@ -189,6 +200,7 @@ public String toString() {
189200
sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n");
190201
sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n");
191202
sb.append(" legalBusinessName: ").append(toIndentedString(legalBusinessName)).append("\n");
203+
sb.append(" registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n");
192204
sb.append("}");
193205
return sb.toString();
194206
}
@@ -202,6 +214,4 @@ private String toIndentedString(Object o) {
202214
}
203215
return o.toString().replace("\n", "\n ");
204216
}
205-
206-
}
207-
217+
}

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public class CreateAccountHolderRequest {
3030
@SerializedName("createDefaultAccount")
3131
private Boolean createDefaultAccount = null;
3232

33+
@SerializedName("description")
34+
private String description = null;
35+
3336
@SerializedName("accountHolderCode")
3437
private String accountHolderCode = null;
3538

@@ -64,6 +67,9 @@ public String toString() {
6467
@SerializedName("legalEntity")
6568
private LegalEntityEnum legalEntity = null;
6669

70+
@SerializedName("primaryCurrency")
71+
private String primaryCurrency = null;
72+
6773
public CreateAccountHolderRequest createDefaultAccount(Boolean createDefaultAccount) {
6874
this.createDefaultAccount = createDefaultAccount;
6975
return this;
@@ -87,6 +93,14 @@ public CreateAccountHolderRequest accountHolderCode(String accountHolderCode) {
8793
return this;
8894
}
8995

96+
public String getDescription() {
97+
return description;
98+
}
99+
100+
public void setDescription(String description) {
101+
this.description = description;
102+
}
103+
90104
/**
91105
* code of account holder to be created
92106
*
@@ -154,6 +168,13 @@ public void setLegalEntity(LegalEntityEnum legalEntity) {
154168
this.legalEntity = legalEntity;
155169
}
156170

171+
public String getPrimaryCurrency() {
172+
return primaryCurrency;
173+
}
174+
175+
public void setPrimaryCurrency(String primaryCurrency) {
176+
this.primaryCurrency = primaryCurrency;
177+
}
157178

158179
@Override
159180
public boolean equals(Object o) {
@@ -183,10 +204,12 @@ public String toString() {
183204
sb.append("class CreateAccountHolderRequest {\n");
184205

185206
sb.append(" createDefaultAccount: ").append(toIndentedString(createDefaultAccount)).append("\n");
207+
sb.append(" description: ").append(toIndentedString(description)).append("\n");
186208
sb.append(" accountHolderCode: ").append(toIndentedString(accountHolderCode)).append("\n");
187209
sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
188210
sb.append(" processingTier: ").append(toIndentedString(processingTier)).append("\n");
189211
sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
212+
sb.append(" primaryCurrency: ").append(toIndentedString(primaryCurrency)).append("\n");
190213
sb.append("}");
191214
return sb.toString();
192215
}

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

Lines changed: 87 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020
*/
2121
package com.adyen.model.marketpay;
2222

23+
import java.io.IOException;
2324
import java.util.ArrayList;
2425
import java.util.List;
2526
import java.util.Objects;
27+
28+
import com.google.gson.TypeAdapter;
2629
import com.google.gson.annotations.SerializedName;
30+
import com.google.gson.stream.JsonReader;
31+
import com.google.gson.stream.JsonWriter;
2732

2833
/**
2934
* CreateAccountHolderResponse
@@ -55,9 +60,59 @@ public class CreateAccountHolderResponse {
5560
@SerializedName("accountHolderStatus")
5661
private AccountHolderStatus accountHolderStatus;
5762

63+
@SerializedName("description")
64+
private String description = null;
65+
5866
@SerializedName("pspReference")
5967
private String pspReference;
6068

69+
public enum LegalEntityEnum {
70+
71+
BUSINESS("Business"),
72+
INDIVIDUAL("Individual"),
73+
NONPROFIT("NonProfit");
74+
75+
private String value;
76+
77+
LegalEntityEnum(String value) {
78+
this.value = value;
79+
}
80+
81+
public String getValue() {
82+
return value;
83+
}
84+
85+
@Override
86+
public String toString() {
87+
return String.valueOf(value);
88+
}
89+
90+
public static LegalEntityEnum fromValue(String text) {
91+
for (LegalEntityEnum b : LegalEntityEnum.values()) {
92+
if (String.valueOf(b.value).equals(text)) {
93+
return b;
94+
}
95+
}
96+
return null;
97+
}
98+
99+
public static class Adapter extends TypeAdapter<LegalEntityEnum> {
100+
@Override
101+
public void write(final JsonWriter jsonWriter, final LegalEntityEnum enumeration) throws IOException {
102+
jsonWriter.value(enumeration.getValue());
103+
}
104+
105+
@Override
106+
public LegalEntityEnum read(final JsonReader jsonReader) throws IOException {
107+
String value = jsonReader.nextString();
108+
return LegalEntityEnum.fromValue(String.valueOf(value));
109+
}
110+
}
111+
}
112+
113+
@SerializedName("legalEntity")
114+
private LegalEntityEnum legalEntity = null;
115+
61116
public CreateAccountHolderResponse accountStatus(AccountStatus accountStatus) {
62117
this.accountStatus = accountStatus;
63118
return this;
@@ -139,7 +194,7 @@ public List<ErrorFieldType> getInvalidFields() {
139194
if (invalidFields == null) {
140195
invalidFields = new ArrayList<ErrorFieldType>();
141196

142-
if (invalidFieldsContainers != null && ! invalidFieldsContainers.isEmpty()) {
197+
if (invalidFieldsContainers != null && !invalidFieldsContainers.isEmpty()) {
143198
for (ErrorFieldTypeContainer invalidFieldsContainer : invalidFieldsContainers) {
144199
invalidFields.add(invalidFieldsContainer.getErrorFieldType());
145200
}
@@ -218,6 +273,14 @@ public CreateAccountHolderResponse pspReference(String pspReference) {
218273
return this;
219274
}
220275

276+
public String getDescription() {
277+
return description;
278+
}
279+
280+
public void setDescription(String description) {
281+
this.description = description;
282+
}
283+
221284
/**
222285
* psp reference
223286
*
@@ -247,6 +310,14 @@ public void setInvalidFieldsContainers(List<ErrorFieldTypeContainer> invalidFiel
247310
this.invalidFieldsContainers = invalidFieldsContainers;
248311
}
249312

313+
public LegalEntityEnum getLegalEntity() {
314+
return legalEntity;
315+
}
316+
317+
public void setLegalEntity(LegalEntityEnum legalEntity) {
318+
this.legalEntity = legalEntity;
319+
}
320+
250321
@Override
251322
public boolean equals(Object o) {
252323
if (this == o) {
@@ -264,20 +335,24 @@ public boolean equals(Object o) {
264335
&& Objects.equals(this.invalidFieldsContainers, createAccountHolderResponse.invalidFieldsContainers)
265336
&& Objects.equals(this.accountHolderDetails, createAccountHolderResponse.accountHolderDetails)
266337
&& Objects.equals(this.accountHolderStatus, createAccountHolderResponse.accountHolderStatus)
267-
&& Objects.equals(this.pspReference, createAccountHolderResponse.pspReference);
338+
&& Objects.equals(this.description, createAccountHolderResponse.description)
339+
&& Objects.equals(this.pspReference, createAccountHolderResponse.pspReference)
340+
&& Objects.equals(this.legalEntity, createAccountHolderResponse.legalEntity);
268341
}
269342

270343
@Override
271344
public int hashCode() {
272345
return Objects.hash(accountStatus,
273-
verification,
274-
submittedAsync,
275-
accountHolderCode,
276-
accountCode,
277-
invalidFieldsContainers,
278-
accountHolderDetails,
279-
accountHolderStatus,
280-
pspReference);
346+
verification,
347+
submittedAsync,
348+
accountHolderCode,
349+
accountCode,
350+
invalidFieldsContainers,
351+
accountHolderDetails,
352+
accountHolderStatus,
353+
description,
354+
pspReference,
355+
legalEntity);
281356
}
282357

283358

@@ -296,7 +371,9 @@ public String toString() {
296371
sb.append(" invalidFields: ").append(toIndentedString(invalidFields)).append("\n");
297372
sb.append(" accountHolderDetails: ").append(toIndentedString(accountHolderDetails)).append("\n");
298373
sb.append(" accountHolderStatus: ").append(toIndentedString(accountHolderStatus)).append("\n");
374+
sb.append(" description: ").append(toIndentedString(description)).append("\n");
299375
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
376+
sb.append(" legalEntity: ").append(toIndentedString(legalEntity)).append("\n");
300377
sb.append("}");
301378
return sb.toString();
302379
}

0 commit comments

Comments
 (0)