Class StatusResponse

java.lang.Object
pro.mypvit.responses.AbstractResponse
pro.mypvit.responses.StatusResponse

public class StatusResponse extends AbstractResponse
Represents the response for a transaction status inquiry in the MyPVit SDK.

This class extends AbstractResponse to inherit functionality for JSON deserialization and provides specific fields related to transaction status details.

Key Features:
  • Inherits JSON deserialization capabilities from AbstractResponse.
  • Includes fields to describe the status, amount, fees, and other transaction details.
  • Supports automatic generation of getters, setters, equals, and hashCode methods through Lombok.
Usage: Use the `fromJson` method provided by AbstractResponse to deserialize a JSON response into an instance of this class. Example:
 String jsonResponse = "{"
     + "\"date\": \"2025-01-02T12:34:56Z\","
     + "\"status\": \"SUCCESS\","
     + "\"amount\": 150.0,"
     + "\"fees\": 2.5,"
     + "\"operator\": \"MERCHANT\","
     + "\"merchant_reference_id\": \"REF123456\","
     + "\"customer_account_number\": \"123456789\","
     + "\"merchant_operation_account_code\": \"MERCHANT_ACC\""
     + "}";

 StatusResponse response = AbstractResponse.fromJson(jsonResponse, StatusResponse.class);
 System.out.println("Date: " + response.getDate());
 System.out.println("Status: " + response.getStatus());
 System.out.println("Amount: " + response.getAmount());
 System.out.println("Fees: " + response.getFees());
 
  • Constructor Details

    • StatusResponse

      public StatusResponse()
      Default constructor