Class: Spree::ReimbursementPerformer
- Inherits:
-
Object
- Object
- Spree::ReimbursementPerformer
- Defined in:
- app/models/spree/reimbursement_performer.rb
Class Method Summary collapse
-
.perform(reimbursement, created_by:) ⇒ Object
Actually perform the reimbursement.
-
.simulate(reimbursement, created_by:) ⇒ Object
Simulate performing the reimbursement without actually saving anything or refunding money, etc.
Class Method Details
.perform(reimbursement, created_by:) ⇒ Object
Actually perform the reimbursement
19 20 21 |
# File 'app/models/spree/reimbursement_performer.rb', line 19 def perform(reimbursement, created_by:) execute(reimbursement, false, created_by:) end |
.simulate(reimbursement, created_by:) ⇒ Object
Simulate performing the reimbursement without actually saving anything or refunding money, etc. This must return an array of objects that respond to the following methods:
-
#description
-
#display_amount
so they can be displayed in the Admin UI appropriately.
14 15 16 |
# File 'app/models/spree/reimbursement_performer.rb', line 14 def simulate(reimbursement, created_by:) execute(reimbursement, true, created_by:) end |