lib/insales_api/order.rb in insales_api-0.1.3 vs lib/insales_api/order.rb in insales_api-0.2.0

- old
+ new

@@ -1,6 +1,7 @@ -# coding: utf-8 +# frozen_string_literal: true + module InsalesApi class Order < Base extend Resource::WithUpdatedSince def order_lines_attributes @@ -11,10 +12,14 @@ ol end end def to_xml(options = {}) - super(options.merge(methods: :order_lines_attributes)) + serialized_options = options.dup + if respond_to? :order_lines_attributes + serialized_options[:methods] = :order_lines_attributes + end + super(serialized_options) end def paid? financial_status == 'paid' end