Module: ActsAsPurchasable::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#acts_as_purchasable?Boolean

Returns:

  • (Boolean)


96
# File 'app/models/concerns/acts_as_purchasable.rb', line 96

def acts_as_purchasable?; true; end

#after_decline(&block) ⇒ Object



118
119
120
# File 'app/models/concerns/acts_as_purchasable.rb', line 118

def after_decline(&block)
  send :define_method, :after_decline do |order, order_item| self.instance_exec(order, order_item, &block) end
end

#after_defer(&block) ⇒ Object



102
103
104
# File 'app/models/concerns/acts_as_purchasable.rb', line 102

def after_defer(&block)
  send :define_method, :after_defer do |order, order_item| self.instance_exec(order, order_item, &block) end
end

#after_purchase(&block) ⇒ Object



110
111
112
# File 'app/models/concerns/acts_as_purchasable.rb', line 110

def after_purchase(&block)
  send :define_method, :after_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end
end

#before_decline(&block) ⇒ Object



114
115
116
# File 'app/models/concerns/acts_as_purchasable.rb', line 114

def before_decline(&block)
  send :define_method, :before_decline do |order, order_item| self.instance_exec(order, order_item, &block) end
end

#before_defer(&block) ⇒ Object



98
99
100
# File 'app/models/concerns/acts_as_purchasable.rb', line 98

def before_defer(&block)
  send :define_method, :before_defer do |order, order_item| self.instance_exec(order, order_item, &block) end
end

#before_purchase(&block) ⇒ Object



106
107
108
# File 'app/models/concerns/acts_as_purchasable.rb', line 106

def before_purchase(&block)
  send :define_method, :before_purchase do |order, order_item| self.instance_exec(order, order_item, &block) end
end