Class: PartyBuyingGroupHandler
- Inherits:
-
Object
- Object
- PartyBuyingGroupHandler
- Defined in:
- app/subscribers/party_buying_group_handler.rb
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/subscribers/party_buying_group_handler.rb', line 4 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 |