Skip to content

Commit 4ab57e2

Browse files
authored
Skip serialisation of attributes with default values (#1517)
* Avoid initialising attribute with default * Re-generate Checkout models * Add tests * Refactor test to use JSON comparison * Address Code Analysis remarks * Address Code Analysis remarks
1 parent dec0402 commit 4ab57e2

File tree

61 files changed

+130
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+130
-110
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public static TypeEnum fromValue(String value) {
206206
}
207207

208208
public static final String JSON_PROPERTY_TYPE = "type";
209-
private TypeEnum type = TypeEnum.ACH;
209+
private TypeEnum type;
210210

211211
public AchDetails() {}
212212

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static TypeEnum fromValue(String value) {
7070
}
7171

7272
public static final String JSON_PROPERTY_TYPE = "type";
73-
private TypeEnum type = TypeEnum.AFFIRM;
73+
private TypeEnum type;
7474

7575
public AffirmDetails() {}
7676

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static TypeEnum fromValue(String value) {
9797
}
9898

9999
public static final String JSON_PROPERTY_TYPE = "type";
100-
private TypeEnum type = TypeEnum.AFTERPAY_DEFAULT;
100+
private TypeEnum type;
101101

102102
public AfterpayDetails() {}
103103

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static TypeEnum fromValue(String value) {
7878
}
7979

8080
public static final String JSON_PROPERTY_TYPE = "type";
81-
private TypeEnum type = TypeEnum.AMAZONPAY;
81+
private TypeEnum type;
8282

8383
public AmazonPayDetails() {}
8484

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static TypeEnum fromValue(String value) {
7070
}
7171

7272
public static final String JSON_PROPERTY_TYPE = "type";
73-
private TypeEnum type = TypeEnum.ANDROIDPAY;
73+
private TypeEnum type;
7474

7575
public AndroidPayDetails() {}
7676

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static TypeEnum fromValue(String value) {
131131
}
132132

133133
public static final String JSON_PROPERTY_TYPE = "type";
134-
private TypeEnum type = TypeEnum.APPLEPAY;
134+
private TypeEnum type;
135135

136136
public ApplePayDetails() {}
137137

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static TypeEnum fromValue(String value) {
131131
}
132132

133133
public static final String JSON_PROPERTY_TYPE = "type";
134-
private TypeEnum type = TypeEnum.APPLEPAY;
134+
private TypeEnum type;
135135

136136
public ApplePayDonations() {}
137137

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static AttemptAuthenticationEnum fromValue(String value) {
8080
private AttemptAuthenticationEnum attemptAuthentication;
8181

8282
public static final String JSON_PROPERTY_AUTHENTICATION_ONLY = "authenticationOnly";
83-
private Boolean authenticationOnly = false;
83+
private Boolean authenticationOnly;
8484

8585
public static final String JSON_PROPERTY_THREE_D_S_REQUEST_DATA = "threeDSRequestData";
8686
private ThreeDSRequestData threeDSRequestData;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static TypeEnum fromValue(String value) {
9595
}
9696

9797
public static final String JSON_PROPERTY_TYPE = "type";
98-
private TypeEnum type = TypeEnum.DIRECTDEBIT_GB;
98+
private TypeEnum type;
9999

100100
public BacsDirectDebitDetails() {}
101101

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public static ShopperInteractionEnum fromValue(String value) {
315315
"threeDSAuthenticationOnly";
316316
@Deprecated // deprecated since Adyen Checkout API v69: Use
317317
// `authenticationData.authenticationOnly` instead.
318-
private Boolean threeDSAuthenticationOnly = false;
318+
private Boolean threeDSAuthenticationOnly;
319319

320320
public static final String JSON_PROPERTY_TOTALS_GROUP = "totalsGroup";
321321
private String totalsGroup;

0 commit comments

Comments
 (0)