public async Task <IEnumerable <GetGulfCardLimitQueryResult> > Handle(GetGulfCardLimitQuery request, CancellationToken cancellationToken)
        {
            List <GetGulfCardLimitQueryResult> result = new List <GetGulfCardLimitQueryResult>();

            var fueltypes = await _repository.GetFuelTypes(request.UscId, request.RfId);

            if (fueltypes == null)
            {
                return(result);
            }

            foreach (var fuelType in fueltypes)
            {
                var limit = await _repository.GetCardLimit(request.UscId, request.RfId, fuelType.Id);

                if (limit.Result != "OK")
                {
                    continue;
                }

                var limitResult = new GetGulfCardLimitQueryResult
                {
                    Limit    = limit.AUTHORIZE,
                    FuelId   = fuelType.Id,
                    FuelName = fuelType.Name
                };

                if (limitResult.Limit > 0)
                {
                    result.Add(limitResult);
                }
            }

            return(result);
        }
        public async Task <Unit> Handle(ReserveCulfCardLimitCommand request, CancellationToken cancellationToken)
        {
            var limit = await _repository.GetCardLimit(request.UscId, request.RfId, request.FuelId, true);

            if (limit.Result != "OK")
            {
                throw new System.Exception(limit.Result);
            }
            return(Unit.Value);
        }