Beispiel #1
0
        protected override async Task ProcessMessageAsync(BonusReceivedEvent msg)
        {
            var bonusCashIn = new BonusCashInDto
            {
                AssetSymbol         = msg.AssetSymbol,
                TransactionId       = msg.TransactionId,
                Timestamp           = msg.Timestamp,
                ExternalOperationId = msg.ExternalOperationId,
                CustomerId          = msg.CustomerId,
                LocationCode        = msg.LocationCode,
                BonusType           = msg.BonusType,
                Amount      = msg.Amount,
                CampaignId  = msg.CampaignId.ToString(),
                PartnerId   = msg.PartnerId,
                LocationId  = msg.LocationId,
                ConditionId = msg.ConditionId != Guid.Empty ? msg.ConditionId.ToString() : null,
                ReferralId  = !string.IsNullOrWhiteSpace(msg.ReferralId) && msg.ReferralId != Guid.Empty.ToString()
                    ? msg.ReferralId : null
            };

            await _operationsService.ProcessBonusReceivedEventAsync(bonusCashIn);

            _log.Info($"Processed bonus cash in event", msg);
        }