Beispiel #1
0
        public virtual GetMyDetailsResponse GetMyDetails()
        {
            var details = _accountApiProxy.GetMyDetails(CultureCode, _userContext.UserId);

            if (details == null)
            {
                return(new GetMyDetailsResponse {
                    Code = ResponseCode.UserDetailsNotFound
                });
            }

            string symbol;

            if (!CurrencyUtility.TryGetCurrencySymbol(_userContext.Currency, out symbol))
            {
                symbol = "$";
            }

            return(new GetMyDetailsResponse
            {
                Code = ResponseCode.Success,
                User = new UserModel
                {
                    Username = _userContext.Username,
                    FirstName = details.FirstName,
                    LastName = details.LastName,
                    AddressLine1 = details.AddressLine1,
                    AddressLine2 = details.AddressLine2,
                    AddressLine3 = details.AddressLine3,
                    PostalCode = details.PostalCode,
                    MobileNumber = details.MobileNumber,
                    Email = details.Email,
                    City = details.City,
                    Country = details.Country,
                    CurrencySymbol = symbol,
                    Status = details.Status,
                    LowDeposit = details.LowDeposit
                },

                // Should not be doing this because the token is not sharable between mobile and desktop
                //SportsbookUrl = _sportsbookApiProxy.GetSbTechUrl(CultureCode, _userContext.Username),
                //SportsbookMobileUrl = _sportsbookApiProxy.GetSbTechMobileUrl(CultureCode, _userContext.Username)
            });
        }