lib/gateway/requests/common_request.rb in gateway-sdk-1.0.3 vs lib/gateway/requests/common_request.rb in gateway-sdk-1.0.4
- old
+ new
@@ -13,13 +13,17 @@
# @return [Hash]
#
def attributes
hash = {}
instance_variables.each do |attr|
- hash[attr[1..-1]] = instance_variable_get attr
+ value = instance_variable_get attr
+ if value.is_a? Gateway::Requests::CommonRequest
+ hash[attr[1..-1]] = value.attributes
+ else
+ hash[attr[1..-1]] = value
+ end
end
hash
end
-
end
end
end
\ No newline at end of file