Sha256: af71ef71e0b1fbb32a3d8d23e628b233e50b06d59fa8b3858f716b7653579083

Contents?: true

Size: 374 Bytes

Versions: 9

Compression:

Stored size: 374 Bytes

Contents

module InsalesApi
  class Order < Base
    def order_lines_attributes
      @order_lines_attributes = []
      order_lines.each do |order_line|
        @order_lines_attributes << order_line.as_json['order_line']
      end
      @order_lines_attributes
    end

    def to_xml(options = {})
      super(options.merge({:methods => :order_lines_attributes}))
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
insales_api-0.0.13 lib/insales_api/order.rb
insales_api-0.0.10 lib/insales_api/resources/order.rb
insales_api-0.0.9 lib/insales_api/resources/order.rb
insales_api-0.0.8 lib/insales_api/resources/order.rb
insales_api-0.0.7 lib/insales_api/resources/order.rb
insales_api-0.0.6 lib/insales_api/resources/order.rb
insales_api-0.0.5 lib/insales_api/resources/order.rb
insales_api-0.0.4 lib/insales_api/resources/order.rb
insales_api-0.0.3 lib/insales_api/resources/order.rb