Skip to content

Commit 882d8c0

Browse files
authored
Merge pull request #314 from Adyen/develop
Version Update 4.2.0
2 parents c9ccb40 + 8dc83e7 commit 882d8c0

File tree

11 files changed

+259
-17
lines changed

11 files changed

+259
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Add this dependency to your project's POM:
3838
<dependency>
3939
<groupId>com.adyen</groupId>
4040
<artifactId>adyen-java-api-library</artifactId>
41-
<version>4.1.0</version>
41+
<version>4.2.0</version>
4242
</dependency>
4343
```
4444

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>4.1.0</version>
7+
<version>4.2.0</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
@@ -42,7 +42,7 @@ public class Client {
4242
public static final String MARKETPAY_FUND_API_VERSION = "v3";
4343
public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v1";
4444
public static final String LIB_NAME = "adyen-java-api-library";
45-
public static final String LIB_VERSION = "4.1.0";
45+
public static final String LIB_VERSION = "4.2.0";
4646
public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout";
4747
public static final String CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout";
4848
public static final String CHECKOUT_API_VERSION = "v51";
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.adyen.enums;
2+
3+
public enum Gender {
4+
MALE {
5+
6+
public String toString() {
7+
return "MALE";
8+
}
9+
},
10+
FEMALE {
11+
12+
public String toString() {
13+
return "FEMALE";
14+
}
15+
},
16+
UNKNOWN {
17+
18+
public String toString() {
19+
return "UNKNOWN";
20+
}
21+
22+
}
23+
}

src/main/java/com/adyen/model/checkout/DefaultPaymentMethodDetails.java

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ public class DefaultPaymentMethodDetails implements PaymentMethodDetails {
5050
private String encryptedExpiryYear;
5151
@SerializedName("encryptedSecurityCode")
5252
private String encryptedSecurityCode;
53+
/**
54+
* @deprecated This field is deprecated. Use {@link DefaultPaymentMethodDetails#storedPaymentMethodId } instead.
55+
*/
56+
@Deprecated
5357
@SerializedName("recurringDetailReference")
5458
private String recurringDetailReference;
59+
@SerializedName("storedPaymentMethodId")
60+
private String storedPaymentMethodId;
5561
@SerializedName("storeDetails")
5662
private Boolean storeDetails;
5763
/**
@@ -70,6 +76,8 @@ public class DefaultPaymentMethodDetails implements PaymentMethodDetails {
7076
private String applepayToken;
7177
@SerializedName("paywithgoogle.token")
7278
private String googlepayToken;
79+
@SerializedName("separateDeliveryAddress")
80+
private Boolean separateDeliveryAddress;
7381

7482
@Override
7583
public String getType() {
@@ -229,19 +237,44 @@ public DefaultPaymentMethodDetails encryptedSecurityCode(String encryptedSecurit
229237
return this;
230238
}
231239

240+
/**
241+
* @deprecated This field is deprecated. Use {@link DefaultPaymentMethodDetails#storedPaymentMethodId } instead.
242+
*/
243+
@Deprecated
232244
public String getRecurringDetailReference() {
233245
return recurringDetailReference;
234246
}
235247

248+
/**
249+
* @deprecated This field is deprecated. Use {@link DefaultPaymentMethodDetails#storedPaymentMethodId } instead.
250+
*/
251+
@Deprecated
236252
public void setRecurringDetailReference(String recurringDetailReference) {
237253
this.recurringDetailReference = recurringDetailReference;
238254
}
239255

256+
/**
257+
* @deprecated This field is deprecated. Use {@link DefaultPaymentMethodDetails#storedPaymentMethodId } instead.
258+
*/
259+
@Deprecated
240260
public DefaultPaymentMethodDetails recurringDetailReference(String recurringDetailReference) {
241261
this.recurringDetailReference = recurringDetailReference;
242262
return this;
243263
}
244264

265+
public String getStoredPaymentMethodId() {
266+
return storedPaymentMethodId;
267+
}
268+
269+
public void setStoredPaymentMethodId(String storedPaymentMethodId) {
270+
this.storedPaymentMethodId = storedPaymentMethodId;
271+
}
272+
273+
public DefaultPaymentMethodDetails storedPaymentMethodId(String storedPaymentMethodId) {
274+
this.storedPaymentMethodId = storedPaymentMethodId;
275+
return this;
276+
}
277+
245278
public Boolean getStoreDetails() {
246279
return storeDetails;
247280
}
@@ -325,6 +358,14 @@ public void setGooglepayToken(String googlepayToken) {
325358
this.googlepayToken = googlepayToken;
326359
}
327360

361+
public Boolean getSeparateDeliveryAddress() {
362+
return separateDeliveryAddress;
363+
}
364+
365+
public void setSeparateDeliveryAddress(Boolean separateDeliveryAddress) {
366+
this.separateDeliveryAddress = separateDeliveryAddress;
367+
}
368+
328369
@Override
329370
public boolean equals(Object o) {
330371
if (this == o) {
@@ -347,21 +388,23 @@ public boolean equals(Object o) {
347388
&& Objects.equals(encryptedExpiryYear, that.encryptedExpiryYear)
348389
&& Objects.equals(encryptedSecurityCode, that.encryptedSecurityCode)
349390
&& Objects.equals(recurringDetailReference, that.recurringDetailReference)
391+
&& Objects.equals(storedPaymentMethodId, that.storedPaymentMethodId)
350392
&& Objects.equals(storeDetails, that.storeDetails)
351393
&& Objects.equals(idealIssuer, that.idealIssuer)
352394
&& Objects.equals(issuer, that.issuer)
353395
&& Objects.equals(sepaIbanNumber, that.sepaIbanNumber)
354396
&& Objects.equals(sepaOwnerName, that.sepaOwnerName)
355397
&& Objects.equals(applepayToken, that.applepayToken)
356-
&& Objects.equals(googlepayToken, that.googlepayToken);
398+
&& Objects.equals(googlepayToken, that.googlepayToken)
399+
&& Objects.equals(separateDeliveryAddress, that.separateDeliveryAddress);
357400
}
358401

359402
@Override
360403
public int hashCode() {
361404
return Objects.hash(type, number, expiryMonth, expiryYear, holderName, cvc, installmentConfigurationKey,
362405
personalDetails, encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode,
363-
recurringDetailReference, storeDetails, idealIssuer, issuer, sepaOwnerName, sepaIbanNumber,
364-
applepayToken, googlepayToken);
406+
recurringDetailReference, storedPaymentMethodId, storeDetails, idealIssuer, issuer, sepaOwnerName,
407+
sepaIbanNumber, applepayToken, googlepayToken, separateDeliveryAddress);
365408
}
366409

367410
@Override
@@ -380,13 +423,15 @@ public String toString() {
380423
", encryptedExpiryYear='" + encryptedExpiryYear + '\'' +
381424
", encryptedSecurityCode='" + encryptedSecurityCode + '\'' +
382425
", recurringDetailReference='" + recurringDetailReference + '\'' +
426+
", storedPaymentMethodId='" + storedPaymentMethodId + '\'' +
383427
", storeDetails=" + storeDetails +
384428
", idealIssuer='" + idealIssuer + '\'' +
385429
", issuer='" + issuer + '\'' +
386430
", sepaOwnerName='" + sepaOwnerName + '\'' +
387431
", sepaIbanNumber='" + sepaIbanNumber + '\'' +
388432
", applepayToken='" + applepayToken + '\'' +
389433
", googlepayToken='" + googlepayToken + '\'' +
434+
", separateDeliveryAddress='" + separateDeliveryAddress + '\'' +
390435
'}';
391436
}
392437
}

src/main/java/com/adyen/model/checkout/PersonalDetails.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
package com.adyen.model.checkout;
2222

23+
import com.adyen.enums.Gender;
2324
import com.google.gson.annotations.SerializedName;
2425

2526
public class PersonalDetails {
@@ -31,6 +32,8 @@ public class PersonalDetails {
3132
private String lastName;
3233
@SerializedName("dateOfBirth")
3334
private String dateOfBirth;
35+
@SerializedName("gender")
36+
private Gender gender;
3437
@SerializedName("telephoneNumber")
3538
private String telephoneNumber;
3639
@SerializedName("socialSecurityNumber")
@@ -68,6 +71,10 @@ public String getLastName() {
6871
return lastName;
6972
}
7073

74+
public void setLastName(String lastName) {
75+
this.lastName = lastName;
76+
}
77+
7178
public PersonalDetails lastName(String lastName) {
7279
this.lastName = lastName;
7380
return this;
@@ -77,6 +84,10 @@ public String getDateOfBirth() {
7784
return dateOfBirth;
7885
}
7986

87+
public void setDateOfBirth(String dateOfBirth) {
88+
this.dateOfBirth = dateOfBirth;
89+
}
90+
8091
public PersonalDetails dateOfBirth(String dateOfBirth) {
8192
this.dateOfBirth = dateOfBirth;
8293
return this;
@@ -86,6 +97,10 @@ public String getTelephoneNumber() {
8697
return telephoneNumber;
8798
}
8899

100+
public void setTelephoneNumber(String telephoneNumber) {
101+
this.telephoneNumber = telephoneNumber;
102+
}
103+
89104
public PersonalDetails telephoneNumber(String telephoneNumber) {
90105
this.telephoneNumber = telephoneNumber;
91106
return this;
@@ -95,6 +110,10 @@ public String getSocialSecurityNumber() {
95110
return socialSecurityNumber;
96111
}
97112

113+
public void setSocialSecurityNumber(String socialSecurityNumber) {
114+
this.socialSecurityNumber = socialSecurityNumber;
115+
}
116+
98117
public PersonalDetails socialSecurityNumber(String socialSecurityNumber) {
99118
this.socialSecurityNumber = socialSecurityNumber;
100119
return this;
@@ -104,11 +123,28 @@ public String getShopperEmail() {
104123
return shopperEmail;
105124
}
106125

126+
public void setShopperEmail(String shopperEmail) {
127+
this.shopperEmail = shopperEmail;
128+
}
129+
107130
public PersonalDetails shopperEmail(String shopperEmail) {
108131
this.shopperEmail = shopperEmail;
109132
return this;
110133
}
111134

135+
public Gender getGender() {
136+
return gender;
137+
}
138+
139+
public void setGender(Gender gender) {
140+
this.gender = gender;
141+
}
142+
143+
public PersonalDetails gender(Gender gender) {
144+
this.gender = gender;
145+
return this;
146+
}
147+
112148
@Override
113149
public String toString() {
114150
return "PersonalDetails{"
@@ -133,6 +169,9 @@ public String toString() {
133169
+ ", shopperEmail='"
134170
+ shopperEmail
135171
+ '\''
172+
+ ", gender='"
173+
+ gender
174+
+ '\''
136175
+ '}';
137176
}
138177
}

src/main/java/com/adyen/model/nexo/BarcodeType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* &lt;enumeration value="Code25"/&gt;
2020
* &lt;enumeration value="Code128"/&gt;
2121
* &lt;enumeration value="PDF417"/&gt;
22-
* &lt;enumeration value="QRCODE"/&gt;
22+
* &lt;enumeration value="QRCode"/&gt;
2323
* &lt;/restriction&gt;
2424
* &lt;/simpleType&gt;
2525
* </pre>
@@ -60,7 +60,8 @@ public enum BarcodeType {
6060
/**
6161
* Qrcode barcode type.
6262
*/
63-
QRCODE("QRCODE");
63+
@XmlEnumValue("QRCode")
64+
QRCODE("QRCode");
6465
private final String value;
6566

6667
BarcodeType(String v) {

src/main/java/com/adyen/model/nexo/OutputBarcode.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import javax.xml.bind.annotation.XmlAccessorType;
55
import javax.xml.bind.annotation.XmlAttribute;
66
import javax.xml.bind.annotation.XmlType;
7-
import javax.xml.bind.annotation.XmlValue;
87

98

109
/**
@@ -26,15 +25,15 @@
2625
*/
2726
@XmlAccessorType(XmlAccessType.FIELD)
2827
@XmlType(name = "OutputBarcode", propOrder = {
29-
"value"
28+
"barcodeValue"
3029
})
3130
public class OutputBarcode {
3231

3332
/**
3433
* The Value.
3534
*/
36-
@XmlValue
37-
protected String value;
35+
@XmlAttribute(name = "BarcodeValue")
36+
protected String barcodeValue;
3837
/**
3938
* The Barcode.
4039
*/
@@ -47,16 +46,16 @@ public class OutputBarcode {
4746
* @return possible object is {@link String }
4847
*/
4948
public String getValue() {
50-
return value;
49+
return barcodeValue;
5150
}
5251

5352
/**
54-
* Sets the value of the value property.
53+
* Sets the value of the barcodeValue property.
5554
*
56-
* @param value allowed object is {@link String }
55+
* @param barcodeValue allowed object is {@link String }
5756
*/
58-
public void setValue(String value) {
59-
this.value = value;
57+
public void setBarcodeValue(String barcodeValue) {
58+
this.barcodeValue = barcodeValue;
6059
}
6160

6261
/**

0 commit comments

Comments
 (0)