Class TransactionLinkResponse

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

public class TransactionLinkResponse extends AbstractResponse
Represents the response for a LINK transaction request in the MyPVit SDK.

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

Key Features:
  • Inherits JSON deserialization capabilities from AbstractResponse.
  • Includes fields for the transaction status, merchant reference, and URL 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 = "{"
     + "\"status\": \"SUCCESS\","
     + "\"status_code\": \"200\","
     + "\"merchant_reference_id\": \"REF123456\","
     + "\"url\": \"https://api.mypvit.pro/XXXXXXXXXXXXXXXXXX\""
     + "}";

 TransactionLinkResponse response = AbstractResponse.fromJson(jsonResponse, TransactionLinkResponse.class);
 System.out.println("Status: " + response.getStatus());
 System.out.println("Status Code: " + response.getStatusCode());
 System.out.println("Merchant Reference ID: " + response.getMerchantReferenceId());
 System.out.println("Transaction URL: " + response.getUrl());
 
  • Constructor Details

    • TransactionLinkResponse

      public TransactionLinkResponse()
      Default constructor