public async Task <RootAccounts> GetAccountsFromAPI(string userToken)
        {
            if (!string.IsNullOrWhiteSpace(userToken))
            {
                RESTClient <RootAccounts> client = new RESTClient <RootAccounts>(WebAPIURL);
                var accountsResponseDetails      = await client.PostAsync(null, string.Format("{0}{1}", Constants.AccountsURLParameters, userToken));

                if (accountsResponseDetails != null)
                {
                    return(accountsResponseDetails);
                }
            }

            return(null);
        }
        public async Task <RootTransactions> GetTransactionsFromAPI(TransactionRequest tReq, string userToken)
        {
            if (!string.IsNullOrWhiteSpace(userToken))
            {
                RESTClient <RootTransactions> client = new RESTClient <RootTransactions>(WebAPIURL);
                var transResponseDetails             = await client.PostAsync(tReq, string.Format("{0}{1}", Constants.TransactionURLParameters, userToken));

                if (transResponseDetails != null)
                {
                    return(transResponseDetails);
                }
            }

            return(null);
        }
        public async Task <GenericResponse> AddToErrorLogFromAPI(string userToken, ErrorLogAPI requestObject)
        {
            GenericResponse accountsResponseDetails = new OmniDataManagement.GenericResponse();

            if (!string.IsNullOrWhiteSpace(userToken))
            {
                RESTClient <GenericResponse> client = new RESTClient <GenericResponse>(WebAPIURL);

                accountsResponseDetails = await client.PostAsync(requestObject, string.Format("{0}{1}", Constants.AddErrorLogURLParameters, userToken));

                if (accountsResponseDetails != null)
                {
                    return(accountsResponseDetails);
                }
            }

            return(accountsResponseDetails);
        }