public GetRewardResponseDto GetAllReward() { var response = new GetRewardResponseDto(); if (!AppConfigReaderHelper.AppConfigToBool(AppSettingKeys.MockEnabled)) { response.Rewards = _iPmsLogic.GetAllReward(); } else { //mock data } return(response); }
public GetRewardResponseDto GetRewardById(int rewardId) { var response = new GetRewardResponseDto(); if (rewardId <= 0) { return(response); } var rewardResponseDto = GetAllReward(); if (rewardResponseDto == null || rewardResponseDto.Rewards == null || rewardResponseDto.Rewards.Count <= 0) { return(response); } response.Rewards = rewardResponseDto.Rewards.Where(x => x.Id.Equals(rewardId)).ToList(); return(response); }
public GetRewardResponseDto GetRewardByGuestId(int guestId) { if (guestId <= 0) { throw new PmsException("Invalid Guest Id."); } var response = new GetRewardResponseDto(); if (!AppConfigReaderHelper.AppConfigToBool(AppSettingKeys.MockEnabled)) { response.Rewards = _iPmsLogic.GetRewardByGuestId(guestId); } else { //mock data } return(response); }