Class: Effective::Stamp
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Stamp
- Defined in:
- app/models/effective/stamp.rb
Instance Method Summary collapse
-
#mark_as_issued! ⇒ Object
Admin action.
-
#mark_as_submitted! ⇒ Object
Admin action.
-
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action.
-
#submit! ⇒ Object
Called by a stamp wizard, applicant or fee payment when submitted.
- #to_s ⇒ Object
Instance Method Details
#mark_as_issued! ⇒ Object
Admin action
81 82 83 |
# File 'app/models/effective/stamp.rb', line 81 def mark_as_issued! issued! end |
#mark_as_submitted! ⇒ Object
Admin action
76 77 78 |
# File 'app/models/effective/stamp.rb', line 76 def mark_as_submitted! submitted! end |
#mark_paid! ⇒ Object
This is the Admin Save and Mark Paid action
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'app/models/effective/stamp.rb', line 86 def mark_paid! category = owner&.membership&.category assign_attributes( price: (category&.stamp_fee || 0), tax_exempt: (category&.stamp_fee_tax_exempt || false), qb_item_name: (category&.stamp_fee_qb_item_name || 'Professional Stamp') ) submit! Effective::Order.new(items: self, user: owner).mark_as_purchased! true end |
#submit! ⇒ Object
Called by a stamp wizard, applicant or fee payment when submitted
71 72 73 |
# File 'app/models/effective/stamp.rb', line 71 def submit! submitted! end |
#to_s ⇒ Object
66 67 68 |
# File 'app/models/effective/stamp.rb', line 66 def to_s [model_name.human, name.presence, category.presence].compact.join(' - ') end |