com.ingenico.connect.gateway.sdk.java.IdempotenceException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect-sdk-java Show documentation
Show all versions of connect-sdk-java Show documentation
SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API
package com.ingenico.connect.gateway.sdk.java;
import java.util.List;
import com.ingenico.connect.gateway.sdk.java.domain.errors.definitions.APIError;
/**
* Represents an error response from the Ingenico ePayments platform when an idempotent request failed because the first request has not
* finished yet.
*/
@SuppressWarnings("serial")
public class IdempotenceException extends ApiException {
private final String idempotenceKey;
private final Long idempotenceRequestTimestamp;
public IdempotenceException(String idempotenceKey, Long idempotenceRequestTimestamp,
int statusCode, String responseBody, String errorId, List errors) {
super("the Ingenico ePayments platform returned a duplicate request error response", statusCode, responseBody, errorId, errors);
this.idempotenceKey = idempotenceKey;
this.idempotenceRequestTimestamp = idempotenceRequestTimestamp;
}
public IdempotenceException(String message, String idempotenceKey, Long idempotenceRequestTimestamp,
int statusCode, String responseBody, String errorId, List errors) {
super(message, statusCode, responseBody, errorId, errors);
this.idempotenceKey = idempotenceKey;
this.idempotenceRequestTimestamp = idempotenceRequestTimestamp;
}
/**
* @return The key that was used for the idempotent request.
*/
public String getIdempotenceKey() {
return idempotenceKey;
}
/**
* @return The request timestamp of the first idempotent request with the same key.
*/
public Long getIdempotenceRequestTimestamp() {
return idempotenceRequestTimestamp;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy