Module: ActsAsSubscribableBuyer::ClassMethods

Defined in:
app/models/concerns/acts_as_subscribable_buyer.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_subscribable_buyer?Boolean

Returns:

  • (Boolean)


22
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 22

def acts_as_subscribable_buyer?; true; end

#after_customer_subscription_created(&block) ⇒ Object



32
33
34
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 32

def after_customer_subscription_created(&block)
  send :define_method, :after_customer_subscription_created do |event| self.instance_exec(event, &block) end
end

#after_customer_subscription_deleted(&block) ⇒ Object



40
41
42
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 40

def after_customer_subscription_deleted(&block)
  send :define_method, :after_customer_subscription_deleted do |event| self.instance_exec(event, &block) end
end

#after_customer_subscription_updated(&block) ⇒ Object



36
37
38
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 36

def after_customer_subscription_updated(&block)
  send :define_method, :after_customer_subscription_updated do |event| self.instance_exec(event, &block) end
end

#after_customer_updated(&block) ⇒ Object



44
45
46
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 44

def after_customer_updated(&block)
  send :define_method, :after_customer_updated do |event| self.instance_exec(event, &block) end
end

#after_invoice_payment_failed(&block) ⇒ Object



28
29
30
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 28

def after_invoice_payment_failed(&block)
  send :define_method, :after_invoice_payment_failed do |event| self.instance_exec(event, &block) end
end

#after_invoice_payment_succeeded(&block) ⇒ Object



24
25
26
# File 'app/models/concerns/acts_as_subscribable_buyer.rb', line 24

def after_invoice_payment_succeeded(&block)
  send :define_method, :after_invoice_payment_succeeded do |event| self.instance_exec(event, &block) end
end