public IActionResult InsertPayment(InsertPaymentRequestDto insertPaymentRequestDto)
        {
            IActionResult            oResponse;
            ResponseModel <object>   oResponseModel;
            CreateVehicleResponseDto oResult = residentPaymentsService.InsertPayment(insertPaymentRequestDto);

            oResponseModel = new ResponseModel <object>()
            {
                IsSuccess = oResult.Inserted,
                Messages  = oResult.Message,
                Result    = null
            };

            oResponse = Ok(oResponseModel);

            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));
        }