Class: Pay::FakeProcessor::Charge

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Charge

#amount_refunded_with_currency, #amount_with_currency, #charged_to, find_by_processor_and_id, #full_refund?, #partial_refund?, #refunded?, #sync!

Class Method Details

.sync(processor_id) ⇒ Object



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

def self.sync(processor_id)
  true
end

Instance Method Details

#api_recordObject



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

def api_record
  self
end

#refund!(amount_to_refund = nil) ⇒ Object



12
13
14
# File 'app/models/pay/fake_processor/charge.rb', line 12

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