Class: Effective::EventAddon
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::EventAddon
- Defined in:
- app/models/effective/event_addon.rb
Instance Method Summary collapse
-
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action.
- #qb_item_name ⇒ Object
- #tax_exempt ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action
59 60 61 62 63 64 65 66 67 68 |
# File 'app/models/effective/event_addon.rb', line 59 def mark_paid! raise('expected a blank event registration') if event_registration.present? save! order = Effective::Order.new(items: self, user: owner) order.purchase!(skip_buyer_validations: true, email: false) true end |
#qb_item_name ⇒ Object
54 55 56 |
# File 'app/models/effective/event_addon.rb', line 54 def qb_item_name event_product.qb_item_name end |
#tax_exempt ⇒ Object
50 51 52 |
# File 'app/models/effective/event_addon.rb', line 50 def tax_exempt event_product.tax_exempt end |
#to_s ⇒ Object
46 47 48 |
# File 'app/models/effective/event_addon.rb', line 46 def to_s persisted? ? event_product.to_s : 'product' end |