private void When(ClaimRequestAutoSubstantiatedEvent @event)
 {
     _id               = new Guid(@event.ClaimRequestId);
     _claimAmount      = @event.Amount.Dollars();
     _claimType        = @event.ClaimType;
     CurrentClaimState = ClaimRequestStateEnum.Substantiated;
 }
Example #2
0
 private void Handle(ClaimRequestAutoSubstantiatedEvent autoSubstantiatedEvent)
 {
     ClaimRequestId = new Guid(autoSubstantiatedEvent.ClaimRequestId);
     ParticipantId  = autoSubstantiatedEvent.ParticipantId;
     Bus.Publish(new DisburseClaim
     {
         ClaimId       = ClaimRequestId.ToString(),
         ParticipantId = ParticipantId,
     });
 }
Example #3
0
        private void RaiseClaimRequestAutoSubstantiatedEvent(SubmitClaimRequest command)
        {
            var claimAutoSubstantiated = new ClaimRequestAutoSubstantiatedEvent
            {
                Amount            = command.Amount,
                ClaimRequestId    = command.ClaimRequestId,
                ClaimType         = command.ClaimType,
                CompanyId         = command.CompanyId,
                DateOfTransaction = command.DateOfTransaction,
                ParticipantId     = command.ParticipantId,
                ProviderName      = command.ProviderName,
                Source            = command.Source,
            };

            ApplyEvent(claimAutoSubstantiated, @event => _state.Apply(@event));
        }