Sha256: e6a7b8c8a5d204835af233f729ab1ffa65d5a76fd2ee2f236e1818db1138f6b6
Contents?: true
Size: 839 Bytes
Versions: 29
Compression:
Stored size: 839 Bytes
Contents
module Spree module Api module V2 module Platform class PromotionActionsController < ResourceController include ::Spree::Api::V2::Platform::PromotionCalculatorParams private def model_class Spree::PromotionAction end def scope_includes [:promotion] end def spree_permitted_attributes conditional_params = action_name == 'update' ? [:id] : [] super + [{ promotion_action_line_items_attributes: Spree::PromotionActionLineItem.json_api_permitted_attributes.concat(conditional_params), calculator_attributes: Spree::Calculator.json_api_permitted_attributes.concat(conditional_params, calculator_params) }] end end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems