lib/recurly/resource.rb in recurly-2.18.12 vs lib/recurly/resource.rb in recurly-2.18.13
- old
+ new
@@ -822,12 +822,12 @@
value = respond_to?(key) ? send(key) : self[key]
node = builder.add_element key
# Duck-typing here is problematic because of ActiveSupport's #to_xml.
case value
- when Resource, Subscription::AddOns
+ when Resource
value.to_xml options.merge(:builder => node)
- when Array
+ when Array, Subscription::AddOns
value.each do |e|
if e.is_a? Recurly::Resource
# create a node to hold this resource
e_node = node.add_element Helper.singularize(key)
# serialize the resource into this node