Ejemplo n.º 1
0
        /// <summary>
        /// Activates a bonus for a user and a service
        /// </summary>
        /// <param name="userId">User id</param>
        /// <param name="activateBonusDto">Model for activating the bonus with a Service Id and a Promocode</param>
        /// <returns></returns>
        public async Task ActivateBonusAsync(Guid userId, ActivateBonusDto activateBonusDto)
        {
            var activatedBonus = new ActivatedBonus
            {
                UserId    = userId,
                ServiceId = activateBonusDto.ServiceId
            };

            await _servicesRepository.ActivateBonusAsync(activatedBonus);
        }