Sha256: 8e95b46b18740ab8ac0a856190c5a09011c4dd7b2154444a699227abcc45d8ef
Contents?: true
Size: 1013 Bytes
Versions: 37
Compression:
Stored size: 1013 Bytes
Contents
module Spree module V2 module Storefront class ProductSerializer < BaseSerializer set_type :product attributes :name, :description, :price, :currency, :display_price, :available_on, :slug, :meta_description, :meta_keywords, :updated_at attribute :purchasable, &:purchasable? attribute :in_stock, &:in_stock? attribute :backorderable, &:backorderable? has_many :variants has_many :option_types has_many :product_properties has_many :taxons # all images from all variants has_many :images, object_method_name: :variant_images, id_method_name: :variant_image_ids, record_type: :image, serializer: :image has_one :default_variant, object_method_name: :default_variant, id_method_name: :default_variant_id, record_type: :variant, serializer: :variant end end end end
Version data entries
37 entries across 37 versions & 1 rubygems