public async Task <(UserDetailsDto dto, Error error)> GetUserDetails(string accountNumber)
        {
            JObject accountJobject = JObject.Parse((await _httpClientWrapper.Get($"http://fairwaybank-bizfitech.azurewebsites.net/api/v1/accounts/{accountNumber}")));

            if (accountJobject.Value <string>("errorCode") != null)
            {
                return(null, new Error(accountJobject.Value <string>("message")));
            }

            JObject balanceJobject = JObject.Parse((await _httpClientWrapper.Get($"http://fairwaybank-bizfitech.azurewebsites.net/api/v1/accounts/{accountNumber}/balance")));

            decimal availableBalance = balanceJobject.Value <decimal?>("overdraft.amount") != null
                ? balanceJobject.Value <decimal>("amount") + balanceJobject.Value <decimal?>("overdraft.amount").Value
                : balanceJobject.Value <decimal>("amount");

            UserDetailsDto dto = new UserDetailsDto
            {
                AccountName      = accountJobject.Value <string>("name"),
                AccountNumber    = (string)accountJobject.SelectToken("identifier.accountNumber"),
                SortCode         = (string)accountJobject.SelectToken("identifier.accountNumber"),
                Balance          = balanceJobject.Value <decimal>("amount"),
                AvailableBalance = availableBalance,
                Overdraft        = (decimal?)balanceJobject.SelectToken("overdraft.amount")
            };

            return(dto, null);
        }
        public async Task <(UserDetailsDto dto, Error error)> GetUserDetails(string accountNumber)
        {
            JObject jobject = JObject.Parse((await _httpClientWrapper.Get($"http://bizfibank-bizfitech.azurewebsites.net/api/v1/accounts/{accountNumber}")));

            if (jobject.Value <string>("errorCode") != null)
            {
                return(null, new Error(jobject.Value <string>("message")));
            }

            UserDetailsDto dto = new UserDetailsDto
            {
                AccountName      = jobject.Value <string>("account_name"),
                AccountNumber    = jobject.Value <string>("account_number"),
                SortCode         = jobject.Value <string>("sort_code"),
                Balance          = jobject.Value <decimal>("balance"),
                AvailableBalance = jobject.Value <decimal>("available_balance"),
                Overdraft        = jobject.Value <decimal?>("overdraft")
            };

            return(dto, null);
        }