lib/pagarme/subscription.rb in pagarme-1.7 vs lib/pagarme/subscription.rb in pagarme-1.8

- old
+ new

@@ -28,15 +28,17 @@ response = request.run update(response) end def charge(amount) - request = PagarMe::Request.new(self.url, 'POST') + request = PagarMe::Request.new(self.url + '/transactions', 'POST') request.parameters = { :amount => amount, } response = request.run - update(response) + + request = PagarMe::Request.new(self.url, 'GET') + update(request.run) end end end