Example #1
0
        public GetAllVouchersResponse GetAll()
        {
            var response = new GetAllVouchersResponse();

            var getAllVouchersResponse = _voucherRepository.GetAllVouchers();

            if (getAllVouchersResponse.HasError)
            {
                response.AddError(getAllVouchersResponse.Error);
                return(response);
            }

            response.VoucherDetails = getAllVouchersResponse.VoucherDetails;
            return(response);
        }