lib/razorpay/payment.rb in razorpay-1.2.1 vs lib/razorpay/payment.rb in razorpay-2.0.0
- old
+ new
@@ -17,20 +17,23 @@
def self.all(options = {})
request.all options
end
+ def self.capture(id, options)
+ request.post "#{id}/capture", options
+ end
+
def refund(options = {})
self.class.request.post "#{id}/refund", options
end
- def refunds
- # This needs to be a string, not a symbol
- Refund.new('payment_id' => id)
- end
-
def capture(options)
self.class.request.post "#{id}/capture", options
+ end
+
+ def refunds
+ self.class.request.get "#{id}/refunds"
end
def method
method_missing(:method)
end