lib/balanced/resources/credit.rb in balanced-1.0.1 vs lib/balanced/resources/credit.rb in balanced-1.0.2
- old
+ new
@@ -11,17 +11,12 @@
include Balanced::HypermediaRegistry
define_hypermedia_types [:credits]
def reverse(options={})
- amount = options[:amount]
- description = options[:description]
+ options[:href] = self.reversals.href
- reversal = Reversal.new(
- :href => self.reversals.href,
- :amount => amount,
- :description => description
- )
+ reversal = Reversal.new(options)
reversal.save
end
end
end