Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 43 additions & 5 deletions src/main/java/com/adyen/model/checkout/PaymentsResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
package com.adyen.model.checkout;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
Expand Down Expand Up @@ -77,9 +75,19 @@ public class PaymentsResponse {

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

@SerializedName("resultCode")
private ResultCodeEnum resultCode = null;

@SerializedName("serviceError")
private ServiceError serviceError;

@SerializedName("authResponse")
private ResultCodeEnum authResponse;

@SerializedName("merchantReference")
private String merchantReference;

public PaymentsResponse additionalData(Map<String, String> additionalData) {
this.additionalData = additionalData;
return this;
Expand Down Expand Up @@ -263,6 +271,30 @@ public void setResultCode(ResultCodeEnum resultCode) {
this.resultCode = resultCode;
}

public ServiceError getServiceError() {
return serviceError;
}

public void setServiceError(ServiceError serviceError) {
this.serviceError = serviceError;
}

public ResultCodeEnum getAuthResponse() {
return authResponse;
}

public void setAuthResponse(ResultCodeEnum authResponse) {
this.authResponse = authResponse;
}

public String getMerchantReference() {
return merchantReference;
}

public void setMerchantReference(String merchantReference) {
this.merchantReference = merchantReference;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -280,7 +312,10 @@ public boolean equals(Object o) {
&& Objects.equals(this.pspReference, paymentsResponse.pspReference)
&& Objects.equals(this.redirect, paymentsResponse.redirect)
&& Objects.equals(this.refusalReason, paymentsResponse.refusalReason)
&& Objects.equals(this.resultCode, paymentsResponse.resultCode);
&& Objects.equals(this.resultCode, paymentsResponse.resultCode)
&& Objects.equals(this.serviceError, paymentsResponse.serviceError)
&& Objects.equals(this.authResponse, paymentsResponse.authResponse)
&& Objects.equals(this.merchantReference, paymentsResponse.merchantReference);
}

@Override
Expand All @@ -292,7 +327,6 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentsResponse {\n");

sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).append("\n");
sb.append(" fraudResult: ").append(toIndentedString(fraudResult)).append("\n");
Expand All @@ -301,6 +335,9 @@ public String toString() {
sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n");
sb.append(" refusalReason: ").append(toIndentedString(refusalReason)).append("\n");
sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n");
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("}");
return sb.toString();
}
Expand Down Expand Up @@ -336,7 +373,8 @@ public enum ResultCodeEnum {
ERROR("Error"),
CANCELLED("Cancelled"),
RECEIVED("Received"),
REDIRECTSHOPPER("RedirectShopper");
REDIRECTSHOPPER("RedirectShopper"),
UNKNOWN("Unknown"); //applicable for payments/details

private String value;

Expand Down
64 changes: 64 additions & 0 deletions src/main/java/com/adyen/model/checkout/ServiceError.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Java API Library
*
* Copyright (c) 2017 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 com.google.gson.annotations.SerializedName;

public class ServiceError {
@SerializedName("errorCode")
private String errorCode;

@SerializedName("message")
private String message;

@SerializedName("errorType")
private String errorType;

public String getErrorCode() {
return errorCode;
}

public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public String getErrorType() {
return errorType;
}

public void setErrorType(String errorType) {
this.errorType = errorType;
}

@Override
public String toString() {
return "ServiceError{" + "errorCode='" + errorCode + '\'' + ", message='" + message + '\'' + ", errorType='" + errorType + '\'' + '}';
}
}