Sha256: 4684af27082fd188ed3b632a036e0e9234c1846bbf4eb529e5c2a6a0031d04a9

Contents?: true

Size: 736 Bytes

Versions: 29

Compression:

Stored size: 736 Bytes

Contents

module Spree
  module V2
    module Storefront
      class WishedItemSerializer < BaseSerializer
        set_type :wished_item

        attributes :quantity

        attribute :price do |wished_item, params|
          wished_item.price(currency: params[:currency])
        end

        attribute :total do |wished_item, params|
          wished_item.total(currency: params[:currency])
        end

        attribute :display_price do |wished_item, params|
          wished_item.display_price(currency: params[:currency]).to_s
        end

        attribute :display_total do |wished_item, params|
          wished_item.display_total(currency: params[:currency]).to_s
        end

        belongs_to :variant
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
spree_api-4.10.1 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.10.0 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.9.0 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.8.3 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.8.2 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.7.3 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.6 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.5.5 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.4.1 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.5.4 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.5 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.7.2 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.7.1 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.4 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.7.0 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.3 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.2 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.1 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.6.0 app/serializers/spree/v2/storefront/wished_item_serializer.rb
spree_api-4.5.3 app/serializers/spree/v2/storefront/wished_item_serializer.rb