Skip to content

Commit

Permalink
PW-4436 add notifyShopper endpoint and mandate field (#530)
Browse files Browse the repository at this point in the history
* PW-4436: Add Mandate field to Checkout /payments and PAL /authorise

* PW-4436: Add @JsonValue

* PW-4436 added notifyShopper endpoint
  • Loading branch information
Aleffio committed Apr 28, 2021
1 parent 3a65be8 commit a4b2c05
Show file tree
Hide file tree
Showing 9 changed files with 1,086 additions and 47 deletions.
26 changes: 24 additions & 2 deletions src/main/java/com/adyen/model/PaymentRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.adyen.model.additionalData.InvoiceLine;
import com.adyen.model.additionalData.SplitPayment;
import com.adyen.model.additionalData.SplitPaymentItem;
import com.adyen.model.checkout.Mandate;
import com.adyen.util.Util;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -68,6 +69,9 @@ public class PaymentRequest extends AbstractPaymentRequest<PaymentRequest> {
@SerializedName("threeDS2RequestData")
private ThreeDS2RequestData threeDS2RequestData = null;

@SerializedName("mandate")
private Mandate mandate = null;


/**
* how the shopper interacts with the system
Expand Down Expand Up @@ -352,6 +356,22 @@ public void setTrustedShopper(Boolean trustedShopper) {
this.trustedShopper = trustedShopper;
}

public PaymentRequest mandate(Mandate mandate) {
this.mandate = mandate;
return this;
}

/**
* Get mandate
* @return mandate
**/
public Mandate getMandate() {
return mandate;
}

public void setMandate(Mandate mandate) {
this.mandate = mandate;
}

@Override
public boolean equals(Object o) {
Expand All @@ -372,12 +392,13 @@ public boolean equals(Object o) {
&& Objects.equals(this.splits, paymentRequest.splits)
&& Objects.equals(this.store, paymentRequest.store)
&& Objects.equals(this.threeDS2RequestData, paymentRequest.threeDS2RequestData)
&& Objects.equals(this.trustedShopper, paymentRequest.trustedShopper);
&& Objects.equals(this.trustedShopper, paymentRequest.trustedShopper)
&& Objects.equals(this.mandate, paymentRequest.mandate);
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), accountInfo, card, mpiData, bankAccount, store, merchantRiskIndicator, splits, trustedShopper, threeDS2RequestData, recurringProcessingModel);
return Objects.hash(super.hashCode(), accountInfo, card, mpiData, bankAccount, store, merchantRiskIndicator, splits, trustedShopper, threeDS2RequestData, recurringProcessingModel, mandate);
}

@Override
Expand All @@ -395,6 +416,7 @@ public String toString() {
sb.append(" store: ").append(toIndentedString(store)).append("\n");
sb.append(" trustedShopper: ").append(toIndentedString(trustedShopper)).append("\n");
sb.append(" threeDS2RequestData: ").append(toIndentedString(threeDS2RequestData)).append("\n");
sb.append(" mandate: ").append(toIndentedString(mandate)).append("\n");
sb.append("}");

return sb.toString();
Expand Down

0 comments on commit a4b2c05

Please sign in to comment.