Skip to content

Commit

Permalink
Merge pull request #640 from Adyen/develop
Browse files Browse the repository at this point in the history
Release 17.2.0
  • Loading branch information
Morerice authored Oct 21, 2021
2 parents f0e4eb8 + 3e920ac commit 9584805
Show file tree
Hide file tree
Showing 37 changed files with 4,139 additions and 529 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can use Maven and add this dependency to your project's POM:
<dependency>
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<version>17.1.0</version>
<version>17.2.0</version>
</dependency>
```

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<packaging>jar</packaging>
<version>17.1.0</version>
<version>17.2.0</version>
<name>Adyen Java API Library</name>
<description>Adyen API Client Library for Java</description>
<url>https://github.com/adyen/adyen-java-api-library</url>
Expand Down Expand Up @@ -97,7 +97,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -195,7 +195,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.12.4</version>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/adyen/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Client {
public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v6";
public static final String MARKETPAY_HOP_API_VERSION = "v6";
public static final String LIB_NAME = "adyen-java-api-library";
public static final String LIB_VERSION = "17.0.0";
public static final String LIB_VERSION = "17.2.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_ENDPOINT_CERT_LIVE = "https://checkoutcert-live-%s.adyen.com/checkout";
Expand Down
39 changes: 38 additions & 1 deletion src/main/java/com/adyen/model/ThreeDS2RequestData.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public enum ChallengeIndicatorEnum {

NOPREFERENCE("noPreference"),
REQUESTCHALLENGE("requestChallenge"),
REQUESTNOCHALLENGE("requestNoChallenge");
REQUESTNOCHALLENGE("requestNoChallenge"),
REQUESTCHALLENGEASMANDATE("requestChallengeAsMandate");

@JsonValue
private String value;
Expand Down Expand Up @@ -89,6 +90,10 @@ public ChallengeIndicatorEnum read(final JsonReader jsonReader) throws IOExcepti
}
}

/**
* @deprecated As of Checkout/Payments API version 68, this field is not used anymore.
*/
@Deprecated
@SerializedName("challengeIndicator")
private ChallengeIndicatorEnum challengeIndicator = null;

Expand Down Expand Up @@ -135,6 +140,9 @@ public ChallengeIndicatorEnum read(final JsonReader jsonReader) throws IOExcepti
@SerializedName("threeDSRequestorID")
private String threeDSRequestorID = null;

@SerializedName("threeDSRequestorChallengeInd")
private String threeDSRequestorChallengeInd = null;

@SerializedName("threeDSRequestorName")
private String threeDSRequestorName = null;

Expand Down Expand Up @@ -211,15 +219,27 @@ public void setAuthenticationOnly(Boolean authenticationOnly) {
this.authenticationOnly = authenticationOnly;
}

/**
* @deprecated As of Checkout/Payments API version 68, this field is not used anymore.
*/
@Deprecated
public ThreeDS2RequestData challengeIndicator(ChallengeIndicatorEnum challengeIndicator) {
this.challengeIndicator = challengeIndicator;
return this;
}

/**
* @deprecated As of Checkout/Payments API version 68, this field is not used anymore.
*/
@Deprecated
public ChallengeIndicatorEnum getChallengeIndicator() {
return challengeIndicator;
}

/**
* @deprecated As of Checkout/Payments API version 68, this field is not used anymore.
*/
@Deprecated
public void setChallengeIndicator(ChallengeIndicatorEnum challengeIndicator) {
this.challengeIndicator = challengeIndicator;
}
Expand Down Expand Up @@ -410,6 +430,23 @@ public ThreeDS2RequestData messageVersion(String messageVersion) {
return this;
}

/**
* Indicates whether a challenge is requested for this transaction.
* @return threeDSRequestorChallengeInd
*/
public String getThreeDSRequestorChallengeInd() {
return threeDSRequestorChallengeInd;
}

public void setThreeDSRequestorChallengeInd(String threeDSRequestorChallengeInd) {
this.threeDSRequestorChallengeInd = threeDSRequestorChallengeInd;
}

public ThreeDS2RequestData threeDSRequestorChallengeInd(String threeDSRequestorChallengeInd) {
this.threeDSRequestorChallengeInd = threeDSRequestorChallengeInd;
return this;
}

/**
* Required for [authentication-only integration](https://docs.adyen.com/checkout/3d-secure-2/3ds2-checkout-authentication-only-integration) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2.
* @return threeDSRequestorID
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Java API Library
*
* Copyright (c) 2021 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*/
package com.adyen.model.checkout;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonValue;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.adyen.model.Amount;
import com.adyen.model.Split;

/**
* CreatePaymentAmountUpdateRequest
*/
public class CreatePaymentAmountUpdateRequest {
public static final String SERIALIZED_NAME_AMOUNT = "amount";
@SerializedName(SERIALIZED_NAME_AMOUNT)
private Amount amount;

public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT = "merchantAccount";
@SerializedName(SERIALIZED_NAME_MERCHANT_ACCOUNT)
private String merchantAccount;

/**
* The reason for the amount update. Possible values: * **delayedCharge** * **noShow**
*/
@JsonAdapter(ReasonEnum.Adapter.class)
public enum ReasonEnum {
DELAYEDCHARGE("delayedCharge"),

NOSHOW("noShow");

@JsonValue
private String value;

ReasonEnum(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static ReasonEnum fromValue(String value) {
for (ReasonEnum b : ReasonEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<ReasonEnum> {
@Override
public void write(final JsonWriter jsonWriter, final ReasonEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public ReasonEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ReasonEnum.fromValue(value);
}
}
}

public static final String SERIALIZED_NAME_REASON = "reason";
@SerializedName(SERIALIZED_NAME_REASON)
private ReasonEnum reason;

public static final String SERIALIZED_NAME_REFERENCE = "reference";
@SerializedName(SERIALIZED_NAME_REFERENCE)
private String reference;

public static final String SERIALIZED_NAME_SPLITS = "splits";
@SerializedName(SERIALIZED_NAME_SPLITS)
private List<Split> splits = null;


public CreatePaymentAmountUpdateRequest amount(Amount amount) {

this.amount = amount;
return this;
}

/**
* Get amount
* @return amount
**/
public Amount getAmount() {
return amount;
}


public void setAmount(Amount amount) {
this.amount = amount;
}


public CreatePaymentAmountUpdateRequest merchantAccount(String merchantAccount) {

this.merchantAccount = merchantAccount;
return this;
}

/**
* The merchant account that is used to process the payment.
* @return merchantAccount
**/
public String getMerchantAccount() {
return merchantAccount;
}


public void setMerchantAccount(String merchantAccount) {
this.merchantAccount = merchantAccount;
}


public CreatePaymentAmountUpdateRequest reason(ReasonEnum reason) {

this.reason = reason;
return this;
}

/**
* The reason for the amount update. Possible values: * **delayedCharge** * **noShow**
* @return reason
**/
public ReasonEnum getReason() {
return reason;
}


public void setReason(ReasonEnum reason) {
this.reason = reason;
}


public CreatePaymentAmountUpdateRequest reference(String reference) {

this.reference = reference;
return this;
}

/**
* Your reference for the amount update request. Maximum length: 80 characters.
* @return reference
**/
public String getReference() {
return reference;
}


public void setReference(String reference) {
this.reference = reference;
}


public CreatePaymentAmountUpdateRequest splits(List<Split> splits) {

this.splits = splits;
return this;
}

public CreatePaymentAmountUpdateRequest addSplitsItem(Split splitsItem) {
if (this.splits == null) {
this.splits = new ArrayList<Split>();
}
this.splits.add(splitsItem);
return this;
}

/**
* An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/platforms/processing-payments#providing-split-information).
* @return splits
**/
public List<Split> getSplits() {
return splits;
}


public void setSplits(List<Split> splits) {
this.splits = splits;
}


@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePaymentAmountUpdateRequest createPaymentAmountUpdateRequest = (CreatePaymentAmountUpdateRequest) o;
return Objects.equals(this.amount, createPaymentAmountUpdateRequest.amount) &&
Objects.equals(this.merchantAccount, createPaymentAmountUpdateRequest.merchantAccount) &&
Objects.equals(this.reason, createPaymentAmountUpdateRequest.reason) &&
Objects.equals(this.reference, createPaymentAmountUpdateRequest.reference) &&
Objects.equals(this.splits, createPaymentAmountUpdateRequest.splits);
}

@Override
public int hashCode() {
return Objects.hash(amount, merchantAccount, reason, reference, splits);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreatePaymentAmountUpdateRequest {\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" splits: ").append(toIndentedString(splits)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* 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) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

}

Loading

0 comments on commit 9584805

Please sign in to comment.