public IHttpActionResult ChangePaymentLevel(ChangePaymentLevelData command)
        {
            VerifyPermission(Permissions.AssignPaymentLevel, Modules.PlayerManager);

            if (ModelState.IsValid == false)
            {
                return(Ok(ErrorResponse()));
            }

            var request = new ChangePaymentLevelData
            {
                PlayerId       = command.PlayerId,
                PaymentLevelId = command.PaymentLevelId,
                Remarks        = command.Remarks
            };
            var validationResult = _commands.ValidatePlayerPaymentLevelCanBeChanged(request);

            if (validationResult.IsValid == false)
            {
                return(Ok(ValidationExceptionResponse(validationResult.Errors)));
            }

            _commands.ChangePaymentLevel(request);

            return(Ok(new { Result = "success" }));
        }
        public void Can_not_change_inactivate_payment_level()
        {
            //setup
            var brand        = _brandTestHelper.CreateBrand();
            var player       = _playerTestHelper.CreatePlayer();
            var paymentLevel = _paymentTestHelper.CreatePaymentLevel(brand.Id, player.CurrencyCode, false);

            //act
            var reseponse = _playerCommands.ValidatePlayerPaymentLevelCanBeChanged(new ChangePaymentLevelData
            {
                PlayerId       = player.Id,
                PaymentLevelId = paymentLevel.Id,
                Remarks        = "test"
            });

            //assert
            reseponse.IsValid.Should().BeFalse();
            reseponse.Errors[0].ErrorMessage.Should().Be(PaymentLevelErrors.PaymentLevelInactivate.ToString());
        }