class MainPresenter extends BasePresenter<MainMvpView> {

    public void getAccountData() {
        checkViewAttached();
        getMvpView().showProgress(true);
        mCompositeSubscription.add(mDataManager.getAccountDetails()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(new SingleSubscriber<DataManager.AccountData>() {
                    @Override
                    public void onSuccess(DataManager.AccountData accountData) {
                        getMvpView().showProgress(false);
                        if (accountData.transactions != null &&
                                !accountData.transactions.isEmpty()) {
                            getMvpView().showTransactions(accountData.transactions);
                        } else {
                            getMvpView().showEmptyTransactions();
                        }
                        getMvpView().showBalance(accountData.balance);
                    }

                    @Override
                    public void onError(Throwable error) {
                        getMvpView().showProgress(false);
                        getMvpView().showAccountError();
                        error.printStackTrace();
                        Timber.e("There was an error retrieving the account data...");
                    }
                }));
    }

    @Inject public  MainPresenter(DataManager dataManager, RxEventBus rxEventBus);

}