lib/recurly/schema/json_parser.rb in recurly-3.2.1 vs lib/recurly/schema/json_parser.rb in recurly-3.2.2
- old
+ new
@@ -25,13 +25,13 @@
#
# @param data [Hash] The parsed JSON data
# @return [Error,Resource]
def self.from_json(data)
type = if data.has_key?("error")
- "error_may_have_transaction"
- else
- data["object"]
- end
+ "error_may_have_transaction"
+ else
+ data["object"]
+ end
klazz = self.recurly_class(type)
unless klazz
raise ArgumentError, "Unknown resource for json type #{type}"
end