Package io.token

Class Account


  • public class Account
    extends java.lang.Object
    Represents a funding account in the Token system.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected io.token.proto.common.account.AccountProtos.Account account  
      protected Client client  
      protected Member member  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Account​(Account account)
      Copy constructor.
      protected Account​(Member member, io.token.proto.common.account.AccountProtos.Account account, Client client)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.token.proto.common.account.AccountProtos.AccountDetails accountDetails()
      Gets the account details.
      io.token.proto.common.account.AccountProtos.AccountFeatures accountFeatures()
      Gets the account features.
      java.lang.String bankId()
      Gets a bank ID.
      boolean equals​(java.lang.Object obj)  
      io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> getBalance​(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an account balance.
      io.token.proto.common.transaction.TransactionProtos.Balance getBalanceBlocking​(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up an account balance.
      io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.StandingOrder> getStandingOrder​(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 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 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 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 transactionId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up a transaction by ID.
      io.token.proto.common.transaction.TransactionProtos.Transaction getTransactionBlocking​(java.lang.String transactionId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up a transaction by ID.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up transactions.
      io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(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 with date filter.
      io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
      Looks up transactions.
      io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(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.
      int hashCode()  
      java.lang.String id()
      Gets an account ID.
      boolean isLocked()
      Looks up if this account is locked.
      Member member()
      Gets an account owner.
      java.lang.String name()
      Gets an account name.
      io.token.proto.common.account.AccountProtos.Account toProto()
      Fetches the original AccountProtos.Account object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • member

        protected final Member member
      • account

        protected final io.token.proto.common.account.AccountProtos.Account account
      • client

        protected final Client client
    • Constructor Detail

      • Account

        public Account​(Account account)
        Copy constructor. For internal use.
        Parameters:
        account - account
      • Account

        protected Account​(Member member,
                          io.token.proto.common.account.AccountProtos.Account account,
                          Client client)
    • Method Detail

      • member

        public Member member()
        Gets an account owner.
        Returns:
        account owner
      • id

        public java.lang.String id()
        Gets an account ID.
        Returns:
        account id
      • name

        public java.lang.String name()
        Gets an account name.
        Returns:
        account name
      • isLocked

        public boolean isLocked()
        Looks up if this account is locked.
        Returns:
        true if this account is locked; false otherwise.
      • bankId

        public java.lang.String bankId()
        Gets a bank ID.
        Returns:
        bank ID
      • accountDetails

        public io.token.proto.common.account.AccountProtos.AccountDetails accountDetails()
        Gets the account details.
        Returns:
        account details
      • accountFeatures

        public io.token.proto.common.account.AccountProtos.AccountFeatures accountFeatures()
        Gets the account features.
        Returns:
        account features
      • toProto

        public io.token.proto.common.account.AccountProtos.Account toProto()
        Fetches the original AccountProtos.Account object.
        Returns:
        the account.
      • getBalance

        public io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> getBalance​(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an account balance.
        Parameters:
        keyLevel - key level
        Returns:
        account balance
      • getBalanceBlocking

        public io.token.proto.common.transaction.TransactionProtos.Balance getBalanceBlocking​(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up an account balance.
        Parameters:
        keyLevel - key level
        Returns:
        account balance
      • getTransaction

        public io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Transaction> getTransaction​(java.lang.String transactionId,
                                                                                                                       io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up a transaction by ID.
        Parameters:
        transactionId - transaction ID
        keyLevel - key level
        Returns:
        transaction
      • getTransactionBlocking

        public io.token.proto.common.transaction.TransactionProtos.Transaction getTransactionBlocking​(java.lang.String transactionId,
                                                                                                      io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up a transaction by ID.
        Parameters:
        transactionId - transaction ID
        keyLevel - key level
        Returns:
        transaction
      • getTransactions

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(@Nullable
                                                                                                                                                                         java.lang.String offset,
                                                                                                                                                                         int limit,
                                                                                                                                                                         io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up transactions.
        Parameters:
        offset - offset
        limit - limit
        keyLevel - key level
        Returns:
        paged list of transactions
      • getTransactions

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String>> getTransactions​(@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 with date filter.
        Parameters:
        offset - offset
        limit - limit
        keyLevel - key level
        startDate - inclusive lower bound of transaction booking date
        endDate - inclusive upper bound of transaction booking date
        Returns:
        paged list of transactions
      • getTransactionsBlocking

        public io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(@Nullable
                                                                                                                                                        java.lang.String offset,
                                                                                                                                                        int limit,
                                                                                                                                                        io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
        Looks up transactions.
        Parameters:
        offset - offset
        limit - limit
        keyLevel - key level
        Returns:
        paged list of transactions
      • getTransactionsBlocking

        public io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,​java.lang.String> getTransactionsBlocking​(@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.
        Parameters:
        offset - offset
        limit - limit
        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

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

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

        public io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String>> getStandingOrders​(@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:
        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

        public io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.StandingOrder,​java.lang.String> getStandingOrdersBlocking​(@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:
        offset - optional offset to start at
        limit - max number of records to return
        keyLevel - key level
        Returns:
        a paged list of standing order records
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object