Class: PaymentRecipes::PayPal::REST::Action::RefundCapture
- Inherits:
-
Utils::Action
- Object
- Utils::Action
- PaymentRecipes::PayPal::REST::Action::RefundCapture
- Defined in:
- lib/payment_recipes/paypal/rest/action/refund_capture.rb
Instance Method Summary collapse
Methods inherited from Utils::Action
#debug, debug, #ensure_presence, #execute, #failure?, #get, #initialize, #make_instance_variables_available, prepare, rules, #set, #store, #stored_variables, #success?, variable
Constructor Details
This class inherits a constructor from PaymentRecipes::Utils::Action
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/payment_recipes/paypal/rest/action/refund_capture.rb', line 8 def perform if @capture.can_be_refunded? @capture.raw_capture.refund({}) @capture.reload! @capture.reload_payment! else raise Exception, "Capture can't be refunded" end @capture end |