Class: Pay::FakeProcessor::Charge
- Inherits:
-
Object
- Object
- Pay::FakeProcessor::Charge
- Defined in:
- lib/pay/fake_processor/charge.rb
Instance Attribute Summary collapse
-
#pay_charge ⇒ Object
readonly
Returns the value of attribute pay_charge.
Instance Method Summary collapse
- #charge ⇒ Object
-
#initialize(pay_charge) ⇒ Charge
constructor
A new instance of Charge.
- #refund!(amount_to_refund) ⇒ Object
Constructor Details
#initialize(pay_charge) ⇒ Charge
Returns a new instance of Charge.
8 9 10 |
# File 'lib/pay/fake_processor/charge.rb', line 8 def initialize(pay_charge) @pay_charge = pay_charge end |
Instance Attribute Details
#pay_charge ⇒ Object (readonly)
Returns the value of attribute pay_charge.
4 5 6 |
# File 'lib/pay/fake_processor/charge.rb', line 4 def pay_charge @pay_charge end |
Instance Method Details
#charge ⇒ Object
12 13 14 |
# File 'lib/pay/fake_processor/charge.rb', line 12 def charge pay_charge end |
#refund!(amount_to_refund) ⇒ Object
16 17 18 |
# File 'lib/pay/fake_processor/charge.rb', line 16 def refund!(amount_to_refund) pay_charge.update(amount_refunded: amount_to_refund) end |