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
65 66 67 |
# File 'app/models/effective/event_registrant.rb', line 65 def last_first_name "#{last_name}, #{first_name}" end |
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action
78 79 80 81 82 83 84 85 86 87 |
# File 'app/models/effective/event_registrant.rb', line 78 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 |
#name ⇒ Object
61 62 63 |
# File 'app/models/effective/event_registrant.rb', line 61 def name "#{first_name} #{last_name}" end |
#qb_item_name ⇒ Object
73 74 75 |
# File 'app/models/effective/event_registrant.rb', line 73 def qb_item_name event_ticket.qb_item_name end |
#tax_exempt ⇒ Object
69 70 71 |
# File 'app/models/effective/event_registrant.rb', line 69 def tax_exempt event_ticket.tax_exempt end |
#title ⇒ Object
57 58 59 |
# File 'app/models/effective/event_registrant.rb', line 57 def title "#{event_ticket} - #{last_first_name}" end |
#to_s ⇒ Object
53 54 55 |
# File 'app/models/effective/event_registrant.rb', line 53 def to_s persisted? ? title : 'registrant' end |