Sha256: 36f7d01251216cd2389da349cc32550857da935cd19677c8a8c3c83a12ad9a8d

Contents?: true

Size: 549 Bytes

Versions: 53

Compression:

Stored size: 549 Bytes

Contents

module Spree
  module V2
    module Storefront
      class VariantSerializer < BaseSerializer
        set_type :variant

        attributes :name, :sku, :price, :currency, :display_price, :weight, :height,
                   :width, :depth, :is_master, :options_text, :slug, :description

        attribute :purchasable,   &:purchasable?
        attribute :in_stock,      &:in_stock?
        attribute :backorderable, &:backorderable?

        belongs_to :product
        has_many :images
        has_many :option_values
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
spree_api-4.0.9 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.15 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.14 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.8 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-3.7.14.1 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.13.1 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.7.1 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.7 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-3.7.14 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.13 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.6 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-3.7.13 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.5 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.12 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-3.7.12 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.0.4 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-3.7.11 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.11 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.10 app/serializers/spree/v2/storefront/variant_serializer.rb
spree_api-4.1.9 app/serializers/spree/v2/storefront/variant_serializer.rb