lib/pagarme/resources/balance_operation.rb in pagarme-2.2.0 vs lib/pagarme/resources/balance_operation.rb in pagarme-2.2.1
- old
+ new
@@ -1,13 +1,15 @@
module PagarMe
class BalanceOperation < PagarMeObject
def method_missing(name, *args, &block)
+ super name, *args, &block
+ rescue NameError
if @attributes['movement_object'] && @attributes['movement_object'].respond_to?(name)
- return movement_object.public_send(name, *args, &block)
+ return @attributes['movement_object'].public_send(name, *args, &block)
end
- super name, *args, &block
+ raise $!
end
class << self
def url(recipient_id = nil)
if recipient_id