Sha256: 70af3e01ac8c1ef27793732156fe78ec022ce9d190a0b3c4ebbe082bc1413c7b
Contents?: true
Size: 608 Bytes
Versions: 29
Compression:
Stored size: 608 Bytes
Contents
module Spree module Api module V2 module Platform class PromotionActionSerializer < BaseSerializer include ResourceSerializerConcern belongs_to :promotion # Some promotion actions have a :calculator, while others do not. has_one :calculator, if: proc { |record| record.respond_to?(:calculator) } # Only the CreateLineItems promotion action uses :promotion_action_line_items. has_many :promotion_action_line_items, if: proc { |record| record.respond_to?(:promotion_action_line_items) } end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems