diff --git a/README.md b/README.md
index 3bccd380f..8473e8fa1 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,18 @@
The Adyen API Library for Java enables you to work with Adyen APIs and Hosted Payment Pages.
+## Integration
+The Library supports all APIs under the following services:
+
+* checkout
+* checkout utility
+* payments
+* modifications
+* payouts
+* recurring
+* marketpay
+* notifications
+
## Requirements
* Java 7 or higher
@@ -23,13 +35,13 @@ Add this dependency to your project's POM:
com.adyen
adyen-java-api-library
- 1.8.0
+ 2.0.0
```
## Documentation
-
-Follow the rest of our guides from the [documentation](http://adyen.github.io/adyen-java-api-library/index.html) on how to use this library.
+* https://docs.adyen.com/developers/development-resources/libraries
+* https://docs.adyen.com/developers/checkout/api-integration
## Usage
diff --git a/pom.xml b/pom.xml
index 8b909c548..d07b83137 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.adyen
adyen-java-api-library
jar
- 1.8.0
+ 2.0.0
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 f7e33584b..cbabbbe61 100644
--- a/src/main/java/com/adyen/Client.java
+++ b/src/main/java/com/adyen/Client.java
@@ -41,10 +41,10 @@ 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 LIB_NAME = "adyen-java-api-library";
- public static final String LIB_VERSION = "1.8.0";
+ public static final String LIB_VERSION = "2.0.0";
public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout";
public static final String CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout";
- public static final String CHECKOUT_API_VERSION = "v40";
+ public static final String CHECKOUT_API_VERSION = "v41";
public static final String CHECKOUT_UTILITY_API_VERSION = "v1";
public static final String ENDPOINT_PROTOCOL = "https://";
diff --git a/src/main/java/com/adyen/model/Card.java b/src/main/java/com/adyen/model/Card.java
index d966ab4ce..a64a0d756 100644
--- a/src/main/java/com/adyen/model/Card.java
+++ b/src/main/java/com/adyen/model/Card.java
@@ -208,8 +208,7 @@ public boolean equals(Object o) {
return Objects.equals(this.expiryMonth, card.expiryMonth)
&& Objects.equals(this.expiryYear, card.expiryYear)
&& Objects.equals(this.cvc, card.cvc)
- && Objects.equals(this.holderName,
- card.holderName)
+ && Objects.equals(this.holderName, card.holderName)
&& Objects.equals(this.issueNumber, card.issueNumber)
&& Objects.equals(this.number, card.number)
&& Objects.equals(this.startMonth, card.startMonth)
diff --git a/src/main/java/com/adyen/model/checkout/PaymentsResponse.java b/src/main/java/com/adyen/model/checkout/PaymentsResponse.java
index dcc2a3c58..4e9fc4576 100755
--- a/src/main/java/com/adyen/model/checkout/PaymentsResponse.java
+++ b/src/main/java/com/adyen/model/checkout/PaymentsResponse.java
@@ -93,6 +93,9 @@ public class PaymentsResponse {
@SerializedName("merchantReference")
private String merchantReference;
+ @SerializedName("outputDetails")
+ private Map outputDetails;
+
public PaymentsResponse additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
@@ -145,6 +148,13 @@ public PaymentsResponse addDetailsItem(InputDetail detailsItem) {
return this;
}
+ public String getOutputDetailDataByKey(String key) {
+ if (outputDetails == null) {
+ return null;
+ }
+ return outputDetails.get(key);
+ }
+
/**
* When non-empty, contains all the fields that you must submit to the `/payments/details` endpoint.
*
@@ -308,6 +318,14 @@ public void setMerchantReference(String merchantReference) {
this.merchantReference = merchantReference;
}
+ public Map getOutputDetails() {
+ return outputDetails;
+ }
+
+ public void setOutputDetails(Map outputDetails) {
+ this.outputDetails = outputDetails;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -329,7 +347,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.resultCode, paymentsResponse.resultCode)
&& Objects.equals(this.serviceError, paymentsResponse.serviceError)
&& Objects.equals(this.authResponse, paymentsResponse.authResponse)
- && Objects.equals(this.merchantReference, paymentsResponse.merchantReference);
+ && Objects.equals(this.merchantReference, paymentsResponse.merchantReference)
+ && Objects.equals(this.outputDetails, paymentsResponse.outputDetails);
}
@Override
@@ -353,6 +372,7 @@ public String toString() {
sb.append(" serviceError: ").append(toIndentedString(serviceError)).append("\n");
sb.append(" authResponse: ").append(toIndentedString(authResponse)).append("\n");
sb.append(" merchantReference: ").append(toIndentedString(merchantReference)).append("\n");
+ sb.append(" outputDetails: ").append(toIndentedString(outputDetails)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -389,6 +409,7 @@ public enum ResultCodeEnum {
CANCELLED("Cancelled"),
RECEIVED("Received"),
REDIRECTSHOPPER("RedirectShopper"),
+ PRESENTTOSHOPPER("PresentToShopper"),
UNKNOWN("Unknown"); //applicable for payments/details
private String value;
@@ -458,29 +479,29 @@ public boolean get3DAuthenticated() {
}
public String getBoletoBarCodeReference() {
- return getAdditionalDataByKey(BOLETO_BARCODE_REFERENCE);
+ return getOutputDetailDataByKey(BOLETO_BARCODE_REFERENCE);
}
public String getBoletoData() {
- return getAdditionalDataByKey(BOLETO_DATA);
+ return getOutputDetailDataByKey(BOLETO_DATA);
}
public String getAuthCode() {
- return getAdditionalDataByKey(AUTH_CODE);
+ return getOutputDetailDataByKey(AUTH_CODE);
}
public Date getBoletoDueDate() {
- String date = getAdditionalDataByKey(BOLETO_DUE_DATE);
+ String date = getOutputDetailDataByKey(BOLETO_DUE_DATE);
return DateUtil.parseYmdDate(date);
}
public Date getBoletoExpirationDate() {
- String date = getAdditionalDataByKey(BOLETO_EXPIRATION_DATE);
+ String date = getOutputDetailDataByKey(BOLETO_EXPIRATION_DATE);
return DateUtil.parseYmdDate(date);
}
public String getBoletoUrl() {
- return getAdditionalDataByKey(BOLETO_URL);
+ return getOutputDetailDataByKey(BOLETO_URL);
}
diff --git a/src/main/java/com/adyen/model/checkout/SubInputDetail.java b/src/main/java/com/adyen/model/checkout/SubInputDetail.java
index 06f07f3f6..46963dfea 100755
--- a/src/main/java/com/adyen/model/checkout/SubInputDetail.java
+++ b/src/main/java/com/adyen/model/checkout/SubInputDetail.java
@@ -21,11 +21,11 @@
package com.adyen.model.checkout;
-import com.google.gson.annotations.SerializedName;
-
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
+import com.google.gson.annotations.SerializedName;
/**
* SubInputDetail
@@ -47,6 +47,9 @@ public class SubInputDetail {
@SerializedName("value")
private String value = null;
+ @SerializedName("Configuration")
+ private Map configuration;
+
public SubInputDetail items(List- items) {
this.items = items;
return this;
@@ -151,6 +154,19 @@ public void setValue(String value) {
this.value = value;
}
+ /**
+ * The value can be pre-filled, if available.
+ *
+ * @return value
+ **/
+ public Map getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(Map configuration) {
+ this.configuration = configuration;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -160,11 +176,13 @@ public boolean equals(Object o) {
return false;
}
SubInputDetail subInputDetail = (SubInputDetail) o;
- return Objects.equals(this.items, subInputDetail.items) &&
- Objects.equals(this.key, subInputDetail.key) &&
- Objects.equals(this.optional, subInputDetail.optional) &&
- Objects.equals(this.type, subInputDetail.type) &&
- Objects.equals(this.value, subInputDetail.value);
+ return Objects.equals(this.items, subInputDetail.items)
+ && Objects.equals(this.key, subInputDetail.key)
+ && Objects.equals(this.optional, subInputDetail.optional)
+ && Objects.equals(this.type,
+ subInputDetail.type)
+ && Objects.equals(this.value, subInputDetail.value)
+ && Objects.equals(this.configuration, subInputDetail.configuration);
}
@Override
@@ -182,13 +200,13 @@ public String toString() {
sb.append(" optional: ").append(toIndentedString(optional)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
+ sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n");
sb.append("}");
return sb.toString();
}
/**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {