WealthFit.Campaigns.AvailableOffers.Defaults (Peacemaker v3.3.5-rc.7) View Source

This module contains the default event handler behaviours that are commonly used throughout the wealthfit system. The current available event handlers can be found in WealthFit.Campaigns.EventHandlerDefinitions

This module is meant to be used when defining the implementation for a given campaign's dispatcher.

Example:

defimpl WealthFit.Campaigns.AvailableOffers, for: WealthFit.Campaigns.FreeAccountCampaign  do
  use WealthFit.Campaigns.AvailableOffers.Defaults

  # We are able to overrun the optin event for specific
  # campaigns in case any campaign specific requirements
  # arise.

  def run(%{_event_handler: :optin} = params) do
    require IEx
    IEx.pry()
  end
end