Class VirtualCard

java.lang.Object
com.flutterwave.services.VirtualCard

public class VirtualCard extends Object
Author:
Cleopatra Douglas
  • Constructor Details

    • VirtualCard

      public VirtualCard()
  • Method Details

    • runCreateVirtualCard

      public Response runCreateVirtualCard(VirtualCardRequest virtualCardRequest)
      Create A Virtual Card
      Parameters:
      virtualCardRequest - bean
      Returns:
      Response
    • runGetAllVirtualCards

      public ListResponse runGetAllVirtualCards()
      This fetches all virtual cards created by the User
      Returns:
      ListResponse
    • runGetVirtualCard

      public Response runGetVirtualCard(String id)
      This call gets a specific virtual card by ID created by the User with id
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      Returns:
      Response
    • runFundVirtualCard

      public Response runFundVirtualCard(String id, FundVirtualCardRequest fundVirtualCardRequest)
      This funds a specific virtual card.
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      fundVirtualCardRequest - bean
      Returns:
      Response
    • runWithdrawVirtualCard

      public Response runWithdrawVirtualCard(String id, BigDecimal amount)
      This withdraws existing funds from a virtual card
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      amount - BigDecimal This is the amount to be withdrawn
      Returns:
      Response
    • runStatusVirtualCard

      public Response runStatusVirtualCard(String id, Actions actions)
      This call blocks or unblocks a virtual card created by the User.
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      actions - Actions This is the action you want to perform on the virtual card. Can be block or unblock
      Returns:
      Response
    • runTerminateVirtualCard

      public Response runTerminateVirtualCard(String id)
      This call terminates a virtual card created by the User.
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      Returns:
      Response
    • runGetTransactions

      public ListResponse runGetTransactions(String id, String from, String to, Integer index, Integer size)
      This call fetches transactions by date range on a single card
      Parameters:
      id - String This is the id of the virtual card to be fetched. You can get this id from the call to create a virtual card or list virtual cards as data.id
      from - String This is the start date of the transaction request period
      to - String This is the end date of the transaction request period
      index - Integer Pass 0 if you want to start from the beginning
      size - Integer Specify how many transactions you want to retrieve in a single call
      Returns:
      ListResponse