public GetAmountResponseDto GetAmount(string VehiclePlate)
        {
            GetAmountResponseDto oResponse = new GetAmountResponseDto
            {
                Vehicle = vehicleService.GetVehicle(VehiclePlate)
            };

            if (oResponse.Vehicle == null)
            {
                throw new BusinessExeption(string.Format(GeneralMessages.VehicleNotFound, VehiclePlate));
            }

            AVehicleBase aVehicle = GetVehicleBase(oResponse.Vehicle, (VehicleType)Enum.ToObject(typeof(VehicleType), oResponse.Vehicle.VehicleType));

            oResponse.Amount = aVehicle.GetAmount(oResponse.Vehicle);

            return(oResponse);
        }
        public CreateVehicleResponseDto InsertPayment(InsertPaymentRequestDto insertPaymentRequestDto)
        {
            if (insertPaymentRequestDto.PaymentValue == 0)
            {
                throw new BusinessExeption(GeneralMessages.PaymentGreaterThanZero);
            }

            GetAmountResponseDto oResponseGetAmount = GetAmount(insertPaymentRequestDto.VehiclePlate);

            if (oResponseGetAmount.Amount == 0)
            {
                throw new BusinessExeption(string.Format(GeneralMessages.VehicleADay, oResponseGetAmount.Vehicle.VehiclePlate, oResponseGetAmount.Vehicle.CutoffDate.Date));
            }

            if (oResponseGetAmount.Amount > insertPaymentRequestDto.PaymentValue)
            {
                throw new BusinessExeption(string.Format(GeneralMessages.LowerPaymentValue, oResponseGetAmount.Vehicle.VehiclePlate, oResponseGetAmount.Amount));
            }


            AVehicleBase aVehicle = GetVehicleBase(oResponseGetAmount.Vehicle, (VehicleType)Enum.ToObject(typeof(VehicleType), oResponseGetAmount.Vehicle.VehicleType));

            return(aVehicle.InsertPayment(oResponseGetAmount, insertPaymentRequestDto.PaymentValue));
        }