Class: Pay::FakeProcessor::Charge

Inherits:
Charge show all
Defined in:
app/models/pay/fake_processor/charge.rb

Instance Method Summary collapse

Methods inherited from Charge

#amount_refunded_with_currency, #amount_with_currency, #captured?, #charged_to, find_by_processor_and_id, #full_refund?, #line_items, #partial_refund?, #refunded?

Instance Method Details

#api_recordObject



4
5
6
# File 'app/models/pay/fake_processor/charge.rb', line 4

def api_record
  self
end

#refund!(amount_to_refund = nil) ⇒ Object



8
9
10
# File 'app/models/pay/fake_processor/charge.rb', line 8

def refund!(amount_to_refund = nil)
  update(amount_refunded: amount_to_refund || amount)
end