Package io.token.tpp

Interface Representable

  • All Known Implementing Classes:
    Member

    public interface Representable
    Represents the part of a token member that can be accessed through an access token.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.Observable<java.lang.Boolean> confirmFunds​(java.lang.String accountId, double amount, java.lang.String currency)
      Confirm that the given account has sufficient funds to cover the charge.
      boolean confirmFundsBlocking​(java.lang.String accountId, double amount, java.lang.String currency)
      Confirm that the given account has sufficient funds to cover the charge.
      io.reactivex.Observable<Account> getAccount​(java.lang.String accountId)
      Looks up a funding bank account linked to Token.
      Account getAccountBlocking​(java.lang.String accountId)
      Looks up a funding bank account linked to Token.
      io.reactivex.Observable<java.util.List<Account>> getAccounts()
      Looks up funding bank accounts linked to Token.
      java.util.List<Account> getAccountsBlocking()
      Looks up funding bank accounts linked to Token.
      io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> getBalance​(java.lang.String accountId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up account balance.
      io.token.proto.common.transaction.TransactionProtos.Balance getBalanceBlocking​(java.lang.String accountId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up account balance.
      io.reactivex.Observable<java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance>> getBalances​(java.util.List<java.lang.String> accountIds, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up balances for a list of accounts.
      java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance> getBalancesBlocking​(java.util.List<java.lang.String> accountIds, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up balances for a list of accounts.
      io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.StandingOrder> getStandingOrder​(java.lang.String accountId, java.lang.String standingOrderId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an existing standing order for a given account.
      io.token.proto.common.transaction.TransactionProtos.StandingOrder getStandingOrderBlocking​(java.lang.String accountId, java.lang.String standingOrderId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an existing standing order for a given account.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String>> getStandingOrders​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up standing orders for a given account.
      io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String> getStandingOrdersBlocking​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up standing orders for a given account.
      io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Transaction> getTransaction​(java.lang.String accountId, java.lang.String transactionId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an existing transaction for a given account.
      io.token.proto.common.transaction.TransactionProtos.Transaction getTransactionBlocking​(java.lang.String accountId, java.lang.String transactionId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an existing transaction for a given account.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up transactions for a given account.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel, java.lang.String startDate, java.lang.String endDate)
      Looks up transactions for a given account.
      io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up transactions for a given account.
      io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(java.lang.String accountId, java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel, java.lang.String startDate, java.lang.String endDate)
      Looks up transactions for a given account.
      io.reactivex.Observable<java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination>> resolveTransferDestinations​(java.lang.String accountId)
      Resolves transfer destinations for the given account ID.
      java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination> resolveTransferDestinationsBlocking​(java.lang.String accountId)
      Resolves transfer destinations for the given account ID.
    • Method Detail

      • getAccounts

        io.reactivex.Observable<java.util.List<Account>> getAccounts()
        Looks up funding bank accounts linked to Token.
        Returns:
        list of accounts
      • getAccountsBlocking

        java.util.List<Account> getAccountsBlocking()
        Looks up funding bank accounts linked to Token.
        Returns:
        list of linked accounts
      • getAccount

        io.reactivex.Observable<Account> getAccount​(java.lang.String accountId)
        Looks up a funding bank account linked to Token.
        Parameters:
        accountId - account id
        Returns:
        looked up account
      • getAccountBlocking

        Account getAccountBlocking​(java.lang.String accountId)
        Looks up a funding bank account linked to Token.
        Parameters:
        accountId - account id
        Returns:
        looked up account
      • getBalance

        io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> getBalance​(java.lang.String accountId,
                                                                                                        io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up account balance.
        Parameters:
        accountId - the account id
        keyLevel - key level
        Returns:
        balance
      • getBalanceBlocking

        io.token.proto.common.transaction.TransactionProtos.Balance getBalanceBlocking​(java.lang.String accountId,
                                                                                       io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up account balance.
        Parameters:
        accountId - account id
        keyLevel - key level
        Returns:
        balance
      • getBalances

        io.reactivex.Observable<java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance>> getBalances​(java.util.List<java.lang.String> accountIds,
                                                                                                                         io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up balances for a list of accounts.
        Parameters:
        accountIds - list of account ids
        keyLevel - key level
        Returns:
        list of balances
      • getBalancesBlocking

        java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance> getBalancesBlocking​(java.util.List<java.lang.String> accountIds,
                                                                                                        io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up balances for a list of accounts.
        Parameters:
        accountIds - list of account ids
        keyLevel - key level
        Returns:
        list of balances
      • getTransaction

        io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Transaction> getTransaction​(java.lang.String accountId,
                                                                                                                java.lang.String transactionId,
                                                                                                                io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an existing transaction for a given account.
        Parameters:
        accountId - the account id
        transactionId - ID of the transaction
        keyLevel - key level
        Returns:
        transaction record
      • getTransactionBlocking

        io.token.proto.common.transaction.TransactionProtos.Transaction getTransactionBlocking​(java.lang.String accountId,
                                                                                               java.lang.String transactionId,
                                                                                               io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an existing transaction for a given account.
        Parameters:
        accountId - the account id
        transactionId - ID of the transaction
        keyLevel - key level
        Returns:
        transaction
      • getTransactions

        io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(java.lang.String accountId,
                                                                                                                                                                  @Nullable
                                                                                                                                                                  java.lang.String offset,
                                                                                                                                                                  int limit,
                                                                                                                                                                  io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up transactions for a given account.
        Parameters:
        accountId - the account id
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        Returns:
        a paged list of transaction records
      • getTransactions

        io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(java.lang.String accountId,
                                                                                                                                                                  @Nullable
                                                                                                                                                                  java.lang.String offset,
                                                                                                                                                                  int limit,
                                                                                                                                                                  io.token.proto.common.security.SecurityProtos.Key.Level keyLevel,
                                                                                                                                                                  @Nullable
                                                                                                                                                                  java.lang.String startDate,
                                                                                                                                                                  @Nullable
                                                                                                                                                                  java.lang.String endDate)
        Looks up transactions for a given account.
        Parameters:
        accountId - the account id
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        startDate - inclusive lower bound of transaction booking date
        endDate - inclusive upper bound of transaction booking date
        Returns:
        a paged list of transaction records
      • getTransactionsBlocking

        io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(java.lang.String accountId,
                                                                                                                                                 @Nullable
                                                                                                                                                 java.lang.String offset,
                                                                                                                                                 int limit,
                                                                                                                                                 io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up transactions for a given account.
        Parameters:
        accountId - the account id
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        Returns:
        paged list of transactions
      • getTransactionsBlocking

        io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(java.lang.String accountId,
                                                                                                                                                 @Nullable
                                                                                                                                                 java.lang.String offset,
                                                                                                                                                 int limit,
                                                                                                                                                 io.token.proto.common.security.SecurityProtos.Key.Level keyLevel,
                                                                                                                                                 @Nullable
                                                                                                                                                 java.lang.String startDate,
                                                                                                                                                 @Nullable
                                                                                                                                                 java.lang.String endDate)
        Looks up transactions for a given account.
        Parameters:
        accountId - the account id
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        startDate - inclusive lower bound of transaction booking date
        endDate - inclusive upper bound of transaction booking date
        Returns:
        paged list of transactions
      • getStandingOrder

        io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.StandingOrder> getStandingOrder​(java.lang.String accountId,
                                                                                                                    java.lang.String standingOrderId,
                                                                                                                    io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an existing standing order for a given account.
        Parameters:
        accountId - the account ID
        standingOrderId - ID of the standing order
        keyLevel - key level
        Returns:
        standing order record
      • getStandingOrderBlocking

        io.token.proto.common.transaction.TransactionProtos.StandingOrder getStandingOrderBlocking​(java.lang.String accountId,
                                                                                                   java.lang.String standingOrderId,
                                                                                                   io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an existing standing order for a given account.
        Parameters:
        accountId - the account ID
        standingOrderId - ID of the standing order
        keyLevel - key level
        Returns:
        standing order record
      • getStandingOrders

        io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String>> getStandingOrders​(java.lang.String accountId,
                                                                                                                                                                      @Nullable
                                                                                                                                                                      java.lang.String offset,
                                                                                                                                                                      int limit,
                                                                                                                                                                      io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up standing orders for a given account.
        Parameters:
        accountId - the account ID
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        Returns:
        a paged list of standing order records
      • getStandingOrdersBlocking

        io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String> getStandingOrdersBlocking​(java.lang.String accountId,
                                                                                                                                                     @Nullable
                                                                                                                                                     java.lang.String offset,
                                                                                                                                                     int limit,
                                                                                                                                                     io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up standing orders for a given account.
        Parameters:
        accountId - the account ID
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        Returns:
        a paged list of standing order records
      • resolveTransferDestinations

        io.reactivex.Observable<java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination>> resolveTransferDestinations​(java.lang.String accountId)
        Resolves transfer destinations for the given account ID.
        Parameters:
        accountId - account ID
        Returns:
        transfer destinations
      • resolveTransferDestinationsBlocking

        java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferDestination> resolveTransferDestinationsBlocking​(java.lang.String accountId)
        Resolves transfer destinations for the given account ID.
        Parameters:
        accountId - account ID
        Returns:
        transfer destinations
      • confirmFunds

        io.reactivex.Observable<java.lang.Boolean> confirmFunds​(java.lang.String accountId,
                                                                double amount,
                                                                java.lang.String currency)
        Confirm that the given account has sufficient funds to cover the charge.
        Parameters:
        accountId - account ID
        amount - charge amount
        currency - charge currency
        Returns:
        true if the account has sufficient funds to cover the charge
      • confirmFundsBlocking

        boolean confirmFundsBlocking​(java.lang.String accountId,
                                     double amount,
                                     java.lang.String currency)
        Confirm that the given account has sufficient funds to cover the charge.
        Parameters:
        accountId - account ID
        amount - charge amount
        currency - charge currency
        Returns:
        true if the account has sufficient funds to cover the charge