Class: Pay::FakeProcessor::Charge

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

Class Method Summary collapse

Instance Method Summary collapse

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