Class: Spree::CreditCards::Destroy

Inherits:
Object
  • Object
show all
Includes:
ServiceModule::Base
Defined in:
app/services/spree/credit_cards/destroy.rb

Instance Method Summary collapse

Methods included from ServiceModule::Base

prepended

Instance Method Details

#call(card:) ⇒ Object



6
7
8
9
10
11
12
# File 'app/services/spree/credit_cards/destroy.rb', line 6

def call(card:)
  ApplicationRecord.transaction do
    run :invalidate_payments
    run :void_payments
    run :destroy
  end
end