Package pro.mypvit.responses
Class TransactionRestResponse
java.lang.Object
pro.mypvit.responses.AbstractResponse
pro.mypvit.responses.TransactionRestResponse
Represents the response for a REST transaction request in the MyPVit SDK.
This class extends AbstractResponse to inherit functionality for JSON deserialization
and provides specific fields related to REST transaction results.
- Inherits JSON deserialization capabilities from
AbstractResponse. - Includes fields for transaction status, operator, references, and additional details.
- Supports automatic generation of getters, setters, equals, and hashCode methods through Lombok.
AbstractResponse to deserialize a JSON response into
an instance of this class.
Example:
String jsonResponse = "{"
+ "\"status\": \"SUCCESS\","
+ "\"status_code\": \"200\","
+ "\"operator\": \"AIRTEL_MONEY\","
+ "\"reference_id\": \"REF123456\","
+ "\"merchant_reference_id\": \"MERCHANT_REF123\","
+ "\"merchant_operation_account_code\": \"ACC123456\","
+ "\"message\": \"Transaction processed successfully\""
+ "}";
TransactionRestResponse response = AbstractResponse.fromJson(jsonResponse, TransactionRestResponse.class);
System.out.println("Status: " + response.getStatus());
System.out.println("Operator: " + response.getOperator());
System.out.println("Reference ID: " + response.getReferenceId());
System.out.println("Message: " + response.getMessage());
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class pro.mypvit.responses.AbstractResponse
fromJson
-
Constructor Details
-
TransactionRestResponse
public TransactionRestResponse()Default constructor
-