Class: Spree::ReimbursementPerformer

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

Class Method Summary (collapse)

Class Method Details

+ (Object) perform(reimbursement)

Actually perform the reimbursement



17
18
19
# File 'app/models/spree/reimbursement_performer.rb', line 17

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

+ (Object) simulate(reimbursement)

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.



12
13
14
# File 'app/models/spree/reimbursement_performer.rb', line 12

def simulate(reimbursement)
  execute(reimbursement, true)
end