class MercadoPago::RefundAdvancedPayment

Attributes

payment_id[RW]

Public Class Methods

new(payment_id) click to toggle source
Calls superclass method MercadoPago::BaseAction::new
# File lib/mercado_pago/actions/refund_advanced_payment.rb, line 4
def initialize(payment_id)
  super()
  self.payment_id = payment_id
end

Private Instance Methods

find_payment() click to toggle source
# File lib/mercado_pago/actions/refund_advanced_payment.rb, line 16
def find_payment
  SearchAdvancedPayment.new(payment_id).run.advanced_payment
end
perform_action() click to toggle source
# File lib/mercado_pago/actions/refund_advanced_payment.rb, line 11
def perform_action
  rest_client.advanced_payments(payment_id).refunds.post
  find_payment
end