From 452b48faf96f187e6b9d5a40e4cc0a35292d78eb Mon Sep 17 00:00:00 2001 From: Daniel Forsman Date: Wed, 3 Oct 2018 12:15:41 +0200 Subject: [PATCH 1/2] Add store to payment request --- .../java/com/adyen/model/PaymentRequest.java | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/adyen/model/PaymentRequest.java b/src/main/java/com/adyen/model/PaymentRequest.java index e2d35724b..bf49d3f3e 100644 --- a/src/main/java/com/adyen/model/PaymentRequest.java +++ b/src/main/java/com/adyen/model/PaymentRequest.java @@ -44,6 +44,9 @@ public class PaymentRequest extends AbstractPaymentRequest { @SerializedName("bankAccount") private BankAccount bankAccount = null; + @SerializedName("store") + private Long store = null; + /** * how the shopper interacts with the system */ @@ -266,6 +269,24 @@ public void setBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; } + public PaymentRequest store(Long store) { + this.store = store; + return this; + } + + /** + * store id from which the payment request is made from + * + * @return store + **/ + public Long getStore() { + return store; + } + + public void setStore(Long store) { + this.store = store; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -275,8 +296,11 @@ public boolean equals(Object o) { return false; } PaymentRequest paymentRequest = (PaymentRequest) o; - return super.equals(paymentRequest) && Objects.equals(this.card, paymentRequest.card) && Objects.equals(this.mpiData, paymentRequest.mpiData) && Objects.equals(this.bankAccount, - paymentRequest.bankAccount); + return super.equals(paymentRequest) + && Objects.equals(this.card, paymentRequest.card) + && Objects.equals(this.mpiData, paymentRequest.mpiData) + && Objects.equals(this.bankAccount, paymentRequest.bankAccount) + && Objects.equals(this.store, paymentRequest.store); } @Override @@ -309,4 +333,3 @@ private String toIndentedString(Object o) { } } - From 1d72617539821ec6a42586204d73f6210583d042 Mon Sep 17 00:00:00 2001 From: Daniel Forsman Date: Wed, 3 Oct 2018 14:26:47 +0200 Subject: [PATCH 2/2] Change store type from Long to String --- src/main/java/com/adyen/model/PaymentRequest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/adyen/model/PaymentRequest.java b/src/main/java/com/adyen/model/PaymentRequest.java index bf49d3f3e..792c2878e 100644 --- a/src/main/java/com/adyen/model/PaymentRequest.java +++ b/src/main/java/com/adyen/model/PaymentRequest.java @@ -45,7 +45,7 @@ public class PaymentRequest extends AbstractPaymentRequest { private BankAccount bankAccount = null; @SerializedName("store") - private Long store = null; + private String store = null; /** * how the shopper interacts with the system @@ -269,7 +269,7 @@ public void setBankAccount(BankAccount bankAccount) { this.bankAccount = bankAccount; } - public PaymentRequest store(Long store) { + public PaymentRequest store(String store) { this.store = store; return this; } @@ -279,11 +279,11 @@ public PaymentRequest store(Long store) { * * @return store **/ - public Long getStore() { + public String getStore() { return store; } - public void setStore(Long store) { + public void setStore(String store) { this.store = store; }