Package pro.mypvit
Class MyPVitClient
java.lang.Object
pro.mypvit.MyPVitClient
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBalance(String accountOperationCode, String codeUrl, String secretKey) Retrieves the balance for a specific account.Retrieves KYC (Know Your Customer) information for a specific customer.getStatus(String transactionId, String accountOperationCode, String transactionOperation, String codeUrl, String secretKey) Retrieves the status of a specific transaction.Retrieves a new token for accessing the MyPVit API.initLinkTransaction(TransactionLinkRequest transaction, String codeUrl, String secretKey) Initializes a LINK transaction with the MyPVit API.initRestTransaction(TransactionRestRequest transaction, String codeUrl, String secretKey) Initializes a REST transaction 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
TransactionRestResponsecontaining 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
TransactionLinkResponsecontaining 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
StatusResponsecontaining the transaction status.
-
getKyc
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
KycResponsecontaining the KYC information.
-
getBalance
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
BalanceResponsecontaining 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
TokenResponsecontaining the new token.
-