Class: PartyBuyingGroupHandler
- Inherits:
-
Object
- Object
- PartyBuyingGroupHandler
- Defined in:
- app/subscribers/party_buying_group_handler.rb
Overview
Pub/sub subscriber: party buying group handler.
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/subscribers/party_buying_group_handler.rb', line 5 def call(event) party = Party.find_by(id: event.data[:party_id]) return unless party context = Campaign::DripContext.new( party:, buying_group_id_added: event.data[:buying_group_id_added], buying_group_id_removed: event.data[:buying_group_id_removed] ) Campaign::AssignDripCampaigns.new.process(context) end |