Class: Spree::ReimbursementPerformer

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/reimbursement_performer.rb

Class Method Summary collapse

Class Method Details

.perform(reimbursement) ⇒ Object

Actually perform the reimbursement



19
20
21
# File 'app/models/spree/reimbursement_performer.rb', line 19

def perform(reimbursement)
  execute(reimbursement, false)
end

.simulate(reimbursement) ⇒ 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)
  execute(reimbursement, true)
end