Class: Effective::EventRegistrant
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::EventRegistrant
- Defined in:
- app/models/effective/event_registrant.rb
Instance Method Summary collapse
- #last_first_name ⇒ Object
-
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action.
- #name ⇒ Object
- #qb_item_name ⇒ Object
- #tax_exempt ⇒ Object
- #title ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#last_first_name ⇒ Object
71 72 73 |
# File 'app/models/effective/event_registrant.rb', line 71 def last_first_name "#{last_name}, #{first_name}" end |
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action
84 85 86 87 88 89 90 91 92 93 |
# File 'app/models/effective/event_registrant.rb', line 84 def mark_paid! raise('expected a blank event registration') if event_registration.present? save! order = Effective::Order.new(items: self, user: owner) order.mark_as_purchased! true end |
#name ⇒ Object
67 68 69 |
# File 'app/models/effective/event_registrant.rb', line 67 def name "#{first_name} #{last_name}" end |
#qb_item_name ⇒ Object
79 80 81 |
# File 'app/models/effective/event_registrant.rb', line 79 def qb_item_name event_ticket&.qb_item_name end |
#tax_exempt ⇒ Object
75 76 77 |
# File 'app/models/effective/event_registrant.rb', line 75 def tax_exempt event_ticket&.tax_exempt end |
#title ⇒ Object
63 64 65 |
# File 'app/models/effective/event_registrant.rb', line 63 def title "#{event_ticket} - #{last_first_name}" end |
#to_s ⇒ Object
59 60 61 |
# File 'app/models/effective/event_registrant.rb', line 59 def to_s persisted? ? title : 'registrant' end |