Package pro.mypvit

Class MyPVitClient

java.lang.Object
pro.mypvit.MyPVitClient

public class MyPVitClient extends Object
MyPVitClient is a client class for interacting with the MyPVit API. It provides methods for initiating transactions, checking status, retrieving KYC information, and other operations with the MyPVit API.
  • Constructor Details

    • MyPVitClient

      public MyPVitClient()
      Initializes a new instance of MyPVitClient. This constructor sets up the HTTP client used for API requests.
  • Method Details

    • initRestTransaction

      public TransactionRestResponse initRestTransaction(TransactionRestRequest transaction, String codeUrl, String secretKey)
      Initializes a REST transaction with the MyPVit API.
      Parameters:
      transaction - The transaction request data.
      codeUrl - The specific endpoint code URL for the API.
      secretKey - The API secret key for authentication.
      Returns:
      A TransactionRestResponse containing the API response.
    • initLinkTransaction

      public TransactionLinkResponse initLinkTransaction(TransactionLinkRequest transaction, String codeUrl, String secretKey)
      Initializes a LINK transaction with the MyPVit API.
      Parameters:
      transaction - The transaction request data.
      codeUrl - The specific endpoint code URL for the API.
      secretKey - The API secret key for authentication.
      Returns:
      A TransactionLinkResponse containing the API response.
    • getStatus

      public StatusResponse getStatus(String transactionId, String accountOperationCode, String transactionOperation, String codeUrl, String secretKey)
      Retrieves the status of a specific transaction.
      Parameters:
      transactionId - The ID of the transaction to query.
      accountOperationCode - The account operation code.
      transactionOperation - The transaction operation type.
      codeUrl - The specific endpoint code URL for the API.
      secretKey - The API secret key for authentication.
      Returns:
      A StatusResponse containing the transaction status.
    • getKyc

      public KycResponse getKyc(String customerAccountNumber, String codeUrl)
      Retrieves KYC (Know Your Customer) information for a specific customer.
      Parameters:
      customerAccountNumber - The customer account number.
      codeUrl - The specific endpoint code URL for the API.
      Returns:
      A KycResponse containing the KYC information.
    • getBalance

      public BalanceResponse getBalance(String accountOperationCode, String codeUrl, String secretKey)
      Retrieves the balance for a specific account.
      Parameters:
      accountOperationCode - The account operation code.
      codeUrl - The specific endpoint code URL for the API.
      secretKey - The API secret key for authentication.
      Returns:
      A BalanceResponse containing the account balance.
    • getToken

      public TokenResponse getToken(String accountOperationCode, String receptionUrlCode, String password, String codeUrl)
      Retrieves a new token for accessing the MyPVit API.
      Parameters:
      accountOperationCode - The account operation code.
      receptionUrlCode - The reception URL code.
      password - The account password.
      codeUrl - The specific endpoint code URL for the API.
      Returns:
      A TokenResponse containing the new token.