Package com.akraml.satim.reply
Class RefundReply
java.lang.Object
com.akraml.satim.reply.AbstractReply
com.akraml.satim.reply.RefundReply
Response from the refund or reverse endpoint.
Contains the result of a refund or reversal request.
Example usage:
// Full refund
api.refundPayment(orderId)
.thenAccept(reply -> {
if (reply.isSuccessful()) {
System.out.println("Refund processed successfully");
} else {
System.out.println("Refund failed: " + reply.getErrorMessage());
}
});
// Partial refund
api.refundPayment(orderId, 50000) // Refund 500 DZD
.thenAccept(reply -> {
// Handle response
});
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RefundReplyfromJson(@NotNull com.google.gson.JsonObject json) Creates a RefundReply from a JSON response.toString()Methods inherited from class com.akraml.satim.reply.AbstractReply
getErrorCode, getErrorMessage, getRawResponse, getResponse, isSuccessful
-
Method Details
-
toString
- Overrides:
toStringin classAbstractReply
-
fromJson
@NotNull public static @NotNull RefundReply fromJson(@NotNull @NotNull com.google.gson.JsonObject json) Creates a RefundReply from a JSON response.- Parameters:
json- the JSON response from the API- Returns:
- a new RefundReply instance
-