lib/pagarme/transaction.rb in pagarme-1.9.5 vs lib/pagarme/transaction.rb in pagarme-1.9.6

- old
+ new

@@ -14,11 +14,19 @@ def charge create end - def refund + def capture(params={}) + request = PagarMe::Request.new(self.url + '/capture', 'POST') + request.parameters.merge!(params) + response = request.run + update(response) + end + + def refund(params={}) request = PagarMe::Request.new(self.url + '/refund', 'POST') + request.parameters.merge!(params) response = request.run update(response) end end end