Sha256: 6a39ea82f90239ec0f9d700c6aa2929223e0d7d5e9875c7e473d964f702b28f4
Contents?: true
Size: 1.45 KB
Versions: 29
Compression:
Stored size: 1.45 KB
Contents
module Spree module Api module V2 module Platform class VariantSerializer < BaseSerializer include ResourceSerializerConcern include DisplayMoneyHelper attributes :name, :options_text, :total_on_hand attribute :purchasable do |product| product.purchasable? end attribute :in_stock do |product| product.in_stock? end attribute :backorderable do |product| product.backorderable? end attribute :available do |product| product.available? end attribute :currency do |_product, params| params[:currency] end attribute :price do |object, params| price(object, params[:currency]) end attribute :display_price do |object, params| display_price(object, params[:currency]) end attribute :compare_at_price do |object, params| compare_at_price(object, params[:currency]) end attribute :display_compare_at_price do |object, params| display_compare_at_price(object, params[:currency]) end belongs_to :product belongs_to :tax_category has_many :digitals has_many :images has_many :option_values has_many :stock_items has_many :stock_locations end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems