lib/recurly/resource.rb in recurly-2.2.0 vs lib/recurly/resource.rb in recurly-2.2.1

- old
+ new

@@ -415,10 +415,15 @@ :method => :get, :href => href.value } end else - record[el.name] = XML.cast el + val = XML.cast(el) + if 'address' == el.name && val.kind_of?(Hash) + record[el.name] = Address.new val + else + record[el.name] = val + end end end record.persist! if record.respond_to? :persist! record