Class: ApplicationEvent
- Inherits:
-
RubyEventStore::Event
- Object
- RubyEventStore::Event
- ApplicationEvent
- Defined in:
- app/events/application_event.rb
Overview
Base class for all domain events in this application.
JSON serialization (used by RailsEventStore::JSONClient) converts symbol keys
to strings on round-trip: { party_id: 1 } → stored as "party_id":1 → loaded
as { "party_id" => 1 }. Handlers throughout the app access data with symbol
keys (event.data[:party_id]), so we wrap the deserialized hash in
HashWithIndifferentAccess so both forms always work.
Direct Known Subclasses
Events::AccountInvited, Events::ActivityCreated, Events::ActivityUpdated, Events::AmazonBuyBoxChanged, Events::ArticlePublished, Events::ArticleUnpublished, Events::AssistantMessageCompleted, Events::BuyingGroupChanged, Events::ContactPointAdded, Events::ContactPointPhoneChanged, Events::ContentEmbeddingRequired, Events::CustomerProfileChanged, Events::CustomerSourceChanged, Events::DeliveryArrivedAtWarehouse, Events::DeliveryAutomaticReleaseFailed, Events::DeliveryAutomaticallyReleased, Events::DeliveryInvoiced, Events::DeliveryLabelComplete, Events::DeliveryManualReleaseDue, Events::DeliveryPrePackCancelled, Events::DeliveryPrePacked, Events::DeliveryReadyForLabeling, Events::DeliveryShipped, Events::DiscountLevelChanged, Events::EmailTemplateBodyV4Changed, Events::EmailUnsubscribed, Events::EmployeeSignedIn, Events::InvoiceCreated, Events::ItemShippingDimensionsChanged, Events::KitComponentChanged, Events::LocationChanged, Events::OpportunityFollowedUp, Events::OrderAcknowledged, Events::OrderBackOrdered, Events::OrderCancelled, Events::OrderCrHoldReleaseStarted, Events::OrderInvoiced, Events::OutletPurchaseRejected, Events::OutletPurchaseVerified, Events::PostContentUpdated, Events::PriceUpdated, Events::ProblematicDeliveryDetected, Events::ProductInterestChanged, Events::PublicationPdfChanged, Events::PublicationUpdated, Events::QuoteCompleted, Events::RetailerProbeCompleted, Events::RmaCreated, Events::RmaItemsAdded, Events::RmaReceived, Events::ShipmentFirstCarrierScan, Events::ShowcaseUnpublished, Events::SitemapRegenerated, Events::SmsSendFailed, Events::SupportCaseClosed
Instance Method Summary collapse
-
#data ⇒ ActiveSupport::HashWithIndifferentAccess
The event payload, with indifferent access so symbol and string keys both work.
Instance Method Details
#data ⇒ ActiveSupport::HashWithIndifferentAccess
The event payload, with indifferent access so symbol and string keys both work.
16 17 18 |
# File 'app/events/application_event.rb', line 16 def data ActiveSupport::HashWithIndifferentAccess.new(super) end |