Sha256: 75774a73f6de22d5db239e33c7a7c96dbe0e1f8e065d495652748172a71cd5bf

Contents?: true

Size: 374 Bytes

Versions: 8

Compression:

Stored size: 374 Bytes

Contents

module Spree
  class LineItemSerializer < Spree::BaseSerializer
    attributes :id, :quantity, :variant_id, :order_id, :currency, :cost_price,
               :adjustment_total, :additional_tax_total, :price

    %w(amount total).each do |money_method|
      attributes money_method, "display_#{money_method}"
    end

    belongs_to :order
    belongs_to :variant
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
solidus_json_api-0.3.1 app/serializers/spree/line_item_serializer.rb
solidus_json_api-0.3.0 app/serializers/spree/line_item_serializer.rb
spree_api_v2-0.2.2 app/serializers/spree/line_item_serializer.rb
solidus_api_v2-0.2.2 app/serializers/spree/line_item_serializer.rb
solidus_api_v2-0.2.1 app/serializers/spree/line_item_serializer.rb
spree_api_v2-0.2.1 app/serializers/spree/line_item_serializer.rb
spree_api_v2-0.2.0 app/serializers/spree/line_item_serializer.rb
solidus_api_v2-0.2.0 app/serializers/spree/line_item_serializer.rb