Class: LucidIntercom::Events::ChangedPlan

Inherits:
Base
  • Object
show all
Defined in:
lib/lucid_intercom/events/changed_plan.rb

Instance Attribute Summary

Attributes inherited from Base

#credentials, #shop_attributes

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from LucidIntercom::Events::Base

Instance Method Details

#call(plan_name) ⇒ Object

Parameters:

  • plan_name (String, nil)

    e.g. ‘free’, or nil to unset



14
15
16
17
# File 'lib/lucid_intercom/events/changed_plan.rb', line 14

def call(plan_name)
  LucidIntercom::UpdateUser.new(shop_attributes, {plan: plan_name}, credentials).()
  LucidIntercom::SendEvent.new(shop_attributes, credentials).(event_name, (plan_name))
end