public ValidationResult ValidatePlayerBankAccount([FromUri] PlayerBankAccountRequest request) { var data = new EditPlayerBankAccountData(); Mapper.DynamicMap(request, data); data.PlayerId = PlayerId; var result = _paymentQueries.ValidatePlayerBankAccount(data); if (result == null) { throw new RegoException(ErrorMessagesEnum.ServiceUnavailable.ToString()); } var errors = new Dictionary <string, string>(); if (result.Errors.Any()) { result.Errors.ForEach(x => { if (!errors.ContainsKey(x.PropertyName)) { errors.Add(x.PropertyName, x.ErrorMessage); } }); } return(new ValidationResult { Errors = errors }); }
public async Task <PlayerBankAccountResponse> CreatePlayerBankAccount(PlayerBankAccountRequest request) { var result = await HttpClient.SecurePostAsJsonAsync(Token, "api/Payment/CreatePlayerBankAccount", request); return(await EnsureApiResult <PlayerBankAccountResponse>(result)); }
public PlayerBankAccountResponse CreatePlayerBankAccount(PlayerBankAccountRequest request) { var data = new EditPlayerBankAccountData(); Mapper.DynamicMap(request, data); data.PlayerId = PlayerId; var result = _playerBankAccountCommands.Add(data); return(new PlayerBankAccountResponse()); }
public async Task <ValidationResult> ValidatePlayerBankAccount(PlayerBankAccountRequest request) { var query = "playerId=" + request.PlayerId + "&bank=" + request.Bank + "&accountName=" + request.AccountName + "&accountNumber=" + request.AccountNumber + "&province=" + request.Province + "&city=" + request.City + "&branch=" + request.Branch; var result = await HttpClient.SecureGetAsync(Token, "api/Payment/ValidatePlayerBankAccount", query); return(await EnsureApiResult <ValidationResult>(result)); }
public async Task <PlayerBankAccountResponse> CreatePlayerBankAccount(PlayerBankAccountRequest request) { return(await _memberApiProxy.CreatePlayerBankAccount(request)); }
public async Task <ValidationResult> ValidatePlayerBankAccount(PlayerBankAccountRequest request) { return(await _memberApiProxy.ValidatePlayerBankAccount(request)); }